Indoor image position sensing method and system based on graph neural network

By constructing an indoor spatial topology graph model and multi-layer message passing of a graph neural network, the problems of insufficient accuracy and environmental sensitivity in existing indoor positioning technologies are solved, achieving high-precision, robust location awareness and adaptive positioning.

CN121921630APending Publication Date: 2026-04-24XIAN TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN TECH UNIV
Filing Date
2025-12-11
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing indoor positioning technologies, which rely solely on single-frame image input, suffer from insufficient location estimation accuracy, poor generalization ability, and sensitivity to environmental changes due to a lack of effective modeling of the deep relationship between spatial topology and visual semantics.

Method used

A spatial topology graph model of an indoor scene is constructed, multi-scale visual features are extracted, and cross-domain alignment and multi-layer message passing and aggregation are performed through graph neural networks to generate location-aware results.

Benefits of technology

It significantly improves the accuracy of location perception and environmental adaptability under single-frame image conditions, alleviates feature drift problems caused by changes in lighting, differences in viewing angles and occlusion, and supports incremental map updates and mobile deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921630A_ABST
    Figure CN121921630A_ABST
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence, discloses an indoor image position sensing method and system based on a graph neural network, and aims to solve the problems of low position estimation precision and poor generalization ability caused by lack of deep correlation modeling of spatial topology and visual semantics under the condition of a single-frame image in the prior art. The method comprises the following steps: constructing an indoor space topological graph model; extracting multi-scale visual features of the image; performing cross-domain alignment on the visual features and the graph nodes; performing multi-layer message passing and feature aggregation through a graph neural network; a location awareness result is generated based on the final node characterization. The system comprises corresponding function modules and supports incremental map updating and mobile terminal deployment. According to the method, the space structure and the visual semantics are fused, so that the positioning precision and the environment robustness are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence, specifically relating to an indoor image location perception method and system based on graph neural networks. Background Technology

[0002] With the increasing application of indoor positioning and spatial perception technologies in scenarios such as intelligent navigation, augmented reality, autonomous robot movement, and smart building management, location perception methods based on visual information have gradually become a research hotspot. Traditional indoor positioning solutions mostly rely on wireless signals (such as Wi-Fi and Bluetooth beacons) or inertial sensors, which suffer from high deployment costs, susceptibility to environmental interference, and limited accuracy. In recent years, image location recognition methods based on deep learning have extracted visual features through convolutional neural networks, achieving certain results in specific scenarios. However, these methods typically treat images as isolated data points, ignoring the topological relationships and semantic structures between physical areas in an indoor space. This results in weak model generalization ability, sensitivity to changes in viewpoint and occlusion, and difficulty in achieving accurate location inference in unfamiliar layouts.

[0003] Graph neural networks, as a deep learning architecture capable of modeling relationships between entities and disseminating structured information, offer a novel approach to integrating spatial topology and visual semantics. This technology abstracts indoor areas as graph nodes, defining paths or adjacency relationships as edges. It can aggregate visual and geometric features of adjacent areas during message passing, thereby enhancing the contextual consistency and robustness of location representation. However, existing attempts still face key challenges: firstly, there is a lack of effective mechanisms for automatically constructing a graph structure aligned with the real spatial topology from a single indoor image; secondly, existing graph neural networks struggle to establish accurate mappings between image features and graph nodes when processing dynamic viewpoint inputs, leading to semantic misalignment and topological mismatch in the location reasoning process.

[0004] In existing technologies, most image-based location awareness methods do not fully integrate prior spatial connectivity, relying solely on pixel-level feature matching, which fails to effectively distinguish areas that appear similar but are geographically distinct (such as multiple meeting rooms or corridor intersections). Furthermore, graph structure construction often depends on manually annotated floor plans or pre-scanned 3D models, limiting the system's deployment capabilities in unknown or dynamically changing environments. Moreover, the lack of joint modeling of visual observation uncertainty and topological connectivity reliability during graph neural network propagation makes location prediction susceptible to local feature noise, and the overall system's accuracy, robustness, and adaptability in complex indoor scenes urgently need improvement. Therefore, there is a pressing need for a location awareness method and system that can automatically construct a semantically-topologically consistent graph representation from a single image and achieve high accuracy and strong generalization through graph neural networks. Summary of the Invention

