A mobile single-station indoor fingerprint positioning training method, a positioning method, a device, equipment, and a medium
Patent Information
- Application Number
- CN202611319011.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-10-16
AI Technical Summary
然而,穷举采集会带来显著的切换、采样与同步开销;固定或随机选择配置又难以稳定生成具有判别性的指纹
[0047]This method provides model and policy support for online localization through three phases of progressive training. In the data acquisition phase, the method collects RSS fingerprints for all path segments and all RIS configuration combinations at reference points with known coordinates, constructing a fingerprint matrix. This allows the dual-branch localization network to simultaneously learn the temporal dependencies between path segments and the joint features between path segment-configuration combinations from the complete fingerprint matrix during subsequent training, establishing a mapping between the fingerprint matrix and reference point locations. In the localization network training phase, the dual-branch structure extracts temporal dependency features along the path sequence and weighted joint features along the configuration combination dimension, respectively. These are then fused and mapped to a reference point probability distribution, enabling the localization model to simultaneously utilize the spatial diversity brought by the movement of mobile monostations and the electromagnetic diversity brought by RIS reconfiguration to distinguish different reference points. In the policy training phase, after freezing the localization model parameters, the configuration selection policy is trained using the localization error as feedback. This allows the policy to learn the ability to select subsequent RIS configurations based on accumulated observations without updating the localization model. After convergence, the policy can output configuration selections for each path segment during online deployment, replacing the exhaustive scanning of all configuration combinations and reducing the inference overhead of online localization. The localization model and configuration selection strategy output during the entire offline training process work together in the online phase, enabling the localization system to complete position estimation without exhaustively enumerating all RIS configuration sequences.
Smart Images

