Positioning method and device, computer equipment and storage medium
By collecting and fusing signal characteristic data at different moments in the room, and using the fusion positioning model for feature analysis, the problem of inaccurate indoor positioning is solved and high-precision indoor positioning effect is achieved.
Patent Information
- Application Number
- CN202510635837.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-08-26
AI Technical Summary
In indoor environments, signal transmission is blocked by building walls or other objects, resulting in inaccurate positioning, and it is difficult for the prior art to achieve high-precision indoor positioning.
By collecting characteristic data such as signal reception strength, signal reception power and upstream arrival time at the target sampling time and historical sampling time, data is normalized and fused, and the fusion positioning model includes a spatial attention module, a time attention module and a fusion analysis module for feature extraction and analysis. Combining the characteristic data of different sampling times, the position coordinates of the position to be detected are determined.
High-precision indoor positioning is achieved, the accuracy of position coordinate determination is improved, and the positioning accuracy is ensured in complex indoor environments.
Smart Images

Figure CN120547671A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal positioning technology, and in particular to a positioning method, apparatus, computer equipment, and storage medium. Background Art
[0002] Indoor positioning services have a wide range of application scenarios in people's daily lives, bringing great convenience to people's daily lives and work.
[0003] However, in indoor environments, signal transmission may be blocked by building walls or other objects, resulting in inaccurate indoor positioning. Therefore, the problem of accurate positioning in indoor environments still faces huge challenges. Summary of the Invention
[0004] Based on this, it is necessary to provide a positioning method, device, computer equipment and storage medium that can improve the accuracy of indoor positioning in response to the above technical problems.
[0005] In a first aspect, the present application provides a positioning method. The method comprises:
[0006] Determining target positioning features of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment and feature data of different data types collected at at least one historical sampling moment before the target sampling moment; wherein the different data types include at least signal reception strength, signal reception power, and uplink arrival time;
[0007] The target positioning features are input into the fusion positioning model to obtain the position coordinates of the position to be detected.
[0008] In one embodiment, determining the target positioning feature of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment and feature data of different data types collected at at least one historical sampling moment before the target sampling moment includes:
[0009] For each data type, normalizing the characteristic data of the data type to obtain normalized data of the data type;
[0010] Performing data fusion on normalized data of different data types to obtain a data fusion matrix; wherein the normalized data corresponding to the same sampling time is located in the same row or column of the data fusion matrix;
[0011] The target positioning feature of the position to be detected is determined according to the data fusion matrix.
[0012] In one embodiment, determining the target positioning feature of the position to be detected based on the data fusion matrix includes:
[0013] A sliding window of a preset size is used to segment the target positioning features of the position to be detected from the data fusion matrix; wherein the target positioning features at least include normalized data corresponding to the target sampling moment.
[0014] In one embodiment, the fusion positioning model includes a spatial attention module, a temporal attention module and a fusion analysis module;
[0015] Inputting the target positioning features into a fusion positioning model to obtain the position coordinates of the position to be detected includes:
[0016] Inputting the target positioning feature into a spatial attention module to obtain a spatial feature output by the spatial attention module after performing spatial key feature extraction on the target positioning feature;
[0017] Inputting the target positioning feature into a time attention module to obtain a time feature output by the time attention module for performing time key feature extraction on the target positioning feature;
[0018] The spatial features and the time features are input into a fusion analysis module to obtain the position coordinates of the position to be detected which is output by the fusion analysis module after performing feature analysis on the spatial features and the time features.
[0019] In one embodiment, the training process of the fusion positioning model includes:
[0020] Performing model training on the initial positioning model based on sample positioning features corresponding to sample positions at at least two sample moments and sample coordinates of the sample positions corresponding to the sample positioning features to obtain a reference positioning model;
[0021] Performing a model performance evaluation on the reference positioning model to obtain a performance score;
[0022] When the performance score does not exceed a score threshold, the reference positioning model is used as a fused positioning model.
[0023] In one embodiment, performing a model performance evaluation on the reference positioning model to obtain a performance score includes:
[0024] obtaining a test location feature of a test location;
[0025] Inputting the test positioning features into a reference positioning model and obtaining predicted coordinates output by the reference positioning model;
[0026] The root mean square error between the test coordinates of the test location and the predicted coordinates is used as the performance score.
[0027] In a second aspect, the present application further provides a positioning device. The device comprises:
[0028] a determination module, configured to determine target positioning features of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment, and feature data of different data types collected at at least one historical sampling moment before the target sampling moment; wherein the different data types include at least signal reception strength, signal reception power, and uplink arrival time;
[0029] The positioning module is used to input the target positioning features into the fusion positioning model to obtain the position coordinates of the position to be detected.
[0030] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:
[0031] Determining target positioning features of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment and feature data of different data types collected at at least one historical sampling moment before the target sampling moment; wherein the different data types include at least signal reception strength, signal reception power, and uplink arrival time;
[0032] The target positioning features are input into the fusion positioning model to obtain the position coordinates of the position to be detected.
[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0034] Determining target positioning features of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment and feature data of different data types collected at at least one historical sampling moment before the target sampling moment; wherein the different data types include at least signal reception strength, signal reception power, and uplink arrival time;
[0035] The target positioning features are input into the fusion positioning model to obtain the position coordinates of the position to be detected.
[0036] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:
[0037] Determining target positioning features of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment and feature data of different data types collected at at least one historical sampling moment before the target sampling moment; wherein the different data types include at least signal reception strength, signal reception power, and uplink arrival time;
[0038] The target positioning features are input into the fusion positioning model to obtain the position coordinates of the position to be detected.
[0039] The above positioning method, device, computer equipment and storage medium, the present application determines the target positioning features of the position to be detected based on the feature data of different data types collected at the position to be detected at the target sampling moment, and the feature data of different data types collected at at least one historical sampling moment before the target sampling moment; then, the target positioning features are input into the fusion positioning model to obtain the position coordinates of the position to be detected. According to the above content, when performing positioning processing, the present application will pre-acquire the feature data at the target sampling moment and the feature data at at least one historical sampling moment before the target sampling moment, thereby combining the feature data at different sampling moments and fully analyzing the data changes of the feature data at different sampling moments; and, since different data types include at least signal reception strength, signal reception power and uplink arrival time, therefore, when determining the position coordinates of the position to be detected, the present application fully combines the signal reception strength, signal reception power and uplink arrival time corresponding to the target sampling moment and the historical sampling moment, thereby ensuring the accuracy of determining the position coordinates of the position to be detected, thereby achieving high-precision indoor positioning operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A diagram of an application environment of a positioning method provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of the flow of the first positioning method provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the flow of the second positioning method provided in an embodiment of the present application;
[0043] Figure 4 A schematic diagram of a sliding window provided in an embodiment of the present application;
[0044] Figure 5A schematic diagram of a flow chart of a third positioning method provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of a fourth positioning method according to an embodiment of the present application;
[0046] Figure 7 A schematic diagram of the model training process provided in the embodiment of the present application;
[0047] Figure 8 A schematic diagram of a fifth positioning method according to an embodiment of the present application;
[0048] Figure 9 A structural block diagram of the first positioning device provided in an embodiment of the present application;
[0049] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0051] The positioning method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The present application determines the target positioning features of the position to be detected based on the feature data of different data types collected at the position to be detected at the target sampling moment, and the feature data of different data types collected at at least one historical sampling moment before the target sampling moment; then, the target positioning features are input into the fusion positioning model to obtain the position coordinates of the position to be detected. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0052] In one embodiment, Figure 2 As shown, a positioning method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:
[0053] S201 , determining target positioning features of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment and feature data of different data types collected at at least one historical sampling moment before the target sampling moment.
[0054] The different data types include at least signal reception strength, signal reception power and uplink arrival time.
[0055] It should be noted that in order to ensure the accuracy of the subsequent determination of the position coordinates of the position to be detected, in the process of obtaining feature data of different data types, it is necessary to collect feature data at different sampling times to ensure that the position coordinates of the position to be detected are comprehensively judged from the perspective of time and space.
[0056] In one embodiment of the present application, if the terminal to be detected moves in an indoor environment, a certain sampling frequency is adopted to continuously obtain feature data of different data types at different sampling moments; among which, the last sampling moment can be used as the target sampling moment, and the three sampling moments before the target sampling moment are used as historical sampling moments.
[0057] In another embodiment of the present application, if the terminal to be detected moves in an indoor environment, different time intervals can be randomly generated to realize the collection of feature data of different data types at multiple sampling moments; specifically, after sampling and obtaining feature data of different data types at the first sampling moment, data sampling is performed again at the second sampling moment after the random time interval to obtain feature data of different data types at the second sampling moment, and so on until feature data of different data types are collected at all sampling moments.
[0058] Specifically, for each sampling moment, when it is necessary to collect characteristic data of different data types at the location to be detected, the signal reception strength of the terminal Bluetooth at that moment can be obtained after the time reaches the sampling moment, and the time point of that moment can be recorded. Then, after the signal reception strength is collected, the base station uplink data corresponding to the time point of that moment is obtained in the terminal background. The base station uplink data includes the signal reception power and the uplink arrival time.
[0059] It is further explained that when determining the target positioning features of the position to be detected based on the characteristic data of different data types at the target sampling moment and the characteristic data of different data types at at least one historical sampling moment, data preprocessing can be performed on the characteristic data of different data types at each sampling moment to obtain the target positioning features of the position to be detected.
[0060] Among them, data pre-processing may include but is not limited to: at least one of data cleaning, data integration, data change, data regulation and data division. The specific processing content included in the data pre-processing is not limited here.
[0061] S202: Input the target positioning features into the fusion positioning model to obtain the position coordinates of the position to be detected.
[0062] It should be noted that when it is necessary to obtain the position coordinates of the position to be detected, the target positioning features can be input into the fusion positioning model, and the output result of the fusion positioning model can be obtained. The output result is the position coordinates of the position to be detected.
[0063] It is further explained that in order to further improve the accuracy of determining the position coordinates, after obtaining the output results of the fusion positioning model, the output results may be filtered to obtain the final position coordinates.
[0064] In one embodiment of the present application, when it is necessary to obtain the position coordinates of the target sampling moment at the position to be detected, the historical coordinates of at least one historical sampling moment at the historical position can be obtained in advance; and each historical coordinate and the position coordinate are input into the filter, and the output result of the filter is obtained, which is the position coordinate after the position coordinate is extracted and filtered.
[0065] As an example, the position coordinates of the target sampling moment at the position to be detected and the historical coordinates of the previous six historical sampling moments at the historical positions can be input into the Savitzky-Golay filter, and the output result of the filter can be obtained. The output result is the accurate position coordinates after filtering.
[0066] The above positioning method, the present application determines the target positioning features of the position to be detected based on the feature data of different data types collected at the position to be detected at the target sampling moment, and the feature data of different data types collected at at least one historical sampling moment before the target sampling moment; then, the target positioning features are input into the fusion positioning model to obtain the position coordinates of the position to be detected. According to the above content, when performing positioning processing, the present application will pre-acquire the feature data at the target sampling moment, as well as the feature data at at least one historical sampling moment before the target sampling moment, so as to realize the combination of feature data at different sampling moments and fully analyze the data changes of feature data at different sampling moments; and, since different data types include at least signal reception strength, signal reception power and uplink arrival time, therefore, when determining the position coordinates of the position to be detected, the present application fully combines the signal reception strength, signal reception power and uplink arrival time corresponding to the target sampling moment and the historical sampling moment, thereby ensuring the accuracy of determining the position coordinates of the position to be detected, thereby realizing high-precision indoor positioning operations.
[0067] In one embodiment, if Figure 3 As shown, when it is necessary to determine the target positioning features of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment and feature data of different data types collected at at least one historical sampling moment before the target sampling moment, the following contents may be included:
[0068] S301 , for each data type, normalize characteristic data of the data type to obtain normalized data of the data type.
[0069] It should be noted that when it is necessary to normalize the characteristic data of a data type to obtain normalized data of the data type, the normalization formula for the characteristic data of different data types can be obtained in advance, and then the characteristic data can be substituted into the normalization formula of the corresponding data type to achieve normalization of the characteristic data of the data type.
[0070] In one embodiment of the present application, the normalization formula may be as follows:
[0071]
[0072] Among them, R i,t Refers to the feature data before normalization, R` i,t It refers to the normalized data after normalization processing; the subscript i represents the index of the signal access point; t represents the time of acquisition; e represents the natural logarithm; and c represents the minimum characteristic data.
[0073] S302: performing data fusion on normalized data of different data types to obtain a data fusion matrix.
[0074] The normalized data corresponding to the same sampling moment are located in the same row or column of the data fusion matrix.
[0075] In one embodiment of the present application, when it is necessary to perform data fusion on normalized data of different data types, an empty matrix can be established in advance, and the normalized data of different data types can be inserted into the empty matrix according to preset splicing rules to obtain a data fusion matrix.
[0076] Among them, the splicing rules may include but are not limited to: setting the normalized data corresponding to the same sampling time in the same row of the data fusion matrix, or setting the normalized data corresponding to the same sampling time in the same column of the data fusion matrix. The specific content of the splicing rules is not limited here.
[0077] S303: Determine the target positioning feature of the position to be detected according to the data fusion matrix.
[0078] In one embodiment of the present application, in order to ensure that the feature data collected at different sampling times can be fully integrated in the subsequent process of determining the position coordinates of the position to be detected, the data fusion matrix can be directly used as the target positioning feature of the position to be detected.
[0079] It should be noted that in order to prevent the target positioning feature from containing too much data, thereby consuming too many computing resources and time resources in the process of locating the position to be detected, therefore, when it is necessary to determine the target positioning feature of the position to be detected based on the data fusion matrix, it can include the following content: using a sliding window of a preset size to segment the target positioning feature of the position to be detected from the data fusion matrix; wherein, the target positioning feature at least includes normalized data corresponding to the target sampling moment.
[0080] In another embodiment of the present application, the number of characters contained in the target positioning feature can be pre-set, and the size of the sliding window can be determined according to the number of characters, and then Figure 4 As shown, a sliding window of a preset size is used to segment the target positioning features of the position to be detected from the data fusion matrix.
[0081] The above positioning method realizes the operation of determining the target positioning features of the position to be detected through the feature data of different data types collected at the position to be detected at the target sampling moment, and the feature data of different data types collected at at least one historical sampling moment, which provides a data basis for the subsequent acquisition of the position coordinates of the position to be detected through the fusion positioning model, ensures the smooth progress of the subsequent process, and improves the accuracy of determining the position coordinates of the position to be detected.
[0082] In one embodiment, if Figure 5 As shown in the figure, the fusion positioning model includes a spatial attention module, a temporal attention module, and a fusion analysis module. Therefore, when it is necessary to input the target positioning features into the fusion positioning model to obtain the position coordinates of the position to be detected, the following contents may be included:
[0083] S501, input the target positioning feature into the spatial attention module to obtain the spatial feature output by the spatial attention module after performing spatial key feature extraction on the target positioning feature.
[0084] It should be noted that when it is necessary to extract spatial key features of the target positioning features through the spatial attention module, the spatial attention mechanism operation can be performed on the feature data of different data types in the target positioning features respectively, and then the spatial attention score is obtained. The feature data with a higher spatial attention score is used as the spatial feature output by the spatial attention module for extracting spatial key features of the target positioning features.
[0085] In one embodiment of the present application, the attention module includes an LSTM layer and an attention calculation layer, wherein the LSTM layer is responsible for predicting the feature data at the next moment based on the intrinsic relationship of the feature data at different moments; and the attention calculation layer determines three vector values Q (i.e., Query, representing the information to be queried), K (i.e., Key, representing the candidate items, used to match the Query) and V (i.e., Value, representing the content associated with each Key. Once the Key is selected, the corresponding Value will be used to calculate the final output) based on the output of the LSTM layer; then, the spatial attention mechanism operation is performed based on the vector values Q, K and V to obtain the spatial attention score.
[0086] Among them, the calculation formula of the spatial attention mechanism is as follows:
[0087] Output=softmax( )V;
[0088] 其中,Output指的是经过Softmax处理后的输出向量, 指的是经过空间注意力机制运算得到的空间注意力评分。
[0089] S502,将目标定位特征输入至时间注意力模块中,得到时间注意力模块对目标定位特征进行时间关键特征提取输出的时间特征。
[0090] 需要说明的是,时间注意力模块可利用通道注意力基站,将将时间维度上利用全连接层对权重进行拟合,生成不同采样时刻的特征权重,进而,根据特征权重的高低,获取时间注意力模块对目标定位特征进行时间关键特征提取输出的时间特征。
[0091] S503,将空间特征和时间特征输入至融合分析模块中,得到融合分析模块对空间特征和时间特征进行特征分析后输出的待检测位置的位置坐标。
[0092] 需要说明的是,由于空间特征和时间特征分别为空间注意力模块和时间注意力模块提取得到的关键特征,因此,通过融合分析模块对空间特征和时间特征进行特征分析,不仅仅可以防止冗余数据对分析效率造成影响,还可保证通过空间特征和时间特征有效的反应待检测位置的时间特性和空间特性,实现准确获取待检测位置的位置坐标的目的。
[0093] 上述定位方法,通过空间注意力模块、时间注意力模块和融合分析模块相互之间的模块配合,实现了对目标定位特征的定位分析,从而得到待检测位置的位置坐标,因此,使得在确定待检测位置的位置坐标的过程中结合了空间特征和时间特征,提高了待检测位置的位置坐标的确定准确性。
[0094] 在一种实施例中,如 图6所示,当需要对融合定位模型进行模型训练时,可包括以下内容:
[0095] S601,根据至少两个样本时刻在样本位置对应的样本定位特征,以及样本定位特征对应样本位置的样本坐标对初始定位模型进行模型训练,得到参考定位模型。
[0096] 在本申请的一种实施例中,当需要获取样本定位特征时,可包括以下内容:使用终端在室内环境中沿一定的轨迹缓慢移动;期间,终端按照固定的采集频率,在每一样本采样时刻记录蓝牙信号的信号接收强度,以及对应时间点所处的样本坐标;在收集完成后,在终端后台导出相应时间点的基站上行数据,该上行数据包括信号接收功率和上行到达时间。对每一样本采样时刻的信号接收强度、信号接收功率和上行到达时间,分别进行归一化处理,得到每一样本采样时刻对应的不同数据类型的归一化数据;对每一样本采样时刻对应的不同数据类型的归一化数据进行数据融合,得到数据融合矩阵;并如 图7所示,采用预设尺寸的滑动窗口从数据融合矩阵中分割出样本定位特征,其中,将滑动窗口中最后一个时刻对应的样本坐标作为标签值;如 图7中第一样本定位特征的标签值为t L时刻对应的样本坐标;第而样本定位特征的标签值为t L+1时刻对应的样本坐标;最终实现根据至少两个样本时刻在样本位置对应的样本定位特征,以及样本定位特征对应样本位置的样本坐标对初始定位模型进行模型训练,得到参考定位模型的步骤。
[0097] S602,对参考定位模型进行模型性能评估,得到性能评分。
[0098] 需要说明的是,当需要对参考定位模型进行模型性能评估时,可包括以下内容:获取测试位置的测试定位特征;将测试定位特征输入至参考定位模型,并获取参考定位模型输出的预测坐标;将测试位置的测试坐标与预测坐标之间的均方根误差作为性能评分。
[0099] S603,在性能评分未超过评分阈值的情况下,将参考定位模型作为融合定位模型。
[0100] 需要说明的是,由于性能评分是根据测试位置的测试坐标与预测坐标之间的均方根误差确定的,因此,若性能评分越高,则表征测试位置的测试坐标与预测坐标之间的均方根误差越高,表征模型性能越差;若性能评分越低,则表征测试位置的测试坐标与预测坐标之间的均方根误差越低,表征模型性能越好;因此,在性能评分未超过评分阈值的情况下,则表征模型性能好于预设阈值,因此,可将参考定位模型作为融合定位模型。
[0101] 在本申请的一种实施例中,如 图7所示,本申请在对融合定位模型进行模型训练时,可通过终端在室内环境获取不同样本采样时刻的进行数据收集(Data Collected byUE),包括5G NR信号(5G NR Signal)和蓝牙低功耗信标(BLE Beacon)等,进而,通过数据融合(Data Fusion)、数据归一化(Data Normalization)和数据分割(Data Segmentation);进而,对完成上述处理的数据进行离线训练(Offline Training);通过神经网络(NeuralNetwork)获取预测位置(Predicted Positions),并通过预测位置与真实位置(GroundTruth Positions)之间的误差计算(Error Calculation),对神经网络进行梯度反向传播(Gradient Backpropagation);再通过训练完成的神经网络进行在线估计(OnlineEstimation)时,可通过加载训练好的模型(Load Model),以实现通过神经网络实时估计位置(Estimated real-time positions),在通过位置滤波器(Pos-filter)对估计位置进行滤波处理;将将处理后的位置数据发送到服务器引擎(Server Engine),服务器引擎将最终将处理结果反馈给用户设备(UE)。
[0102] 上述定位方法,在对初始定位模型进行模型训练后,得到参考定位模型;并在对参考定位模型进行模型性能评估合格后,将将参考定位模型作为融合定位模型,以此保证了融合定位模型的模型预测准确性,提高了后续通过融合定位模型确定待检测位置的位置坐标的准确性。
[0103] 在一种实施例中,如 图8所示,当需要获取待检测位置的位置坐标时,可包括以下内容:
[0104] S801,针对每一数据类型,对数据类型的特征数据进行归一化处理,得到数据类型的归一化数据。
[0105] S802,获取目标采样时刻在待检测位置处采集到的不同数据类型的特征数据,以及目标采样时刻之前的至少一个历史采样时刻采集到的不同数据类型的特征数据。
[0106] S803,对不同数据类型的归一化数据进行数据融合,得到数据融合矩阵;其中,同一采样时刻对应的归一化数据位于数据融合矩阵的同一行或同一列中。
[0107] S804,采用预设尺寸的滑动窗口,从数据融合矩阵中分割出待检测位置的目标定位特征;其中,目标定位特征中至少包含目标采样时刻对应的归一化数据。
[0108] S805,将目标定位特征输入至空间注意力模块中,得到空间注意力模块对目标定位特征进行空间关键特征提取输出的空间特征。
[0109] S806,将目标定位特征输入至时间注意力模块中,得到时间注意力模块对目标定位特征进行时间关键特征提取输出的时间特征。
[0110] S807,将空间特征和时间特征输入至融合分析模块中,得到融合分析模块对空间特征和时间特征进行特征分析后输出的待检测位置的位置坐标。
[0111] S808,对待检测位置的位置坐标进行滤波处理,得到最终的位置坐标。
[0112] 上述定位方法,本申请根据目标采样时刻在待检测位置处采集到的不同数据类型的特征数据,以及目标采样时刻之前的至少一个历史采样时刻采集到的不同数据类型的特征数据,确定待检测位置的目标定位特征;进而,将目标定位特征输入至融合定位模型,得到待检测位置的位置坐标。根据上述内容可知,本申请在进行定位处理时,会预先获取目标采样时刻下的特征数据,以及目标采样时刻之前的至少一个历史采样时刻下的特征数据,实现了结合不同采样时刻的特征数据,充分分析不同采样时刻下特征数据的数据变化情况;并且,由于不同数据类型至少包括信号接收强度、信号接收功率和上行到达时间,因此,本申请在确定待检测位置的位置坐标时,充分结合了目标采样时刻以及历史采样时刻对应的信号接收强度、信号接收功率和上行到达时间,以此保证了确定待检测位置的位置坐标的准确性,以此实现了高精度的室内定位操作。
[0113] 应该理解的是,虽然如上的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。
[0114] 基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的定位方法的定位装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个定位装置实施例中的具体限定可以参见上文中对于定位方法的限定,在此不再赘述。
[0115] 在一个实施例中,如 图9所示,提供了一种定位装置,包括:确定模块10和定位模块20,其中:
[0116] 确定模块10,用于根据目标采样时刻在待检测位置处采集到的不同数据类型的特征数据,以及目标采样时刻之前的至少一个历史采样时刻采集到的不同数据类型的特征数据,确定待检测位置的目标定位特征;其中,不同数据类型至少包括信号接收强度、信号接收功率和上行到达时间;
[0117] 定位模块20,用于将目标定位特征输入至融合定位模型,得到待检测位置的位置坐标。
[0118] 在一种实施例中,针对每一数据类型,对数据类型的特征数据进行归一化处理,得到数据类型的归一化数据;
[0119] 对不同数据类型的归一化数据进行数据融合,得到数据融合矩阵;其中,同一采样时刻对应的归一化数据位于数据融合矩阵的同一行或同一列中;
[0120] 根据数据融合矩阵,确定待检测位置的目标定位特征。
[0121] 在一种实施例中,采用预设尺寸的滑动窗口,从数据融合矩阵中分割出待检测位置的目标定位特征;其中,目标定位特征中至少包含目标采样时刻对应的归一化数据。
[0122] 在一种实施例中,将目标定位特征输入至融合定位模型,得到待检测位置的位置坐标,包括:
[0123] 将目标定位特征输入至空间注意力模块中,得到空间注意力模块对目标定位特征进行空间关键特征提取输出的空间特征;
[0124] 将目标定位特征输入至时间注意力模块中,得到时间注意力模块对目标定位特征进行时间关键特征提取输出的时间特征;
[0125] 将空间特征和时间特征输入至融合分析模块中,得到融合分析模块对空间特征和时间特征进行特征分析后输出的待检测位置的位置坐标。
[0126] 在一种实施例中,根据至少两个样本时刻在样本位置对应的样本定位特征,以及样本定位特征对应样本位置的样本坐标对初始定位模型进行模型训练,得到参考定位模型;
[0127] 对参考定位模型进行模型性能评估,得到性能评分;
[0128] 在性能评分未超过评分阈值的情况下,将参考定位模型作为融合定位模型。
[0129] 在一种实施例中,获取测试位置的测试定位特征;
[0130] 将测试定位特征输入至参考定位模型,并获取参考定位模型输出的预测坐标;
[0131] 将测试位置的测试坐标与预测坐标之间的均方根误差作为性能评分。
[0132] 上述定位装置,本申请根据目标采样时刻在待检测位置处采集到的不同数据类型的特征数据,以及目标采样时刻之前的至少一个历史采样时刻采集到的不同数据类型的特征数据,确定待检测位置的目标定位特征;进而,将目标定位特征输入至融合定位模型,得到待检测位置的位置坐标。根据上述内容可知,本申请在进行定位处理时,会预先获取目标采样时刻下的特征数据,以及目标采样时刻之前的至少一个历史采样时刻下的特征数据,实现了结合不同采样时刻的特征数据,充分分析不同采样时刻下特征数据的数据变化情况;并且,由于不同数据类型至少包括信号接收强度、信号接收功率和上行到达时间,因此,本申请在确定待检测位置的位置坐标时,充分结合了目标采样时刻以及历史采样时刻对应的信号接收强度、信号接收功率和上行到达时间,以此保证了确定待检测位置的位置坐标的准确性,以此实现了高精度的室内定位操作。
[0133] 上述定位装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
[0134] 在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如 图10所示。该计算机设备包括处理器、存储器、输入 / 输出接口、通信接口、显示单元和输入装置。其中,处理器、存储器和输入 / 输出接口通过系统总线连接,通信接口、显示单元和输入装置通过输入 / 输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的输入 / 输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、移动蜂窝网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种定位方法。该计算机设备的显示单元用于形成视觉可见的画面,可以是显示屏、投影装置或虚拟现实成像装置。显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
[0135] 本领域技术人员可以理解, 图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
[0136] 在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:
[0137] 根据目标采样时刻在待检测位置处采集到的不同数据类型的特征数据,以及目标采样时刻之前的至少一个历史采样时刻采集到的不同数据类型的特征数据,确定待检测位置的目标定位特征;其中,不同数据类型至少包括信号接收强度、信号接收功率和上行到达时间;
[0138] 将目标定位特征输入至融合定位模型,得到待检测位置的位置坐标。
[0139] 在一个实施例中,处理器执行计算机程序时还实现以下步骤:
[0140] 针对每一数据类型,对数据类型的特征数据进行归一化处理,得到数据类型的归一化数据;
[0141] 对不同数据类型的归一化数据进行数据融合,得到数据融合矩阵;其中,同一采样时刻对应的归一化数据位于数据融合矩阵的同一行或同一列中;
[0142] 根据数据融合矩阵,确定待检测位置的目标定位特征。
[0143] 在一个实施例中,处理器执行计算机程序时还实现以下步骤:
[0144] 采用预设尺寸的滑动窗口,从数据融合矩阵中分割出待检测位置的目标定位特征;其中,目标定位特征中至少包含目标采样时刻对应的归一化数据。
[0145] 在一个实施例中,处理器执行计算机程序时还实现以下步骤:
[0146] 将目标定位特征输入至融合定位模型,得到待检测位置的位置坐标,包括:
[0147] 将目标定位特征输入至空间注意力模块中,得到空间注意力模块对目标定位特征进行空间关键特征提取输出的空间特征;
[0148] 将目标定位特征输入至时间注意力模块中,得到时间注意力模块对目标定位特征进行时间关键特征提取输出的时间特征;
[0149] 将空间特征和时间特征输入至融合分析模块中,得到融合分析模块对空间特征和时间特征进行特征分析后输出的待检测位置的位置坐标。
[0150] 在一个实施例中,处理器执行计算机程序时还实现以下步骤:
[0151] 根据至少两个样本时刻在样本位置对应的样本定位特征,以及样本定位特征对应样本位置的样本坐标对初始定位模型进行模型训练,得到参考定位模型;
[0152] 对参考定位模型进行模型性能评估,得到性能评分;
[0153] 在性能评分未超过评分阈值的情况下,将参考定位模型作为融合定位模型。
[0154] 在一个实施例中,处理器执行计算机程序时还实现以下步骤:
[0155] 获取测试位置的测试定位特征;
[0156] 将测试定位特征输入至参考定位模型,并获取参考定位模型输出的预测坐标;
[0157] 将测试位置的测试坐标与预测坐标之间的均方根误差作为性能评分。
[0158] 在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:
[0159] 根据目标采样时刻在待检测位置处采集到的不同数据类型的特征数据,以及目标采样时刻之前的至少一个历史采样时刻采集到的不同数据类型的特征数据,确定待检测位置的目标定位特征;其中,不同数据类型至少包括信号接收强度、信号接收功率和上行到达时间;
[0160] 将目标定位特征输入至融合定位模型,得到待检测位置的位置坐标。
[0161] 在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
[0162] 针对每一数据类型,对数据类型的特征数据进行归一化处理,得到数据类型的归一化数据;
[0163] 对不同数据类型的归一化数据进行数据融合,得到数据融合矩阵;其中,同一采样时刻对应的归一化数据位于数据融合矩阵的同一行或同一列中;
[0164] 根据数据融合矩阵,确定待检测位置的目标定位特征。
[0165] 在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
[0166] 采用预设尺寸的滑动窗口,从数据融合矩阵中分割出待检测位置的目标定位特征;其中,目标定位特征中至少包含目标采样时刻对应的归一化数据。
[0167] 在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
[0168] 将目标定位特征输入至融合定位模型,得到待检测位置的位置坐标,包括:
[0169] 将目标定位特征输入至空间注意力模块中,得到空间注意力模块对目标定位特征进行空间关键特征提取输出的空间特征;
[0170] 将目标定位特征输入至时间注意力模块中,得到时间注意力模块对目标定位特征进行时间关键特征提取输出的时间特征;
[0171] 将空间特征和时间特征输入至融合分析模块中,得到融合分析模块对空间特征和时间特征进行特征分析后输出的待检测位置的位置坐标。
[0172] 在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
[0173] 根据至少两个样本时刻在样本位置对应的样本定位特征,以及样本定位特征对应样本位置的样本坐标对初始定位模型进行模型训练,得到参考定位模型;
[0174] 对参考定位模型进行模型性能评估,得到性能评分;
[0175] 在性能评分未超过评分阈值的情况下,将参考定位模型作为融合定位模型。
[0176] 在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
[0177] 获取测试位置的测试定位特征;
[0178] 将测试定位特征输入至参考定位模型,并获取参考定位模型输出的预测坐标;
[0179] 将测试位置的测试坐标与预测坐标之间的均方根误差作为性能评分。
[0180] 在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:
[0181] 根据目标采样时刻在待检测位置处采集到的不同数据类型的特征数据,以及目标采样时刻之前的至少一个历史采样时刻采集到的不同数据类型的特征数据,确定待检测位置的目标定位特征;其中,不同数据类型至少包括信号接收强度、信号接收功率和上行到达时间;
[0182] 将目标定位特征输入至融合定位模型,得到待检测位置的位置坐标。
[0183] 在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
[0184] 针对每一数据类型,对数据类型的特征数据进行归一化处理,得到数据类型的归一化数据;
[0185] 对不同数据类型的归一化数据进行数据融合,得到数据融合矩阵;其中,同一采样时刻对应的归一化数据位于数据融合矩阵的同一行或同一列中;
[0186] 根据数据融合矩阵,确定待检测位置的目标定位特征。
[0187] 在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
[0188] 采用预设尺寸的滑动窗口,从数据融合矩阵中分割出待检测位置的目标定位特征;其中,目标定位特征中至少包含目标采样时刻对应的归一化数据。
[0189] 在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
[0190] 将目标定位特征输入至空间注意力模块中,得到空间注意力模块对目标定位特征进行空间关键特征提取输出的空间特征;
[0191] 将目标定位特征输入至时间注意力模块中,得到时间注意力模块对目标定位特征进行时间关键特征提取输出的时间特征;
[0192] 将空间特征和时间特征输入至融合分析模块中,得到融合分析模块对空间特征和时间特征进行特征分析后输出的待检测位置的位置坐标。
[0193] 在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
[0194] 根据至少两个样本时刻在样本位置对应的样本定位特征,以及样本定位特征对应样本位置的样本坐标对初始定位模型进行模型训练,得到参考定位模型;
[0195] 对参考定位模型进行模型性能评估,得到性能评分;
[0196] 在性能评分未超过评分阈值的情况下,将参考定位模型作为融合定位模型。
[0197] 在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
[0198] 获取测试位置的测试定位特征;
[0199] 将测试定位特征输入至参考定位模型,并获取参考定位模型输出的预测坐标;
[0200] 将测试位置的测试坐标与预测坐标之间的均方根误差作为性能评分。
[0201] 需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
[0202] 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。
[0203] 以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
[0204] 以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。
Claims
1. A positioning method, characterized in that: The method comprises: Determining target positioning features of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment and feature data of different data types collected at at least one historical sampling moment before the target sampling moment; wherein the different data types include at least signal reception strength, signal reception power, and uplink arrival time; The target positioning features are input into the fusion positioning model to obtain the position coordinates of the position to be detected.
2. The method according to claim 1, characterized in that Determining the target positioning feature of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment and feature data of different data types collected at at least one historical sampling moment before the target sampling moment includes: For each data type, normalizing the characteristic data of the data type to obtain normalized data of the data type; Performing data fusion on normalized data of different data types to obtain a data fusion matrix; wherein the normalized data corresponding to the same sampling time is located in the same row or the same column of the data fusion matrix; The target positioning feature of the position to be detected is determined according to the data fusion matrix.
3. The method according to claim 2, characterized in that Determining the target positioning feature of the position to be detected based on the data fusion matrix includes: A sliding window of a preset size is used to segment the target positioning features of the position to be detected from the data fusion matrix; wherein the target positioning features at least include normalized data corresponding to the target sampling moment.
4. The method according to claim 1, wherein The fusion positioning model includes a spatial attention module, a temporal attention module and a fusion analysis module; Inputting the target positioning features into a fusion positioning model to obtain the position coordinates of the position to be detected includes: Inputting the target positioning feature into a spatial attention module to obtain a spatial feature output by the spatial attention module after performing spatial key feature extraction on the target positioning feature; Inputting the target positioning feature into a time attention module to obtain a time feature output by the time attention module for performing time key feature extraction on the target positioning feature; The spatial features and the time features are input into a fusion analysis module to obtain the position coordinates of the position to be detected which is output by the fusion analysis module after performing feature analysis on the spatial features and the time features.
5. The method according to claim 1, characterized in that The training process of the fusion positioning model includes: Performing model training on the initial positioning model based on sample positioning features corresponding to sample positions at at least two sample moments and sample coordinates of the sample positions corresponding to the sample positioning features to obtain a reference positioning model; Performing a model performance evaluation on the reference positioning model to obtain a performance score; When the performance score does not exceed a score threshold, the reference positioning model is used as a fused positioning model.
6. The method according to claim 5, characterized in that The performing model performance evaluation on the reference positioning model to obtain a performance score includes: obtaining a test location feature of a test location; Inputting the test positioning features into a reference positioning model and obtaining predicted coordinates output by the reference positioning model; The root mean square error between the test coordinates of the test location and the predicted coordinates is used as the performance score.
7. A positioning device, characterized in that: The device comprises: a determination module, configured to determine target positioning features of the position to be detected based on feature data of different data types collected at the position to be detected at the target sampling moment, and feature data of different data types collected at at least one historical sampling moment before the target sampling moment; wherein the different data types include at least signal reception strength, signal reception power, and uplink arrival time; The positioning module is used to input the target positioning features into the fusion positioning model to obtain the position coordinates of the position to be detected.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.