[0005] This invention provides an indoor image location perception method and system based on graph neural networks, aiming to solve the technical problems of insufficient location estimation accuracy, poor generalization ability, and sensitivity to environmental changes caused by existing indoor positioning technologies that rely solely on single-frame image input due to the lack of effective modeling of the deep correlation between spatial topology and visual semantics.

[0006] As one embodiment of the present invention, the method includes the following steps: constructing a spatial topology graph model of an indoor scene; extracting multi-scale visual features from the input image; aligning the multi-scale visual features with the spatial topology graph model across domains; performing multi-layer message passing and aggregation on the aligned node features through a graph neural network; and generating a location-aware result based on the aggregated graph node representation.

[0007] Furthermore, the construction of the spatial topology graph model of the indoor scene specifically includes: acquiring the indoor floor plan data of the target building; defining the node set of the graph model based on the rooms, corridors, doors, stairs, and elevator areas in the floor plan data; defining the edge set of the graph model based on the physical connectivity between the areas; assigning initial geometric attributes to each node, the initial geometric attributes including the node center coordinates, area, and shape descriptor; and assigning connection weights to each edge, the connection weights being determined by the travel distance and travel difficulty between adjacent areas.

[0008] Furthermore, the extraction of multi-scale visual features from the input image specifically includes: inputting the input image into a pre-trained convolutional neural network backbone model; extracting feature maps from different levels of the backbone model to form low-level texture features, mid-level structural features, and high-level semantic features; performing global average pooling on the feature maps of each level to obtain feature vectors of fixed dimensions; and concatenating the feature vectors of all levels to form the final multi-scale visual feature vector.

[0009] Furthermore, the cross-domain alignment of the multi-scale visual features with the spatial topology graph model specifically includes: calculating the similarity score between the multi-scale visual feature vector and the initial geometric attributes of each node in the graph model; the similarity score is calculated using a cosine similarity function; selecting the top K nodes with the highest similarity scores as candidate matching nodes; assigning visual feature embeddings to the candidate matching nodes, and setting the visual feature embeddings of the remaining nodes to zero; and concatenating the visual feature embeddings with the original geometric attributes of the nodes to form the fused initial node features.

[0010] Furthermore, the step of performing multi-layer message passing and aggregation on the aligned node features using a graph neural network specifically includes: setting the number of layers in the graph neural network to L; in the l-th layer, for each node in the graph, collecting the feature vectors output by all its first-order neighbor nodes in the l-th minus one layer; performing a weighted summation on the collected neighbor feature vectors, with the weights determined by the connection weights of the edges and the feature similarity between nodes; performing a linear transformation on the weighted summation result and adding it to the feature vector of the current node itself, and then processing it through a non-linear activation function to obtain the output feature of the node in the l-th layer; repeating the above process until message passing in the L-th layer is completed.

[0011] Furthermore, the generation of location-aware results based on the aggregated graph node representation specifically includes: calculating the dot product similarity between the feature vectors of all nodes output by the last layer of the graph neural network and the multi-scale visual feature vectors of the input image; normalizing the dot product similarity of all nodes to obtain a probability distribution; selecting the node with the highest probability value as the final location estimation result; and outputting the location estimation result in the form of the indoor area identifier corresponding to the node and its center coordinates.

[0012] In one embodiment of the present invention, the system includes: a spatial topology graph construction module for constructing a spatial topology graph model of an indoor scene; a multi-scale visual feature extraction module for extracting multi-scale visual features from an input image; a cross-domain feature alignment module for aligning the multi-scale visual features with the spatial topology graph model across domains; a graph neural network inference module for performing multi-layer message passing and aggregation on the aligned node features using a graph neural network; and a location-aware result generation module for generating location-aware results based on the aggregated graph node representations.

[0013] Furthermore, the spatial topology map construction module is specifically configured as follows: receiving the interior floor plan data of the target building; parsing the floor plan data to identify functional area units; generating nodes based on the boundary information of the functional area units; generating edges based on the doorway or passage information between the functional area units; calculating the geometric center coordinates, area, and outline Fourier descriptor of each node as initial geometric attributes; and calculating the connection weight of the edges based on the Euclidean distance between adjacent areas and the presence or absence of obstacles.