Figure CN122934460A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of indoor positioning, specifically to a mobile single-station indoor fingerprint positioning training method, positioning method, device, and medium. Background Technology
[0002] Indoor positioning supports a wide range of applications, including smart buildings, industrial automation, asset tracking, emergency response, and context-aware services. Wi-Fi fingerprint-based indoor positioning methods have attracted significant attention due to their ability to reuse existing wireless infrastructure and the fact that they only require Received Signal Strength (RSS) measurements without the need for dedicated ranging hardware. However, traditional Wi-Fi fingerprint positioning typically relies on multiple fixed sites to provide sufficient spatial coverage and location-dependent signal diversity. In large or rapidly changing indoor environments, achieving ideal positioning performance often requires high deployment, calibration, and maintenance costs.
[0003] Single Mobile Site (SMS) positioning transforms site movement into spatial observation diversity by acquiring RSS measurements at continuous spatial locations along a mobile path, thereby reducing reliance on dense fixed sites. Existing research demonstrates the feasibility of indoor positioning and identification using single mobile sites based on path-level RSS fingerprints. However, conventional single mobile site positioning is still constrained by uncontrollable wireless propagation environments: under occlusion, multipath, or non-line-of-sight (NLOS) conditions, different target locations may generate weak signals or highly similar RSS fingerprints, leading to longer measurement paths and reduced fingerprint separability and positioning accuracy.
[0004] Reconfigurable Intelligent Surfaces (RIS) can programmatically reshape the wireless propagation environment. Under different phase configurations, RIS can induce location-dependent RSS responses at the target location, introducing additional controllable electromagnetic diversity beyond the spatial diversity provided by mobile monolithic motion. These RIS-induced RSS variations help improve signal observability in weak signal / NLOS regions and increase the separability between previously similar mobile monolithic fingerprints. Existing RIS-assisted localization research has validated the potential of programmable wireless environments; however, how to efficiently coordinate RIS reconfiguration with mobile monolithic path observation remains insufficient research.
[0005] One intuitive approach is to exhaustively scan all candidate RIS configurations on each path segment of a mobile single station. However, exhaustive collection incurs significant switching, sampling, and synchronization overhead; and fixed or randomly selected configurations are difficult to reliably generate discriminative fingerprints. Summary of the Invention
[0006] The purpose of this invention is to provide a mobile single-station indoor fingerprint positioning training method, positioning method, device, and medium, which solves the problems in the prior art.
[0007] This invention is achieved through the following technical solution:
[0008] In a first aspect, embodiments of the present invention provide a mobile single-station indoor fingerprint positioning training method, comprising:
[0009] When the target device is at a reference point with known coordinates and a mobile single station continuously sends Wi-Fi signals to the target device in any path segment of a predefined path with a preset RIS configuration, the RSS fingerprints continuously received by the target device are collected to construct a fingerprint matrix. The rows of the fingerprint matrix correspond to each path segment, the columns correspond to each RIS configuration, and the matrix elements are RSS fingerprints. The RSS fingerprints are a preset number of received signal strength value sequences.
[0010] Based on multiple fingerprint matrices and the reference points corresponding to each fingerprint matrix, a dual-branch localization network is trained to obtain a trained localization model. The first branch of the dual-branch localization network is used to extract the temporal dependency features between RSS fingerprints of continuous path segments, and the second branch of the dual-branch localization network is used to extract the joint features of path segments and RIS configuration.
[0011] The parameters of the localization model are frozen. At test points with known coordinates, the terminal reward is constructed using the localization error output by the localization model. An adaptive configuration selection strategy is trained using a reinforcement learning algorithm to obtain the trained configuration selection strategy. The adaptive configuration selection strategy is used to model the configuration selection of each path segment as a sequential decision process. The sequential decision process uses the accumulated RSS fingerprint, the selected RIS configuration, and the path progress as the state, the candidate RIS configuration as the action, and the negative normalized localization error as the reward.
[0012] Preferably, the process of collecting continuously received RSS fingerprints from the target device and constructing a fingerprint matrix includes:
[0013] Based on the number of candidate RIS configurations N and the number of path segments T, a sparse fingerprint matrix of T rows and N columns is constructed, where each matrix element is the RSS fingerprint of the corresponding path segment and the corresponding RIS configuration. The matrix elements corresponding to the combination of unselected path segments and RIS configurations are set to zero.
[0014] At multiple reference points with known coordinates, the mobile single station sequentially traverses all path segments of the predefined path, and sequentially switches each RIS configuration in the candidate RIS configuration set on each path segment. The target device continuously collects RSS fingerprints under each combination of path segment and each candidate configuration to obtain a fingerprint matrix.
[0015] Preferably, the dual-branch localization network is trained based on multiple fingerprint matrices and the reference points corresponding to each fingerprint matrix to obtain a trained localization model, including:
[0016] For each fingerprint matrix and its corresponding reference point, the fingerprint matrix is input into the convolutional neural network of the first branch. The convolutional neural network performs convolution operation on the RSS fingerprint of each path segment to extract the local spatial features of the fingerprint of each path segment.
[0017] Local spatial features are input into the Long Short-Term Memory (LSTM) network in the order of path segments. The LSM network then performs state transfer along the temporal direction of the path segments to extract the temporal dependency features between the RSS fingerprints of continuous path segments, thus obtaining the output features of the first branch.
[0018] The fingerprint matrix is input in parallel into the convolutional neural network of the second branch, and the convolutional neural network of the second branch extracts the joint spatial features of the path segment and the RIS configuration combination.
[0019] The joint spatial features are input into the squeezing excitation module, which then performs global average pooling on each feature channel to obtain the channel description vector.
[0020] The channel description vector is mapped to channel weights through a fully connected layer and an activation function. The channel weights are then multiplied with the joint spatial features channel by channel to obtain the second branch output features after adaptive weighting.
[0021] The output features of the first branch and the output features of the second branch are concatenated into a fused feature. The fused feature is then input into a fully connected layer, which maps the fused feature into a reference point probability distribution vector. Each element of the reference point probability distribution vector represents the probability that the target device is located at the corresponding reference point.
[0022] Based on the cross-entropy loss between the reference point probability distribution vector and the real reference point label, the gradient descent algorithm is used to update the network parameters of the convolutional neural network, long short-term memory network, squeezed excitation module and fully connected layer. The training is completed with the goal of minimizing the cross-entropy loss, resulting in a trained localization model. The real reference point label is the one-hot encoded vector of the reference point.
[0023] Preferably, at test points with known coordinates, the terminal reward is constructed using the positioning error output by the positioning model, and an adaptive configuration selection strategy is trained using a reinforcement learning algorithm to obtain the trained configuration selection strategy, including:
[0024] The configuration selection for each path segment is modeled as a sequential decision-making process. The state of the sequential decision-making process consists of the accumulated RSS fingerprint, the selected RIS configuration, and the path progress. The action of the sequential decision-making process is to select one RIS configuration from the candidate RIS configuration set. The reward of the sequential decision-making process is: zero when the path segment traversal is not completed, and negative normalized positioning error when all path segments are traversed.
[0025] In each training round, for test points with known coordinates, the RIS configuration selection for each path segment is output according to the current strategy. After the data collection is completed, the frozen localization model outputs the position estimate.
[0026] The Euclidean distance between the estimated location and the actual coordinates of the test point is calculated as the positioning error.
[0027] The normalized positioning error is obtained by dividing the positioning error by the maximum possible positioning error within the positioning area, and the negative value of the normalized positioning error is used as the terminal reward.
[0028] The advantage function is calculated using the generalized advantage estimation method;
[0029] The network parameters of the policy are updated based on the dominance function and the truncation objective function of the near-end policy optimization algorithm to obtain the training completed configuration selection policy. The truncation objective function is as follows: calculate the untruncation objective value based on the probability ratio of the current policy to the old policy and the dominance function, truncate the probability ratio to a preset interval and calculate the truncated objective value, and take the smaller value between the untruncation objective value and the truncated objective value as the truncation objective function.
[0030] Preferably, the RIS configuration includes a shutdown configuration and N-1 active phase configurations. The shutdown configuration is the state in which the reconfigurable smart surface does not apply phase modulation, and the active phase configuration is the state in which each reflection unit of the reconfigurable smart surface modulates signal reflection according to a preset phase value.
[0031] Secondly, embodiments of the present invention provide a mobile single-station indoor fingerprint positioning method, including:
[0032] When a mobile single station traverses the current path segment of a predefined path, it inputs the accumulated RSS fingerprint, the selected RIS configuration, and the path progress into the configuration selection strategy that has been trained, and outputs the current RIS configuration selected for the current path segment.
[0033] The mobile station is controlled to continuously send Wi-Fi signals to the target device in the current path segment according to the current RIS configuration, collect the RSS fingerprints continuously received by the target device, and fill the RSS fingerprints into the fingerprint matrix according to the path segment order and the corresponding RIS configuration. The rows of the fingerprint matrix correspond to each path segment and the columns correspond to each RIS configuration.
[0034] After the mobile station has traversed all path segments, the fingerprint matrix is input into the trained localization model, and the localization model outputs the probability distribution of each reference point where the target device is located.
[0035] By selecting multiple reference points with the highest probabilities and then fusing the coordinates of each reference point according to the normalized probability weighting, the estimated position of the target device is obtained.
[0036] Preferably, the accumulated RSS fingerprint, the selected RIS configuration, and the path progress are input into the trained configuration selection strategy, and the output is the current RIS configuration selected for the current path segment, including:
[0037] The accumulated RSS fingerprint matrix, the selected RIS configuration matrix, and the number of currently traversed path segments are input into the bottom feature encoding layer of the configuration selection strategy. The bottom feature encoding layer encodes the fingerprint matrix, configuration matrix, and path progress respectively to obtain fingerprint encoding features, configuration encoding features, and progress encoding features.
[0038] The fingerprint coding feature, configuration coding feature and progress coding feature are concatenated into a joint coding feature. The joint coding feature is then input into a shared feature coding layer, which performs a nonlinear transformation on the joint coding feature to obtain a shared feature representation.
[0039] The shared feature representations are input into the fully connected layers of the Actor network and the Critic network, respectively. The fully connected layer of the Actor network maps the shared features to the probability distribution of each configuration in the candidate RIS configuration set. Based on the probability distribution, the candidate configuration with the highest probability is sampled or selected as the current RIS configuration. The fully connected layer of the Critic network maps the shared features to the value estimate of the current state. The value estimate is used to evaluate the quality of the state during the training phase.
[0040] Thirdly, embodiments of the present invention provide an offline training device for a reconfigurable smart surface-assisted localization network, comprising:
[0041] The data acquisition module is used to collect the RSS fingerprints continuously received by the target device when the target device is at a reference point with known coordinates and a mobile single station continuously sends Wi-Fi signals to the target device in any path segment of a predefined path with a preset RIS configuration. The module constructs a fingerprint matrix, where the rows of the fingerprint matrix correspond to each path segment, the columns correspond to each RIS configuration, and the matrix elements are RSS fingerprints. The RSS fingerprints are a preset number of received signal strength value sequences.
[0042] The first training module is used to train the dual-branch localization network based on multiple fingerprint matrices and the reference points corresponding to each fingerprint matrix, so as to obtain the trained localization model. The first branch of the dual-branch localization network is used to extract the temporal dependency features between RSS fingerprints of continuous path segments, and the second branch of the dual-branch localization network is used to extract the joint features of path segments and RIS configuration.
[0043] The second training module is used to freeze the parameters of the localization model. At test points with known coordinates, the terminal reward is constructed based on the localization error output by the localization model. The adaptive configuration selection strategy is trained using a reinforcement learning algorithm to obtain the trained configuration selection strategy. The adaptive configuration selection strategy is used to model the configuration selection of each path segment as a sequential decision-making process. The sequential decision-making process uses the accumulated RSS fingerprint, the selected RIS configuration, and the path progress as the state, the candidate RIS configuration as the action, and the negative normalized localization error as the reward.
[0044] Thirdly, embodiments of the present invention provide an electronic device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect described above.
[0045] Fourthly, embodiments of the present invention provide a storage medium storing computer program instructions, which, when executed by a processor, implement the method of the first aspect described above.
[0046] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0047] This method provides model and policy support for online localization through three phases of progressive training. In the data acquisition phase, the method collects RSS fingerprints for all path segments and all RIS configuration combinations at reference points with known coordinates, constructing a fingerprint matrix. This allows the dual-branch localization network to simultaneously learn the temporal dependencies between path segments and the joint features between path segment-configuration combinations from the complete fingerprint matrix during subsequent training, establishing a mapping between the fingerprint matrix and reference point locations. In the localization network training phase, the dual-branch structure extracts temporal dependency features along the path sequence and weighted joint features along the configuration combination dimension, respectively. These are then fused and mapped to a reference point probability distribution, enabling the localization model to simultaneously utilize the spatial diversity brought by the movement of mobile monostations and the electromagnetic diversity brought by RIS reconfiguration to distinguish different reference points. In the policy training phase, after freezing the localization model parameters, the configuration selection policy is trained using the localization error as feedback. This allows the policy to learn the ability to select subsequent RIS configurations based on accumulated observations without updating the localization model. After convergence, the policy can output configuration selections for each path segment during online deployment, replacing the exhaustive scanning of all configuration combinations and reducing the inference overhead of online localization. The localization model and configuration selection strategy output during the entire offline training process work together in the online phase, enabling the localization system to complete position estimation without exhaustively enumerating all RIS configuration sequences. Attached Figure Description
[0048] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:
[0049] Figure 1 A schematic diagram of a scenario for the mobile single-station indoor fingerprint positioning method provided by the present invention;
[0050] Figure 2 A flowchart illustrating a mobile single-station indoor fingerprint positioning training method provided by the present invention;
[0051] Figure 3 This is a schematic diagram of the positioning model structure provided by the present invention;
[0052] Figure 4 A schematic diagram illustrating the interaction between the PPO-based adaptive RIS configuration selection strategy and the environment provided by this invention;
[0053] Figure 5 This is a schematic diagram of the Actor-Critic network structure provided by the present invention;
[0054] Figure 6This is a schematic diagram comparing the cumulative distribution of positioning errors provided by the present invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0056] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0057] It should be noted that all actions involving the acquisition of signals, information, or data in this invention are carried out in compliance with the relevant data protection laws and regulations of the locality and with authorization from the owner of the relevant device.
[0058] Example 1
[0059] For the application scenario of this embodiment, please refer to [link / reference]. Figure 1 , Figure 1 In this context, RIS stands for Reconfigurable Smart Surface, SelectedPhase is the selected phase, Unselected Phase is the unselected phase, Mobile Site is a mobile single station, Segment represents a path segment, Target refers to the target device, and Wireless Signal represents the Wi-Fi signal. Within the positioning area, the mobile single station moves along a predefined path and continuously transmits Wi-Fi signals, while the target device receives and records the RSS fingerprint. RIS is used to reconfigure the wireless propagation environment to improve signal observability under conditions such as NLOS and enhance the separability of the obtained RSS fingerprint.
[0060] Please refer to Figure 2 This invention provides a mobile single-station indoor fingerprint positioning training method, including:
[0061] S11. When the target device is located at a reference point with known coordinates and a mobile single station continuously sends Wi-Fi signals to the target device in any path segment of a predefined path with a preset RIS configuration, the RSS fingerprint continuously received by the target device is collected, and a fingerprint matrix is constructed. The rows of the fingerprint matrix correspond to each path segment, the columns correspond to each RIS configuration, and the matrix elements are RSS fingerprints. The RSS fingerprint is a preset number of received signal strength value sequences.
[0062] The fingerprint matrix is a data structure used to organize all path segments on the complete path and the RSS fingerprints under all RIS configurations. Assume the predefined path is equally divided into... The path segment, the candidate RIS configuration set contains One configuration, then fingerprint matrix for OK The matrix consists of columns, where row indices correspond to path segment numbers, column indices correspond to RIS configuration numbers, and matrix elements are the corresponding path segment and the RSS fingerprint under the corresponding RIS configuration. Since each path segment uses only one RIS configuration in actual data collection, for each path segment, only one column position in a row (i.e., the column corresponding to the used RIS configuration) is filled with the actually collected RSS fingerprint; the rest... The matrix elements corresponding to each column position are filled with zeros. For example, Take 4 and When taking 6, the fingerprint matrix is 4 rows and 6 columns. If the first path segment uses the third RIS configuration, the matrix element in the first row and third column is the actual collected RSS fingerprint, and the other 5 matrix elements in this row are zero.
[0063] A path segment is a continuous segment obtained by dividing a predefined path along an indoor positioning area using equidistant or isochronous methods. Each path segment corresponds to a continuous spatial range on the movement trajectory of the mobile station. Within this segment, the mobile station maintains its movement and continuously transmits Wi-Fi signals, and the RIS maintains the same configuration throughout the entire path segment. For example, when the predefined path is a closed loop path with a length of 20 meters, the path can be divided into 4 path segments of 5 meters each, with each path segment corresponding to a 5-meter movement trajectory.
[0064] A RIS configuration refers to a scheme for adjusting the reflection phase of an incident Wi-Fi signal applied by a reconfigurable smart surface. (Set of candidate RIS configurations) Include A discrete configuration, denoted as:
[0065] ;
[0066] in When configured to be off, this means that RIS does not perform phase modulation on the incident signal, and the signal propagates by natural reflection. to An active phase configuration means that each reflection unit on the RIS modulates the reflection of the incident signal according to a preset phase offset value. For example, when the RIS has 8 reflection units, one RIS configuration can specify a phase offset for each reflection unit. , , , , , , , The phase offset values are used to create different RIS configurations by changing the combination of these phase offset values.
[0067] Configure selection variables Used to indicate a path segment Should I select RIS configuration? Defined as:
[0068] ;
[0069] ;
[0070] in , Since each path segment selects exactly one RIS configuration, Satisfy constraints:
[0071] .
[0072] Movable single station on the path segment Configuration When transmitting Wi-Fi signals, the target device collects... Each RSS measurement value constitutes a path segment - configure fingerprint:
[0073] ;
[0074] in Indicates in , The first collection RSS measurements. Fingerprint matrix. The elements are given by the product of the configuration selection variable and the path segment-configuration fingerprint:
[0075] ;
[0076] That is when hour, The Line 1 Column entry ;when When , the corresponding matrix element is the zero vector.
[0077] Reference points are pre-selected spatial locations with known coordinates within the indoor positioning area, used to provide supervisory labels for the dual-branch positioning network during the offline training phase. During data acquisition, the target device is sequentially placed at each reference point. A mobile station moves along a predefined path and transmits Wi-Fi signals. The target device receives the signals and records RSS fingerprints at each reference point. Each reference point has a unique location identifier and two-dimensional spatial coordinates. For example, in an indoor scene of 180 square meters, several reference points can be set in a uniform grid pattern within the area, with a spacing of 0.5 meters between adjacent reference points.
[0078] Specifically, within the coverage area of a single transmission signal from a mobile station, the target device passively receives the Wi-Fi signal from the mobile station without actively transmitting a signal. The wireless propagation environment at the target device's location directly determines the numerical characteristics of the received RSS fingerprint; therefore, there is a mapping relationship between the RSS fingerprint collected at the same reference point and the spatial location of that reference point. By sequentially placing the target device at various reference points with known coordinates, traversing all path segments and all RIS configuration combinations to collect data, a complete dataset corresponding to different RSS fingerprint patterns at different spatial locations can be obtained.
[0079] During data acquisition, the target device is placed at a reference point and remains stationary. A mobile single station moves along a predefined path and continuously transmits Wi-Fi signals within each path segment using the currently selected RIS configuration. The target device continuously records data within each path segment. Each received signal strength measurement forms the RSS fingerprint of the path segment under this configuration. By organizing the RSS fingerprints of all reference points, all path segments, and all RIS configuration combinations according to the aforementioned fingerprint matrix data structure, a complete fingerprint matrix set covering all spatial locations and all configuration combinations can be obtained. Each complete fingerprint matrix corresponds to a reference point, and the coordinates of the reference point serve as the supervision information of the fingerprint matrix.
[0080] In some implementations, collecting the continuously received RSS fingerprints from the target device and constructing a fingerprint matrix includes:
[0081] Based on the number of candidate RIS configurations N and the number of path segments T, a sparse fingerprint matrix of T rows and N columns is constructed, where each matrix element is the RSS fingerprint of the corresponding path segment and the corresponding RIS configuration. The matrix elements corresponding to the combination of unselected path segments and RIS configurations are set to zero.
[0082] At multiple reference points with known coordinates, the mobile single station sequentially traverses all path segments of the predefined path, and sequentially switches each RIS configuration in the candidate RIS configuration set on each path segment. The target device continuously collects RSS fingerprints under each combination of path segment and each candidate configuration to obtain a fingerprint matrix.
[0083] S12. Based on multiple fingerprint matrices and the reference points corresponding to each fingerprint matrix, the dual-branch localization network is trained to obtain the trained localization model. The first branch of the dual-branch localization network is used to extract the temporal dependency features between RSS fingerprints of continuous path segments, and the second branch of the dual-branch localization network is used to extract the joint features of path segments and RIS configuration.
[0084] Among them, the dual-branch localization network is based on the fingerprint matrix. The neural network model takes the fingerprint matrix as input and outputs the probability distribution of the reference points, containing two parallel branches. The first branch is the temporal feature extraction branch, which consists of a concatenated convolutional neural network and a long short-term memory network. The convolutional neural network first processes the fingerprint matrix... Local feature extraction is performed on the RSS fingerprint of each path segment. The extracted features are then input into a Long Short-Term Memory (LSTM) network in the order of the path segments. The LSM network's gating mechanism transmits state information along the time direction, capturing the dependencies between the RSS fingerprints of different path segments. The second branch is a joint feature extraction branch, consisting of a convolutional neural network and a squeezing activation module connected in series. The convolutional neural network extracts the fingerprint matrix. The joint spatial features of the mid-path segment and the RIS configuration are combined. The squeezing excitation module obtains the global description of each feature channel through global average pooling, and then maps it to channel weights through a fully connected layer and activation function. The channel weights are multiplied with the original joint spatial features channel by channel to achieve adaptive enhancement of the discriminative feature channels. The output features of the two branches are concatenated in the channel dimension to form a fused feature, which is then mapped through a fully connected layer to... dimensional vector, Given the total number of reference points, this vector, after being normalized using the Softmax function, yields the probability distribution of the target device being located at each reference point:
[0085] ;
[0086] in Indicates that the target device is located at the . The predicted probability of each reference point. For example, when there are 100 reference points preset in the positioning area, If we set it to 100, the output of the dual-branch positioning network is a 100-dimensional probability distribution vector, where each element corresponds to the predicted probability of the target device being located at the 1st to the 100th reference point.
[0087] Specifically, in offline training, all collected fingerprint matrices are divided into a training set and a validation set according to a certain ratio. For each sample in the training set, the fingerprint matrix is... Input a two-branch localization network, and the network outputs the probability distribution of the target device being located at each reference point. A cross-entropy loss function is defined to calculate the difference between the probability distribution and the true reference point labels. The true reference point labels are one-hot encoded, taking a value of 1 in the dimension corresponding to the actual reference point of the target device and 0 in the other dimensions. Gradient descent is used to calculate the partial derivatives of the loss function with respect to each network parameter. The network parameters are updated along the negative gradient direction. After each update, the loss value is recalculated and updated again, repeating this process until the loss value converges to a preset range. After training, the parameters of each network layer are fixed and no longer changed, resulting in a localization model that can be used for location estimation.
[0088] In the location estimation stage, select the one with the highest prediction probability. Let there be reference points, and denote their probabilities as . Coordinates are The weights are obtained by normalizing each probability:
[0089] ;
[0090] The estimated position of the target device is:
[0091] ;
[0092] in These are the weighted and fused coordinate estimates. For example, when When taking 3, select the 3 reference points with the highest probability, and sum the coordinates of the 3 reference points according to their normalized probabilities to obtain the position estimate of the target equipment.
[0093] In some implementations, a dual-branch localization network is trained based on multiple fingerprint matrices and reference points corresponding to each fingerprint matrix to obtain a trained localization model, including:
[0094] For each fingerprint matrix and its corresponding reference point, the fingerprint matrix is input into the convolutional neural network of the first branch. The convolutional neural network performs convolution operation on the RSS fingerprint of each path segment to extract the local spatial features of the fingerprint of each path segment.
[0095] Local spatial features are input into the Long Short-Term Memory (LSTM) network in the order of path segments. The LSM network then performs state transfer along the temporal direction of the path segments to extract the temporal dependency features between the RSS fingerprints of continuous path segments, thus obtaining the output features of the first branch.
[0096] The fingerprint matrix is input in parallel into the convolutional neural network of the second branch, and the convolutional neural network of the second branch extracts the joint spatial features of the path segment and the RIS configuration combination.
[0097] The joint spatial features are input into the squeezing excitation module, which then performs global average pooling on each feature channel to obtain the channel description vector.
[0098] The channel description vector is mapped to channel weights through a fully connected layer and an activation function. The channel weights are then multiplied with the joint spatial features channel by channel to obtain the second branch output features after adaptive weighting.
[0099] The output features of the first branch and the output features of the second branch are concatenated into a fused feature. The fused feature is then input into a fully connected layer, which maps the fused feature into a reference point probability distribution vector. Each element of the reference point probability distribution vector represents the probability that the target device is located at the corresponding reference point.
[0100] Based on the cross-entropy loss between the reference point probability distribution vector and the real reference point label, the gradient descent algorithm is used to update the network parameters of the convolutional neural network, long short-term memory network, squeezed excitation module and fully connected layer. The training is completed with the goal of minimizing the cross-entropy loss, resulting in a trained localization model. The real reference point label is the one-hot encoded vector of the reference point.
[0101] Specifically, such as Figure 3 As shown, fingerprint matrix Two parallel branches are input simultaneously.
[0102] In the first branch, the fingerprint matrix is first input into a one-dimensional convolutional layer (conv1D). This layer performs convolution operations on the RSS fingerprint of each path segment along the path segment dimension, extracting the local spatial features of each segment's fingerprint. The output after convolution is normalized and nonlinearly transformed by a batch normalization layer (BN) and an activation function (ReLU). The transformed features are then input into a Long Short-Term Memory (LSTM) network in the order of the path segments. The LSTM network performs state propagation along the temporal direction of the path segments. Since adjacent path segments are spatially continuous, the RSS fingerprint received by the target device as it moves along the path gradually changes with the path segment number. The LSTM network selectively retains the feature information of historical path segments along the temporal direction through a gating mechanism, outputting temporally dependent features. The output of the LSTM network is regularized by a dropout layer to prevent overfitting.
[0103] In the second branch, the fingerprint matrix is input in parallel to a one-dimensional convolutional layer. This layer slides its kernel across both the path segment and RIS configuration dimensions to extract joint spatial features of the path segment and RIS configuration combinations. The output after convolution is normalized and nonlinearly transformed by a batch normalization layer and an activation function. The transformed features are then input to a squeeze activation module (SE). This module compresses the spatial information of each feature channel using a global pooling layer to obtain channel description vectors. These vectors are then mapped to channel weights via a fully connected layer and an activation function. The channel weights are multiplied channel-by-channel by the joint spatial features, resulting in adaptive weighting that focuses the network on path segment-configuration combination patterns that contribute more to location differentiation. The output is the weighted joint features. The output of the squeeze activation module is then regularized by a random deactivation layer.
[0104] The temporal dependency features and weighted joint features output from the two branches are concatenated into a fused feature by a concatenation layer (Concat), and then mapped to a reference point (RP) probability distribution vector by a fully connected layer. , Indicates that the target device is located at the . The probability of each reference point. During training, the gradient is calculated based on the cross-entropy loss between the probability distribution vector and the true reference point label. The gradient descent algorithm is used to update the network parameters of the two branches and the fully connected layer, so that the model gradually maps the fingerprint matrix corresponding to different reference points to different peak positions in the probability distribution vector.
[0105] When locating, the one with the highest probability A number of reference points are selected, and the coordinates are fused using normalized probability weighting to obtain the position estimate. This dual-branch structure extracts position-related features of the fingerprint matrix along both path sequence and configuration combination dimensions, enabling the model to simultaneously utilize the spatial diversity brought about by the motion of mobile monostations and the electromagnetic diversity brought about by RIS reconfiguration to distinguish different reference points.
[0106] S13. Freeze the parameters of the localization model. At the test point with known coordinates, construct the terminal reward based on the localization error output by the localization model. Train the adaptive configuration selection strategy using a reinforcement learning algorithm to obtain the trained configuration selection strategy. The adaptive configuration selection strategy is used to model the configuration selection of each path segment as a sequential decision-making process. The sequential decision-making process takes the accumulated RSS fingerprint, the selected RIS configuration, and the path progress as the state, the candidate RIS configuration as the action, and the negative normalized localization error as the reward.
[0107] Freezing refers to the operation of keeping all network parameters of the localization model unchanged during the configuration selection policy training after the localization model has been trained. Specifically, in each forward propagation of policy training, the collected fingerprint matrix... The localization model is input, and it calculates and outputs a position estimate based on the trained parameters. When updating the policy network parameters through backpropagation, gradient calculations do not go through backpropagation of the localization model, and the parameters of the localization model do not participate in gradient descent updates. The purpose of freezing is to ensure that the mapping relationship of the localization model remains constant during policy training, so that the reward signal obtained by the policy has a stable and consistent evaluation benchmark.
[0108] Test points are spatial locations within the indoor positioning area that differ in spatial location from the reference point but whose coordinates are known. They serve as a benchmark for calculating positioning errors during the policy training phase. In each round of policy training, the target device is placed at the test point, the policy network selects a RIS configuration for each path segment, and after data acquisition, the frozen positioning model outputs the position estimate. Calculate the estimated value and the actual coordinates of the test point. Euclidean distance between As a positioning error:
[0109] ;
[0110] Test points and reference points jointly cover the localization area, but their spatial distribution is interleaved. Reference points are used for localization model training, while test points are used for policy training. This division method can prevent the policy from overfitting to spatial locations already seen by the localization model. For example, in an indoor scene of 180 square meters, reference points and test points can be alternately marked on a uniform grid, ensuring that any test point maintains a certain spatial distance from the nearest reference point.
[0111] Terminal reward is a one-time reward value given only after all path segments have been traversed during the sequential decision-making process; no reward is given when intermediate path segments are completed. When a movable single station moves along a predefined path, it passes through... Each path segment has a policy network that selects a RIS configuration and collects an RSS fingerprint. After the first path segment is completed, since there is no complete path fingerprint for location estimation, the merits of the selected configuration combination cannot be evaluated. Therefore, the reward for the intermediate steps is set to zero. Once each path segment is collected, the complete... OK Column fingerprint matrix Input a frozen localization model, and the localization model outputs a position estimate. Calculate the estimated value and the actual coordinates of the test point. Euclidean distance between ,Will Divide by the maximum possible Euclidean distance within the positioning area Obtain the normalized positioning error Terminal rewards for:
[0112] ;
[0113] in This represents the maximum possible positioning error within the positioning area, for example, when the diagonal length of the positioning area is 8 meters. 4 meters is acceptable.
[0114] The sequential decision-making process is a modeling framework that sequentially selects RIS configurations for each path segment, comprising three core elements: state, action, and reward. The state is defined in each decision step. Defined as:
[0115] ;
[0116] in For the front The fingerprint matrix accumulated from the completed path segments. Record the selected RIS configuration. The number of path segments traversed; the action is to select from the candidate configuration set. Select one configuration to apply to the current path segment; rewards come first. Each decision step is set to zero, and a negative normalized positioning error is applied at the final step. Reward Discount Factor Used to balance the weights of current rewards and future rewards, when When the value is 0.99, the terminal reward is calculated during backpropagation. The decay coefficient is passed on to the early decision steps.
[0117] Negative normalized positioning error is a specific numerical value of the terminal reward, defined as the Euclidean distance between the estimated location and the true location. Divide by the maximum possible distance within the positioning area Then take the negative value. The position estimate output by the frozen localization model at the test point is... The actual coordinates of the test point are Then the Euclidean distance is:
[0118] ;
[0119] Normalized positioning error is The negative normalized positioning error is .because The range of values is The range of negative normalized positioning error is: The smaller the positioning error, the closer the reward value is to 0; the larger the positioning error, the more negative the reward value.
[0120] Specifically, during the policy training phase, the movable single station traverses all path segments along a predefined path, and on each path segment, it adjusts its current accumulated state. Choose a RIS configuration And collect RSS fingerprints and fill them into the fingerprint matrix. After the path traversal is complete, the complete fingerprint matrix will be generated. Input the frozen localization model to obtain the location estimate. Computing terminal rewards Reinforcement learning algorithms collect state sequences. Action sequence and reward sequence The reward for each decision step is given by the following formula:
[0121] ;
[0122] Calculate the discounted return for each decision step based on the collected reward sequence:
[0123] ;
[0124] in This is the discount factor. As parameters for the policy update network, the updated policy generates different configuration choices in the next interaction based on the new state distribution. After multiple iterations, the policy gradually tends to choose the configuration that makes the target state more favorable. The increased configuration sequence refers to the configuration sequence with reduced localization error. The policy network adopts an Actor-Critic architecture, and the Actor network outputs the probability distribution of candidate configurations. Critic network output state value estimation Both share the underlying feature encoding layer and are updated synchronously during training.
[0125] In some implementations, at test points with known coordinates, a terminal reward is constructed using the positioning error output by the positioning model. An adaptive configuration selection strategy is trained using a reinforcement learning algorithm to obtain the trained configuration selection strategy, including:
[0126] The configuration selection for each path segment is modeled as a sequential decision-making process. The state of the sequential decision-making process consists of the accumulated RSS fingerprint, the selected RIS configuration, and the path progress. The action of the sequential decision-making process is to select one RIS configuration from the candidate RIS configuration set. The reward of the sequential decision-making process is: zero when the path segment traversal is not completed, and negative normalized positioning error when all path segments are traversed.
[0127] In each training round, for test points with known coordinates, the RIS configuration selection for each path segment is output according to the current strategy. After the data collection is completed, the frozen localization model outputs the position estimate.
[0128] The Euclidean distance between the estimated location and the actual coordinates of the test point is calculated as the positioning error.
[0129] The normalized positioning error is obtained by dividing the positioning error by the maximum possible positioning error within the positioning area, and the negative value of the normalized positioning error is used as the terminal reward.
[0130] The advantage function is calculated using the generalized advantage estimation method;
[0131] The network parameters of the policy are updated based on the dominance function and the truncation objective function of the near-end policy optimization algorithm to obtain the training completed configuration selection policy. The truncation objective function is as follows: calculate the untruncation objective value based on the probability ratio of the current policy to the old policy and the dominance function, truncate the probability ratio to a preset interval and calculate the truncated objective value, and take the smaller value between the untruncation objective value and the truncated objective value as the truncation objective function.
[0132] Specifically, such as Figure 4 As shown, the training process of the adaptive RIS configuration selection strategy is modeled as a sequential decision-making interaction between the agent and the RIS-assisted mobile single-station localization environment. This process models the configuration selection for each path segment as a sequential decision-making process, with states... From the accumulated fingerprint matrix Selected RIS configuration records and the number of traversed path segments The composition and action are derived from the candidate RIS configuration set. Select one configuration to apply to the current path segment. The reward function is set as follows: the reward is zero when the path segment traversal is incomplete, and the reward is negative when all path segments are traversed (normalized positioning error). . Figure 4 State corresponds to state Action corresponds to from Selected RIS configuration Reward corresponds to terminal reward Fingerprint corresponds to the accumulated fingerprint matrix Configuration corresponds to the selected RIS configuration record. Path Progress corresponds to the number of path segments traversed. .
[0133] like Figure 4 As shown, in each training round, the agent makes the current decision step. Observation status Output actions based on the current strategy. Location environment Apply the corresponding RIS configuration to the current path segment and collect RSS fingerprints, then update the cumulative fingerprint matrix. and path progress Transition to the next state Repeat the above process until all [cases] have been traversed. Each path segment, after collection, will yield a complete fingerprint matrix. Input the frozen localization model to obtain the location estimate. . Figure 4 The State, Action, Reward, and Next State in the code form a complete interactive loop. Env represents the positioning environment, which includes RIS configuration switching, Wi-Fi signal transmission, RSS fingerprint collection, and positioning model inference.
[0134] Based on location estimates Compared with the actual coordinates of the test point Calculate the Euclidean distance as the positioning error Positioning error Divide by the maximum possible positioning error within the positioning area Obtain the normalized positioning error The negative value of the normalized positioning error As a terminal reward The intermediate decision step has its reward set to zero because there is no complete path fingerprint available for location estimation.
[0135] like Figure 5 As shown, the policy network adopts an Actor-Critic structure, which consists of three parts: an input layer, a shared hidden layer, and an output layer.
[0136] The input layer contains three input nodes. This indicates the number of path segments that have been traversed so far, corresponding to the state. Path progress It is used to provide the network with information about which path segment the decision-making process has reached. This indicates the RIS configuration records selected up to the current decision step, and their corresponding status. In It is used to provide the network with historical configuration selection information. This represents the fingerprint matrix accumulated up to the current decision step, corresponding to the state. In It is used to provide the network with the collected RSS fingerprint information.
[0137] The outputs of the three input nodes are fed into a shared hidden layer. This shared hidden layer contains multiple fully connected layers that encode the features of each of the three inputs, concatenate them to form a joint feature, and then perform a nonlinear transformation to obtain the shared feature representation. The shared hidden layer provides a unified feature base for the Actor and Critic heads, enabling the two output heads to make policy decisions and value assessments from the same high-level features.
[0138] The output of the shared hidden layer is input to the Actor Head and the Critic Head, respectively. The Actor Head corresponds to the policy network. It consists of fully connected layers and a Softmax activation function, which maps shared features to a set of candidate RIS configurations. The probability distribution on the right is used to select actions. The Critic head corresponds to the value network. It consists of fully connected layers that map shared features to a scalar, namely the value estimate of the current state. This value estimate is used in the advantage function of the generalized advantage estimation method. The calculation is as follows:
[0139] ,
[0140] ,
[0141] in, As a discount factor, These are GAE parameters. The Critic header output Value is precisely the value calculated above. It is used to assess whether the current state is good or bad.
[0142] During training, the Actor head is based on the dominance function. Update strategy parameters to increase the probability of selecting favorable actions and decrease the probability of selecting unfavorable actions; the Critic head adjusts the timing difference error. Update the value network parameters to gradually bring the value estimate closer to the true return. The two output heads share the underlying shared hidden encoding layer, which is updated synchronously during training, enabling the shared representation to serve both policy optimization and value evaluation.
[0143] like Figure 6As shown, the performance of the trained configuration selection strategy is evaluated by comparing the cumulative distribution curve of the localization error. The horizontal axis represents the localization error, and the vertical axis represents the cumulative probability. In 6000 localization experiments in an indoor scene of approximately 180 square meters, the cumulative distribution curve of the localization error using the method of this invention is located to the left of the curve of the comparative method, with a localization error of approximately 1.75 meters at an 80% cumulative probability level. In comparison, the localization error of the mobile single-station baseline method without RIS assistance is approximately 2.25 meters, and the multi-station localization method is approximately 2.00 meters at the same cumulative probability level. The trained configuration selection strategy selects RIS configurations for each path segment based on the accumulated fingerprint state, giving the collected fingerprint matrix higher positional discriminative power, thus achieving a smaller localization error under a frozen localization model.
[0144] In some implementations, the RIS configuration includes a shutdown configuration and N-1 active phase configurations. The shutdown configuration is the state in which the reconfigurable smart surface does not apply phase modulation, and the active phase configuration is the state in which each reflection unit of the reconfigurable smart surface modulates signal reflection according to a preset phase value.
[0145] Example 2
[0146] This invention provides a mobile single-station indoor fingerprint positioning method, including:
[0147] When a mobile single station traverses the current path segment of a predefined path, it inputs the accumulated RSS fingerprint, the selected RIS configuration, and the path progress into the configuration selection strategy that has been trained, and outputs the current RIS configuration selected for the current path segment.
[0148] The mobile station is controlled to continuously send Wi-Fi signals to the target device in the current path segment according to the current RIS configuration, and the RSS fingerprint continuously received by the target device is collected. The RSS fingerprint is filled into the fingerprint matrix according to the path segment order and the corresponding RIS configuration. The rows of the fingerprint matrix correspond to each path segment and the columns correspond to each RIS configuration.
[0149] After the mobile station has traversed all path segments, the fingerprint matrix is input into the trained positioning model, and the positioning model outputs the probability distribution of each reference point where the target device is located.
[0150] By selecting multiple reference points with the highest probabilities and then fusing the coordinates of each reference point according to the normalized probability weighting, the estimated position of the target device is obtained.
[0151] Specifically, this online localization method estimates the target location without exhaustively scanning all RIS configuration sequences through the coordinated operation of a trained configuration selection strategy and the localization model. On each path segment, the configuration selection strategy selects a RIS configuration for the current segment based on the accumulated fingerprint matrix, selected configuration records, and path progress. This selection process proceeds segment by segment along the path, resulting in a structured observation of spatial and controllable electromagnetic diversity in the fingerprint matrix after being filled with the RSS data of the complete path. When the path traversal is complete, the localization model processes the complete fingerprint matrix. Two branches extract the temporal dependency features between path segments and the joint features of path segments and configurations, respectively. These are fused and mapped to a reference point probability distribution, and the location estimate is output through weighted K-nearest neighbor fusion. Throughout the localization process, the mobile station's movement along the path provides spatial observation diversity, while the configurations selected by the RIS according to the strategy provide controllable electromagnetic response diversity segment by segment. Both are uniformly organized in the fingerprint matrix as a path segment-configuration joint representation. Compared to fixed single configurations or random configuration selection, the policy network dynamically adjusts the configuration selection of subsequent path segments based on accumulated fingerprints. This results in higher location discriminative power in both the path segment and configuration dimensions of the collected fingerprint matrix, leading to smaller localization errors within a limited number of path segments. Compared to exhaustively searching for all configuration combinations, the policy network only requires one forward propagation computation per segment to output the configuration selection, significantly reducing online inference overhead. The localization model has already learned the ability to extract location discriminative features from the sparse fingerprint matrix during offline training. During online inference, only forward propagation is needed to output the location estimate, eliminating the need for iterative optimization or database retrieval, thus meeting real-time localization requirements.
[0152] In some implementations, the step of inputting the accumulated RSS fingerprint, the selected RIS configuration, and the path progress into the trained configuration selection strategy, and outputting the current RIS configuration for the current path segment, includes:
[0153] The accumulated RSS fingerprint matrix, the selected RIS configuration matrix, and the number of currently traversed path segments are input into the bottom feature encoding layer of the configuration selection strategy. The bottom feature encoding layer performs feature encoding on the fingerprint matrix, the configuration matrix, and the path progress respectively to obtain fingerprint encoding features, configuration encoding features, and progress encoding features.
[0154] The fingerprint coding feature, the configuration coding feature, and the progress coding feature are concatenated into a joint coding feature. The joint coding feature is then input into a shared feature coding layer, which performs a nonlinear transformation on the joint coding feature to obtain a shared feature representation.
[0155] The shared feature representation is input into the fully connected layers of the Actor network and the Critic network, respectively. The fully connected layer of the Actor network maps the shared feature to the probability distribution of each configuration in the candidate RIS configuration set. The candidate configuration with the highest probability is sampled or selected as the current RIS configuration according to the probability distribution. The fully connected layer of the Critic network maps the shared feature to the value estimate of the current state. The value estimate is used to evaluate the quality of the state during the training phase.
[0156] Example 3
[0157] This invention provides an offline training device for a reconfigurable smart surface-assisted localization network, comprising:
[0158] The data acquisition module is used to collect the RSS fingerprints continuously received by the target device when the target device is at a reference point with known coordinates and a movable single station continuously sends Wi-Fi signals to the target device in any path segment of a predefined path with a preset RIS configuration. The module constructs a fingerprint matrix, in which rows correspond to each path segment, columns correspond to each RIS configuration, and matrix elements are RSS fingerprints. The RSS fingerprints are a preset number of received signal strength value sequences.
[0159] The first training module is used to train the dual-branch localization network based on multiple fingerprint matrices and the reference points corresponding to each fingerprint matrix to obtain the trained localization model. The first branch of the dual-branch localization network is used to extract the temporal dependency features between RSS fingerprints of continuous path segments, and the second branch of the dual-branch localization network is used to extract the joint features of path segments and RIS configuration.
[0160] The second training module is used to freeze the parameters of the positioning model, construct terminal rewards based on the positioning error output by the positioning model at test points with known coordinates, and train an adaptive configuration selection strategy using a reinforcement learning algorithm to obtain a trained configuration selection strategy. The adaptive configuration selection strategy is used to model the configuration selection of each path segment as a sequential decision process. The sequential decision process uses the accumulated RSS fingerprint, the selected RIS configuration, and the path progress as states, the candidate RIS configuration as actions, and the negative normalized positioning error as a reward.
[0161] It should be noted that each module and unit in the offline training device for the reconfigurable smart surface assisted positioning network in this embodiment corresponds one-to-one with each step in the offline training method for the reconfigurable smart surface assisted positioning network in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned offline training method for the reconfigurable smart surface assisted positioning network, and will not be repeated here.
[0162] Example 4
[0163] This embodiment provides an electronic device, including at least one processor and a memory. Optionally, the device further includes a communication component. The processor, memory, and communication component are connected via a bus.
[0164] In a specific implementation, at least one processor executes computer execution instructions stored in memory, causing at least one processor to perform the above-described method.
[0165] The specific implementation process of the processor can be found in the above method embodiments, and its implementation principle and technical effect are similar, so it will not be repeated here.
[0166] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0167] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0168] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0169] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0170] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0171] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0172] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0173] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0174] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0175] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0176] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0177] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0178] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A mobile single-station indoor fingerprint positioning training method, characterized in that, include: When the target device is at a reference point with known coordinates and a mobile single station continuously sends Wi-Fi signals to the target device in any path segment of a predefined path with a preset RIS configuration, the RSS fingerprint continuously received by the target device is collected to construct a fingerprint matrix. The rows of the fingerprint matrix correspond to each path segment, the columns correspond to each RIS configuration, and the matrix elements are RSS fingerprints. The RSS fingerprint is a preset number of received signal strength value sequences. The dual-branch localization network is trained based on multiple fingerprint matrices and the reference points corresponding to each fingerprint matrix to obtain a trained localization model. The first branch of the dual-branch localization network is used to extract the temporal dependency features between RSS fingerprints of continuous path segments, and the second branch of the dual-branch localization network is used to extract the joint features of path segments and RIS configuration. The parameters of the positioning model are frozen. At test points with known coordinates, the terminal reward is constructed using the positioning error output by the positioning model. An adaptive configuration selection strategy is trained using a reinforcement learning algorithm to obtain the trained configuration selection strategy. The adaptive configuration selection strategy is used to model the configuration selection of each path segment as a sequential decision process. The sequential decision process uses the accumulated RSS fingerprint, the selected RIS configuration, and the path progress as the state, the candidate RIS configuration as the action, and the negative normalized positioning error as the reward.
2. The method according to claim 1, characterized in that, The process of collecting the continuously received RSS fingerprints from the target device and constructing a fingerprint matrix includes: Based on the number of candidate RIS configurations N and the number of path segments T, a sparse fingerprint matrix of T rows and N columns is constructed, where each matrix element is the RSS fingerprint of the corresponding path segment and the corresponding RIS configuration. The matrix elements corresponding to the combination of unselected path segments and RIS configurations are set to zero. At multiple reference points with known coordinates, the movable single station sequentially traverses all path segments of the predefined path, and sequentially switches each RIS configuration in the candidate RIS configuration set on each path segment. The target device continuously collects RSS fingerprints under each combination of path segment and candidate configuration to obtain a fingerprint matrix.
3. The method according to claim 1, characterized in that, The step of training the dual-branch localization network based on multiple fingerprint matrices and reference points corresponding to each fingerprint matrix to obtain a trained localization model includes: For each fingerprint matrix and its corresponding reference point, the fingerprint matrix is input into the convolutional neural network of the first branch, and the convolutional neural network performs a convolution operation on the RSS fingerprint of each path segment to extract the local spatial features of the fingerprint of each path segment. The local spatial features are input into the long short-term memory network in the order of path segments. The long short-term memory network performs state transfer along the temporal direction of the path segments to extract the temporal dependency features between the RSS fingerprints of continuous path segments and obtain the output features of the first branch. The fingerprint matrix is input in parallel into the convolutional neural network of the second branch, and the convolutional neural network of the second branch extracts the joint spatial features of the path segment and the RIS configuration combination. The joint spatial features are input into the squeezing excitation module, which then performs global average pooling on each feature channel to obtain the channel description vector. The channel description vector is mapped to channel weights through a fully connected layer and an activation function. The channel weights are then multiplied with the joint spatial features channel by channel to obtain the second branch output features after adaptive weighting. The first branch output feature and the second branch output feature are concatenated into a fused feature. The fused feature is input into a fully connected layer, and the fully connected layer maps the fused feature into a reference point probability distribution vector. Each element of the reference point probability distribution vector represents the probability that the target device is located at the corresponding reference point. Based on the cross-entropy loss between the reference point probability distribution vector and the real reference point label, the network parameters of the convolutional neural network, the long short-term memory network, the squeeze excitation module, and the fully connected layer are updated using the gradient descent algorithm. The training is completed with the goal of minimizing the cross-entropy loss, resulting in a trained localization model. The real reference point label is the one-hot encoded vector of the reference point.
4. The method according to claim 1, characterized in that, At test points with known coordinates, a terminal reward is constructed using the positioning error output by the positioning model. An adaptive configuration selection strategy is trained using a reinforcement learning algorithm to obtain the trained configuration selection strategy, including: The configuration selection for each path segment is modeled as a sequential decision process. The state of the sequential decision process consists of the accumulated RSS fingerprint, the selected RIS configuration, and the path progress. The action of the sequential decision process is to select one RIS configuration from the candidate RIS configuration set. The reward of the sequential decision process is: zero when the path segment traversal is not completed, and negative normalized positioning error when all path segments are traversed. In each training round, for test points with known coordinates, the RIS configuration selection for each path segment is output according to the current strategy. After the data collection is completed, the frozen localization model outputs the position estimate. The Euclidean distance between the estimated location and the actual coordinates of the test point is calculated as the positioning error. The normalized positioning error is obtained by dividing the positioning error by the maximum possible positioning error within the positioning area, and the negative value of the normalized positioning error is used as the terminal reward. The advantage function is calculated using the generalized advantage estimation method; The network parameters of the policy are updated according to the dominance function and the truncation objective function of the near-end policy optimization algorithm to obtain the training completed configuration selection policy. The truncation objective function is as follows: calculate the untruncation objective value based on the probability ratio of the current policy to the old policy and the dominance function, truncate the probability ratio to a preset interval and calculate the truncated objective value, and take the smaller value between the untruncation objective value and the truncated objective value as the truncation objective function.
5. The method according to claim 1, characterized in that, The RIS configuration includes a shutdown configuration and N-1 active phase configurations. The shutdown configuration is the state in which the reconfigurable smart surface does not apply phase modulation, and the active phase configuration is the state in which each reflection unit of the reconfigurable smart surface modulates signal reflection according to a preset phase value.
6. A mobile single-station indoor fingerprint positioning method, characterized in that, include: When a mobile single station traverses the current path segment of a predefined path, it inputs the accumulated RSS fingerprint, the selected RIS configuration, and the path progress into the configuration selection strategy that has been trained, and outputs the current RIS configuration selected for the current path segment. The mobile station is controlled to continuously send Wi-Fi signals to the target device in the current path segment according to the current RIS configuration, and the RSS fingerprint continuously received by the target device is collected. The RSS fingerprint is filled into the fingerprint matrix according to the path segment order and the corresponding RIS configuration. The rows of the fingerprint matrix correspond to each path segment and the columns correspond to each RIS configuration. After the mobile station has traversed all path segments, the fingerprint matrix is input into the trained positioning model, and the positioning model outputs the probability distribution of each reference point where the target device is located. By selecting multiple reference points with the highest probabilities and then fusing the coordinates of each reference point according to the normalized probability weighting, the estimated position of the target device is obtained.
7. The method according to claim 6, characterized in that, The process of inputting the accumulated RSS fingerprint, selected RIS configuration, and path progress into the trained configuration selection strategy, and outputting the current RIS configuration for the current path segment, includes: The accumulated RSS fingerprint matrix, the selected RIS configuration matrix, and the number of currently traversed path segments are input into the bottom feature encoding layer of the configuration selection strategy. The bottom feature encoding layer performs feature encoding on the fingerprint matrix, the configuration matrix, and the path progress respectively to obtain fingerprint encoding features, configuration encoding features, and progress encoding features. The fingerprint coding feature, the configuration coding feature, and the progress coding feature are concatenated into a joint coding feature. The joint coding feature is then input into a shared feature coding layer, which performs a nonlinear transformation on the joint coding feature to obtain a shared feature representation. The shared feature representation is input into the fully connected layers of the Actor network and the Critic network, respectively. The fully connected layer of the Actor network maps the shared feature to the probability distribution of each configuration in the candidate RIS configuration set. The candidate configuration with the highest probability is sampled or selected as the current RIS configuration according to the probability distribution. The fully connected layer of the Critic network maps the shared feature to the value estimate of the current state. The value estimate is used to evaluate the quality of the state during the training phase.
8. An offline training device for a reconfigurable smart surface-assisted positioning network, characterized in that, include: The data acquisition module is used to collect the RSS fingerprints continuously received by the target device when the target device is at a reference point with known coordinates and a movable single station continuously sends Wi-Fi signals to the target device in any path segment of a predefined path with a preset RIS configuration. The module constructs a fingerprint matrix, in which rows correspond to each path segment, columns correspond to each RIS configuration, and matrix elements are RSS fingerprints. The RSS fingerprints are a preset number of received signal strength value sequences. The first training module is used to train the dual-branch localization network based on multiple fingerprint matrices and the reference points corresponding to each fingerprint matrix to obtain the trained localization model. The first branch of the dual-branch localization network is used to extract the temporal dependency features between RSS fingerprints of continuous path segments, and the second branch of the dual-branch localization network is used to extract the joint features of path segments and RIS configuration. The second training module is used to freeze the parameters of the positioning model, construct terminal rewards based on the positioning error output by the positioning model at test points with known coordinates, and train an adaptive configuration selection strategy using a reinforcement learning algorithm to obtain a trained configuration selection strategy. The adaptive configuration selection strategy is used to model the configuration selection of each path segment as a sequential decision process. The sequential decision process uses the accumulated RSS fingerprint, the selected RIS configuration, and the path progress as states, the candidate RIS configuration as actions, and the negative normalized positioning error as a reward.
9. An electronic device, characterized in that, include: At least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, The method as described in any one of claims 1-7 is implemented when the computer program instructions are executed by the processor.