An indoor wireless positioning method and device
By calculating the similarity and distribution characteristics between Wi-Fi CSI data, and updating the CSI data to obtain the matching probability, the problem of long deployment time of indoor wireless positioning system when scene changes is solved, and efficient indoor wireless positioning is achieved.
Patent Information
- Application Number
- CN202311003316.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-08-10
AI Technical Summary
In indoor environments, due to the environmental dependence of Wi-Fi signals, when replacing an old indoor scene with a new one, existing technologies require a lot of manpower and time to re-collect fingerprint reference points and CSI data, resulting in a long deployment cycle for indoor wireless positioning systems.
By acquiring CSI data of fingerprint reference points with known indoor coordinates and fingerprint points to be located, the similarity and similarity distribution characteristics between CSI data are calculated. The CSI data is then updated to obtain the matching probability. Matching fingerprint reference points are selected to determine the coordinates of the fingerprint points to be located, ensuring that the spacing between fingerprint reference points is greater than the preset spacing to reduce data collection requirements.
It reduces the deployment time and manpower/time costs of indoor wireless positioning systems, improves positioning accuracy, and reduces the number of fingerprint reference points required.
Smart Images

Figure CN119485633B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of data processing, in particular to an indoor wireless positioning method and device. BACKGROUND
[0002] With the wide deployment of wireless sensor devices in indoor environments, wireless sensor networks make up for the defects that global navigation positioning systems are difficult to achieve high-precision positioning in indoor environments, and provide a strong prerequisite for indoor location services. Wi-Fi, Bluetooth, RFID (Radio Frequency Identification) and UWB (Ultra Wideband) are commonly used sensors and signal sources in wireless sensor networks, and are widely used in indoor wireless positioning. Among them, the positioning method based on Wi-Fi has the characteristics of high positioning accuracy and low device cost. The CSI (Channel State Information) from the wireless signal of the Wi-Fi device contains multi-channel subcarrier phase and amplitude data, which can describe the indoor and location-related information in detail, and has become the most commonly used wireless signal feature for building indoor fingerprint coordinates.
[0003] In related technologies, the indoor wireless positioning method based on Wi-Fi includes an offline stage and an online stage. In the offline stage, CSI data is collected at multiple fingerprint reference points in the indoor environment, and a fingerprint reference database is constructed to train a wireless positioning model. In the online stage, CSI data of a fingerprint point to be positioned is collected in real time, and the wireless positioning model is compared with the fingerprint reference database to obtain the predicted coordinates of the fingerprint point to be positioned, thereby realizing positioning. In related technologies, the positioning effect of the coordinates of the fingerprint point to be positioned depends on the matching degree of the CSI data of the fingerprint point to be positioned collected in real time and the CSI data in the fingerprint reference database. The number of fingerprint reference points and the amount of CSI data collected in the offline stage will significantly affect the positioning accuracy of the fingerprint point to be positioned. Therefore, the number of fingerprint reference points and the amount of CSI data collected in related technologies are often large.
[0004] In the case of replacing an old indoor scene with a new indoor scene, the indoor space size, obstacle type, Wi-Fi device position and fingerprint distribution will all change completely, and the new and old indoor scenes have no correlation. Due to the environmental dependence of Wi-Fi signals, the fingerprint reference points and CSI data in the old indoor scene are no longer available in the new indoor scene. In order to use the indoor wireless positioning method based on Wi-Fi in the new indoor scene, related technologies need to spend a lot of manpower and time to collect a large amount of fingerprint reference points and CSI data in the new indoor scene, and the deployment cycle of the new indoor wireless positioning system is long. SUMMARY
[0005] The embodiment of the present application aims to provide an indoor wireless positioning method and device to reduce the deployment time of an indoor wireless positioning system. The specific technical solutions are as follows.
[0006] In a first aspect, the embodiment of the present application provides an indoor wireless positioning method, which comprises the following steps.
[0007] Obtaining channel state information (CSI) data of a wireless network communication technology (Wi-Fi) at each fingerprint reference point with known coordinates in an indoor space and at a fingerprint point to be positioned, wherein different fingerprint reference points correspond to different positions in the indoor space, and the distance between any two fingerprint reference points is greater than a preset distance;
[0008] Calculating a first similarity between each CSI data, and calculating a similarity distribution feature between each CSI data based on each first similarity and each CSI data;
[0009] Calculating a second similarity between each similarity distribution feature, and updating each CSI data based on each second similarity;
[0010] Based on the similarity between the CSI data of the fingerprint point to be positioned and other CSI data obtained after the final update and the other CSI data, calculating a matching probability between the fingerprint point to be positioned and each fingerprint reference point;
[0011] Based on the matching probability, selecting a fingerprint reference point matched with the fingerprint point to be positioned, and determining the coordinates of the fingerprint point to be positioned based on the coordinates of the selected fingerprint reference point.
[0012] In an embodiment of the present application, before the step of calculating a matching probability between the fingerprint point to be positioned and each fingerprint reference point based on the similarity between the CSI data of the fingerprint point to be positioned and other CSI data obtained after the final update and the other CSI data, the method further comprises the following steps.
[0013] Returning to repeat the steps of calculating a first similarity between each CSI data, calculating a similarity distribution feature between each CSI data based on each first similarity and each CSI data, calculating a second similarity between each similarity distribution feature, and updating each CSI data based on each second similarity, until the number of repeated execution reaches a preset number of times.
[0014] In an embodiment of the present application, the step of calculating a first similarity between each CSI data, and calculating a similarity distribution feature between each CSI data based on each first similarity and each CSI data, comprises the following steps.
[0015] calculate first similarities between the CSI data, and construct a fingerprint feature fully connected graph, wherein features of each node in the fingerprint feature fully connected graph are respectively the CSI data, and features of each edge in the fingerprint feature fully connected graph are respectively the first similarities between the features of the connected nodes;
[0016] calculate similarity distribution features between the CSI data based on the features of each node and the features of each edge in the fingerprint feature fully connected graph.
[0017] In an embodiment of the present application, the calculating second similarities between the similarity distribution features, and updating the CSI data based on the second similarities, comprises:
[0018] calculate second similarities between the similarity distribution features, and construct a similarity distribution fully connected graph, wherein features of each node in the similarity distribution fully connected graph are respectively the similarity distribution features, and features of each edge in the similarity distribution fully connected graph are respectively the second similarities between the features of the connected nodes;
[0019] update the CSI data based on the features of each edge in the similarity distribution fully connected graph.
[0020] In an embodiment of the present application, the selecting the fingerprint reference points matching the to-be-positioned fingerprint point comprises:
[0021] select the fingerprint reference points with the maximum matching probability of the to-be-positioned fingerprint.
[0022] In an embodiment of the present application, the calculating first similarities between the CSI data, and calculating similarity distribution features between the CSI data based on the first similarities and the CSI data to the selecting the fingerprint reference points matching the to-be-positioned fingerprint point based on the matching probability, and determining the coordinates of the to-be-positioned fingerprint point based on the coordinates of the selected fingerprint reference points, comprises:
[0023] input the CSI data into a pre-trained indoor wireless positioning model to obtain the coordinates of the to-be-positioned fingerprint point output by the indoor wireless positioning model;
[0024] The indoor wireless positioning model is used to: calculate first similarities between CSI data, calculate similarity distribution features between the CSI data based on the first similarities and the CSI data, calculate second similarities between the similarity distribution features, update the CSI data based on the second similarities, calculate matching probabilities between the to-be-positioned fingerprint point and each fingerprint reference point based on similarities between the CSI data of the to-be-positioned fingerprint point finally obtained through updating and other CSI data and the other CSI data, select a fingerprint reference point matching the to-be-positioned fingerprint point based on the matching probabilities, and determine coordinates of the to-be-positioned fingerprint point based on coordinates of the selected fingerprint reference point.
[0025] In a second aspect, an embodiment of the present application provides an indoor wireless positioning device, and the device comprises:
[0026] A obtaining module is configured to obtain channel state information (CSI) data of a wireless network communication technology (Wi-Fi) at each fingerprint reference point with known coordinates indoors and at a to-be-positioned fingerprint point, wherein different fingerprint reference points correspond to different positions indoors, and a distance between any two fingerprint reference points is greater than a preset distance.
[0027] A first calculating module is configured to calculate first similarities between CSI data, and calculate similarity distribution features between the CSI data based on the first similarities and the CSI data.
[0028] A second calculating module is configured to calculate second similarities between the similarity distribution features, and update the CSI data based on the second similarities.
[0029] A third calculating module is configured to calculate matching probabilities between the to-be-positioned fingerprint point and each fingerprint reference point based on similarities between the CSI data of the to-be-positioned fingerprint point finally obtained through updating and other CSI data and the other CSI data.
[0030] A determining module is configured to select a fingerprint reference point matching the to-be-positioned fingerprint point based on the matching probabilities, and determine coordinates of the to-be-positioned fingerprint point based on coordinates of the selected fingerprint reference point.
[0031] In an embodiment of the present application, the device further comprises:
[0032] A returning and executing module is configured to return to repeatedly execute steps of calculating first similarities between CSI data, calculating similarity distribution features between the CSI data based on the first similarities and the CSI data, calculating second similarities between the similarity distribution features, and updating the CSI data based on the second similarities, until a number of times of repeated execution reaches a preset number of times.
[0033] In one embodiment of the present application, the first calculation module is specifically configured to:
[0034] calculate the first similarity between each CSI data, construct a fingerprint feature fully connected graph, wherein the features of each node in the fingerprint feature fully connected graph are respectively each CSI data, and the features of each edge in the fingerprint feature fully connected graph are respectively the first similarity between the features of the connected nodes;
[0035] calculate the similarity distribution features between the CSI data based on the features of each node and the features of each edge in the fingerprint feature fully connected graph.
[0036] In one embodiment of the present application, the second calculation module is specifically configured to:
[0037] calculate the second similarity between each similarity distribution feature, construct a similarity distribution fully connected graph, wherein the features of each node in the similarity distribution fully connected graph are respectively each similarity distribution feature, and the features of each edge in the similarity distribution fully connected graph are respectively the second similarity between the features of the connected nodes;
[0038] update each CSI data based on the features of each edge in the similarity distribution fully connected graph.
[0039] In one embodiment of the present application, the determination module is specifically configured to:
[0040] select the fingerprint reference points with the maximum matching probability with the to-be-positioned fingerprint point from the selected fingerprint reference points based on the matching probability, and determine the coordinates of the to-be-positioned fingerprint point based on the coordinates of the selected fingerprint reference points.
[0041] In one embodiment of the present application, the first calculation module, the second calculation module, the third calculation module, and the determination module are specifically configured to:
[0042] input each CSI data into a pre-trained indoor wireless positioning model to obtain the coordinates of the to-be-positioned fingerprint point output by the indoor wireless positioning model;
[0043] The indoor wireless positioning model is configured to: calculate the first similarity between each CSI data, calculate the similarity distribution features between each CSI data based on each first similarity and each CSI data; calculate the second similarity between each similarity distribution feature, update each CSI data based on each second similarity; calculate the matching probability between the to-be-positioned fingerprint point and each fingerprint reference point based on the similarity between the CSI data of the to-be-positioned fingerprint point and other CSI data and the other CSI data; select the fingerprint reference point matching the to-be-positioned fingerprint point based on the matching probability, and determine the coordinates of the to-be-positioned fingerprint point based on the coordinates of the selected fingerprint reference point.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
[0045] The memory is configured to store a computer program.
[0046] The processor is configured to execute the program stored in the memory, and implement the method steps of any one of the first aspect.
[0047] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method steps of any one of the first aspect.
[0048] The embodiment of the present application has the following beneficial effects:
[0049] The embodiment of the present application provides an indoor wireless positioning method, first acquires CSI data at each fingerprint reference point and a to-be-positioned fingerprint point in an indoor environment, then calculates a first similarity between each CSI data, and further obtains a similarity distribution feature between each CSI data; a second similarity between each similarity distribution feature is calculated, and then each CSI data is updated according to the second similarity, and the similarity between each updated CSI data obtained in this way can describe a distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the to-be-positioned fingerprint point. Based on the similarity between the CSI data of the to-be-positioned fingerprint point and the CSI data of each fingerprint reference point finally obtained by updating, a matching probability of the to-be-positioned fingerprint point and each fingerprint reference point can be obtained, and then the coordinates of the to-be-positioned fingerprint point are determined according to the matching probability.
[0050] In addition, the scheme provided by the embodiment of the present application requires that the distance between each fingerprint reference point is greater than a preset distance, so as to ensure that the CSI data between each fingerprint reference point has obvious feature difference, thereby ensuring that the similarity between each updated CSI data finally obtained can better describe the distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the to-be-positioned fingerprint point, so that the matching probability of the to-be-positioned fingerprint point and each fingerprint reference point obtained can better conform to the actual situation. Therefore, when the scheme provided by the embodiment of the present application is used for indoor wireless positioning, the distance between the fingerprint reference points from which the CSI data is collected is relatively large, so in the case of a fixed indoor size, the number of fingerprint reference points will not be too large, and compared with related technologies, the human and time costs required for collecting the CSI data of the fingerprint reference points can be reduced, thereby reducing the deployment time of the indoor wireless positioning system. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to make the technical solutions in the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description only aim to some embodiments of the present application, and other embodiments can be obtained by those skilled in the art based on the accompanying drawings.
[0052] Figure 1 A flowchart of a first indoor wireless positioning method provided by the embodiment of the present application is shown in the figure.
[0053] Figure 2 A structure diagram of a convolutional neural network extracting a feature vector provided by the embodiment of the present application is shown in the figure.
[0054] Figure 3 A structure diagram of a fingerprint feature full connection graph provided by the embodiment of the present application is shown in the figure.
[0055] Figure 4 A diagram of calculating similarity distribution features between CSI data provided by the embodiment of the present application is shown in the figure.
[0056] Figure 5 A structure diagram of a similarity distribution full connection graph provided by the embodiment of the present application is shown in the figure.
[0057] Figure 6 A diagram of updating CSI data provided by the embodiment of the present application is shown in the figure.
[0058] Figure 7 A flowchart of a second indoor wireless positioning method provided by the embodiment of the present application is shown in the figure.
[0059] Figure 8 A flowchart of a third indoor wireless positioning method provided by the embodiment of the present application is shown in the figure.
[0060] Figure 9 A flowchart of a fourth indoor wireless positioning method provided by the embodiment of the present application is shown in the figure.
[0061] Figure 10 A structure diagram of a fingerprint feature full connection graph and a similarity distribution full connection graph calculation process provided by the embodiment of the present application is shown in the figure.
[0062] Figure 11 A structure diagram of an indoor wireless positioning method calculation process provided by the embodiment of the present application is shown in the figure.
[0063] Figure 12 A structure diagram of an indoor wireless positioning device provided by the embodiment of the present application is shown in the figure.
[0064] Figure 13 A structure diagram of an electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0065] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art based on the present application shall fall within the scope of the present application.
[0066] In order to use the Wi-Fi-based indoor wireless positioning method in a new indoor scene, the related art needs a large amount of manpower and time cost to collect a large amount of fingerprint reference points and CSI data in the new indoor scene, and the period of deploying a new indoor wireless positioning system is relatively long.
[0067] In order to solve the above problems, the embodiments of the present application provide an indoor wireless positioning method and device, which are described below.
[0068] Firstly, an indoor wireless positioning method provided by the embodiments of the present application is described.
[0069] Referring to Figure 1 A flowchart of a first indoor wireless positioning method provided by the embodiments of the present application is shown, the method is applied to an electronic device with computing capability, for example, the method is applied to a computer, and the above method includes the following steps S101 to S105.
[0070] Step S101: Obtain CSI data at each fingerprint reference point with known coordinates in the indoor scene and at a fingerprint point to be positioned.
[0071] Different fingerprint reference points correspond to different positions in the indoor scene, and the distance between any two fingerprint reference points is greater than a preset distance.
[0072] In the process of indoor wireless positioning, a plurality of fingerprint reference points with known coordinates are first determined in the indoor scene. In the embodiments of the present application, it is required that the distance between any two fingerprint reference points is greater than a preset distance, so as to ensure that the obtained CSI data at each fingerprint reference point has obvious feature difference.
[0073] For example, the amount of CSI data obtained at each fingerprint reference point is KN, wherein KN represents the product of K and N, N is the number of fingerprint reference points, and K is the amount of CSI data obtained at each fingerprint reference point. In the embodiments of the present application, the value of K does not need to be large, and the value of K is generally 5 or 10, of course, the value of K can also be set to other values according to actual needs.
[0074] Step S102: calculating first similarities between each pair of CSI data, and calculating similarity distribution features between each pair of CSI data based on each first similarity and each CSI data.
[0075] Each CSI data described above includes CSI data at each fingerprint reference point and the fingerprint point to be located, and the similarity between each pair of CSI data is referred to as the first similarity described above. Since the similarity distribution features between each pair of CSI data are calculated based on each first similarity and each CSI data, the CSI data at the fingerprint point to be located in each CSI data will affect the similarity distribution features between each pair of CSI data, and the more the amount of CSI data at the fingerprint point to be located participating in the calculation, the greater the influence on the similarity distribution features between each pair of CSI data, which will reduce the positioning accuracy of the fingerprint point to be located subsequently. In actual applications, the amount of CSI data at the fingerprint point to be located participating in the calculation is generally set to 1.
[0076] For example, as described in step S101, the amount of CSI data at each fingerprint reference point obtained is KN; in addition, the amount of CSI data at the fingerprint point to be located obtained is 1, so a total of KN+1 CSI data participate in the calculation of the first similarity between each pair of CSI data. In the process of calculating the first similarity described above, x i represents the CSI data, where i = 1, 2, …, KN+1. For each CSI data, the label y i of each CSI data can be represented in the form of one-hot code. For example, the labels of K CSI data at one fingerprint reference point are all [1, 0, …, 0] T , the labels of K CSI data at another fingerprint reference point are all [0, 1, …, 0] T , and so on. Among each fingerprint reference point, the labels of K CSI data at one fingerprint reference point are different from the labels of K CSI data at another fingerprint reference point. For the CSI data at the fingerprint point to be located, assuming that the probability of the fingerprint point to be located belonging to each fingerprint reference point is the same, the label of the CSI data at the fingerprint point to be located can be set to to represent the uniform distribution of the CSI data at the fingerprint point to be located in the label space.
[0077] In the above description, x i represents the CSI data, so x i ∈R W×H×M , where R W×H×MLet f represent a W×H×M dimensional real space, where W is the number of subcarriers contained in the CSI data, H is the number of CSI data packets that make up the CSI data, and M is the number of wireless signal propagation links. To calculate the first similarity between each CSI data set, the representation vector of each CSI data set needs to be extracted. Specifically, a convolutional neural network f can be designed. emb Extract the representation vectors from each CSI data point, see [link / reference]. Figure 2 This is a schematic diagram of the structure for extracting representation vectors using a convolutional neural network, provided in an embodiment of the present invention.
[0078] from Figure 2 As can be seen from this, taking 30 continuously acquired CSI data packets as an example, by obtaining the amplitude, data with a dimension of 3×30×30 is obtained. This data is then input into the convolutional neural network f. emb The final output is a 64-dimensional column vector. The convolutional neural network f... emb The input data is processed sequentially using 32×15×15 dimensional convolution kernels, 64×7×7 dimensional convolution kernels, and 128×3×3 dimensional convolution kernels. Figure 2 In Chinese, "dim" is an abbreviation for "dimension". Figure 2 The lighter gray arrows indicate the operations performed on the data: Conv (Convolution) 3x3, BatchNorm (batch normalization), Maxpool (max pooling), and LeakyReLU (Leaky Linear Rectification Function). The darker gray arrows indicate the operations: Conv3x3, BatchNorm, and LeakyReLU. Here, Conv3x3 represents a 3×3 convolutional layer.
[0079] Specifically, Figure 2 This is just an example; adjustments can be made as needed in practical applications. Figure 2 The relevant parameters involved. According to... Figure 2 The CSI data are processed in the manner shown, and the resulting column vectors are used as the representation vectors of each CSI data. Based on the representation vectors of each CSI data, the first similarity between each CSI data can be calculated using the following embodiment, and then the similarity distribution characteristics between each CSI data can be calculated.
[0080] In one embodiment of the present invention, the first similarity between each CSI data is calculated through steps A and B, and the similarity distribution characteristics between each CSI data are calculated based on each first similarity and each CSI data.
[0081] Step A: Calculate the first similarity between each CSI data point and construct a fully connected graph of fingerprint features.
[0082] wherein the feature of each node in the fingerprint feature fully connected graph is respectively each CSI data, and the feature of each edge in the fingerprint feature fully connected graph is respectively the first similarity between the features of the connected nodes.
[0083] Specifically, the feature of each node in the fingerprint feature fully connected graph is the representation vector of each CSI data. Referring to Figure 3 A structural diagram of the fingerprint feature fully connected graph provided by an embodiment of the present application is shown. Figure 3 Three node features are shown in the formula (2). The feature of the edge connecting the node features The feature of the edge connecting the node features The feature of the edge connecting the node features The feature of the edge connecting the node features The corresponding node is a Query Fingerprint (query fingerprint), that is, the CSI data at the to-be-positioned fingerprint point in the present application. Figure 3 In the formula (2), dim=64+N represents that the dimension of the node feature is 64+N, and dim=1 represents that the dimension of the edge feature is 1. Figure 3 In the formula (2), the parameter F represents that the calculation related to the fingerprint feature fully connected graph is performed, the parameter l represents the number of times of calculation of the node feature and the edge feature, l=0 represents that the node feature or the edge feature is calculated once, l=2 represents that the node feature or the edge feature is calculated three times, and so on. For example, if the node feature The corresponding node is called node i, and then represents that the node feature is calculated once for the node i in the calculation related to the fingerprint feature fully connected graph; the edge feature represents that the edge feature is calculated once for the edge connecting the node i and the node 1 in the calculation related to the fingerprint feature fully connected graph.
[0084] Specifically, the first calculation of the edge feature for the edge connecting the node i and the node j can be shown in the following formula (1):
[0085]
[0086] In the formula (1), |·| represents the absolute value, is an encoding network for converting the first similarity between the node features into a certain dimension feature. includes a plurality of fully connected layers and parameter settings and a sigmoid (a mathematical function with an S-shaped curve) layer.
[0087] In addition, in order to integrate the edge features in the fingerprint feature full connection graph from a global perspective, after the first similarity between each node feature is calculated, all are normalized, and the features of the edges connecting node i and node j in the fingerprint feature full connection graph are obtained.
[0088] Step B: Calculate the similarity distribution features between the CSI data based on the features of each node and the features of each edge in the fingerprint feature full connection graph.
[0089] After the features of each node and the features of each edge in the fingerprint feature full connection graph are obtained, the similarity distribution features are further calculated to increase the discrimination of each node feature and improve the positioning ability of the to-be-positioned fingerprint point. In the embodiment of the present application, the N*K dimensional vector representing the similarity distribution features is represented as follows: In the formula, parameter D represents the calculation related to the similarity distribution features, and l represents the number of calculations, for example, l is 0, which means that the calculation is performed once, and l is 2, which means that the calculation is performed three times, and i represents the CSI data corresponding to the similarity distribution features. i i j The jth item of the N*K dimensional vector representing the similarity distribution features represents the similarity between the CSI data x
[0090] Specifically, in the case of l being 0, if x i is the CSI data at the fingerprint reference point, then may be as shown in the following formula (2):
[0091]
[0092] If x i is the CSI data at the to-be-positioned fingerprint point, then may be as shown in the following formula (3):
[0093]
[0094] In the formula (2) and the formula (3), || is a connection operator, which means that the results of connecting multiple a(i,j) form an N*K array. For a(i,j), the following definition can be used:
[0095] If the labels of the CSI data x i and x j are the same, then a(i,j) = 1; if the labels of the CSI data x i and x j are different, then a(i,j) = 0.wherein, if the labels of the CSI data are different, then a(i, j) = 0; wherein, i, j = 1, …, NK.
[0096] Referring to Figure 4 is a schematic diagram of calculating the similarity distribution features between the CSI data provided by an embodiment of the present application. As shown in Figure 4 As can be seen from the above, based on the node features and edge features in the fingerprint feature full connection graph, which are both of dimension N*K, a feature of dimension 2*N*K is generated, and then the similarity distribution relationship aggregation network f F2D :R 2NK →R NK is used to realize feature conversion, and the generated feature of dimension 2*N*K is converted into a similarity distribution feature of dimension N*K. Wherein, f F2D is composed of multiple full connection layers and an activation function ReLU, and the parameter setting is θ F2D .
[0097] Step S103: calculating the second similarity between each similarity distribution feature, and updating each CSI data based on each second similarity.
[0098] After the similarity distribution features between the CSI data are calculated, the similarity between each similarity distribution feature is calculated, and the result is called the second similarity. The above second similarity is used to return each similarity distribution feature to each CSI data, so as to update each CSI data and improve the discrimination between the CSI data. In an embodiment of the present application, the second similarity between each similarity distribution feature is calculated through the following steps C and D, and each CSI data is updated based on each second similarity.
[0099] Step C: calculating the second similarity between each similarity distribution feature, and constructing a similarity distribution full connection graph.
[0100] The features of each node in the above similarity distribution full connection graph are each similarity distribution feature, and the features of each edge in the above similarity distribution full connection graph are the second similarity between the features of the connected nodes.
[0101] Referring to Figure 5 is a structural schematic diagram of the similarity distribution full connection graph provided by an embodiment of the present application. Figure 5 As shown in the above, the features of three nodes are The features of the edges connecting the node features The features of the edges connecting the node features The features of the edges connecting the node features The features of the edges connecting the node features Wherein, l represents the connection between the node features The number of times the features of the corresponding node's edges are calculated. In this embodiment of the invention, l = 0 indicates that it has been calculated once, l = 1 indicates that it has been calculated twice, and so on.
[0102] Specifically, regarding the characteristics of connected nodes The edge features of the corresponding node are calculated for the first time, as shown in the following equation (4):
[0103]
[0104] In equation (4), Fingerprint similarity distribution relationship coding network It consists of multiple fully connected layers and one sigmoid layer, with parameters set to... After calculating the features of each edge in the fully connected graph with similarity distribution, regularization can be performed on each edge feature to integrate the edge features in the fully connected graph with similarity distribution.
[0105] Step D: Update each CSI data based on the features of each edge in the fully connected graph with the above similarity distribution.
[0106] After calculating the edge features in the fully connected graph of similarity distribution, the CSI data can be updated using the following equation (5):
[0107]
[0108] In equation (5), This is a fingerprint feature aggregation network, consisting of multiple fully connected layers, with parameters set to θ. D2F .
[0109] For details, please refer to Figure 6 This is a schematic diagram illustrating the updating of CSI data according to an embodiment of the present invention. From... Figure 6 As can be seen, by applying the features of each edge in the fully connected graph of the similarity distribution to the representation vector of the calculated CSI data, a vector of dimension (64+N)*N*K is generated, and then through f... D2F The data is then processed, meaning the representation vector of the CSI data is calculated again, thus updating the CSI data.
[0110] Step S104: Based on the similarity between the CSI data of the fingerprint point to be located and other CSI data obtained from the final update, and the other CSI data, calculate the matching probability between the fingerprint point to be located and each fingerprint reference point.
[0111] Specifically, the vector representing the similarity distribution relationship between the CSI data of the to-be-positioned fingerprint point obtained after final updating and other CSI data, and the data representing the coordinates of the above-mentioned other CSI data are processed by using a relevant classification function, and the matching probability between the to-be-positioned fingerprint point and each fingerprint reference point is calculated.
[0112] In the embodiment of the application, the matching probability between the to-be-positioned fingerprint point and each fingerprint reference point can be calculated by using the following method, as shown in the following formula (6):
[0113]
[0114] In formula (6), the normalized exponential function Softmax is used, is the CSI data of the to-be-positioned fingerprint point, i is the matching probability of the to-be-positioned fingerprint point and the fingerprint reference point, is the prediction result of the label of the to-be-positioned fingerprint point, y j is the one-hot code label of the fingerprint reference point to which the jth CSI data in the CSI data at each fingerprint reference point belongs.
[0115] Step S105: Based on the above-mentioned matching probability, the fingerprint reference point matched with the above-mentioned to-be-positioned fingerprint point is selected, and based on the coordinates of the selected fingerprint reference point, the coordinates of the above-mentioned to-be-positioned fingerprint point are determined.
[0116] After the matching probability between the to-be-positioned fingerprint point and each fingerprint reference point is obtained, the fingerprint reference point with the highest matching probability with the to-be-positioned fingerprint point can be selected, and the coordinates of the fingerprint reference point are taken as the coordinates of the to-be-positioned fingerprint point; or the fingerprint reference points with higher matching probability with the to-be-positioned fingerprint point and ranking in the top of the pre-set bit can be selected, and the average value of the coordinates of the fingerprint reference points is calculated as the coordinates of the to-be-positioned fingerprint point. Of course, there are other ways to determine the to-be-positioned fingerprint reference point, as long as the fingerprint reference point is selected according to the matching probability, and then the coordinates of the to-be-positioned fingerprint point are determined, and the method conforms to the actual situation.
[0117] It can be seen from the above that, in the scheme provided by the embodiment of the application, first, the CSI data at each fingerprint reference point and the to-be-positioned fingerprint point in the room is acquired, then the first similarity between each CSI data is calculated, and then the similarity distribution features between each CSI data are obtained; the second similarity between each similarity distribution feature is calculated, and then each CSI data is updated according to the second similarity, so that the similarity between each updated CSI data can describe the distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the to-be-positioned fingerprint point. Based on the similarity between the CSI data of the to-be-positioned fingerprint point and the CSI data of each fingerprint reference point finally obtained by updating, the matching probability of the to-be-positioned fingerprint point and each fingerprint reference point can be obtained, and then the coordinates of the to-be-positioned fingerprint point are determined according to the matching probability.
[0118] In addition, the scheme provided by the embodiment of the application requires that the distance between each fingerprint reference point is greater than a preset distance, so as to ensure that the CSI data between each fingerprint reference point has obvious feature difference, thereby ensuring that the similarity between each updated CSI data finally obtained can better describe the distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the to-be-positioned fingerprint point, so that the matching probability of the to-be-positioned fingerprint point and each fingerprint reference point obtained can better conform to the actual situation. Therefore, when the scheme provided by the embodiment of the application is used for indoor wireless positioning, the distance between the fingerprint reference points from which the CSI data is collected is relatively large, so that in the case of a fixed indoor size, the number of fingerprint reference points will not be too large, and compared with related technologies, the human and time costs required for collecting the CSI data of the fingerprint reference points can be reduced, thereby reducing the deployment time of the indoor wireless positioning system.
[0119] In the positioning process of the to-be-positioned fingerprint point, if the similarity distribution features between each CSI data are calculated only once, and each CSI data is updated only once based on the above-mentioned second similarity, because the feature information between each CSI data is aggregated and propagated for a small number of times, the finally determined coordinates of the to-be-positioned fingerprint point may be greatly different from the actual situation, that is, the calculation accuracy of the coordinates of the to-be-positioned fingerprint point is not high. Therefore, the embodiment of the application provides the embodiment shown in the following Figure 7 .
[0120] Referring to Figure 7 , the flowchart of the second indoor wireless positioning method provided by the embodiment of the application is compared with the embodiment shown in Figure 1 , before the above-mentioned step S104, the above-mentioned step S102 is repeatedly executed until the number of repeated executions reaches a preset number of times.
[0121] Specifically, in the description of the above-mentioned step A, formula (1) describes the first calculation of the first similarity, and correspondingly, in formula (1), l is 0. For the case of multiple times of calculating the first similarity, that is, l>0, in this case, the first similarity calculated each time can be described by the following formula (7)
[0122]
[0123] By using formula (7), the first similarity can be continuously calculated and updated.
[0124] In the description of the above step B, formula (2) and formula (3) describe the first time of calculating the similarity distribution characteristics between the CSI data. For the case of multiple times of calculating the similarity distribution characteristics between the CSI data, that is, l>0, in this case, the similarity distribution characteristics between the CSI data calculated each time can be described by the following formula (8)
[0125]
[0126] By using formula (8), the similarity distribution characteristics between the CSI data can be continuously calculated and updated.
[0127] In the description of the above step C, formula (4) describes the first time of calculating the second similarity. For the case of multiple times of calculating the second similarity, that is, l>0, in this case, the second similarity calculated each time can be described by the following formula (9)
[0128]
[0129] By using formula (9), the second similarity can be continuously calculated and updated, and the CSI data can be further updated based on the updated second similarity.
[0130] As can be seen from the above, in the scheme provided by the embodiment of the application, by repeatedly calculating multiple times, the CSI data is continuously updated, the feature information between the CSI data is aggregated multiple times, and the calculation accuracy of the coordinates of the to-be-positioned fingerprint point can be improved.
[0131] Referring to Figure 8 The flowchart of the third indoor wireless positioning method provided by the embodiment of the application is shown in FIG. 6, which is similar to the embodiment shown in FIG. 5. Figure 1 Compared with the embodiment shown in FIG. 5, the above step S105 can be implemented by the following step S105A.
[0132] Step S105A: based on the matching probability, selecting the first preset proportion of fingerprint reference points with the maximum matching probability of the to-be-positioned fingerprint, and determining the coordinates of the to-be-positioned fingerprint point based on the coordinates of the selected fingerprint reference points.
[0133] After the first preset proportion of the fingerprint reference points with the largest matching probability of the to-be-positioned fingerprint are selected, the coordinates of the selected fingerprint reference points are processed to obtain the coordinates of the to-be-positioned fingerprint point. For example, the number of the selected fingerprint reference points satisfying the first preset proportion is 3, that is, the three fingerprint reference points with the largest matching probability are selected from front to back according to the size of the matching probability. For the three fingerprint reference points, the coordinates of the to-be-positioned fingerprint point are calculated based on the matching probability weighting, as shown in the following formula (10):
[0134]
[0135] In formula (10), L is the predicted coordinates of the to-be-positioned fingerprint point, L i , P i respectively correspond to the coordinates and the corresponding matching probability of the three selected fingerprint reference points.
[0136] As can be seen from the above, in the scheme provided in the embodiments of the present application, the first preset proportion of the fingerprint reference points with the largest matching probability of the to-be-positioned fingerprint are selected, that is, the coordinates of the to-be-positioned fingerprint point are determined based on the multiple fingerprint reference points with larger matching probability, so that the determined coordinates of the to-be-positioned fingerprint point are more in line with the actual situation.
[0137] Referring to Figure 9 , the flowchart of the fourth indoor wireless positioning method provided in the embodiments of the present application is shown in FIG. 6, which is similar to the embodiment shown in FIG. 5, and the steps S102 to S105 can be implemented by the following step S106 compared with the embodiment shown in FIG. 5. Figure 1
[0138] Step S106: inputting each CSI data into the pre-trained indoor wireless positioning model to obtain the coordinates of the to-be-positioned fingerprint point output by the indoor wireless positioning model.
[0139] The indoor wireless positioning model is used to: calculate the first similarity between each CSI data, calculate the similarity distribution feature between each CSI data based on each first similarity and each CSI data; calculate the second similarity between each similarity distribution feature, update each CSI data based on each second similarity; calculate the matching probability between the to-be-positioned fingerprint point and each fingerprint reference point based on the similarity between the CSI data of the to-be-positioned fingerprint point finally obtained by updating and other CSI data and the other CSI data; select the fingerprint reference point matching the to-be-positioned fingerprint point based on the matching probability, and determine the coordinates of the to-be-positioned fingerprint point based on the coordinates of the selected fingerprint reference point.
[0140] Specifically, the process that the indoor wireless positioning model processes the CSI data to determine the coordinates of the to-be-positioned fingerprint point can be referred to the description of the indoor wireless positioning method, and details are not described herein again.
[0141] The training process of the indoor wireless positioning model can be briefly described as follows: for a large amount of fingerprint data obtained in other indoor scenes, N sample fingerprint reference points are determined, K sample CSI data at each sample fingerprint reference point are obtained, and KN sample CSI data are obtained; then, a sample to-be-positioned CSI data is randomly obtained from the data other than the KN sample CSI data in the large amount of fingerprint data, so that KN+1 sample CSI data are obtained. The coordinates and labels of the fingerprint points corresponding to the CSI data in the large amount of fingerprint data are known quantities.
[0142] After the KN+1 sample CSI data are obtained, the label of the sample to-be-positioned CSI data is artificially concealed as an unknown quantity, and then the KN+1 sample CSI data are processed according to the processing manner of the CSI data in the indoor wireless positioning method described above, to obtain the predicted coordinates of the fingerprint point corresponding to the sample to-be-positioned CSI data, that is, the training output result of the indoor wireless positioning model.
[0143] In the training of the indoor wireless positioning model, the sample loss of the model is calculated based on the training output result of the model, and the parameters of the model are adjusted based on the sample loss. Specifically, in the embodiment of the present application, the sample loss includes a fingerprint sample matching loss and a fingerprint sample similarity distribution loss. The fingerprint sample matching loss function can be as shown in the following formula (11):
[0144]
[0145] wherein y i and are the real label and the predicted label of the sample to-be-positioned CSI data x i , respectively.
[0146] The fingerprint sample similarity distribution loss function can be as shown in the following formula (12):
[0147]
[0148] Finally, the sample loss function of the indoor wireless positioning model can be as shown in the following formula (13):
[0149]
[0150] wherein, represents the number of times of calculating the second similarity in one training of the indoor wireless positioning model, γ is the weight of the fingerprint sample matching loss function, λ is the weight of the fingerprint sample similarity distribution loss function γ and λ are used to balance the importance of the fingerprint sample matching loss function and the fingerprint sample similarity distribution loss function, and can be valued as needed, for example, γ can be 0.9, and λ can be 0.1.
[0151] After obtaining the sample loss of the indoor wireless positioning model in the manner shown in formula (13), the parameters of the indoor wireless positioning model are adjusted based on the sample loss, and the indoor wireless positioning model is continuously trained until a preset training termination condition is reached. Specifically, the preset training termination condition can be a preset number of training times. In the case where the preset training termination condition is reached, it is considered that the indoor wireless positioning model has been trained.
[0152] As can be seen from the above, in the scheme provided in the embodiments of the present application, by using the trained indoor wireless positioning model to process each CSI data, the coordinates of the to-be-positioned fingerprint point can be obtained.
[0153] Referring to Figure 10 , the structural schematic diagram of the fingerprint feature full connection graph and the similarity distribution full connection graph calculation process provided in the embodiments of the present application. As can be seen from Figure 10 , after the first similarity between each CSI data is calculated and the fingerprint feature full connection graph is constructed, the similarity distribution features of each CSI data are calculated as the nodes in the similarity distribution full connection graph, and the second similarity between each similarity distribution feature is calculated, thereby constructing the similarity distribution full connection graph; then each CSI data is updated based on the features of each edge in the similarity distribution full connection graph, and the calculation is performed in a loop.
[0154] Referring to Figure 11 , the structural schematic diagram of the indoor wireless positioning method calculation process provided in the embodiments of the present application. As can be seen from Figure 11 , first, the features of the CSI data at each fingerprint reference point and the to-be-positioned fingerprint point are extracted to generate the representation vector of each CSI data, then the fingerprint feature full connection graph is constructed, the node features and edge features of the fingerprint feature full connection graph are calculated, the similarity distribution full connection graph is constructed, and then the fingerprint feature full connection graph and the similarity distribution full connection graph can be calculated and updated multiple times, based on the edge features related to the CSI data at the to-be-positioned fingerprint point in the finally updated fingerprint feature full connection graph and each fingerprint reference point data, the matching probability between the to-be-positioned fingerprint point and each fingerprint reference point is obtained, and finally the coordinates of the to-be-positioned fingerprint point are determined based on the matching probability.
[0155] Corresponding to the foregoing indoor wireless positioning method, an embodiment of the present application further provides an indoor wireless positioning device.
[0156] Referring to Figure 12 A structural schematic diagram of an indoor wireless positioning device provided by an embodiment of the present application is shown in the figure, which is applied to an electronic device with computing capability, and the device comprises:
[0157] The acquisition module 1201 is configured to acquire channel state information (CSI) data of a wireless network communication technology (Wi-Fi) at each fingerprint reference point with known coordinates in an indoor space and at a fingerprint point to be positioned, wherein different fingerprint reference points correspond to different positions in the indoor space, and the distance between any two fingerprint reference points is greater than a preset distance.
[0158] The first calculation module 1202 is configured to calculate a first similarity between each pair of CSI data, and calculate a similarity distribution feature between each pair of CSI data based on each first similarity and each CSI data.
[0159] The second calculation module 1203 is configured to calculate a second similarity between each similarity distribution feature, and update each CSI data based on each second similarity.
[0160] The third calculation module 1204 is configured to calculate a matching probability between the fingerprint point to be positioned and each fingerprint reference point based on the similarity between the CSI data of the fingerprint point to be positioned and other CSI data obtained after the final update and the other CSI data.
[0161] The determination module 1205 is configured to select a fingerprint reference point matched with the fingerprint point to be positioned based on the matching probability, and determine the coordinates of the fingerprint point to be positioned based on the coordinates of the selected fingerprint reference point.
[0162] In an embodiment of the present application, the first calculation module 1202 is specifically configured to:
[0163] calculate a first similarity between each pair of CSI data, construct a fingerprint feature fully connected graph, wherein the features of each node in the fingerprint feature fully connected graph are respectively each CSI data, and the features of each edge in the fingerprint feature fully connected graph are respectively the first similarities between the features of the connected nodes.
[0164] calculate a similarity distribution feature between each pair of CSI data based on the features of each node and the features of each edge in the fingerprint feature fully connected graph.
[0165] In an embodiment of the present application, the second calculation module 1203 is specifically configured to:
[0166] a second similarity between each of the similarity distribution features, and constructing a similarity distribution fully connected graph, wherein features of each node in the similarity distribution fully connected graph are respectively each of the similarity distribution features, and features of each edge in the similarity distribution fully connected graph are respectively the second similarity between the features of the connected nodes.
[0167] updating each of the CSI data based on the features of each edge in the similarity distribution fully connected graph.
[0168] As can be seen from the above, in the scheme provided by the embodiment of the application, first, the CSI data at each fingerprint reference point and the to-be-positioned fingerprint point in the room is acquired, then the first similarity between each of the CSI data is calculated, and then the similarity distribution features between each of the CSI data are obtained; the second similarity between each of the similarity distribution features is calculated, and then each of the CSI data is updated based on the second similarity, so that the similarity between the updated each of the CSI data can describe the distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the to-be-positioned fingerprint point. Based on the similarity between the CSI data of the to-be-positioned fingerprint point and the CSI data of each fingerprint reference point finally obtained by updating, the matching probability of the to-be-positioned fingerprint point and each fingerprint reference point can be obtained, and then the coordinates of the to-be-positioned fingerprint point are determined based on the matching probability.
[0169] In addition, the scheme provided by the embodiment of the application requires that the distance between each fingerprint reference point is greater than a preset distance, so as to ensure that the CSI data between each fingerprint reference point has obvious feature difference, thereby ensuring that the similarity between the updated each of the CSI data finally obtained can better describe the distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the to-be-positioned fingerprint point, so that the matching probability of the to-be-positioned fingerprint point and each fingerprint reference point obtained can better conform to the actual situation. Therefore, when the scheme provided by the embodiment of the application is used for indoor wireless positioning, the distance between the fingerprint reference points from which the CSI data is collected is relatively large, so that in the case of a fixed indoor size, the number of fingerprint reference points will not be too large, and compared with related technologies, the human and time costs required for collecting the CSI data of the fingerprint reference points can be reduced, thereby reducing the deployment time of the indoor wireless positioning system.
[0170] In an embodiment of the application, the device further comprises:
[0171] Returning to the execution module 1206, the steps of repeatedly calculating the first similarity between each of the CSI data, calculating the similarity distribution features between each of the CSI data based on each of the first similarity and each of the CSI data, calculating the second similarity between each of the similarity distribution features, and updating each of the CSI data based on each of the second similarity are returned to be executed until the number of repeated execution reaches a preset number.
[0172] From the above description, the function of the returning execution module 1206 is to make the first calculation module 1202 and the second calculation module 1203 repeatedly perform the corresponding operations thereof until the number of repeated execution reaches a preset number.
[0173] From the above, in the scheme provided in the embodiment of the application, through repeated calculation multiple times, each CSI data is constantly updated, and the feature information between each CSI data is aggregated multiple times, which can improve the calculation accuracy of the coordinates of the to-be-positioned fingerprint point.
[0174] In an embodiment of the application, the determination module 1205 is specifically configured to:
[0175] Based on the matching probability, the first preset proportion of fingerprint reference points with the maximum matching probability of the to-be-positioned fingerprint are selected, and the coordinates of the to-be-positioned fingerprint point are determined based on the coordinates of the selected fingerprint reference points.
[0176] From the above, in the scheme provided in the embodiment of the application, the first preset proportion of fingerprint reference points with the maximum matching probability of the to-be-positioned fingerprint are selected, that is, the coordinates of the to-be-positioned fingerprint point are determined based on multiple fingerprint reference points with a larger matching probability, so that the determined coordinates of the to-be-positioned fingerprint point are more in line with the actual situation.
[0177] In an embodiment of the application, the first calculation module 1202, the second calculation module 1203, the third calculation module 1204, and the determination module 1205 are specifically configured to:
[0178] Each CSI data is input into a pre-trained indoor wireless positioning model to obtain the coordinates of the to-be-positioned fingerprint point output by the indoor wireless positioning model;
[0179] The indoor wireless positioning model is configured to: calculate a first similarity between each CSI data, calculate a similarity distribution feature between each CSI data based on each first similarity and each CSI data, calculate a second similarity between each similarity distribution feature, update each CSI data based on each second similarity, calculate a matching probability between the to-be-positioned fingerprint point and each fingerprint reference point based on the similarity between the CSI data of the to-be-positioned fingerprint point and other CSI data and the other CSI data, and select a fingerprint reference point matched with the to-be-positioned fingerprint point based on the matching probability, and determine the coordinates of the to-be-positioned fingerprint point based on the coordinates of the selected fingerprint reference point.
[0180] From the above, in the scheme provided in the embodiment of the application, each CSI data is processed by using the trained indoor wireless positioning model, and the coordinates of the to-be-positioned fingerprint point can be obtained.
[0181] Referring toFigure 13 A structural schematic diagram of an electronic device provided by an embodiment of the present application comprises a processor 1301, a communication interface 1302, a memory 1303, and a communication bus 1304, wherein the processor 1301, the communication interface 1302, and the memory 1303 complete communication with each other through the communication bus 1304;
[0182] The memory 1303 is used for storing a computer program.
[0183] The processor 1301 is used for executing the program stored in the memory 1303, and realizes the steps of any one of the foregoing indoor wireless positioning methods.
[0184] As can be seen from the above, in the scheme provided by the embodiment of the present application, first, the CSI data at each fingerprint reference point and the to-be-positioned fingerprint point in the indoor environment is acquired, then the first similarity between each CSI data is calculated, and then the similarity distribution feature between each CSI data is obtained; the second similarity between each similarity distribution feature is calculated, and then each CSI data is updated according to the second similarity, and the similarity between each updated CSI data obtained in this way can describe the distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the to-be-positioned fingerprint point. Based on the similarity between the CSI data of the to-be-positioned fingerprint point and the CSI data of each fingerprint reference point finally obtained by updating, the matching probability of the to-be-positioned fingerprint point and each fingerprint reference point can be obtained, and then the coordinates of the to-be-positioned fingerprint point are determined according to the matching probability.
[0185] In addition, the scheme provided by the embodiment of the present application requires that the distance between each fingerprint reference point is greater than a preset distance, so as to ensure that the CSI data between each fingerprint reference point has obvious feature difference, thereby ensuring that the similarity between each updated CSI data finally obtained can better describe the distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the to-be-positioned fingerprint point, so that the matching probability of the to-be-positioned fingerprint point and each fingerprint reference point obtained can better conform to the actual situation. Therefore, when the scheme provided by the embodiment of the present application is used for indoor wireless positioning, the distance between the fingerprint reference points from which the CSI data is collected is relatively large, and therefore in the case of a fixed indoor size, the number of fingerprint reference points will not be too large, and compared with related technologies, the human and time costs required for collecting the CSI data of the fingerprint reference points can be reduced, thereby reducing the deployment time of the indoor wireless positioning system.
[0186] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0187] The communication interface is used for communication between the above electronic device and other devices.
[0188] The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the above processor.
[0189] The above processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0190] In another embodiment provided by the present application, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of any of the above indoor wireless positioning methods are implemented.
[0191] When the computer program stored in the computer readable storage medium provided by the embodiment of the application is applied to indoor wireless positioning, first, the CSI data at each fingerprint reference point and the fingerprint point to be positioned in the indoor environment is acquired, then the first similarity between each CSI data is calculated, and then the similarity distribution characteristics between each CSI data are obtained; the second similarity between each similarity distribution characteristic is calculated, and then each CSI data is updated according to the second similarity, and the similarity between the updated each CSI data obtained in this way can describe the distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the fingerprint point to be positioned. Based on the similarity between the CSI data of the fingerprint point to be positioned and the CSI data of each fingerprint reference point finally obtained by updating, the matching probability of the fingerprint point to be positioned and each fingerprint reference point can be obtained, and then the coordinates of the fingerprint point to be positioned are determined according to the matching probability.
[0192] In addition, the scheme provided by the embodiment of the application requires that the distance between each fingerprint reference point is greater than a preset distance, so as to ensure that the CSI data between each fingerprint reference point has obvious characteristic differences, thereby ensuring that the similarity between the updated each CSI data finally obtained can better describe the distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the fingerprint point to be positioned, so that the matching probability of the obtained fingerprint point to be positioned and each fingerprint reference point can better conform to the actual situation. Therefore, when the scheme provided by the embodiment of the application is used for indoor wireless positioning, the distance between the fingerprint reference points from which the CSI data is collected is relatively large, and therefore in the case of a fixed indoor size, the number of fingerprint reference points will not be too large, and compared with related technologies, the human and time costs required for collecting the CSI data of the fingerprint reference points can be reduced, thereby reducing the deployment time of the indoor wireless positioning system.
[0193] In another embodiment provided by the application, a computer program product containing instructions is also provided, which, when running on a computer, causes the computer to execute any of the indoor wireless positioning methods in the above embodiments.
[0194] When the computer program product provided by the embodiment of the application is applied to indoor wireless positioning, first, the CSI data at each fingerprint reference point and the fingerprint point to be positioned in the indoor environment is acquired, then the first similarity between each CSI data is calculated, and then the similarity distribution characteristics between each CSI data are obtained; the second similarity between each similarity distribution characteristic is calculated, and then each CSI data is updated according to the second similarity, and the similarity between the updated each CSI data obtained in this way can describe the distribution relationship of the similarity between the CSI data of each fingerprint reference point and the CSI data of the fingerprint point to be positioned. Based on the similarity between the CSI data of the fingerprint point to be positioned and the CSI data of each fingerprint reference point finally obtained by updating, the matching probability of the fingerprint point to be positioned and each fingerprint reference point can be obtained, and then the coordinates of the fingerprint point to be positioned are determined according to the matching probability.
[0195] In addition, the scheme provided by the embodiment of the present application requires that the distances between the fingerprint reference points are greater than the preset distance, so as to ensure that the CSI data of the fingerprint reference points have obvious feature differences, thereby ensuring that the similarity between the updated CSI data can preferably describe the distribution relationship of the similarity between the CSI data of the fingerprint reference points and the CSI data of the to-be-positioned fingerprint point, so that the matching probability between the to-be-positioned fingerprint point and the fingerprint reference points can preferably conform to the actual situation. Therefore, when the scheme provided by the embodiment of the present application is used for indoor wireless positioning, the distances between the fingerprint reference points which need to collect the CSI data are relatively large, so that in the case of a fixed indoor size, the number of the fingerprint reference points is not too large, and compared with the related art, the scheme can reduce the manpower and time cost required for collecting the CSI data of the fingerprint reference points, thereby reducing the deployment time of the indoor wireless positioning system.
[0196] In the above embodiment, the implementation can be achieved by software, hardware, firmware or any combination thereof, in whole or in part. When implemented by software, the implementation can be achieved in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the flow or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), optical medium (for example, DVD), or semiconductor medium (for example, solid state disk (SSD)) and the like.
[0197] It is to be noted that, in the present text, relationaiy terms such as first and second and the like can merely be used to distinguish one entity or action from another, without necessarily requiring or implying any such actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0198] Each of the embodiments in the present specification is described in a related manner, and the same or similar parts between the embodiments can be mutually referred to. Each of the embodiments focuses on the difference from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.
[0199] The above only describes the preferred embodiments of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An indoor wireless positioning method, characterized by, The method comprises: obtaining channel state information (CSI) data of a wireless network communication technology (Wi-Fi) at each fingerprint reference point with known coordinates indoors and at a fingerprint point to be positioned, wherein different fingerprint reference points correspond to different positions indoors, and the distance between any two fingerprint reference points is greater than a preset distance; calculating first similarities between the CSI data, calculating similarity distribution features between the CSI data based on the first similarities and the CSI data; calculating second similarities between the similarity distribution features, and updating the CSI data based on the second similarities; calculating matching probabilities between the fingerprint point to be positioned and each fingerprint reference point based on the similarity between the CSI data of the fingerprint point to be positioned and other CSI data obtained after final updating and the other CSI data; selecting a fingerprint reference point matching the fingerprint point to be positioned based on the matching probabilities, and determining the coordinates of the fingerprint point to be positioned based on the coordinates of the selected fingerprint reference point; wherein the calculation of the first similarities between the CSI data, the calculation of the similarity distribution features between the CSI data based on the first similarities and the CSI data, comprises: calculating the first similarities between the CSI data, constructing a fingerprint feature fully connected graph, wherein the features of each node in the fingerprint feature fully connected graph are respectively the CSI data, and the features of each edge in the fingerprint feature fully connected graph are respectively the first similarities between the features of the connected nodes; calculating the similarity distribution features between the CSI data based on the features of each node and the features of each edge in the fingerprint feature fully connected graph; the calculation of the second similarities between the similarity distribution features, and the updating of the CSI data based on the second similarities, comprises: calculating the second similarities between the similarity distribution features, constructing a similarity distribution fully connected graph, wherein the features of each node in the similarity distribution fully connected graph are respectively the similarity distribution features, and the features of each edge in the similarity distribution fully connected graph are respectively the second similarities between the features of the connected nodes; updating the CSI data based on the features of each edge in the similarity distribution fully connected graph.
2. The method of claim 1, wherein, Before the calculation of the matching probabilities between the fingerprint point to be positioned and each fingerprint reference point based on the similarity between the CSI data of the fingerprint point to be positioned and other CSI data obtained after final updating and the other CSI data, the method further comprises: returning to repeatedly perform the calculation of the first similarities between the CSI data, the calculation of the similarity distribution features between the CSI data based on the first similarities and the CSI data, the calculation of the second similarities between the similarity distribution features, and the updating of the CSI data based on the second similarities, until the number of repeated execution reaches a preset number of times.
3. The method according to any one of claims 1-2, characterized in that, The selection of the fingerprint reference point matching the fingerprint point to be positioned comprises: selecting the first preset proportion of fingerprint reference points with the largest matching probabilities of the fingerprint point to be positioned.
4. The method of claim 1, wherein, The step of calculating first similarities between each CSI data, calculating similarity distribution features between each CSI data based on each first similarity and each CSI data to the step of selecting a fingerprint reference point matched with the to-be-positioned fingerprint point based on the matching probability, and determining the coordinates of the to-be-positioned fingerprint point based on the coordinates of the selected fingerprint reference point comprises: inputting each CSI data into a pre-trained indoor wireless positioning model to obtain the coordinates of the to-be-positioned fingerprint point output by the indoor wireless positioning model; The indoor wireless positioning model is configured to: calculate first similarities between each CSI data, calculate similarity distribution features between each CSI data based on each first similarity and each CSI data; calculate second similarities between each similarity distribution feature, update each CSI data based on each second similarity; calculate matching probabilities between the to-be-positioned fingerprint point and each fingerprint reference point based on the similarity between the CSI data of the to-be-positioned fingerprint point and other CSI data and the other CSI data after final updating; select a fingerprint reference point matched with the to-be-positioned fingerprint point based on the matching probability, and determine the coordinates of the to-be-positioned fingerprint point based on the coordinates of the selected fingerprint reference point.
5. An indoor wireless positioning device, characterized by The device comprises: an acquisition module configured to acquire channel state information (CSI) data at each fingerprint reference point with known coordinates in an indoor environment and at a to-be-positioned fingerprint point by using a wireless network communication technology (Wi-Fi), wherein different fingerprint reference points correspond to different positions in the indoor environment, and the distance between any two fingerprint reference points is greater than a preset distance; a first calculation module configured to calculate first similarities between each CSI data and calculate similarity distribution features between each CSI data based on each first similarity and each CSI data; a second calculation module configured to calculate second similarities between each similarity distribution feature and update each CSI data based on each second similarity; a third calculation module configured to calculate matching probabilities between the to-be-positioned fingerprint point and each fingerprint reference point based on the similarity between the CSI data of the to-be-positioned fingerprint point and other CSI data and the other CSI data after final updating; a determination module configured to select a fingerprint reference point matched with the to-be-positioned fingerprint point based on the matching probability, and determine the coordinates of the to-be-positioned fingerprint point based on the coordinates of the selected fingerprint reference point; The first calculation module is specifically configured to: calculate first similarities between each CSI data, construct a fingerprint feature complete connection graph, and the features of each node in the fingerprint feature complete connection graph are respectively each CSI data, and the features of each edge in the fingerprint feature complete connection graph are respectively the first similarities between the features of the connected nodes; calculate similarity distribution features between each CSI data based on the features of each node and the features of each edge in the fingerprint feature complete connection graph; The second calculation module is specifically configured to: a second similarity between each of the similarity distribution features, and constructing a similarity distribution fully connected graph, wherein a feature of each node in the similarity distribution fully connected graph is respectively a feature of each of the similarity distribution features, and a feature of each edge in the similarity distribution fully connected graph is respectively a second similarity between features of connected nodes; updating each of the CSI data based on the feature of each edge in the similarity distribution fully connected graph.
6. The apparatus of claim 5, wherein, The apparatus further includes: a returning execution module configured to repeatedly execute the steps of calculating a first similarity between each of the CSI data, calculating a similarity distribution feature between each of the CSI data based on each of the first similarities, calculating a second similarity between each of the similarity distribution features, and updating each of the CSI data based on each of the second similarities, until a number of repetitions reaches a preset number.
7. The apparatus of any one of claims 5-6, wherein, The determining module is specifically configured to: select a preset proportion of fingerprint reference points with the largest matching probability based on the matching probability, and determine the coordinates of the to-be-positioned fingerprint point based on the coordinates of the selected fingerprint reference points.
8. An electronic device, comprising: The apparatus includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The memory is configured to store a computer program. The processor is configured to execute the program stored in the memory to implement the steps of the method in any one of claims 1-4.
9. A computer-readable storage medium, characterized in that, The computer program stored in the computer readable storage medium is executed by the processor to implement the steps of the method in any one of claims 1-4.