[0014] Furthermore, the multi-scale visual feature extraction module is specifically configured as follows: a convolutional neural network with a five-stage downsampling structure is used as the feature extraction backbone; features are extracted from the output feature maps of the third, fourth, and fifth stages respectively; global average pooling is performed on the feature maps of each stage to obtain feature vectors with dimensions of 512, 1024, and 2048; the three feature vectors are concatenated in sequence to form a multi-scale visual feature vector with a dimension of 3584.

[0015] Furthermore, the cross-domain feature alignment module is specifically configured as follows: initializing a sequence of all-zero vectors equal to the number of graph nodes; calculating the cosine similarity between the multi-scale visual feature vector and the concatenated vector of the initial geometric attributes of each node; sorting the similarity sequence in descending order and taking the node indices corresponding to the top five maximum values; assigning the multi-scale visual feature vector to the vector positions corresponding to these five nodes; and concatenating the assigned vector sequence with the original geometric attributes of the nodes again to form a fused node feature with a dimension of 3616.

[0016] Furthermore, the graph neural network inference module is specifically configured as follows: it adopts a graph attention network architecture; each layer contains an attention coefficient calculation unit and a feature aggregation unit; the attention coefficient is jointly determined by the source node features, the target node features and the edge weights; the feature aggregation adopts a weighted summation method, and the weights are the attention coefficients after softmax normalization; the graph neural network has a total of four layers, and the output feature dimension of each layer is 256.

[0017] Furthermore, the location-aware result generation module is specifically configured as follows: receiving all node feature matrices output by the graph neural network inference module; calculating the matrix product of the matrix and the multi-scale visual feature vector of the input image to obtain a similarity vector; applying the softmax function to the similarity vector to generate a node probability distribution; selecting the node number corresponding to the maximum value in the probability distribution; querying the pre-stored indoor area database according to the node number, and outputting the area name and center coordinates.

[0018] Furthermore, the system also includes a model training module for end-to-end training of the graph neural network; the model training module receives a labeled training dataset, which includes indoor image samples and their corresponding real-world location node labels; the loss function is cross-entropy loss, and the supervision signal is the one-hot encoded vector of the real-world location node; the optimizer uses a momentum-driven stochastic gradient descent algorithm with an initial learning rate of 0.001, a momentum coefficient of 0.9, and a weight decay coefficient of 0.0005.

[0019] Furthermore, during model training, data augmentation strategies are employed to enhance model robustness. These data augmentation strategies include random horizontal flipping, color jittering, Gaussian noise injection, and random occlusion of the input image. Simultaneously, structural perturbations are applied to the spatial topology graph model, including randomly deleting 5% of edges, randomly adding 3% of spurious connecting edges, and adding Gaussian noise with a mean of zero and a standard deviation of 0.1 meters to the geometric attributes of nodes.

[0020] Furthermore, the system is deployed on a mobile terminal device, including a smartphone, tablet, or wearable device; the mobile terminal device has a built-in inertial measurement unit to assist in determining the user's movement direction; when the position estimation results of two consecutive frames jump too much, the candidate nodes are further filtered by combining the direction data of the inertial measurement unit to eliminate nodes that contradict the movement direction.

[0021] Furthermore, the system supports incremental map updates; when a newly acquired image is detected as not matching any node in the existing spatial topology graph, a map update mechanism is triggered; the map update mechanism includes: adding the region corresponding to the new image as a new node to the graph model; finding the nearest neighbor existing node through an image matching algorithm; establishing bidirectional connection edges between the new node and the nearest neighbor node; initializing the geometric properties of the new node, freezing some of the underlying parameters of the graph neural network, and only fine-tuning the top-level classification head to adapt to the added node.

[0022] Compared with existing technologies, the advantages and positive effects of this invention are as follows: By constructing an explicit indoor spatial topology graph model and deeply fusing it with image visual features within a graph neural network framework, a strong correlation between visual observation and spatial structure is effectively established. This invention utilizes the message passing mechanism of graph neural networks to achieve collaborative reasoning between local visual cues and global topological constraints, significantly improving the accuracy of location perception under single-frame image conditions. Simultaneously, by introducing cross-domain feature alignment and multi-layer graph convolution aggregation, this invention effectively alleviates feature drift problems caused by changes in illumination, viewpoint differences, and partial occlusion, enhancing the model's environmental adaptability and robustness. Furthermore, this invention supports incremental map updates and mobile deployment, possessing good practicality and scalability, providing reliable technical support for indoor positioning, intelligent navigation, and location awareness services. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the overall technical architecture of an indoor image position perception method and system based on graph neural networks proposed in this invention.

