A semantic rectification method, device and equipment for a city monitoring network
By constructing a semantic relationship graph and self-supervised learning, combined with graph neural networks for information propagation and feature aggregation, the accuracy and intelligence issues of device location correction in urban monitoring networks are solved, and the effective integration of functional semantic information and spatial information and spatiotemporal consistency constraints are achieved.
Patent Information
- Application Number
- CN202611272482.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-03
AI Technical Summary
Existing technologies struggle to integrate functional semantic information from device data into urban surveillance networks, resulting in location correction relying on manual annotation and lacking semantic guidance. Consequently, global collaborative correction under semantic guidance and spatiotemporal consistency constraints cannot be achieved.
By extracting structured semantic units from device metadata and operation and maintenance logs, a semantic relationship graph is constructed. Combined with self-supervised learning and graph neural networks, device feature vectors carrying spatiotemporal consistency features are generated. A composite graph structure is constructed for information propagation and feature aggregation, and finally the location information of the correction device is decoded.
It improves the accuracy and intelligence of equipment position correction, solves the dependence on manually labeled data, and realizes the effective integration of functional semantic information and spatial information and spatiotemporal joint modeling.
Smart Images

Figure CN123030930A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer software technology, and in particular to a semantic correction method, apparatus and device for urban monitoring networks. Background Technology
[0002] Currently, the number of devices in urban monitoring networks has surged. Construction errors and operational drift have led to a general deviation between the recorded location and the actual location, creating an urgent need for intelligent location correction methods.
[0003] Currently, point cloud registration-based methods are commonly used for coordinate transformation and alignment, or target detection methods based on fixed network structures are used to extract visual features for localization. Some solutions introduce self-attention mechanisms to model local and global features to optimize detection accuracy.
[0004] The main drawbacks of the above technical solutions are: they are difficult to integrate functional semantic information into the device data, they rely on manually labeled data, and they cannot achieve global collaborative correction under semantic guidance and spatiotemporal consistency constraints. Summary of the Invention
[0005] This application provides a semantic correction method, device, and equipment for urban monitoring networks. By integrating semantic information and self-supervised spatiotemporal joint modeling, it addresses the problems of relying on manual annotation and lacking semantic guidance, thereby improving the accuracy and intelligence level of device position correction.
[0006] In a first aspect, embodiments of this application provide a semantic correction method for urban surveillance networks, the method comprising: Structured semantic units are extracted from device metadata and operation and maintenance logs in the urban monitoring network to construct a semantic relationship graph representing the functional relationship between monitoring devices and geographic entities based on the structured semantic units; wherein, the structured semantic units include monitoring devices, functional actions, and geographic entities; The monitoring device nodes in the semantic relationship graph are taken as the objects to be processed. The spatial location relationship and time series data of the monitoring device nodes are jointly modeled through self-supervised learning to learn the spatiotemporal distribution pattern of the monitoring device nodes in the urban monitoring network and generate device feature vectors carrying spatiotemporal consistency features. The semantic relationship graph is fused with the spatial adjacency relationship between monitoring device nodes to construct a composite graph structure that integrates semantic relationships and spatial adjacency relationships; The device feature vector is used as the initial feature vector of each node in the composite graph structure. Information propagation and feature aggregation are performed on the composite graph structure through a graph neural network to generate an updated feature vector of each node that integrates semantic information and spatial adjacency relationship. The updated feature vectors of each device node are input into the coordinate decoder to obtain the position information of the correction device corresponding to each device node.
[0007] Secondly, embodiments of this application also provide a semantic correction device for urban surveillance networks, the device comprising: The network data acquisition module is used to extract structured semantic units from device metadata and operation and maintenance logs in the urban monitoring network, so as to construct a semantic relationship graph representing the functional relationship between monitoring devices and geographic entities based on the structured semantic units; wherein, the structured semantic units include monitoring devices, functional actions and geographic entities; The device feature determination module is used to take the monitoring device nodes in the semantic relationship graph as the objects to be processed, and to jointly model the spatial location relationship and time series data of the monitoring device nodes through self-supervised learning, so as to learn the spatiotemporal distribution pattern of the monitoring device nodes in the urban monitoring network and generate device feature vectors carrying spatiotemporal consistency features. The composite graph structure construction module is used to fuse the semantic relationship graph with the spatial adjacency relationship between monitoring device nodes to construct a composite graph structure that integrates semantic relationships and spatial adjacency relationships; The updated feature determination module is used to take the device feature vector as the initial feature vector of each node in the composite graph structure, and to perform information propagation and feature aggregation on the composite graph structure through a graph neural network to generate an updated feature vector of each node that integrates semantic information and spatial adjacency relationship. The device position correction module is used to input the updated feature vector of each device node into the coordinate decoder to decode and obtain the correction device position information corresponding to each device node.
[0008] Thirdly, embodiments of this application also provide an electronic device, which includes: One or more processors; Storage device for storing one or more programs. When one or more programs are executed by one or more processors, the one or more processors implement a semantic correction method for urban surveillance networks as described in any of the embodiments of this application.
[0009] Fourthly, embodiments of this application also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a semantic correction method for urban monitoring networks as described in any of the embodiments of this application.
[0010] This application provides a semantic correction method for urban monitoring networks. It extracts structured semantic units from device metadata and operation logs within the urban monitoring network, and constructs a semantic relationship graph representing the functional relationships between monitoring devices and geographic entities based on these structured semantic units. The structured semantic units include monitoring devices, functional actions, and geographic entities. Then, the monitoring device nodes in the semantic relationship graph are treated as objects to be processed. A self-supervised learning approach is used to jointly model the spatial location relationships and time-series data of the monitoring device nodes to learn the spatiotemporal distribution patterns of the monitoring device nodes in the urban monitoring network, generating device feature vectors carrying spatiotemporal consistency characteristics. Furthermore, the semantic relationship graph and the spatial adjacency relationships between the monitoring device nodes are fused to construct a composite graph structure that integrates semantic relationships and spatial adjacency relationships. The device feature vectors are then used as the initial feature vectors for each node in the composite graph structure. A graph neural network is used to perform information propagation and feature aggregation on the composite graph structure, generating updated feature vectors for each node that integrate semantic information and spatial adjacency relationships. Finally, the updated feature vectors of each device node are input into a coordinate decoder to decode and obtain the location information of the correction device corresponding to each device node. The technical solution of this application achieves effective integration of functional semantic information and spatial information by extracting structured semantic units to construct a semantic relationship graph; it generates device feature vectors carrying spatiotemporal consistency features by jointly modeling spatial location relationships and time series data through self-supervised learning, thus solving the problem of excessive reliance on manually labeled data; and it solves the problem of existing methods being unable to integrate semantic information and lacking spatiotemporal joint modeling capabilities by constructing a composite graph structure and using graph neural networks for information propagation and feature aggregation, thereby improving the accuracy and intelligence level of device position correction. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the exemplary embodiments of this application, the accompanying drawings used in describing the embodiments are briefly introduced below. Obviously, the accompanying drawings described are only a portion of the embodiments to be described in this application, and not all of them. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort.
[0012] Figure 1 A flowchart illustrating a semantic correction method for urban surveillance networks provided in an embodiment of this application; Figure 2 A flowchart illustrating another semantic correction method for urban surveillance networks provided in this application embodiment; Figure 3 A flowchart illustrating another semantic correction method for urban surveillance networks provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of a semantic correction device for urban monitoring networks provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0013] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.
[0014] Before introducing the technical solution provided in this application, the application scenarios of the solution can be described first. This embodiment is applicable to various scenarios that require intelligent correction of the position of devices in urban monitoring networks. Currently, although coordinate transformation methods based on point cloud registration or target detection methods based on fixed network structures are widely used in device positioning and position correction, traditional methods have obvious limitations. In practical applications, due to the characteristics of urban monitoring networks such as a large number of devices, ambiguous semantic relationships, complex spatial layout, and high data annotation costs, and the need for the correction process to take into account multiple constraints such as device functional semantics and spatiotemporal distribution patterns, traditional correction methods are difficult to achieve coordinated optimization of semantic guidance and spatiotemporal consistency at the global level, which easily leads to problems such as low correction accuracy, excessive reliance on manual annotation, and inability to adapt to complex scene changes. Therefore, there is an urgent need for a correction method that can integrate device functional semantic information and learn spatiotemporal distribution patterns to improve the global optimization quality and intelligence level of the correction solution.
[0015] Example 1 Figure 1 This is a flowchart illustrating a semantic correction method for urban surveillance networks provided in an embodiment of this application. This embodiment is applicable to various situations requiring intelligent correction of device locations in urban surveillance networks. The method can be executed by a semantic correction device for urban surveillance networks, which can be implemented in the form of software and / or hardware. The hardware can be a controller, such as a mobile terminal, PC, or server.
[0016] like Figure 1 As shown, the semantic correction method for urban surveillance networks provided in this embodiment of the invention includes the following steps: S110. Extract structured semantic units from device metadata and operation and maintenance logs in the urban monitoring network, and construct a semantic relationship map based on the structured semantic units to represent the functional relationship between monitoring devices and geographic entities.
[0017] Urban surveillance networks refer to Internet of Things (IoT) systems comprised of surveillance equipment deployed within urban spaces for data collection and target perception. Device metadata refers to the static attribute information of surveillance equipment stored in structured form, including device identifier, installation location, and device type. Maintenance logs refer to the maintenance records and operational status information of surveillance equipment recorded in unstructured text format.
[0018] The structured semantic unit refers to the data structure extracted from device metadata and operation and maintenance logs, used to express the functional relationship between devices and the geographic environment. This data structure includes three elements: monitoring equipment, functional actions, and geographic entities. Monitoring equipment refers to hardware units with data acquisition capabilities in the urban monitoring network. Functional actions refer to predicate verbs extracted from operation and maintenance log text, used to express the dynamic association between monitoring equipment and geographic entities. These predicate verbs describe the monitoring or coverage actions performed by the monitoring equipment on the geographic entities. Geographic entities refer to physical spatial areas or geographic objects in the urban monitoring network that serve as monitoring targets.
[0019] Among them, semantic relationship graph refers to graph structure data constructed with monitoring equipment and geographical entities as nodes and functional actions as edges, used to express the functional relationship between equipment and targets.
[0020] Specifically, information can be extracted from the device metadata and operation and maintenance logs in the urban monitoring network. The monitoring device can be identified from the device metadata, and the geographic entity that the monitoring device acts on and the functional actions that connect the monitoring device and the geographic entity can be identified from the operation and maintenance logs. The same monitoring device, the corresponding functional action and the geographic entity to which the functional action points are combined into a structured semantic unit. Then, the monitoring device in each structured semantic unit is used as a node, the geographic entity as another node and the functional action as an edge connecting the two nodes. All structured semantic units are mapped into a set of nodes and edges in the above manner, and finally a semantic relationship graph is formed to express the functional association between the monitoring device and the geographic entity through functional actions.
[0021] For example, suppose we obtain the text "Camera A monitors intersection B" from the operation and maintenance logs of a city surveillance network. First, we analyze this text, identifying the subject as "Camera A," which corresponds to the monitoring device in the definition; the predicate verb as "monitor," which corresponds to the functional action in the definition; and the object as "intersection B," which corresponds to the geographical entity in the definition. Then, we combine the three identified elements "Camera A," "monitor," and "intersection B" to form a structured semantic unit. This unit expresses the semantic relationship of "Camera A" performing the functional action of "monitoring" on "intersection B." Finally, we construct a semantic relationship graph based on this structured semantic unit: with "Camera A" as one node, "intersection B" as another node, and "monitor" as the directed edge connecting these two nodes. Repeat the above process to map all similar structured semantic units extracted from device metadata and operation and maintenance logs into nodes and edges, ultimately forming a complete semantic relationship graph. This graph is used to represent the functional associations established between each monitoring device and each geographic entity in the urban monitoring network through their respective functional actions.
[0022] S120. Taking the monitoring equipment nodes in the semantic relationship graph as the objects to be processed, the spatial location relationship and time series data of the monitoring equipment nodes are jointly modeled through self-supervised learning to learn the spatiotemporal distribution pattern of the monitoring equipment nodes in the urban monitoring network and generate equipment feature vectors carrying spatiotemporal consistency features.
[0023] In this context, "monitoring device node" refers to a graph node representing a monitoring device in the semantic relationship graph. "Object to be processed" refers to the basic unit operated on in subsequent self-supervised learning steps. "Spatial location relationship" refers to the geometric association formed by the installation coordinates of different monitoring device nodes, including relative positional attributes such as proximity and distance. "Time series data" refers to the coordinate sequence data of the same monitoring device node at consecutive timestamps.
[0024] Spatiotemporal consistency features refer to the feature representations learned through joint modeling of spatial location relationships and time-series data, reflecting the consistency of monitoring equipment nodes in spatial distribution patterns and temporal behavior patterns. Equipment feature vectors refer to the structured data obtained by numerically representing spatiotemporal consistency features in vector form.
[0025] Specifically, nodes representing monitoring devices in the semantic relationship graph can be taken as objects to be processed. Spatial location relationship data can be constructed based on the installation location coordinates carried by these monitoring device nodes. At the same time, time series data can be constructed based on the coordinate sequence of the same monitoring device node on consecutive timestamps. Then, a pre-training task is designed through self-supervised learning to learn the spatial layout rules between monitoring device nodes from the spatial location relationships and the behavioral change patterns of monitoring device nodes in the time dimension from the time series data. The learned spatial layout rules and time behavior patterns are jointly modeled to capture the inherent spatiotemporal distribution rules of monitoring device nodes in the urban monitoring network. Finally, the knowledge obtained from the above joint modeling is numerically expressed in vector form to generate device feature vectors carrying spatiotemporal consistency features.
[0026] S130. Integrate the semantic relationship graph with the spatial adjacency relationship between monitoring device nodes to construct a composite graph structure that integrates semantic relationships and spatial adjacency relationships.
[0027] Spatial adjacency refers to the spatial adjacency relationship between two monitoring device nodes, determined by the geographical distance between their installation location coordinates, when the geographical distance is less than a preset threshold.
[0028] Among them, the composite graph structure refers to the graph structure data obtained by fusing the semantic relationship edges in the semantic relationship graph with the spatial adjacency edges between monitoring device nodes. This graph structure simultaneously includes monitoring device nodes and geographic entity nodes, semantic relationship edges, and spatial adjacency edges.
[0029] In this embodiment, a semantic relationship graph that has already been constructed can be obtained. This semantic relationship graph contains monitoring device nodes, geographic entity nodes, and semantic relationship edges connecting these two types of nodes. At the same time, the spatial adjacency relationship obtained by calculating the installation location coordinates between monitoring device nodes can be obtained. This spatial adjacency relationship indicates which monitoring device nodes are geographically adjacent to each other. Then, the monitoring device nodes and geographic entity nodes in the semantic relationship graph are used as the node set of the composite graph structure. The existing semantic relationship edges in the semantic relationship graph are used as the first type of edges of the composite graph structure. The connecting edges between monitoring device node pairs with adjacent relationships in the spatial adjacency relationship are used as the second type of edges of the composite graph structure. The first type of edges and the second type of edges are merged into the same graph structure, ultimately forming a composite graph structure that simultaneously contains semantic relationship edges and spatial adjacency edges.
[0030] For example, suppose a semantic relationship graph has been constructed, which includes monitoring device nodes camera A and camera B, and geographic entity node intersection C. It also includes semantic relationship edges obtained from the semantic relationship graph, namely the edge indicating that camera A monitors intersection C. Furthermore, by calculating the geographic distance between the installation coordinates of camera A and camera B, it is found that this geographic distance is less than a preset spatial adjacency threshold, thus determining that there is a spatial adjacency relationship between camera A and camera B. When constructing the composite graph structure, camera A, camera B, and intersection C are all treated as nodes in the composite graph structure. The existing semantic relationship edge (i.e., camera A monitoring intersection C) is retained in the composite graph structure. Simultaneously, a spatial adjacency edge is added between camera A and camera B in the corresponding spatial adjacency relationship. The final composite graph structure contains both semantic relationship edges between monitoring device nodes and geographic entity nodes, as well as spatial adjacency edges between monitoring device nodes.
[0031] S140. Using the device feature vector as the initial feature vector of each node in the composite graph structure, information propagation and feature aggregation are performed on the composite graph structure through a graph neural network to generate an updated feature vector of each node that integrates semantic information and spatial adjacency relationship.
[0032] The initial feature vector refers to the initial feature representation assigned to each node in the composite graph structure before information propagation and feature aggregation in the graph neural network. For monitoring device nodes, this initial feature vector is a device feature vector carrying spatiotemporal consistency features; for geographic entity nodes, this initial feature vector is a randomly initialized vector.
[0033] Among them, graph neural networks refer to deep learning network structures used for information propagation and feature aggregation on composite graph structures. This network achieves selective aggregation of neighbor node information by calculating the attention weights between nodes.
[0034] The updated feature vector refers to the high-order feature representation obtained by each node in the composite graph structure, which integrates its own initial features and the features of its neighboring nodes.
[0035] Specifically, the feature vectors of devices carrying spatiotemporal consistency characteristics can be used as the initial feature vectors of each monitoring device node in the composite graph structure. Random initialization vectors are assigned to each geographic entity node in the composite graph structure as its initial feature vectors. Then, a graph neural network is run on the composite graph structure. For each node in the composite graph structure, the graph neural network calculates the corresponding attention weight according to the semantic relationship type or spatial adjacency type between the node and each neighbor node. The initial feature vectors of each neighbor node are weighted and aggregated according to the attention weight. The aggregation result is then transformed nonlinearly and used as the new feature vector of the node. The above information propagation and feature aggregation process is repeated for multiple rounds. Each round uses the node feature vector updated in the previous round as the input of the current round. Finally, after multiple rounds of iteration, the generated node feature vectors are the updated feature vectors that integrate semantic information and spatial adjacency relationships.
[0036] S150. Input the updated feature vector of each device node into the coordinate decoder to decode and obtain the position information of the correction device corresponding to each device node.
[0037] The coordinate decoder refers to a multilayer perceptron network structure used to map node feature vectors to spatial coordinate values. The location information of the correction device refers to the corrected coordinate data used to replace the original observation coordinates.
[0038] Specifically, the updated feature vectors of each monitoring device node, generated after multiple rounds of information propagation and feature aggregation through a graph neural network, can be used as input data. This input data is then passed to the coordinate decoder. Inside the coordinate decoder, a multilayer perceptron network sequentially performs linear transformations and nonlinear activation operations on the updated feature vectors of each monitoring device node, gradually reducing the dimensionality of the high-dimensional feature vectors to a two-dimensional coordinate space. Finally, a corresponding two-dimensional coordinate value is output for each monitoring device node. This two-dimensional coordinate value is the corrected position coordinate obtained after semantic guidance and spatiotemporal consistency constraints, serving as the correction device position information for that monitoring device node.
[0039] This application provides a semantic correction method for urban monitoring networks. It extracts structured semantic units from device metadata and operation logs within the urban monitoring network, and constructs a semantic relationship graph representing the functional relationships between monitoring devices and geographic entities based on these structured semantic units. The structured semantic units include monitoring devices, functional actions, and geographic entities. Then, the monitoring device nodes in the semantic relationship graph are treated as objects to be processed. A self-supervised learning approach is used to jointly model the spatial location relationships and time-series data of the monitoring device nodes to learn the spatiotemporal distribution patterns of the monitoring device nodes in the urban monitoring network, generating device feature vectors carrying spatiotemporal consistency characteristics. Furthermore, the semantic relationship graph and the spatial adjacency relationships between the monitoring device nodes are fused to construct a composite graph structure that integrates semantic relationships and spatial adjacency relationships. The device feature vectors are then used as the initial feature vectors for each node in the composite graph structure. A graph neural network is used to perform information propagation and feature aggregation on the composite graph structure, generating updated feature vectors for each node that integrate semantic information and spatial adjacency relationships. Finally, the updated feature vectors of each device node are input into a coordinate decoder to decode and obtain the location information of the correction device corresponding to each device node. The technical solution of this application achieves effective integration of functional semantic information and spatial information by extracting structured semantic units to construct a semantic relationship graph; it generates device feature vectors carrying spatiotemporal consistency features by jointly modeling spatial location relationships and time series data through self-supervised learning, thus solving the problem of excessive reliance on manually labeled data; and it solves the problem of existing methods being unable to integrate semantic information and lacking spatiotemporal joint modeling capabilities by constructing a composite graph structure and using graph neural networks for information propagation and feature aggregation, thereby improving the accuracy and intelligence level of device position correction.
[0040] Example 2 Figure 2 This diagram illustrates a semantic correction method for urban surveillance networks, provided in this embodiment of the application. Based on the foregoing embodiments, this embodiment will provide a detailed explanation of the semantic relationship graph construction process. Specific implementation methods can be found in the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0041] like Figure 2 As shown, the method specifically includes the following steps: S210. Extract structured semantic units from device metadata and operation and maintenance logs in the urban monitoring network.
[0042] S220. Perform text parsing on device metadata and operation and maintenance logs, identify the monitoring device name as the monitoring device from the parsed text, and identify the geographic entity name as the geographic entity.
[0043] Specifically, the raw text content in device metadata and operation and maintenance logs can be obtained. Word segmentation and part-of-speech tagging are performed on the raw text content to divide the continuous text into independent word sequences and mark the part-of-speech category of each word. Then, noun words are selected from the word segmentation results as entity candidate words. The selected entity candidate words are input into the named entity recognition model, which classifies and determines each entity candidate word. When the classification result is a monitoring device type, the entity candidate word is identified as a monitoring device. When the classification result is a geographic region type, the entity candidate word is identified as a geographic entity.
[0044] S230. Based on dependency parsing, perform syntactic structure parsing on the parsed text, and extract functional action words connecting monitoring equipment and geographic entities from the syntactic structure parsing results based on the preset relation extraction rule template.
[0045] Dependency parsing refers to the process of parsing the syntactic structure of text to determine the types of dependency relationships between words and generating a dependency parsing tree. Relation extraction rule templates are predefined patterns used to identify matching verbs between subjects and objects from the results of dependency parsing. Functional verbs are the verbs that connect monitoring equipment and geographic entities extracted from the results of dependency parsing using relation extraction rule templates.
[0046] Specifically, dependency parsing can be performed on the text content that has already been parsed. By analyzing the dependency relationship types between each word in the text, a dependency parsing tree representing the syntactic dependency structure between words can be generated. Then, based on the identified locations of the monitoring equipment and the geographic entities in the text, the first node corresponding to the monitoring equipment and the second node corresponding to the geographic entity are located in the dependency parsing tree, respectively. The shortest dependency path connecting the first node and the second node is extracted. From this shortest dependency path, verb words are selected based on part-of-speech tags. These verb words are then output as functional action words connecting the monitoring equipment and the geographic entity.
[0047] S240. Combine monitoring equipment, functional actions, and geographic entities into structured semantic units; construct directed relation edges by using monitoring equipment as source nodes, geographic entities as target nodes, and functional actions as connecting edges, and aggregate all directed relation edges to generate a semantic relation graph that represents the functional relationship between monitoring equipment and geographic entities.
[0048] In this embodiment, the identified monitoring device, the extracted functional action, and the identified geographic entity can be combined into a single unit, which is defined as a structured semantic unit. Then, the monitoring device in this structured semantic unit is used as the source node in the graph structure, the geographic entity is used as the target node in the graph structure, and the functional action is used as the directed edge connecting the source node and the target node to generate a directed relation edge. The above mapping operation of source node, target node, and directed edge is performed for each structured semantic unit extracted from the text to obtain multiple directed relation edges. Finally, all directed relation edges are merged into the same graph structure, which is a semantic relation graph used to represent the functional association relationship established between the monitoring device and the geographic entity through functional actions.
[0049] S250. Taking the monitoring equipment nodes in the semantic relationship graph as the objects to be processed, the spatial location relationship and time series data of the monitoring equipment nodes are jointly modeled through self-supervised learning to learn the spatiotemporal distribution pattern of the monitoring equipment nodes in the urban monitoring network and generate equipment feature vectors carrying spatiotemporal consistency features.
[0050] S260. Integrate the semantic relationship graph with the spatial adjacency relationship between monitoring device nodes to construct a composite graph structure that integrates semantic relationships and spatial adjacency relationships.
[0051] In this embodiment, optionally, the specific implementation of constructing a composite graph structure that integrates semantic relations and spatial adjacency relations may include the following steps: S2601. Obtain all monitoring device nodes and all geographic entity nodes from the semantic relationship graph, and combine the monitoring device nodes and geographic entity nodes as a node set of the composite graph structure.
[0052] In this context, the node set refers to the set of vertices of the graph formed by all monitoring device nodes and all geographic entity nodes in the composite graph structure.
[0053] Specifically, a node traversal operation can be performed on the completed semantic relationship graph to extract all monitoring device nodes and all geographic entity nodes. Then, all the extracted monitoring device nodes and all geographic entity nodes are put into a set, which serves as the node set for the composite graph structure to be constructed. All subsequent edge addition operations will use nodes in this node set as the endpoints of the edges.
[0054] S2602. Based on the structured semantic units in the semantic relationship graph, extract the functional action relationships between each monitoring device node and each geographic entity node, and construct semantic relationship edges in the composite graph structure based on the functional action relationships.
[0055] Among them, functional action relationship refers to the semantic association type established between monitoring device nodes and geographic entity nodes through functional action words. Semantic relationship edge refers to the directed graph edge that connects monitoring device nodes and geographic entity nodes with functional action relationship as the edge attribute.
[0056] Specifically, all structured semantic units stored in the semantic relationship graph can be traversed. For each structured semantic unit, the monitoring device name, functional action word, and geographic entity name contained in the structured semantic unit can be parsed. The monitoring device node corresponding to the monitoring device name and the geographic entity node corresponding to the geographic entity name are taken as the two endpoints to be connected. The functional action relationship expressed by the functional action word is taken as the association type connecting the two endpoints. Then, a directed semantic relationship edge is constructed with the monitoring device node as the starting point, the geographic entity node as the ending point, and the functional action relationship as the attribute label of the edge. The above parsing and edge construction operations are repeated for each structured semantic unit to obtain multiple semantic relationship edges. These semantic relationship edges will be used as the first type of edge in the composite graph structure.
[0057] S2603. Based on the installation location coordinates of each monitoring device node, calculate the geographical distance between every two monitoring device nodes. When the geographical distance is less than the preset spatial adjacency threshold, construct a spatial adjacency edge between the two monitoring device nodes.
[0058] The installation location coordinates refer to the longitude and latitude values recorded in the device metadata of the monitoring device node. The geographical distance refers to the spatial straight-line distance calculated based on the installation location coordinates of two monitoring device nodes.
[0059] A spatial adjacency edge refers to adding an undirected graph edge between two monitoring device nodes.
[0060] Specifically, the installation coordinates of each monitoring device node in the composite graph structure can be obtained. Then, all possible pairs of monitoring device nodes are traversed. For each pair of monitoring device nodes, their respective installation coordinates are extracted. The geographical distance between the two monitoring device nodes is calculated based on the two installation coordinates. The calculated geographical distance is compared with a pre-set spatial adjacency threshold. When the geographical distance is less than the spatial adjacency threshold, the two monitoring device nodes are determined to be spatially adjacent. At this time, an undirected edge is added between the two monitoring device nodes. This undirected edge is the spatial adjacency edge. The above edge building operation is performed on each pair of monitoring device nodes that satisfy the condition that the geographical distance is less than the spatial adjacency threshold. Finally, the set of spatial adjacency edges between all monitoring device nodes is obtained.
[0061] S2604. Merge semantic relation edges with spatial adjacency edges to generate a composite graph structure that integrates semantic relations and spatial adjacency relations.
[0062] In this embodiment, a set of semantic relationship edges and a set of spatial adjacency edges that have been constructed can be obtained. All directed edges in the set of semantic relationship edges and all undirected edges in the set of spatial adjacency edges are merged into the same graph structure. This graph structure uses the previously determined set of nodes as the vertex set and the semantic relationship edges and spatial adjacency edges as the edge set. The semantic relationship edges are used to express the functional association between monitoring device nodes and geographic entity nodes, and the spatial adjacency edges are used to express the geographic adjacency association between monitoring device nodes. The final generated graph structure is a composite graph structure that simultaneously contains semantic relationships and spatial adjacency relationships.
[0063] The above scheme obtains monitoring device nodes and geographic entity nodes from the semantic relationship graph as the node set of the composite graph structure, ensuring that the composite graph structure can fully inherit the semantic information in the semantic relationship graph. By constructing semantic relationship edges based on structured semantic units, the functional action relationship between monitoring devices and geographic entities is retained in the composite graph structure in the form of explicit directed edges, providing computable semantic associations for subsequent graph neural networks. By calculating geographic distance based on installation location coordinates and constructing spatial adjacency edges, the geographic adjacency relationship between monitoring devices is integrated into the composite graph structure in the form of undirected edges, making up for the lack of spatial information in the pure semantic graph. The composite graph structure formed by merging semantic relationship edges and spatial adjacency edges simultaneously contains the functional semantics between devices and geographic entities as well as the spatial topology between devices, providing a unified graph data foundation that integrates two heterogeneous relationships for subsequent graph neural network information propagation and feature aggregation, thereby improving the synergistic ability of semantic guidance and spatial constraints in the correction process.
[0064] S270. Using the device feature vector as the initial feature vector of each node in the composite graph structure, information propagation and feature aggregation are performed on the composite graph structure through a graph neural network to generate an updated feature vector of each node that integrates semantic information and spatial adjacency relationship.
[0065] In this embodiment, optionally, the specific implementation of generating the updated feature vectors that fuse semantic information and spatial adjacency relationships of each node may include the following steps: S2701. Use the device feature vector carrying the spatiotemporal consistency feature as the initial feature vector of each monitoring device node in the composite graph structure, and use the random initialization vector as the initial feature vector of each geographic entity node in the composite graph structure.
[0066] Here, the initial feature vector refers to the initial feature representation assigned to each node in the composite graph structure before the first round of graph neural network iteration. The random initialization vector refers to the initial feature values assigned to geographic entity nodes that follow a random distribution.
[0067] Specifically, the generated device feature vectors carrying spatiotemporal consistency characteristics can be obtained and directly assigned to each monitoring device node in the composite graph structure as the initial feature vector carried by the monitoring device node before entering the graph neural network. At the same time, for each geographic entity node in the composite graph structure, since there is no corresponding device feature vector source, a set of random initialization vectors composed of random values is generated and assigned to each geographic entity node as its initial feature vector. After the above assignment operation, all nodes in the composite graph structure obtain initial feature vectors. The initial feature vectors of the monitoring device nodes contain spatiotemporal consistency information, while the initial feature vectors of the geographic entity nodes are random values.
[0068] S2702. For each central node in the composite graph structure, obtain the current feature vector of the current central node and the current feature vectors of all its neighboring nodes, and determine the relationship embedding vector based on the relationship type between the current central node and each neighboring node.
[0069] Here, the current center node refers to the target node currently being computed and updated during the iterative process of the graph neural network. The current feature vector refers to the feature value held by the current center node in the current iteration. Neighbor nodes refer to other nodes that have connecting edges with the current center node. The relation embedding vector is a vectorized representation obtained from the relation embedding matrix based on the type of connecting edges between the current center node and its neighboring nodes.
[0070] Specifically, a node can be selected from the composite graph structure as the current center node, and the current feature vector held by the current center node in the current iteration round can be obtained. At the same time, all other nodes that have connecting edges with the current center node can be found from the composite graph structure and regarded as neighbor nodes. The current feature vector of each neighbor node can be obtained. Then, for the connecting edge between the current center node and each neighbor node, the relation type label stored on the connecting edge can be read. According to the relation type label, the preset relation embedding matrix can be queried, and the vector value corresponding to the relation type label can be extracted from the relation embedding matrix. The vector value is determined as the relation embedding vector between the current center node and the neighbor node.
[0071] S2703. Based on the current feature vector of the central node, the current feature vectors of the neighboring nodes, and the relationship embedding vector, calculate the attention weight between the current central node and each neighboring node.
[0072] The attention weight is a normalized coefficient used to measure the contribution of each neighboring node to the feature update of the current central node.
[0073] Specifically, the current feature vector of the current center node and the current feature vector of the neighboring nodes can be input into a shared linear transformation layer. The weight matrix of the linear transformation layer maps the two feature vectors to the same vector dimension, resulting in the transformed feature vectors of the current center node and the neighboring nodes. Then, the transformed feature vectors of the current center node, the neighboring nodes, and the embedded vector containing the relationship between the current center node and the neighboring node are concatenated to obtain a combined concatenated vector. This concatenated vector is input into a leaky linear rectifier function, and a scalar value is calculated through the nonlinear mapping of the leaky linear rectifier function. This scalar value is the unnormalized attention coefficient between the current center node and the neighboring node. The above calculation process is repeated for all the neighboring nodes of the current center node to obtain the corresponding unnormalized attention coefficients. All unnormalized attention coefficients are then exponentialized. The sum of the exponentialized results is used as the denominator, and the exponentialized result of each unnormalized attention coefficient is used as the numerator. The normalized ratio is calculated and determined as the attention weight between the current center node and the corresponding neighboring node.
[0074] S2704. Based on the attention weight, the current feature vectors of each neighbor node are weighted and summed. The weighted sum is then transformed nonlinearly and used as the updated feature vector of the current center node.
[0075] In this embodiment, the attention weights between the current central node and each neighboring node can be obtained, and the current feature vectors of each neighboring node can be obtained. The attention weight of each neighboring node is multiplied by the current feature vector of that neighboring node to obtain the weighted feature vector of each neighboring node. Then, the weighted feature vectors of all neighboring nodes are summed element by element to obtain an aggregated vector as the weighted sum result. The weighted sum result is then input into a nonlinear activation function. After the mapping transformation of the nonlinear activation function, a new vector is output. This new vector is used as the updated feature vector of the current central node after one round of information propagation and feature aggregation.
[0076] S2705. Repeat the steps of calculating attention weights and determining updated feature vectors until the preset number of iterations is reached. Then, determine the updated feature vectors of each node obtained in the last iteration as the updated feature vectors of each node that integrate semantic information and spatial adjacency.
[0077] Specifically, a predetermined number of iteration rounds can be set as the termination condition. In the first iteration, the attention weights and updated feature vectors are calculated based on the initial feature vectors of each node, resulting in updated feature vectors for each node after the first iteration. Then, in the second iteration, the updated feature vectors of each node obtained in the first iteration are used as the current feature vectors for the second iteration. The attention weights and updated feature vectors are calculated again, resulting in updated feature vectors for each node after the second iteration. This process is repeated, with each iteration using the updated feature vectors obtained in the previous iteration as the input for the current iteration. When the number of iteration rounds reaches the preset number, the iteration stops, and the updated feature vectors of each node obtained in the last iteration are retrieved. These feature vectors have already incorporated feature information from semantic and spatial neighbors during multiple rounds of information propagation, and are therefore determined as the updated feature vectors of each node that incorporate semantic information and spatial adjacency relationships.
[0078] The above scheme uses the device feature vector carrying spatiotemporal consistency characteristics as the initial feature vector of the monitoring device node and assigns random initialization vectors to the geographic entity node, thus giving all nodes in the composite graph structure a computable initial feature representation. By determining the relationship embedding vector based on the relationship type between the current central node and its neighboring nodes, different semantic relationship edges and spatial adjacency edges can produce differentiated effects in subsequent calculations. By calculating attention weights and performing weighted summation and nonlinear transformation on the features of neighboring nodes, the scheme enables nodes to selectively aggregate information from semantic and spatial neighbors in each iteration, rather than simply averaging. By repeatedly executing multiple iterations, information can be propagated and fused layer by layer in the composite graph structure. The resulting updated feature vector simultaneously contains the node's own spatiotemporal consistency characteristics, functional semantic information from semantic relationship edges, and spatial topological information from spatial adjacency edges, thus providing high-quality node features rich in semantic guidance and spatial constraints for subsequent coordinate decoding.
[0079] S280. Input the updated feature vectors of each device node into the coordinate decoder to decode and obtain the position information of the correction device corresponding to each device node.
[0080] In this embodiment, optionally, the specific implementation method for decoding to obtain the location information of the correction device corresponding to each device node may include the following steps: S2801. Input the updated feature vectors of each monitoring device node into the coordinate decoder. The multilayer perceptron network based on the coordinate decoder maps the updated feature vectors into corrected coordinates.
[0081] Among them, a multilayer perceptron network refers to a feedforward neural network structure composed of multiple fully connected layers and nonlinear activation layers stacked alternately. Corrected coordinates refer to the corrected two-dimensional coordinate values output by the coordinate decoder after inputting the updated feature vectors of the monitoring device nodes.
[0082] Specifically, the updated feature vectors of each monitoring device node generated after multiple rounds of information propagation and feature aggregation through a graph neural network can be obtained. These updated feature vectors are then passed as input data to a coordinate decoder. The coordinate decoder contains a multilayer perceptron network, which consists of multiple fully connected layers connected sequentially. Each fully connected layer performs a linear transformation on the input vector and outputs it to the next fully connected layer. Adjacent fully connected layers are mapped through a nonlinear activation function. The updated feature vectors are transformed sequentially through each layer of the multilayer perceptron network, gradually reducing the dimensionality from the high-dimensional feature space to the two-dimensional coordinate space. Finally, a two-dimensional coordinate value is output at the last layer of the multilayer perceptron network, and this two-dimensional coordinate value is used as the corrected coordinate of the monitoring device node.
[0083] S2802. Based on the difference between the corrected coordinates and the original observed coordinates of the monitoring equipment node, determine the coordinate deviation value of the monitoring equipment node.
[0084] The coordinate deviation value refers to the difference in spatial distance between the corrected coordinates and the original observed coordinates of the monitoring device node.
[0085] Specifically, the corrected coordinates of each monitoring device node output by the coordinate decoder can be obtained, along with the original observed coordinates recorded in the device metadata. Then, for each monitoring device node, the difference between its corrected coordinates and the original observed coordinates can be calculated. This difference is obtained by subtracting the values of the original observed coordinates in the corresponding dimensions from the values of the corrected coordinates in each dimension, and then taking the square root of the absolute value or the sum of the squares. The calculated difference value is used as the coordinate deviation value of the monitoring device node, which is used to measure the correction magnitude of the position coordinates of the monitoring device node by the correction operation.
[0086] S2803. Determine the total loss value based on the semantic alignment loss value corresponding to each structured semantic unit and the spatiotemporal consistency loss value of each monitoring device node.
[0087] The semantic alignment loss value is an error value calculated based on the distance between the sum of the monitoring device embedding vector and the function / action embedding vector and the geographic entity embedding vector, used to measure the inherent logical consistency of structured semantic units. The spatiotemporal consistency loss value is an error value calculated based on the fitting error between the observed coordinates of the monitoring device node and the real coordinates to be learned, as well as the weighted sum of the spatial energy function and the temporal energy function, used to measure the learning effect of spatiotemporal distribution patterns. The total loss value is the comprehensive error value obtained by weighted summing of the semantic alignment loss value and the spatiotemporal consistency loss value.
[0088] Specifically, the semantic alignment loss value corresponding to each structured semantic unit can be obtained. This semantic alignment loss value is used to measure the semantic matching degree between the combination of monitoring devices and functional actions in the structured semantic unit and the geographic entity. At the same time, the spatiotemporal consistency loss value of each monitoring device node can be obtained. This spatiotemporal consistency loss value is used to measure the fitting error between the observed coordinates of the monitoring device node and the real coordinates after spatiotemporal consistency constraints, as well as the smoothness of the spatial distribution pattern and the temporal behavior pattern. Then, the semantic alignment loss values of all structured semantic units are summed to obtain the total semantic loss. The spatiotemporal consistency loss values of all monitoring device nodes are summed to obtain the total spatiotemporal loss. Finally, the total semantic loss and the total spatiotemporal loss are weighted and summed according to a preset weight ratio. The comprehensive value obtained by the weighted summation is determined as the total loss value.
[0089] S2804. Update the parameters of the graph attention network and the coordinate decoder in reverse based on the total loss value until the total loss value converges. Then, determine the corrected coordinates of each monitoring device node in the converged state as the final output of the corrected device location information.
[0090] In this embodiment, the calculated total loss value can be obtained. Based on the total loss value, the gradient of each trainable parameter in the graph attention network with respect to the total loss value and the gradient of each trainable parameter in the coordinate decoder with respect to the total loss value are calculated using the chain rule. Then, each parameter of the graph attention network and each parameter of the coordinate decoder are updated according to the direction of gradient descent, so that the total loss value generated by the updated parameters in the next round of forward propagation is lower than that of the current parameters. The steps of calculating the total loss value through forward propagation and updating the parameters through backpropagation are repeated. After each iteration, the change in the total loss value is judged. When the change in the total loss value is less than the preset convergence threshold, it is determined that the total loss value has converged. At this time, the iterative update is stopped. The corrected coordinates of each monitoring device node output by the coordinate decoder in the last iteration are extracted and these corrected coordinates are used as the final output of the semantic correction method for the location information of the correction device.
[0091] The above scheme achieves numerical conversion from high-order semantic features to spatial coordinates by inputting the updated feature vector into the coordinate decoder and mapping it to the corrected coordinates using a multilayer perceptron network. The coordinate deviation value is determined by calculating the difference between the corrected coordinates and the original observed coordinates, providing a quantitative basis for measuring the correction magnitude. The total loss value is obtained by jointly calculating the semantic alignment loss value and the spatiotemporal consistency loss value, unifying the accuracy of semantic understanding and the effectiveness of geometric correction within the same optimization objective. By updating the graph attention network parameters and coordinate decoder parameters based on the total loss value until convergence, the entire model simultaneously optimizes both semantic alignment and spatiotemporal consistency during end-to-end training. The corrected coordinates output at the final convergence state conform to both the functional semantic constraints in the semantic relationship graph and the spatiotemporal distribution patterns of the urban monitoring network, thus achieving precise correction through the synergy of semantic guidance and spatial constraints.
[0092] The technical solution of this application, when constructing a semantic relationship graph representing the functional relationship between monitoring devices and geographical entities based on structured semantic units, achieves the function of automatically extracting key entities from unstructured text by parsing the device metadata and operation logs and identifying the names of monitoring devices and geographical entities; it performs syntactic structure parsing based on dependency parsing and extracts functional action words using preset relation extraction rule templates, so that the predicate verbs connecting monitoring devices and geographical entities can be accurately identified; it transforms natural language text into structured triple data by combining monitoring devices, functional actions, and geographical entities into structured semantic units; and it realizes the transformation from discrete triples to graph structure by constructing directed relation edges with monitoring devices as source nodes, geographical entities as target nodes, and functional actions as connecting edges, and aggregating all directed relation edges to generate a semantic relationship graph. The final semantic relationship graph explicitly expresses the functional association between monitoring devices and geographical entities, providing a knowledge foundation rich in semantic information for subsequent self-supervised learning and graph reasoning steps.
[0093] Example 3 Figure 3 This is a schematic diagram of a semantic correction method for urban monitoring networks provided in an embodiment of this application. Based on the foregoing embodiments, this embodiment will provide a more detailed description of step S120. For specific implementation details, please refer to the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0094] like Figure 3 As shown, the method specifically includes the following steps: S310. Extract structured semantic units from device metadata and operation and maintenance logs in the urban monitoring network, and construct a semantic relationship map based on the structured semantic units to represent the functional relationship between monitoring devices and geographic entities.
[0095] The structured semantic units include monitoring equipment, functional actions, and geographic entities.
[0096] S320. Based on the monitoring device nodes in the semantic relationship graph, obtain the installation location coordinates of each monitoring device node; construct spatial positive sample pairs based on the coordinate pairs of monitoring device nodes in the same local area, and construct spatial negative sample pairs based on the coordinate pairs of monitoring device nodes whose geographical distance exceeds a preset threshold.
[0097] In this context, a spatial positive sample pair refers to a coordinate pair formed by the installation location coordinates of two monitoring device nodes selected from the same local area. A spatial negative sample pair refers to a coordinate pair formed by the installation location coordinates of two monitoring device nodes selected from two monitoring device nodes whose geographical distance exceeds a preset threshold.
[0098] Specifically, all monitoring device nodes can be extracted from the semantic relationship graph. For each monitoring device node, its installation location coordinates recorded in the device metadata are obtained. Then, all monitoring device node pairs are traversed, and the geographical distance between each pair of monitoring device nodes is calculated based on their installation location coordinates. Monitoring device nodes whose geographical distance is less than the local area threshold are determined to belong to the same local area. Two monitoring device nodes are randomly selected from the set of monitoring device nodes belonging to the same local area, and their installation location coordinates are combined into a spatial positive sample pair. At the same time, the installation location coordinates of two monitoring device nodes whose geographical distance is greater than the far distance threshold are combined into a spatial negative sample pair.
[0099] S330. Train the encoder based on spatial positive sample pairs and spatial negative sample pairs, so that the feature distance of spatial positive sample pairs in the representation space is less than the feature distance of spatial negative sample pairs in the representation space, so as to generate spatial consistency features of each monitoring device node based on the trained encoder.
[0100] Among them, spatial consistency features refer to the vectorized representation used to express the spatial layout pattern of monitoring equipment nodes.
[0101] In this embodiment, the constructed spatial positive sample pairs and spatial negative sample pairs can be input into the encoder. The encoder maps the two installation position coordinates in each spatial positive sample pair to two feature vectors in the representation space and calculates the feature distance between these two feature vectors. At the same time, it maps the two installation position coordinates in each spatial negative sample pair to two feature vectors in the representation space and calculates the feature distance between these two feature vectors. Then, the encoder parameter update is constrained by the loss function, so that the feature distance corresponding to the spatial positive sample pair gradually decreases while the feature distance corresponding to the spatial negative sample pair gradually increases. Finally, the training ensures that the feature distance of any spatial positive sample pair in the representation space is less than the feature distance of any spatial negative sample pair in the representation space. After the encoder is trained, the installation position coordinates of each monitoring device node are input into the trained encoder, and the encoder outputs a feature vector, which is used as the spatial consistency feature of the monitoring device node.
[0102] In this embodiment, optionally, the specific implementation of generating spatial consistency characteristics for each monitoring device node may include the following steps: S3301. Based on the installation location coordinates of each monitoring device node, calculate the geographical distance between every two monitoring device nodes, and determine the monitoring device nodes whose geographical distance is less than the adjacency threshold as a set of spatial neighbor nodes.
[0103] Specifically, the installation location coordinates of each monitoring device node can be obtained. For all possible monitoring device node pairs, the installation location coordinates of two monitoring device nodes can be extracted. The geographical distance between the two monitoring device nodes can be calculated based on the two installation location coordinates. The calculated geographical distance is compared with a pre-set adjacency threshold. When the geographical distance is less than the adjacency threshold, the two monitoring device nodes are determined to be spatially adjacent to each other. All monitoring device nodes that meet the above proximity conditions are grouped according to their spatial connectivity. Multiple monitoring device nodes that are adjacent to each other and connected through the proximity relationship are grouped into the same group. The monitoring device nodes in each group constitute a set of spatial neighbor nodes.
[0104] S3302. Randomly select two monitoring device nodes from the same set of neighboring nodes in the same space, and determine the coordinate pair of the two monitoring device nodes as a spatial positive sample pair.
[0105] Specifically, for each set of spatial neighbor nodes, two monitoring device nodes are randomly selected from the set, and the installation location coordinates of these two monitoring device nodes are extracted. These two installation location coordinates are combined into a coordinate pair, and this coordinate pair is determined as a spatial positive sample pair.
[0106] S3303. From two monitoring device nodes in different spatial neighbor node sets and whose geographical distance is greater than the long distance threshold, randomly select the coordinate pairs of two monitoring device nodes to determine them as spatial negative sample pairs.
[0107] Specifically, we can obtain the pre-defined sets of spatial neighbor nodes to ensure that the two monitoring device nodes selected belong to two different sets of spatial neighbor nodes. At the same time, we can calculate the geographical distance between the two monitoring device nodes based on their installation location coordinates and confirm that the geographical distance is greater than a pre-set long distance threshold. Under the premise of satisfying the above two conditions, we can randomly select a pair from the qualified monitoring device node pairs, form a coordinate pair with the installation location coordinates of the two monitoring device nodes, and determine the coordinate pair as a spatial negative sample pair.
[0108] S3304. Input the spatial positive sample pairs and spatial negative sample pairs into the graph convolutional network encoder, and output the first feature distance of the spatial positive sample pairs in the representation space and the second feature distance of the spatial negative sample pairs in the representation space based on the graph convolutional network encoder.
[0109] Specifically, the coordinates of two installation positions in the constructed positive spatial sample pair can be simultaneously input into the graph convolutional network encoder. The graph convolutional network encoder maps each installation position coordinate into a feature vector in the representation space, and then calculates the spatial distance between these two feature vectors as the first feature distance. At the same time, the coordinates of two installation positions in the constructed negative spatial sample pair can be simultaneously input into the same graph convolutional network encoder. The graph convolutional network encoder maps these two installation position coordinates into two feature vectors in the representation space respectively, and then calculates the spatial distance between these two feature vectors as the second feature distance. Finally, the first feature distance and the second feature distance are output for subsequent loss calculation and parameter update.
[0110] S3305. Based on the constraint that the first feature distance is less than the second feature distance, update the parameters of the graph convolutional network encoder in reverse until the difference between the first feature distance and the second feature distance reaches the preset interval threshold, and obtain the trained graph convolutional network encoder.
[0111] Specifically, a loss value can be calculated based on the first feature distance and the second feature distance. The design goal of this loss value is to minimize the first feature distance and maximize the second feature distance, and to make the difference between the first feature distance and the second feature distance reach a preset interval threshold. Then, based on this loss value, the gradient of each trainable parameter in the graph convolutional network encoder with respect to the loss value is calculated using the chain rule. The parameters of the graph convolutional network encoder are updated in the direction of gradient descent, so that the difference between the first feature distance and the second feature distance generated by the updated parameters in the next forward propagation is closer to the preset interval threshold. The above steps of calculating the loss value and updating the parameters are repeated. When the difference between the first feature distance and the second feature distance reaches or exceeds the preset interval threshold, the iteration stops, and the graph convolutional network encoder at this time is determined as the trained graph convolutional network encoder.
[0112] S3306. Encode the installation location coordinates of each monitoring device node using the trained graph convolutional network encoder to obtain the spatial consistency characteristics of each monitoring device node.
[0113] Specifically, a trained graph convolutional network encoder can be obtained. For each monitoring device node, the installation location coordinates of that node can be extracted and used as input data into the trained graph convolutional network encoder. The graph convolutional network encoder performs forward propagation calculations on the input data, and outputs a feature vector after layer-by-layer transformation through the graph convolutional layers and nonlinear activation layers inside the encoder. This feature vector is used as the spatial consistency feature of the monitoring device node. The above encoding operation is repeated for all monitoring device nodes to obtain the spatial consistency feature corresponding to each monitoring device node.
[0114] S340. Construct a positive time sample sequence based on the coordinate sequence of each monitoring device node on continuous timestamps, and apply random time jitter and coordinate perturbation to the positive time sample sequence to generate a negative time sample sequence.
[0115] Among them, the positive time sample sequence refers to the coordinate sequence of the same monitoring device node at consecutive timestamps. The negative time sample sequence refers to the coordinate sequence generated after applying random time jitter and coordinate perturbation to the positive time sample sequence.
[0116] Specifically, for each monitoring device node, the installation location coordinates of the monitoring device node at multiple consecutive timestamps are collected. These coordinates are arranged into a sequence according to the order of the timestamps. This sequence is used as the positive time sample sequence of the monitoring device node. Then, the positive time sample sequence is copied, and a random time offset is applied to each timestamp in the copied sequence to change the position of the coordinate on the time axis. Random noise perturbation is applied to each coordinate value in the copied sequence to change the coordinate value. The sequence after time offset and coordinate perturbation is used as the negative time sample sequence of the monitoring device node.
[0117] S350. A time series model is trained based on positive and negative time sample sequences, so that the prediction error of the time series model for positive time sample sequences is smaller than that for negative time sample sequences, so as to generate time consistency features of each monitoring device node based on the trained time series model.
[0118] Among them, time consistency feature refers to the vectorized representation used to express the time behavior pattern of monitoring device nodes.
[0119] Specifically, the constructed positive and negative time sample sequences can be input into the time series model. The time series model predicts the coordinate value at the next time stamp based on the coordinate values at the previous several timestamps in the input sequence. The difference between the predicted coordinate value and the actual coordinate value is calculated as the prediction error, resulting in the first prediction error for the positive time sample sequence and the second prediction error for the negative time sample sequence. Then, the parameters of the time series model are updated by constraining the loss function, so that the first prediction error gradually decreases while the second prediction error gradually increases. Finally, the training process ensures that the prediction error of the time series model for the positive time sample sequence is less than that for the negative time sample sequence. After the time series model is trained, the coordinate sequence of each monitoring device node is input into the trained time series model, and the time series model outputs a feature vector, which is used as the time consistency feature of the monitoring device node.
[0120] In this embodiment, optionally, the specific implementation method for generating the time consistency characteristics of each monitoring device node may include the following steps: S3501. For each monitoring device node, collect the coordinate sequence of the current monitoring device node on continuous timestamps, and determine the collected coordinate sequence as the positive time sample sequence of the current monitoring device node.
[0121] Specifically, a monitoring device node can be identified as the current monitoring device node. The installation location coordinates of the current monitoring device node at multiple consecutive time points are extracted from its historical operation data according to the order of timestamps. These coordinates are arranged in chronological order to form a sequence, in which the order of the coordinates is consistent with the ascending order of the timestamps. The coordinate sequence obtained in the above manner is determined as the positive time sample sequence of the current monitoring device node. Then, the same collection and serialization operation is repeated for each monitoring device node, so that each monitoring device node has its own corresponding positive time sample sequence.
[0122] S3502. Apply random offset perturbation to the timestamps in the positive time sample sequence and apply random noise perturbation to the coordinate values in the positive time sample sequence. Determine the sequence after time offset and coordinate perturbation as the negative time sample sequence of the current monitoring device node.
[0123] Specifically, the positive time sample sequence of the current monitoring device node can be obtained, and a copy of the positive time sample sequence can be obtained. A randomly generated time offset is added to each timestamp value in the copy, causing the position of each coordinate on the time axis to move irregularly. At the same time, a randomly generated noise value is added to each coordinate value in the copy, causing the value of each coordinate to fluctuate randomly. The copy sequence that has completed the random timestamp offset perturbation and the random noise perturbation of the coordinate value is used as the negative time sample sequence of the current monitoring device node.
[0124] S3503. Input the positive time sample sequence and the negative time sample sequence into the time series prediction model respectively, and predict the coordinate value of each sequence at the next time stamp based on the time series prediction model.
[0125] Specifically, the system can obtain the positive and negative time sample sequences of the current monitored device node. The positive time sample sequence is fed into the time series prediction model as input data. The time series prediction model extracts the time dependency based on the coordinate values of the first few timestamps in the sequence, predicts the coordinate value of the next timestamp based on the extracted time dependency, and outputs the prediction result. At the same time, the negative time sample sequence is fed into the same time series prediction model as input data. The time series prediction model also extracts the time dependency based on the coordinate values of the first few timestamps in the sequence, predicts the coordinate value of the next timestamp based on the extracted time dependency, and outputs the prediction result.
[0126] S3504. Calculate the first prediction error of the time series prediction model for positive time sample sequences and the second prediction error for negative time sample sequences, respectively. Based on the constraint that the first prediction error is less than the second prediction error, update the parameters of the time series prediction model in reverse to obtain the trained time series prediction model.
[0127] Specifically, the following steps can be taken: First, obtain the next timestamp coordinates predicted by the time-series prediction model for the positive time sample sequence. Compare these predicted coordinates with the actual next timestamp coordinates in the positive time sample sequence, and calculate the difference as the first prediction error. Simultaneously, obtain the next timestamp coordinates predicted by the time-series prediction model for the negative time sample sequence, compare these predicted coordinates with the actual next timestamp coordinates in the negative time sample sequence, and calculate the difference as the second prediction error. Then, calculate a loss value based on the first and second prediction errors. The design goal of this loss value is to minimize the first prediction error and maximize the second prediction error, ensuring that the first prediction error is less than the second prediction error. Using this loss value, calculate the gradient of each trainable parameter in the time-series prediction model with respect to the loss value using the chain rule. Update the parameters of the time-series prediction model according to the direction of gradient descent, so that the relationship between the first and second prediction errors generated in the next forward propagation round better conforms to the constraint that the first prediction error is less than the second prediction error. Repeat the above steps of calculating the loss value and updating the parameters until the training stopping condition is met. The time-series prediction model at this point is then considered a successfully trained time-series prediction model.
[0128] S3505. Encode the coordinate sequences of each monitoring device node using the trained time-series prediction model to obtain the time consistency characteristics of each monitoring device node.
[0129] Specifically, a trained time-series prediction model can be obtained. For each monitoring device node, the coordinate sequence of that monitoring device node is extracted and fed into the trained time-series prediction model as input data. The time-series prediction model performs forward propagation calculation on the input data. During the encoding process, the time dependency in the coordinate sequence is extracted and a feature vector is output. This feature vector is used as the time consistency feature of the monitoring device node. The above encoding operation is repeated for all monitoring device nodes to obtain the time consistency feature corresponding to each monitoring device node.
[0130] S360: The spatial consistency features and temporal consistency features of each monitoring device node are fused to generate a device feature vector carrying spatiotemporal consistency features.
[0131] Specifically, for each monitoring device node, the spatial consistency feature vector and the temporal consistency feature vector of that monitoring device node are obtained. Then, the spatial consistency feature vector and the temporal consistency feature vector are concatenated end to end to form a longer fusion vector. This fusion vector is then input into a fully connected layer. The weight matrix of the fully connected layer performs linear transformation and nonlinear mapping on the fusion vector, and finally outputs a new feature vector. This new feature vector contains both the spatial layout pattern information of the monitoring device node expressed by the spatial consistency feature and the temporal behavior pattern information of the monitoring device node expressed by the temporal consistency feature. This new feature vector is used as the device feature vector carrying the spatiotemporal consistency feature of the monitoring device node.
[0132] S370. Integrate the semantic relationship graph with the spatial adjacency relationship between monitoring device nodes to construct a composite graph structure that integrates semantic relationships and spatial adjacency relationships.
[0133] S380. The device feature vector is used as the initial feature vector of each node in the composite graph structure. Information propagation and feature aggregation are performed on the composite graph structure through graph neural network to generate the updated feature vector of each node that integrates semantic information and spatial adjacency relationship.
[0134] S390. Input the updated feature vectors of each device node into the coordinate decoder to decode and obtain the position information of the correction device corresponding to each device node.
[0135] The technical solution of this application, when generating device feature vectors carrying spatiotemporal consistency features, constructs spatial positive sample pairs and spatial negative sample pairs based on installation location coordinates and trains an encoder. This brings the feature distance between device nodes within the same local area closer and pushes the feature distance between geographically distant device nodes further apart, thereby unsupervisedly learning the spatial layout rules of the monitoring network and generating spatial consistency features. It also constructs a time positive sample sequence based on coordinate sequences on continuous timestamps and applies random perturbations to generate a time negative sample sequence. This trains a time series model so that its prediction error for smooth sequences is smaller than its prediction error for perturbed sequences, thereby unsupervisedly learning the behavioral patterns of devices in the time dimension and generating time consistency features. By fusing spatial consistency features and time consistency features, the final generated device feature vector simultaneously contains spatial distribution constraints between devices and temporal smoothing constraints of the devices themselves. This provides a unified feature representation that conforms to both urban spatial topology and temporal dynamics for subsequent information propagation and coordinate correction in graph neural networks.
[0136] The embodiments of this application were validated on a real urban surveillance network platform, based on experiments conducted using over ten thousand surveillance devices and six months of continuous operational data from a large-scale project. The experiments employed multiple comparative methods, including traditional nonlinear optimization methods, fixed-weighted averaging methods, and the latest deep learning-based error correction networks. Evaluation metrics included average error, maximum error, cross-device tracking accuracy, and zero-shot generalization capability in newly deployed areas.
[0137] Experimental results show that the semantic correction method proposed in this application significantly outperforms existing methods in all metrics. Regarding correction accuracy, the average error and maximum error of this method are the best among all compared methods. In terms of generalization ability, the performance degradation of this method in newly deployed areas is much smaller than other methods, demonstrating its strong knowledge transfer and scenario adaptation capabilities obtained through self-supervised learning. In terms of business value, after correction using this method, the cross-device tracking accuracy and trajectory continuity are substantially improved, proving that this method can effectively support the performance leap of upper-layer business applications.
[0138] Further ablation experiments validated the contributions of each core module of this method. Removing the structured semantic unit extraction and semantic relation graph construction significantly increased the error correction, indicating that semantic information is crucial for understanding the functional relationships between devices and geographic entities. Removing self-supervised spatiotemporal consistency learning resulted in a sharp decline in error correction performance with a substantial reduction in labeled data, demonstrating the key role of self-supervised tasks in reducing data labeling dependence. Removing the composite graph structure and graph neural network inference, and replacing it with direct coordinate decoding, also significantly increased the error, indicating that the graph structure integrating semantic relations and spatial adjacency relationships is indispensable for capturing global consistency.
[0139] This method has been integrated as the core correction engine into the intelligent semantic correction module of the video cloud platform. This module supports automatic semantic discovery and structured semantic unit parsing for newly connected monitoring devices, provides a visual interface for displaying and managing spatiotemporal semantic graphs, and offers standardized semantic correction application programming interfaces (APIs) for other business systems to use. In actual projects, this method completed the entire process from semantic extraction to location correction for over ten thousand monitoring devices in a short time, significantly reducing manual intervention costs and greatly improving the vehicle full-domain trajectory restoration rate in the corrected large-screen application system.
[0140] Example 4 Figure 4 This is a schematic diagram of a semantic correction device for urban surveillance networks provided in an embodiment of this application. The device includes: The network data acquisition module 410 is used to extract structured semantic units from device metadata and operation and maintenance logs in the urban monitoring network, so as to construct a semantic relationship graph representing the functional relationship between monitoring devices and geographic entities based on the structured semantic units; wherein, the structured semantic units include monitoring devices, functional actions and geographic entities; The device feature determination module 420 is used to take the monitoring device nodes in the semantic relationship graph as the objects to be processed, and to jointly model the spatial location relationship and time series data of the monitoring device nodes through self-supervised learning, so as to learn the spatiotemporal distribution pattern of the monitoring device nodes in the urban monitoring network and generate a device feature vector carrying spatiotemporal consistency features. The composite graph structure construction module 430 is used to fuse the semantic relationship graph with the spatial adjacency relationship between monitoring device nodes to construct a composite graph structure that fuses semantic relationships and spatial adjacency relationships. The updated feature determination module 440 is used to take the device feature vector as the initial feature vector of each node in the composite graph structure, and perform information propagation and feature aggregation on the composite graph structure through a graph neural network to generate an updated feature vector of each node that integrates semantic information and spatial adjacency relationship. The device position correction module 450 is used to input the updated feature vector of each device node into the coordinate decoder to decode and obtain the correction device position information corresponding to each device node.
[0141] This application provides a semantic correction device for urban monitoring networks. When applied, the device extracts structured semantic units from device metadata and operation logs within the urban monitoring network. Based on these structured semantic units, a semantic relationship graph representing the functional relationships between monitoring devices and geographic entities is constructed. The structured semantic units include monitoring devices, functional actions, and geographic entities. Monitoring device nodes in the semantic relationship graph are treated as objects to be processed. A self-supervised learning method is used to jointly model the spatial location relationships and time-series data of the monitoring device nodes to learn the spatiotemporal distribution patterns of the monitoring device nodes in the urban monitoring network, generating device feature vectors carrying spatiotemporal consistency characteristics. The semantic relationship graph and the spatial adjacency relationships between monitoring device nodes are fused to construct a composite graph structure that integrates semantic relationships and spatial adjacency relationships. The device feature vectors are used as the initial feature vectors for each node in the composite graph structure. A graph neural network is used to perform information propagation and feature aggregation on the composite graph structure, generating updated feature vectors for each node that integrate semantic information and spatial adjacency relationships. The updated feature vectors of each device node are input into a coordinate decoder to decode and obtain the correction device location information corresponding to each device node. The technical solution of this application achieves effective integration of functional semantic information and spatial information by extracting structured semantic units to construct a semantic relationship graph; it generates device feature vectors carrying spatiotemporal consistency features by jointly modeling spatial location relationships and time series data through self-supervised learning, thus solving the problem of excessive reliance on manually labeled data; and it solves the problem of existing methods being unable to integrate semantic information and lacking spatiotemporal joint modeling capabilities by constructing a composite graph structure and using graph neural networks for information propagation and feature aggregation, thereby improving the accuracy and intelligence level of device position correction.
[0142] Based on the above-mentioned device, optionally, the network data acquisition module 410 is specifically used to perform text parsing on the device metadata and operation and maintenance logs, identify the monitoring device name as the monitoring device and the geographic entity name as the geographic entity from the parsed text; perform syntactic structure parsing on the parsed text based on dependency parsing, extract functional action words connecting the monitoring device and the geographic entity from the syntactic structure parsing results based on a preset relation extraction rule template; combine the monitoring device, the functional action, and the geographic entity into a structured semantic unit; construct directed relation edges with the monitoring device as the source node, the geographic entity as the target node, and the functional action as the connecting edge, and aggregate all directed relation edges to generate a semantic relation graph representing the functional relationship between the monitoring device and the geographic entity.
[0143] Based on the above-mentioned device, optionally, the device feature determination module 420 includes: The sample pair construction unit is used to obtain the installation location coordinates of each monitoring device node based on the monitoring device nodes in the semantic relationship graph; construct spatial positive sample pairs based on the coordinate pairs of monitoring device nodes in the same local area; and construct spatial negative sample pairs based on the coordinate pairs of monitoring device nodes whose geographical distance exceeds a preset threshold. A spatial feature determination unit is used to train an encoder based on the spatial positive sample pair and the spatial negative sample pair, such that the feature distance of the spatial positive sample pair in the representation space is less than the feature distance of the spatial negative sample pair in the representation space, so as to generate spatial consistency features of each monitoring device node based on the trained encoder. The sample sequence construction unit is used to construct a positive time sample sequence based on the coordinate sequence of each monitoring device node on a continuous timestamp, and to apply random time jitter and coordinate perturbation to the positive time sample sequence to generate a negative time sample sequence. The time feature determination unit is used to train a time series model based on the positive time sample sequence and the negative time sample sequence, so that the prediction error of the time series model for the positive time sample sequence is less than the prediction error for the negative time sample sequence, so as to generate the time consistency features of each monitoring device node based on the trained time series model. The device feature determination unit is used to fuse the spatial consistency features and the temporal consistency features of each monitoring device node to generate a device feature vector carrying the spatiotemporal consistency features.
[0144] Based on the above-mentioned device, optionally, a spatial feature determination unit is used to calculate the geographical distance between any two monitoring device nodes based on the installation location coordinates of each monitoring device node; determine monitoring device nodes whose geographical distance is less than the adjacency threshold as a set of spatial neighbor nodes; randomly select two monitoring device nodes from the same set of spatial neighbor nodes, and determine the coordinate pair of the two monitoring device nodes as a spatial positive sample pair; randomly select two monitoring device nodes from two monitoring device nodes in different sets of spatial neighbor nodes whose geographical distance is greater than the distance threshold, and determine the coordinate pair of the two monitoring device nodes as a spatial negative sample pair; and compare the spatial positive sample pair with the spatial negative sample pair. The graph convolutional network encoder is input with negative sample pairs. Based on the graph convolutional network encoder, it outputs the first feature distance of the positive sample pairs in the representation space and the second feature distance of the negative sample pairs in the representation space. Based on the constraint that the first feature distance is less than the second feature distance, the parameters of the graph convolutional network encoder are updated in reverse until the difference between the first feature distance and the second feature distance reaches a preset interval threshold, thus obtaining the trained graph convolutional network encoder. The trained graph convolutional network encoder is used to encode the installation location coordinates of each monitoring device node to obtain the spatial consistency features of each monitoring device node.
[0145] Based on the above-mentioned device, optionally, a time feature determination unit is used to: collect the coordinate sequence of the current monitoring device node on consecutive timestamps for each monitoring device node; determine the collected coordinate sequence as the positive time sample sequence of the current monitoring device node; apply random offset perturbation to the timestamps in the positive time sample sequence and apply random noise perturbation to the coordinate values in the positive time sample sequence; determine the sequence after time offset and coordinate perturbation as the negative time sample sequence of the current monitoring device node; input the positive time sample sequence and the negative time sample sequence into the time series prediction model respectively; predict the coordinate values of each sequence at the next timestamp based on the time series prediction model; calculate the first prediction error of the time series prediction model for the positive time sample sequence and the second prediction error for the negative time sample sequence respectively; update the parameters of the time series prediction model in reverse based on the constraint that the first prediction error is less than the second prediction error, and obtain the trained time series prediction model; encode the coordinate sequence of each monitoring device node using the trained time series prediction model to obtain the time consistency features of each monitoring device node.
[0146] Based on the above-mentioned device, optionally, the composite graph structure construction module 430 includes: A node set construction unit is used to obtain all monitoring device nodes and all geographic entity nodes from the semantic relationship graph, and to use the monitoring device nodes and the geographic entity nodes together as a node set of a composite graph structure. The semantic relationship edge construction unit is used to extract the functional action relationship between each monitoring device node and each geographic entity node based on the structured semantic units in the semantic relationship graph, and to construct the semantic relationship edge in the composite graph structure based on the functional action relationship; The spatial adjacency edge construction unit is used to calculate the geographical distance between every two monitoring device nodes based on the installation location coordinates of each monitoring device node. When the geographical distance is less than a preset spatial adjacency threshold, a spatial adjacency edge is constructed between the two monitoring device nodes. The composite graph generation unit is used to merge the semantic relation edges with the spatial adjacency edges to generate a composite graph structure that integrates semantic relations and spatial adjacency relations.
[0147] Based on the above-described apparatus, optionally, the updated feature determination module 440 includes: The initial feature determination unit is used to use the device feature vector carrying the spatiotemporal consistency feature as the initial feature vector of each monitoring device node in the composite graph structure, and to use the random initialization vector as the initial feature vector of each geographic entity node in the composite graph structure. The embedding vector determination unit is used to obtain the current feature vector of the current center node and the current feature vectors of all its neighboring nodes for each center node in the composite graph structure, and determine the relationship embedding vector based on the relationship type between the current center node and each neighboring node. The attention weight determination unit is used to calculate the attention weight between the current center node and each neighbor node based on the current feature vector of the center node, the current feature vector of the neighbor nodes, and the relationship embedding vector. The feature vector update unit is used to perform a weighted summation of the current feature vectors of each neighboring node based on the attention weights, and then use the weighted summation result as the updated feature vector of the current center node after a nonlinear transformation. The updated feature determination unit is used to repeatedly execute the steps of calculating the attention weight and determining the updated feature vector until a preset number of iterations is reached. The updated feature vector of each node obtained in the last iteration is determined as the updated feature vector of each node that integrates semantic information and spatial adjacency relationship.
[0148] Based on the above-mentioned device, optionally, the equipment position correction module 450 includes: The post-correction coordinate determination unit is used to input the updated feature vectors of each monitoring device node into the coordinate decoder, and the multilayer perceptron network based on the coordinate decoder maps the updated feature vectors into post-correction coordinates. The deviation value determination unit is used to determine the coordinate deviation value of the monitoring equipment node based on the difference between the corrected coordinates and the original observed coordinates of the monitoring equipment node. The total loss value determination unit is used to determine the total loss value based on the semantic alignment loss value corresponding to each structured semantic unit and the spatiotemporal consistency loss value of each monitoring device node. The device location correction unit is used to update the parameters of the graph attention network and the parameters of the coordinate decoder in reverse based on the total loss value until the total loss value converges, and to determine the corrected coordinates of each monitoring device node in the converged state as the final output corrected device location information.
[0149] The semantic correction device for urban monitoring networks provided in this application can execute the semantic correction method for urban monitoring networks provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the method execution.
[0150] It is worth noting that the various units and modules included in the above system are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this application.
[0151] Example 5 Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 A block diagram is shown of an exemplary electronic device 50 suitable for implementing embodiments of the present application. Figure 5 The electronic device 50 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0152] like Figure 5 As shown, the electronic device 50 is represented in the form of a general-purpose computing device. The components of the electronic device 50 may include, but are not limited to: one or more processors or processing units 501, system memory 502, and bus 503 connecting different system components (including system memory 502 and processing unit 501).
[0153] Bus 503 represents one or more of several bus architectures, including memory buses or memory electronics, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0154] Electronic device 50 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 50, including volatile and non-volatile media, removable and non-removable media.
[0155] System memory 502 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 504 and / or cache memory 505. Electronic device 50 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 506 may be used to read and write non-removable, non-volatile magnetic media (… Figure 5 Not shown (usually referred to as a hard drive). Although Figure 5As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a floppy disk) and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 503 via one or more data media interfaces. Memory 502 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.
[0156] A program / utility 508 having a set (at least one) of program modules 507 may be stored, for example, in memory 502. Such program modules 507 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 507 typically perform the functions and / or methods described in the embodiments of this application.
[0157] Electronic device 50 can also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 510, etc.), and with one or more devices that enable a user to interact with electronic device 50, and / or with any device that enables electronic device 50 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 511. Furthermore, electronic device 50 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 512. As shown, network adapter 512 communicates with other modules of electronic device 50 via bus 503. It should be understood that, although... Figure 5 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 50, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0158] The processing unit 501 executes various functional applications and page processing by running programs stored in the system memory 502, such as implementing the semantic correction method for urban monitoring networks provided in the embodiments of this application.
[0159] Example 6 This application embodiment also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a semantic correction method for urban monitoring networks, the method comprising: Structured semantic units are extracted from device metadata and operation and maintenance logs in the urban monitoring network to construct a semantic relationship graph representing the functional relationship between monitoring devices and geographic entities based on the structured semantic units; wherein, the structured semantic units include monitoring devices, functional actions, and geographic entities; The monitoring device nodes in the semantic relationship graph are taken as the objects to be processed. The spatial location relationship and time series data of the monitoring device nodes are jointly modeled through self-supervised learning to learn the spatiotemporal distribution pattern of the monitoring device nodes in the urban monitoring network and generate device feature vectors carrying spatiotemporal consistency features. The semantic relationship graph is fused with the spatial adjacency relationship between monitoring device nodes to construct a composite graph structure that integrates semantic relationships and spatial adjacency relationships; The device feature vector is used as the initial feature vector of each node in the composite graph structure. Information propagation and feature aggregation are performed on the composite graph structure through a graph neural network to generate an updated feature vector of each node that integrates semantic information and spatial adjacency relationship. The updated feature vectors of each device node are input into the coordinate decoder to obtain the position information of the correction device corresponding to each device node.
[0160] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0161] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0162] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0163] Computer program code for performing the operations of the embodiments of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as C or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0164] Note that the above description is merely a preferred embodiment and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the concept of this application, and the scope of this application is determined by the scope of the appended claims.
Claims
1. A semantic rectification method for a city monitoring network, characterized in that, The method comprises: extracting structured semantic units from device metadata and operation and maintenance logs in a city monitoring network to construct a semantic relationship graph representing the functional relationship between monitoring devices and geographic entities based on the structured semantic units; wherein the structured semantic units include monitoring devices, functional actions and geographic entities; taking the monitoring device nodes in the semantic relationship graph as processing objects, jointly modeling the spatial position relationship and time series data of the monitoring device nodes through a self-supervised learning method to learn the spatiotemporal distribution rule of the monitoring device nodes in the city monitoring network, and generating device feature vectors carrying spatiotemporal consistency features; fuse the spatial adjacency relationship between the semantic relationship graph and the monitoring device nodes to construct a composite graph structure that integrates semantic relationship and spatial adjacency relationship; taking the device feature vectors as the initial feature vectors of the nodes in the composite graph structure, propagating information and aggregating features on the composite graph structure through a graph neural network to generate updated feature vectors of the nodes that integrate semantic information and spatial adjacency relationship; input the updated feature vectors of each device node into a coordinate decoder to obtain the rectified device location information corresponding to each device node.
2. The method of claim 1, wherein, The method comprises: performing text analysis on the device metadata and operation and maintenance logs, identifying monitoring device names as monitoring devices and identifying geographic entity names as geographic entities from the analyzed text; performing syntactic structure analysis on the analyzed text based on dependency syntax analysis, and extracting functional action words connecting the monitoring devices and the geographic entities from the syntactic structure analysis results based on a pre-set relationship extraction rule template; combine the monitoring devices, the functional actions and the geographic entities into structured semantic units; take the monitoring devices as source nodes, the geographic entities as target nodes, and the functional actions as connection edges to construct directed relationship edges, and aggregate all directed relationship edges to generate a semantic relationship graph representing the functional relationship between monitoring devices and geographic entities.
3. The method of claim 1, wherein, The method comprises: based on the monitoring device nodes in the semantic relationship graph, obtain the installation location coordinates of each monitoring device node; construct spatial positive sample pairs based on the coordinate pairs of monitoring device nodes in the same local area, and construct spatial negative sample pairs based on the coordinate pairs of monitoring device nodes with a geographical distance exceeding a pre-set threshold; train an encoder based on the spatial positive sample pairs and the spatial negative sample pairs, so that the feature distance of the spatial positive sample pairs in the feature space is less than the feature distance of the spatial negative sample pairs in the feature space, to generate spatial consistency features of each monitoring device node based on the trained encoder; constructing a time positive sample sequence based on coordinate sequences of each monitoring device node at continuous time stamps, generating a time negative sample sequence by applying random time jitter and coordinate disturbance to the time positive sample sequence; training a time sequence model based on the time positive sample sequence and the time negative sample sequence, so that a prediction error of the time sequence model on the time positive sample sequence is smaller than a prediction error of the time sequence model on the time negative sample sequence, to generate time consistency features of each monitoring device node based on the trained time sequence model; fusing the space consistency features and the time consistency features of each monitoring device node to generate a device feature vector carrying space-time consistency features.
4. The method of claim 3, wherein, The space consistency features of each monitoring device node are generated based on the trained encoder, including: calculating a geographical distance between each two monitoring device nodes based on installation position coordinates of each monitoring device node, and determining monitoring device nodes with a geographical distance less than a neighbor threshold as a set of spatial neighbor node sets; randomly selecting two monitoring device nodes from the same spatial neighbor node set, and determining a coordinate pair of the two monitoring device nodes as a space positive sample pair; randomly selecting a coordinate pair of two monitoring device nodes from different spatial neighbor node sets and with a geographical distance greater than a long-distance threshold as a space negative sample pair; inputting the space positive sample pair and the space negative sample pair into a graph convolution network encoder, and outputting a first feature distance of the space positive sample pair in a feature space and a second feature distance of the space negative sample pair in the feature space based on the graph convolution network encoder; updating parameters of the graph convolution network encoder in a reverse direction based on a constraint that the first feature distance is smaller than the second feature distance, until a difference between the first feature distance and the second feature distance reaches a preset interval threshold, to obtain a trained graph convolution network encoder; encoding installation position coordinates of each monitoring device node by using the trained graph convolution network encoder, to obtain space consistency features of each monitoring device node.
5. The method of claim 3, wherein, The time consistency features of each monitoring device node are generated based on the trained time sequence model, including: for each monitoring device node, collecting a coordinate sequence of the current monitoring device node at continuous time stamps, and determining the collected coordinate sequence as a time positive sample sequence of the current monitoring device node; applying random offset disturbance to time stamps in the time positive sample sequence, and applying random noise disturbance to coordinate values in the time positive sample sequence, and determining a sequence after time offset and coordinate disturbance as a time negative sample sequence of the current monitoring device node; inputting the time positive sample sequence and the time negative sample sequence into a time series prediction model respectively, and predicting coordinate values of each sequence at a next timestamp based on the time series prediction model; calculating a first prediction error of the time series prediction model for the time positive sample sequence and a second prediction error of the time series prediction model for the time negative sample sequence respectively, and inversely updating parameters of the time series prediction model based on a constraint that the first prediction error is smaller than the second prediction error to obtain a trained time series prediction model; encoding coordinate sequences of each monitoring device node by using the trained time series prediction model to obtain time consistency features of each monitoring device node.
6. The method of claim 1, wherein, The step of fusing the semantic relation graph and the spatial adjacency relation between the monitoring device nodes to construct a composite graph structure that fuses semantic relation and spatial adjacency relation includes: obtaining all monitoring device nodes and all geographic entity nodes from the semantic relation graph, and taking the monitoring device nodes and the geographic entity nodes as a node set of the composite graph structure; extracting a functional action relation between each monitoring device node and each geographic entity node based on a structured semantic unit in the semantic relation graph, and constructing a semantic relation edge in the composite graph structure based on the functional action relation; calculating a geographic distance between every two monitoring device nodes based on installation position coordinates of the monitoring device nodes, and constructing a spatial adjacency edge between the two monitoring device nodes when the geographic distance is smaller than a preset spatial adjacency threshold; merging the semantic relation edge and the spatial adjacency edge to generate the composite graph structure that fuses semantic relation and spatial adjacency relation.
7. The method of claim 1, wherein, The step of taking the device feature vector as an initial feature vector of each node in the composite graph structure, and performing information propagation and feature aggregation on the composite graph structure by using a graph neural network to generate an updated feature vector of each node that fuses semantic information and spatial adjacency relation includes: taking the device feature vector that carries the spatiotemporal consistency feature as an initial feature vector of each monitoring device node in the composite graph structure, and taking a randomly initialized vector as an initial feature vector of each geographic entity node in the composite graph structure; for each center node in the composite graph structure, obtaining a current feature vector of the current center node and current feature vectors of all neighbor nodes of the current center node, and determining a relation embedding vector based on a relation type between the current center node and each neighbor node; calculating an attention weight between the current center node and each neighbor node based on the current feature vector of the center node, the current feature vectors of the neighbor nodes, and the relation embedding vector; performing weighted summation on the current feature vectors of the neighbor nodes based on the attention weight, and taking a result of the weighted summation after nonlinear transformation as an updated feature vector of the current center node; repeating the steps of calculating the attention weight and determining the updated feature vector until a preset number of iterations is reached, and determining the updated feature vectors of the nodes obtained in the last iteration as the updated feature vectors of the nodes that fuse semantic information and spatial adjacency relation.
8. The method of claim 1, wherein, The updated feature vector of each device node is input into a coordinate decoder to obtain corresponding rectified device position information of each device node. The updated feature vector of each monitoring device node is input into a coordinate decoder, and the updated feature vector is mapped to rectified coordinates based on a multi-layer perception network of the coordinate decoder. A coordinate deviation value of the monitoring device node is determined based on a difference between the rectified coordinates and original observation coordinates of the monitoring device node. A total loss value is determined based on a semantic alignment loss value corresponding to each structured semantic unit and a spatio-temporal consistency loss value of each monitoring device node. Parameters of the graph attention network and parameters of the coordinate decoder are updated based on the total loss value until the total loss value converges, and rectified coordinates of each monitoring device node in the converged state are determined as final output rectified device position information.
9. A semantic rectification device for a city monitoring network, characterized in that, The apparatus includes: A network data acquisition module configured to extract structured semantic units from device metadata and operation and maintenance logs in a city monitoring network, and construct a semantic relationship graph representing functional relationships between monitoring devices and geographic entities based on the structured semantic units; wherein the structured semantic units include monitoring devices, functional actions, and geographic entities. A device feature determination module configured to take monitoring device nodes in the semantic relationship graph as processing objects, and jointly model spatial position relationships and time series data of the monitoring device nodes through a self-supervised learning method to learn spatio-temporal distribution rules of the monitoring device nodes in the city monitoring network, and generate device feature vectors carrying spatio-temporal consistency features. A composite graph structure construction module configured to fuse spatial adjacency relationships between the semantic relationship graph and monitoring device nodes, and construct a composite graph structure integrating semantic relationships and spatial adjacency relationships. An updated feature determination module configured to take the device feature vectors as initial feature vectors of nodes in the composite graph structure, and perform information propagation and feature aggregation on the composite graph structure through a graph neural network to generate updated feature vectors of the nodes integrating semantic information and spatial adjacency relationships. A device position rectification module configured to input the updated feature vectors of the device nodes into a coordinate decoder to obtain corresponding rectified device position information of the device nodes. 10.An electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the semantic rectification method for a city monitoring network as claimed in any one of claims 1-8.