[0024] Figure 2 This is a schematic diagram of the core principle framework of cross-domain feature alignment and graph neural network collaborative reasoning in this invention;

[0025] Figure 3 This is a logical flow framework diagram for constructing the indoor scene space topology model in this invention;

[0026] Figure 4 This is a flowchart illustrating the logical process of multi-scale visual feature extraction and fusion in this invention.

[0027] Figure 5This is a logical flow diagram of the multi-layer message passing and aggregation of the graph neural network in this invention;

[0028] Figure 6 This is a logical flowchart of the location perception result generation and post-processing mechanism in this invention.

[0029] Figure 7 This is a schematic diagram of the multi-level interaction relationship and data flow between the terminal device and the cloud map system in this invention. Detailed Implementation

[0030] This invention provides an indoor image location perception method and system based on graph neural networks. It aims to address the technical problems of existing indoor positioning technologies, which, relying solely on single-frame image input, suffer from insufficient location estimation accuracy, poor generalization ability, and sensitivity to environmental changes due to a lack of effective modeling of the deep correlation between spatial topology and visual semantics. The method constructs an explicit indoor spatial topology graph model and deeply fuses it with image visual features within a graph neural network framework, effectively establishing a strong correlation between visual observation and spatial structure. The specific embodiments of this invention will be described in detail below with reference to the accompanying drawings.

[0031] As one embodiment of the present invention, the method includes the following steps: constructing a spatial topology graph model of an indoor scene; extracting multi-scale visual features from the input image; aligning the multi-scale visual features with the spatial topology graph model across domains; performing multi-layer message passing and aggregation on the aligned node features through a graph neural network; and generating a location-aware result based on the aggregated graph node representation.

[0032] The construction of the spatial topology graph model for the indoor scene specifically includes: acquiring the indoor floor plan data of the target building; defining the node set of the graph model based on the rooms, corridors, doors, stairs, and elevator areas in the floor plan data; defining the edge set of the graph model based on the physical connectivity between the areas; assigning initial geometric attributes to each node, including the node center coordinates, area, and shape descriptor; and assigning connection weights to each edge, where the connection weights are determined by the travel distance and travel difficulty between adjacent areas.

[0033] In practical implementation, acquiring the interior floor plan data of the target building refers to reading two-dimensional vector graphic data containing information such as walls, doors and windows, and functional area divisions from a building information model database, digitized architectural drawings, or laser scanning point cloud reconstruction results. This data is stored in standard formats such as DXF or SVG, where each closed polygon represents an independent functional area unit. After parsing the data, the system identifies all closed areas and abstracts them as nodes in the graphical model. If there are doorways, passageways, or open interfaces between two adjacent areas, the system determines that they have physical connectivity and establishes an undirected edge between the corresponding two nodes. If two areas are completely isolated by a solid wall, no edge connection is established. The initial geometric attributes of each node are calculated as follows: the node center coordinates are obtained by calculating the centroid of the corresponding polygon; the area of ​​the area is obtained by applying the shoelace formula to the vertex coordinates of the polygon; the shape descriptor uses the contour Fourier descriptor, which is constructed by performing a discrete Fourier transform on the boundary contour of the area and retaining the first twenty low-frequency coefficients to form a 160-dimensional vector. The connection weight calculation formula for each edge is:

[0034]

[0035] Where, d ij This represents the Euclidean distance between the centers of node i and node j, in meters; ij This is a binary variable, taking a value of one when there are obstacles between two areas, such as normally closed fire doors, steps, or narrow passages; otherwise, it is zero. α is the passage difficulty adjustment coefficient, set to 2.5. This weight reflects the actual passage cost from one area to an adjacent area; a larger value indicates easier passage.

[0036] The extraction of multi-scale visual features from the input image specifically includes: inputting the input image into a pre-trained convolutional neural network backbone model; extracting feature maps from different levels of the backbone model to form low-level texture features, mid-level structural features, and high-level semantic features; performing global average pooling on the feature maps of each level to obtain feature vectors of fixed dimensions; and concatenating the feature vectors of all levels to form the final multi-scale visual feature vector.

[0037] In its implementation, the convolutional neural network backbone model employs a deep residual network architecture with a five-stage downsampling structure, pre-trained on the ImageNet large-scale image classification task. The input image size is uniformly adjusted to a 224-pixel multi-224-pixel RGB three-channel tensor. The system extracts features from the output feature maps of the third, fourth, and fifth stages, respectively. The resolutions of these three stages are 28x28, 14x14, and 7x7, with 512, 1024, and 2048 channels, respectively. Global average pooling is performed on the feature map of each stage, i.e., the arithmetic mean of all spatial locations in each channel is taken, thereby compressing the three-dimensional feature map into a one-dimensional vector. This yields three fixed-dimensional feature vectors with dimensions of 512, 1024, and 2048, respectively. These three vectors are concatenated sequentially to form a multi-scale visual feature vector with a dimension of 3584. This vector simultaneously contains local edge and texture information, mesoscopic object layout structure, and high-level scene semantic category information, providing rich visual cues for subsequent cross-domain alignment.

[0038] The cross-domain alignment of the multi-scale visual features with the spatial topology graph model specifically includes: calculating the similarity score between the multi-scale visual feature vector and the initial geometric attributes of each node in the graph model; the similarity score is calculated using a cosine similarity function; selecting the top K nodes with the highest similarity scores as candidate matching nodes; assigning visual feature embeddings to the candidate matching nodes, and setting the visual feature embeddings of the remaining nodes to zero; and concatenating the visual feature embeddings with the original geometric attributes of the nodes to form the fused initial node features.

[0039] In the specific implementation, the initial geometric attribute vector of each node (containing two-dimensional center coordinates, one-dimensional area, and one-hundred-sixty-dimensional shape descriptors, for a total of one hundred and sixty-three dimensions) is first multiplied by a learnable projection matrix, mapping it to the same three-thousand-five-eighty-four-dimensional space as the multi-scale visual feature vector. Then, the cosine similarity between the projected geometric attribute vector and the multi-scale visual feature vector of the input image is calculated using the following formula:

[0040]

[0041] Where v is a multi-scale visual feature vector, g i Let s be the geometric attribute vector projected from the i-th node. iThe similarity scores of all N nodes are sorted in descending order, and the top five nodes with the highest scores are selected as candidate matching nodes. The system initializes a sequence of all-zero vectors of length N, with each position corresponding to a graph node. The multi-scale visual feature vector is assigned to the corresponding positions of these five candidate nodes, while the remaining positions remain as zero vectors. Next, each non-zero vector in the visual feature embedding vector sequence is concatenated with the original 160-dimensional geometric attribute vector of the corresponding node to form a fused node feature with a dimension of 3747. For nodes that are not selected, their fused features are formed by concatenating zero vectors with geometric attributes, ensuring that all nodes have complete initial input features.

[0042] The process of performing multi-layer message passing and aggregation on aligned node features using a graph neural network specifically includes: setting the number of layers in the graph neural network to L; in the l-th layer, for each node in the graph, collecting the feature vectors output by all its first-order neighbor nodes in the l-th minus one layer; performing a weighted summation on the collected neighbor feature vectors, with the weights determined by the connection weights of the edges and the feature similarity between nodes; performing a linear transformation on the weighted summation result and adding it to the current node's own feature vector, and then processing it through a non-linear activation function to obtain the output feature of the node in the l-th layer; repeating the above process until message passing in the L-th layer is completed.

[0043] In its implementation, the graph neural network adopts a graph attention network architecture, consisting of four layers. Each layer contains an attention coefficient calculation unit and a feature aggregation unit. For any node i in the l-th layer, it receives messages from all its first-order neighbor nodes j. Attention coefficients... The calculation formula is:

[0044]

[0045] in, Let be the output feature vector of node i at the l-th minus one layer; W is a learnable weight matrix used to project the input features into the 256-dimensional latent space; || denotes the vector concatenation operation; a is a learnable attention vector; the negative slope of LeakyReLU is set to 0.2; w ij β represents the edge connection weights; β is the topological prior adjustment factor, set to 0.8. This formula encodes both visual semantic similarity and topological connectivity into the attention mechanism. Feature aggregation uses a weighted summation method:

[0046]

[0047] Here, N(i) represents the set of neighbors of node i, and σ is the ReLU activation function. The input of the first layer is the fused initial features of the nodes, which are reduced to 256 dimensions by a linear transformation before being used in the calculation. After four layers of message passing, the feature vector of each node has fused the visual and topological information of its four-hop neighborhood, forming a globally context-aware node representation.

[0048] The specific steps for generating location-aware results based on the aggregated graph node representation include: calculating the dot product similarity between the feature vectors of all nodes output from the last layer of the graph neural network and the multi-scale visual feature vectors of the input image; normalizing the dot product similarity of all nodes to obtain a probability distribution; selecting the node with the highest probability value as the final location estimation result; and outputting the location estimation result in the form of the indoor area identifier corresponding to the node and its center coordinates.

[0049] In its implementation, the system constructs an N-by-256 matrix H from the N 256-dimensional node feature vectors output by the fourth layer of the graph neural network. The multi-scale visual feature vector v of the input image is mapped to a 256-dimensional query vector q through a learnable linear projection layer. The matrix product of H and q is calculated to obtain an N-dimensional similarity vector s, where the i-th element is... Apply the softmax function to this vector:

[0050]

[0051] The normalized node probability distribution p is obtained. The system selects the node index corresponding to the maximum value in p. The index is used to query the pre-stored indoor area database to obtain the corresponding area name, such as "Meeting Room A" or "East Corridor," as well as the center coordinates (x, y) of the node. These coordinates are based on the global coordinate system of the building floor plan and are in meters. The final output location-aware result includes an area identifier string and two-dimensional coordinate values.

[0052] The system also includes a model training module for end-to-end training of the graph neural network. The model training module receives a labeled training dataset, which includes indoor image samples and their corresponding real-world location node labels. The loss function is cross-entropy loss, and the supervision signal is the one-hot encoded vector of the real-world location node. The optimizer uses a stochastic gradient descent algorithm with momentum, an initial learning rate of 0.001, a momentum coefficient of 0.9, and a weight decay coefficient of 0.0005.

[0053] During training, the system loads a training set containing 100,000 image-location labels. Each label is an integer indicating the ground truth node number where the image was captured. The loss function is defined as:

[0054]

[0055] Where y is the one-hot encoded vector of the true location. Training uses a batch size of 32, traversing all training samples in each round. To improve model robustness, data augmentation strategies are employed: random horizontal flipping (50% probability) of the input image, color jitter (brightness, contrast, and saturation perturbation amplitude of 0.2), Gaussian noise injection (standard deviation of 0.05), and random occlusion (randomly selecting 10% to 30% of rectangular regions in the image and blacking them out). Simultaneously, structural perturbations are applied to the spatial topology graph model: in each training round, 5% of the edges in the graph are randomly deleted to simulate temporary closed regions; 3% of spurious connected edges are randomly added to enhance the model's tolerance to erroneous topologies; and Gaussian noise with a mean of zero and a standard deviation of 0.1 meters is added to the center coordinates of all nodes to simulate map surveying errors.

[0056] The system is deployed on a mobile terminal device, including a smartphone, tablet, or wearable device. The mobile terminal device has a built-in inertial measurement unit (IMU) to assist in determining the user's movement direction. When the position estimation results of two consecutive frames jump too much, the candidate nodes are further filtered by combining the direction data of the IMU to eliminate nodes that contradict the movement direction.

[0057] During the mobile inference phase, the system processes images captured by the camera at a frequency of five frames per second. For the t-th frame, the system outputs a probability distribution p_t. If the estimated position in the sub-t-th frame is node i, the node with the highest probability in the t-th frame is j, and the distance between i and j in the image exceeds three hops, then it is considered an abnormal jump. At this time, the system reads the acceleration and angular velocity data recorded by the inertial measurement unit in the past second and estimates the user's current movement direction vector d through integration. The displacement vector Δr from node i to node j is calculated. If the angle between d and Δr is greater than 120 degrees, then the jump is considered to contradict the physical movement direction. The system sets the probability of node j to zero and reselects the node with the highest probability from the remaining nodes as the final estimation result. This post-processing mechanism effectively suppresses positioning drift caused by image blur, drastic changes in viewing angle, or brief occlusion.

[0058] The system supports incremental map updates; when a newly acquired image is detected as not matching any node in the existing spatial topology map, a map update mechanism is triggered; the map update mechanism includes: adding the region corresponding to the new image as a new node to the graph model; finding the nearest neighbor existing node through an image matching algorithm; establishing bidirectional connection edges between the new node and the nearest neighbor node; initializing the geometric properties of the new node, freezing some of the underlying parameters of the graph neural network, and only fine-tuning the top-level classification head to adapt to the added node.

[0059] When the map update condition is met—that is, the maximum node probability of five consecutive frames is below the threshold of 0.3—the system initiates the incremental update process. First, the current image and its acquisition location (manually labeled by the user or roughly located by other sensors) are used as new region samples. Using SIFT feature matching or deep feature nearest neighbor search, the visually most similar node k is found in the existing map. The new region is abstracted as a new node n, whose geometric attributes are initialized by the approximate location provided by the user, its area is set to a default value of 25 square meters, and its shape descriptor is set to a circular template. A bidirectional edge is established between nodes n and k, with the connection weights calculated according to the aforementioned formula. Subsequently, the system freezes the parameters of the first to third layers of the graph neural network, only fine-tuning the weight matrix W of the fourth layer and the final projection layer. Fine-tuning uses the labeled data of the new nodes, with twenty training epochs and a learning rate reduced to 0.0001. This mechanism allows the system to dynamically expand the map coverage and adapt to changes in the internal layout of buildings without retraining the entire model.

[0060] In summary, this embodiment effectively establishes a strong correlation between visual observation and spatial structure by constructing an explicit indoor spatial topology graph model and deeply fusing it with image visual features within a graph neural network framework. Utilizing the message passing mechanism of graph neural networks, collaborative reasoning between local visual cues and global topological constraints is achieved, significantly improving the accuracy of location perception under single-frame image conditions. Simultaneously, by introducing cross-domain feature alignment and multi-layer graph convolutional aggregation, the feature drift problem caused by changes in illumination, viewpoint differences, and partial occlusion can be effectively mitigated, enhancing the model's environmental adaptability and robustness. Furthermore, it supports incremental map updates and mobile deployment, possessing good practicality and scalability, providing reliable technical support for indoor positioning, intelligent navigation, and location awareness services.

Claims

1. An indoor image location perception method based on graph neural networks, characterized in that, include: Construct a spatial topology graph model of an indoor scene. The spatial topology graph model includes a set of nodes defined by functional areas, a set of edges defined by physical connectivity, the initial geometric attributes of the nodes, and the connection weights of the edges. Multi-scale visual features are extracted from the input image. These multi-scale visual features are obtained by extracting feature maps from different levels of a pre-trained convolutional neural network backbone model and then concatenating them after global average pooling. Cross-domain alignment of the multi-scale visual features with the spatial topology graph model includes calculating the cosine similarity between the multi-scale visual feature vector and the initial geometric attributes of each node, selecting the top K nodes with the highest similarity as candidate matching nodes, and assigning the multi-scale visual feature vector to the candidate matching nodes to form the fused initial node features. The aligned node features are processed by a graph neural network through multi-layer message passing and aggregation. In each layer, the graph neural network calculates the attention coefficient based on the features of neighboring nodes, edge connection weights and feature similarity between nodes, and then processes the neighboring features by weighted summation and non-linear activation function to update the node features. The location-aware result is generated based on the aggregated graph node representation, including calculating the dot product similarity between the feature vectors of each node output by the last layer of the graph neural network and the multi-scale visual feature vector. After normalization, the node with the highest probability is selected as the final location estimation result and its corresponding region identifier and center coordinates are output.

2. The indoor image location perception method based on graph neural networks according to claim 1, characterized in that, Constructing a spatial topology model of the indoor scene, including: Obtain the interior floor plan data of the target building, which includes information on walls, doors and windows, and functional area divisions; The node set of the graphical model is defined based on the rooms, corridors, doors, stairs, and elevator areas in the aforementioned interior floor plan data; Define the edge set of the graph model based on the physical connectivity between regions; Assign initial geometric attributes to each node, including node center coordinates, region area, and shape descriptor; Each edge is assigned a connection weight, which is determined by the travel distance and travel difficulty between adjacent regions.

3. The indoor image location perception method based on graph neural networks according to claim 2, characterized in that, Extracting multi-scale visual features from the input image, including: The input image is fed into a pre-trained convolutional neural network backbone model; Feature maps are extracted from different levels of the backbone model to form low-level texture features, mid-level structural features and high-level semantic features; Perform global average pooling on the feature maps of each level to obtain feature vectors of fixed dimensions; then concatenate the feature vectors of all levels to form the final multi-scale visual feature vector.

4. The indoor image location perception method based on graph neural networks according to claim 3, characterized in that, Cross-domain alignment of the multi-scale visual features with the spatial topology graph model includes: The similarity score between the multi-scale visual feature vector and the initial geometric attributes of each node in the graph model is calculated, and the similarity score is obtained by the cosine similarity function. Select the top K nodes with the highest similarity scores as candidate matching nodes; Assign visual feature embeddings to the candidate matching nodes, and set the visual feature embeddings of the remaining nodes to zero; The visual features are embedded and vector-concatenated with the original geometric attributes of the node to form the initial features of the fused node.

5. The indoor image location perception method based on graph neural networks according to claim 4, characterized in that, The aligned node features are processed through multi-layer message passing and aggregation using a graph neural network, including: The graph neural network is set to have L layers. At layer l, for each node in the graph, collect the feature vectors output by all its first-order neighbor nodes at layer l minus layer l. The collected neighbor feature vectors are weighted and summed, with the weights determined by the connection weights of the edges and the feature similarity between nodes. The weighted summation result is linearly transformed and added to the feature vector of the current node, and then processed by a nonlinear activation function to obtain the output feature of the node in the l-th layer. Repeat the above process until message passing at layer L is complete.

6. The indoor image location perception method based on graph neural networks according to claim 5, characterized in that, Location-aware results are generated based on the aggregated graph node representations, including: For each node feature vector output from the last layer of the graph neural network, calculate the dot product similarity with the multi-scale visual feature vector of the input image; Normalize the dot product similarity of all nodes to obtain the probability distribution; The node with the highest probability value is selected as the final location estimation result; The location estimation result is output in the form of the indoor area identifier corresponding to the node and its center coordinates.

7. The indoor image location perception method based on graph neural networks according to claim 1, characterized in that, During model training, data augmentation strategies are employed to enhance model robustness. These strategies include random horizontal flipping, color jittering, Gaussian noise injection, and random occlusion of the input image. Simultaneously, structural perturbations are applied to the spatial topology graph model, including randomly deleting 5% of edges, randomly adding 3% of spurious connected edges, and adding Gaussian noise with a mean of zero and a standard deviation of 0.1 meters to the geometric attributes of nodes.

8. The indoor image location perception method based on graph neural networks according to claim 1, characterized in that, When the position estimation results of two consecutive frames jump too much, the candidate nodes are further filtered by combining the orientation data of the inertial measurement unit built into the mobile terminal device, and nodes that contradict the direction of movement are eliminated.

9. An indoor image position sensing system based on graph neural networks, characterized in that, include: The spatial topology graph construction module is used to construct a spatial topology graph model of an indoor scene. The spatial topology graph model includes a set of nodes defined by functional areas, a set of edges defined by physical connectivity, the initial geometric attributes of the nodes, and the connection weights of the edges. A multi-scale visual feature extraction module is used to extract multi-scale visual features from the input image. The multi-scale visual features are obtained by extracting feature maps from different levels of the pre-trained convolutional neural network backbone model and then concatenating them after global average pooling. The cross-domain feature alignment module is used to perform cross-domain alignment between the multi-scale visual features and the spatial topology graph model. This includes calculating the cosine similarity between the multi-scale visual feature vector and the initial geometric attributes of each node, selecting the top K nodes with the highest similarity as candidate matching nodes, and assigning the multi-scale visual feature vector to the candidate matching nodes to form the fused initial node features. The graph neural network inference module is used to perform multi-layer message passing and aggregation on the aligned node features through the graph neural network. In each layer, the graph neural network calculates the attention coefficient based on the features of neighboring nodes, edge connection weights and feature similarity between nodes, and then processes the neighboring features by weighted summation and non-linear activation function to update the node features. The location-aware result generation module is used to generate location-aware results based on the aggregated graph node representations. This includes calculating the dot product similarity between the feature vectors of each node output from the last layer of the graph neural network and the multi-scale visual feature vectors, and after normalization, selecting the node with the highest probability as the final location estimation result and outputting its corresponding region identifier and center coordinates.