Beidou and wi-fi indoor and outdoor seamless switching positioning method and device

By using the fusion positioning method of BeiDou and Wi-Fi, and utilizing the DQN model and weight analysis technology, the problem of discontinuous positioning at indoor and outdoor boundaries was solved, achieving high-precision, low-energy seamless positioning switching and improving the user experience of positioning and navigation.

CN116338745BActive Publication Date: 2026-03-03FIBRLINK NETWORKS +3
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-09
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing positioning and navigation systems suffer from unstable signals at indoor and outdoor boundaries, leading to discontinuous positioning and navigation, increased terminal power consumption, and weak algorithm robustness, which affects user experience.

Method used

A seamless indoor/outdoor positioning method using BeiDou and Wi-Fi is adopted. By combining the reward function of positioning accuracy, terminal energy consumption and time complexity with the DQN model, and using the analytic hierarchy process and entropy weight method to analyze the weight values, a global positioning model is constructed to achieve fusion positioning of BeiDou and Wi-Fi.

Benefits of technology

It improves the accuracy and continuity of indoor and outdoor positioning, reduces terminal energy consumption, enhances the user experience of positioning and navigation, and meets the requirements for seamless switching in heterogeneous positioning modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116338745B_ABST
    Figure CN116338745B_ABST
Patent Text Reader

Abstract

A method and apparatus for seamless indoor / outdoor positioning switching between BeiDou and Wi-Fi is disclosed. The method, after a preset time interval, assesses the current positioning status of the mobile terminal and makes positioning switching decisions using a DQN model and judgment indicators. These judgment indicators include positioning accuracy, terminal power consumption, and time complexity parameters. The switching action set for the positioning switching decision includes BeiDou positioning mode, Wi-Fi positioning mode, and BeiDou+Wi-Fi fusion positioning mode. A reward function for positioning accuracy, terminal power consumption, and time complexity is constructed by weighted summation combined with a switching penalty factor. The subject weight value and object weight value in the judgment indicators are analyzed using the analytic hierarchy process (AHP) and entropy weight method, and the subject weight value and object weight value are coupled using the least squares method. This application improves the accuracy of switching, takes into account terminal power consumption and time complexity of different positioning modes, and can better meet the requirements for seamless indoor / outdoor positioning switching under heterogeneous positioning modes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of positioning technology, specifically relating to a method and device for seamless indoor / outdoor positioning using BeiDou and Wi-Fi. Background Technology

[0002] With social development and technological advancements, intelligent transportation, smart cities, and underground parking space search all rely heavily on location and navigation, leading to increasingly higher demands for the accuracy of location information in daily life.

[0003] Because of the complexity and variety of life scenarios, such as being blocked by obstacles outdoors and at the boundary between indoors and outdoors, the satellite signals or Wi-Fi signals that can be used for positioning and navigation are relatively poor and unstable. This means that a single positioning and navigation system cannot provide continuous positioning and navigation services. Summary of the Invention

[0004] In view of this, the purpose of this application is to propose a method and device for seamless indoor and outdoor positioning using BeiDou and Wi-Fi, in order to solve or partially solve the above-mentioned technical problems.

[0005] To achieve the above objectives, the first aspect of this application provides a method for seamless indoor / outdoor positioning using BeiDou and Wi-Fi, comprising:

[0006] After a preset time interval, the current positioning status of the mobile terminal is assessed, and a positioning switching decision is made using the DQN model with judgment indicators. The judgment indicators include positioning accuracy, terminal power consumption, and time complexity parameters. The switching action set for the positioning switching decision includes BeiDou positioning mode, WIFI positioning mode, and BeiDou + WIFI fusion positioning mode.

[0007] In the DQN model, a reward function for positioning accuracy, terminal energy consumption, and time complexity is constructed by combining weighted summation with switching penalty factors.

[0008] In the DQN model, the Analytic Hierarchy Process (AHP) and the Entropy Weight Method are used to analyze and judge the subject weight value and the object weight value in the indicator. The least squares method is then used to couple the subject weight value and the object weight value of the indicator.

[0009] As a preferred solution for seamless indoor and outdoor positioning methods between BeiDou and Wi-Fi, a global positioning model is constructed, and the location coordinates of mobile terminals in BeiDou positioning mode and Wi-Fi positioning mode are uniformly converted through the global positioning model.

[0010] The coordinates of a mobile terminal in BeiDou positioning mode are first converted to a geocentric coordinate system and then to a global coordinate system.

[0011] As the preferred solution for seamless indoor / outdoor positioning methods combining BeiDou and Wi-Fi, the Geometric Precision Factor (GDOP) is selected as a reference factor for measuring positioning accuracy. The formula for calculating the GDOP is as follows:

[0012]

[0013]

[0014]

[0015] In the formula, (x,y,z) represents the location of the tag calculated using k base stations, (Ax k Ay k Az k ) represents the coordinates of the k-th base station, d k This represents the measured distance from the mobile terminal to the k-th base station.

[0016] As a preferred solution for seamless indoor / outdoor positioning methods combining BeiDou and Wi-Fi, the DQN model defines the state during movement as follows:

[0017] state=[n,GDOP1,NUM1,GDOP2,NUM2,GDOP3,COST1,COST2,COST3,TIME1,TIME2,TIME3]

[0018] In the formula, n represents the positioning mode currently used by the mobile terminal. When n is 1, it represents the Beidou positioning mode; when n is 2, it represents the WIFI positioning mode; and when n is 3, it represents the Beidou + WIFI fusion positioning.

[0019] GDOP1 represents the geometric precision factor of the BeiDou positioning mode, and NUM1 represents the number of satellites observed by the terminal.

[0020] GDOP2 represents the geometric precision factor of the WIFI positioning mode; NUM2 represents the number of WIFI access points observed by the terminal.

[0021] GDOP3 represents the geometric precision factor of the BeiDou + WIFI fusion positioning mode; COST1 represents the terminal power consumption of BeiDou positioning, and COST2 represents the terminal power consumption of WIFI positioning; TIME1 represents the time complexity of the BeiDou positioning algorithm, and TIME2 represents the time complexity of the WIFI positioning algorithm.

[0022] As the preferred solution for seamless indoor / outdoor positioning using BeiDou and Wi-Fi, the reward function is defined as follows:

[0023] r(s,a)=(A1r P (s,a)+A2r E (s,a)+A3rT (s,a))*β

[0024]

[0025] In the formula, A i (i = 1, 2, 3) are the weighting factors of the parameters; r P (s,a), r E (s,a), r T (s,a) represent the reward functions for positioning accuracy, terminal power consumption, and time complexity, respectively; β is the handover penalty factor.

[0026] As a preferred solution for the seamless indoor / outdoor positioning method combining BeiDou and Wi-Fi, the coupling formula for the subject weight value and object weight value of the judgment index using the least squares method is as follows:

[0027]

[0028] The constraints are:

[0029]

[0030] In the formula, W * Here, W represents the coupling weight, and W represents the main weight value. i k represents the object weight value. ij It is a standardized data matrix with m evaluation indicators and n evaluated objects.

[0031] As a preferred solution for seamless indoor / outdoor positioning methods combining BeiDou and Wi-Fi, the DQN model uses the following formula to represent the approximate state-action value function of the main network:

[0032]

[0033] In the formula, ω represents the parameters of the main network, Q π (s,a) represents the current network state s, and the switching action a is taken;

[0034] The expected value of the cumulative discount reward when following the switching strategy π, Q π (s,a) is defined as:

[0035] Q π (s,a)=E π (G t |S t =s,A t =a)

[0036] G t =R t+1 +γR t+2 +γ 2 Rt+3 +...

[0037] In the formula, G t For cumulative discount rewards, parameter γ is the discount factor, which is used to represent the relative ratio of future reward value to current reward value; R is the reward value at each step. At each decision moment, the mobile terminal will make a switching decision, select a positioning technology based on the current positioning information, and obtain a feedback reward value.

[0038] As a preferred solution for seamless indoor / outdoor positioning between BeiDou and Wi-Fi, the DQN model employs an ε-greedy strategy to return the selected action to the mobile terminal. The mobile terminal switches to the target positioning mode based on the switching action and calculates the reward function after executing the switching action. The current state, the selected target switching action, the reward value of switching to the target switching action, and the next state variable are integrated and put into the training database. When training the network, training data is randomly taken from the training database to optimize the weights and biases of the neural network.

[0039] As a preferred solution for seamless indoor / outdoor positioning between BeiDou and Wi-Fi, the loss function is constructed using mean square error, and the DQN model network parameters are updated to full convergence using gradient descent.

[0040] The second aspect of this application provides a BeiDou and Wi-Fi seamless indoor / outdoor positioning device, employing the BeiDou and Wi-Fi seamless indoor / outdoor positioning method of the first aspect or any possible implementation thereof, including:

[0041] The positioning handover decision module is used to make positioning handover decisions based on the current positioning status of the mobile terminal after a preset time interval, using the DQN model and judgment indicators. The judgment indicators include positioning accuracy, terminal power consumption and time complexity parameters. The set of handover actions for the positioning handover decision includes BeiDou positioning mode, WIFI positioning mode and BeiDou + WIFI fusion positioning mode.

[0042] The reward module is used in the DQN model to construct a reward function for positioning accuracy, terminal energy consumption, and time complexity by combining weighted summation with switching penalty factors.

[0043] The weight coupling module is used in the DQN model to analyze and judge the subject weight value and object weight value in the judgment index using the analytic hierarchy process and the entropy weight method, and to couple the subject weight value and object weight value of the judgment index using the least squares method.

[0044] A third aspect of this application proposes an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the BeiDou and Wi-Fi seamless indoor / outdoor positioning method of the first aspect or any possible implementation thereof.

[0045] The fourth aspect of this application proposes a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a BeiDou and Wi-Fi seamless indoor / outdoor positioning method that implements the first aspect or any possible implementation thereof.

[0046] As described above, the technical solution provided in this application, after a preset time interval, uses a DQN model to make positioning handover decisions based on the current positioning status of the mobile terminal and judgment indicators. These judgment indicators include positioning accuracy, terminal power consumption, and time complexity parameters. The set of handover actions for the positioning handover decision includes BeiDou positioning mode, WIFI positioning mode, and BeiDou+WIFI fusion positioning mode. In the DQN model, a reward function for positioning accuracy, terminal power consumption, and time complexity is constructed by weighted summation combined with a handover penalty factor. Furthermore, the DQN model utilizes the analytic hierarchy process (AHP) and entropy weight method to analyze the subject weight values ​​and object weight values ​​in the judgment indicators, and couples these values ​​using the least squares method. This application improves handover accuracy while simultaneously considering terminal power consumption and the time complexity of different positioning algorithms, better meeting the requirements for seamless indoor and outdoor positioning handover under heterogeneous positioning modes. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a schematic diagram of the BeiDou and Wi-Fi seamless indoor / outdoor positioning method according to an embodiment of this application;

[0049] Figure 2 This is a schematic diagram of indoor WIFI positioning location calculation provided in an embodiment of this application;

[0050] Figure 3 This is a schematic diagram of the main network for the BeiDou and Wi-Fi seamless indoor / outdoor positioning method according to an embodiment of this application;

[0051] Figure 4This is a schematic diagram of a Beidou and Wi-Fi seamless indoor / outdoor positioning device according to an embodiment of this application;

[0052] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0054] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by a person skilled in the art to which this application pertains. The terms "comprising" or "including," or similar words used in the embodiments of this application, mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects.

[0055] Due to the complexity and variability of real-life scenarios, such as obstacles outdoors and the poor and unstable satellite or Wi-Fi signals available for positioning and navigation at indoor / outdoor boundaries, a single positioning and navigation system cannot provide continuous service. Furthermore, the ping-pong effect that occurs when switching between indoor and outdoor environments significantly increases the terminal's energy consumption and weakens the robustness of the algorithm. The discontinuity of indoor / outdoor positioning, or the "intermittent" nature of indoor / outdoor navigation, is a key factor affecting the user experience during positioning and navigation.

[0056] In view of this, utilizing the ubiquitous indoor Wi-Fi signal and the stable outdoor BeiDou satellite signal to achieve full indoor and outdoor signal coverage, and employing BeiDou and Wi-Fi fusion positioning technology at the indoor-outdoor boundary, is a solution for precise indoor and outdoor collaborative positioning and navigation. By utilizing seamless positioning technology to obtain continuous location information in indoor or outdoor environments obstructed by objects, the terminal can achieve precise navigation and positioning targets in both indoor and outdoor environments, which has significant application value in daily positioning and navigation. It solves the problem of "intermittent" indoor and outdoor positioning and navigation, which is conducive to the development of location-based services, ensuring that people's positioning and navigation needs are well guaranteed, and improving the user experience during the positioning and navigation process. The collaborative positioning and navigation scheme based on BeiDou and Wi-Fi was chosen because BeiDou is independently developed in my country and is relatively secure, while Wi-Fi has the advantages of easy deployment and low cost for indoor positioning. The following is the specific content of the embodiments of this application.

[0057] See Figure 1 This application provides a method for seamless indoor / outdoor positioning using BeiDou and Wi-Fi, comprising the following steps:

[0058] S1. After a preset time interval, the current positioning status of the mobile terminal is assessed using a DQN model and judgment indicators to make a positioning switching decision. The judgment indicators include positioning accuracy, terminal power consumption, and time complexity parameters. The switching action set for the positioning switching decision includes BeiDou positioning mode, WIFI positioning mode, and BeiDou + WIFI fusion positioning mode.

[0059] S2. In the DQN model, a reward function for positioning accuracy, terminal energy consumption, and time complexity is constructed by combining weighted summation with switching penalty factors.

[0060] S3. In the DQN model, the Analytic Hierarchy Process (AHP) and the Entropy Weight Method are used to analyze and judge the subject weight value and the object weight value in the judgment index. The least squares method is used to couple the subject weight value and the object weight value of the judgment index.

[0061] In this embodiment, the WIFI positioning mode relies on indoor WIFI positioning technology. WIFI can be positioned using triangulation, which includes methods such as Time of Arrival (TOA), Time Difference of Arrival (TDOA), and Angle of Arrival (AOA). This embodiment considers a TOA-based WIFI positioning algorithm for indoor positioning scenarios.

[0062] The basic idea of ​​TOA positioning technology is to deploy three Wi-Fi devices as wireless access points (APs) in an indoor environment. The distance between the mobile terminal and the APs is calculated based on the signal propagation speed and propagation time. Its positioning principle diagram is shown below. Figure 2 As shown. Given the coordinates of access points AP1, AP2, and AP3, the distance l between the mobile terminal to be located and the APs is:

[0063] l = t * c

[0064] Where c represents the speed of Wi-Fi signal propagation in the air, and t represents the time it takes for the Wi-Fi signal to travel from the wireless access point (AP) to the location under test. Let the i-th Wi-Fi positioning device (AP) be... i The coordinates are (x i ,y i The coordinates of the location to be measured are (x, y), and the distance between the location to be measured and AP is... i The distance between them is l i Then x and y satisfy:

[0065]

[0066] The process of obtaining the signal propagation time t is as follows: when the wireless access point (AP) sends a WIFI signal, the current local time t1 is recorded; when the mobile terminal to be located receives the WIFI signal, the current local time t2 is recorded. Therefore, the signal transmission time t = t1 - t2. It can be seen that the positioning accuracy of TOA is limited by whether the transceiver devices are strictly time-synchronized.

[0067] In this embodiment, due to the different indoor and outdoor positioning modes, BeiDou outdoor positioning obtains the absolute geographic coordinates of the mobile terminal device, while indoor Wi-Fi positioning obtains the relative position coordinates of the mobile terminal device. Therefore, it is necessary to unify the terminal position coordinates obtained from different positioning systems to construct a global positioning model. The latitude and longitude coordinates measured by BeiDou satellites need to be converted to the geocentric-fixed coordinate system (ECEF system) and then to the terminal's global coordinate system. Let the coordinates obtained by the terminal through BeiDou positioning at a certain moment be P. i (lon i ,lat i ,alt i The coordinates can be converted to the corresponding coordinates in the Earth-centered Earth-fixed coordinate system using the following formula:

[0068]

[0069] Where e is the eccentricity of the ellipsoid, and N represents the radius of curvature of the reference ellipsoid. In the global coordinate system, a point P0 is set as the origin. The coordinates of point P0 in the latitude and longitude coordinate system are (lon0, lat0, alt0), and the coordinates in the geocentric coordinate system are (x0, y0, z0). The coordinates in the geocentric coordinate system are then converted to the global coordinate system using the following formula: (e...) i ,n i ,u i That is, P i Coordinates in the global coordinate system:

[0070]

[0071] In this embodiment, a Deep Q-Network (DQN) is formed by combining neural network fitting of Q-values ​​and Q-learning. The DQN algorithm can utilize neural network fitting of value functions, largely solving the problem of continuous state variables. The DQN algorithm also introduces an experience replay mechanism, storing historically sampled data in a database to improve algorithm stability. This application addresses the indoor / outdoor multi-mode positioning model of BeiDou and Wi-Fi, using the DQN algorithm to solve the positioning handover problem of mobile terminals in this scenario, improving the reliability of terminal positioning and the accuracy of handover.

[0072] Specifically, the DQN model considers outdoor BeiDou positioning and indoor Wi-Fi positioning. Three positioning modes are set up in the positioning scenario: BeiDou positioning mode, Wi-Fi positioning mode, and BeiDou + Wi-Fi fusion positioning mode. After a predetermined time interval, the mobile terminal needs to make a reasonable positioning decision based on the current state. The time interval is τ, and the decision time is:

[0073] T = t0, t1, t2, ..., t n

[0074] Among them, t n This is the end time, indicating the end of the location service.

[0075] In this embodiment, the Geometric Precision Factor (GDOP) is selected as an important reference factor for measuring positioning accuracy. The principle of GDOP is as follows: assuming there are k base stations, (x, y, z) is defined as the tag position calculated using the k base stations, (Ax...y...z)... k Ay k Az k ) represents the coordinates of the k-th base station, d k Let GDOP represent the measured distance from the positioning terminal to the k-th base station. GDOP is then calculated using the following formula:

[0076]

[0077]

[0078]

[0079] In BeiDou outdoor positioning, GDOP represents the distance vector amplification factor between the receiver and space satellites caused by BeiDou ranging errors. A larger GDOP value indicates that the angles between the receiver and space satellites are very similar, leading to decreased positioning accuracy. A smaller GDOP value indicates higher positioning accuracy, essentially meaning that satellites are evenly distributed across different azimuth areas. However, terrain and other objects around the receiver can obstruct visibility, preventing satellite signal reception. In severe conditions, insufficient satellite signals may be received, making positioning impossible. Therefore, outdoor BeiDou positioning also needs to consider the number of satellites observed by the terminal. In recent years, with the continuous innovation of various algorithms, GDOP is increasingly being applied to indoor positioning. In matching and indoor positioning environments, GDOP represents the existing errors within a positioning space and the relative impact of different media on the system's positioning accuracy. Therefore, GDOP and the number of access points (APs) observed by the terminal are selected as reference factors for the accuracy of Wi-Fi positioning.

[0080] In this embodiment, to obtain the optimal handover decision, not only positioning accuracy but also the mobile terminal's state information is considered, balancing the energy consumption of positioning and the time complexity of the positioning algorithm. Therefore, the terminal positioning state in the DQN model can be defined as:

[0081] state

[0082] =[n,GDOP1,NUM1,GDOP2,NUM2,GDOP3,COST1,COST2,COST3,TIME1,TIME2,TIME3]

[0083] Where n represents the positioning technology currently used by the mobile terminal, n=1 represents BeiDou positioning mode, n=2 represents WIFI positioning mode, and n=3 represents BeiDou + WIFI fusion positioning mode. GDOP1 represents the geometric precision factor of BeiDou positioning, NUM1 represents the number of satellites observed by the terminal; GDOP2 represents the geometric precision factor of WIFI positioning; NUM2 represents the number of WIFI access points observed by the terminal; GDOP3 represents the geometric precision factor of BeiDou + WIFI fusion positioning mode; COST1 represents the terminal power consumption of BeiDou positioning, COST2 represents the terminal power consumption of WIFI positioning; TIME1 represents the time complexity of the BeiDou positioning algorithm, and TIME2 represents the time complexity of the WIFI positioning algorithm.

[0084] Specifically, the switching action is represented by 'a', where a = {a | a ∈ {1, 2, 3}}. The action set is defined as follows: when a is 0, it indicates switching to BeiDou positioning; when it is 1, it indicates switching to WIFI positioning; and when it is 2, it indicates fusion positioning of BeiDou and WIFI.

[0085] In this embodiment, when the mobile terminal makes a location switching decision each time, it selects a location mode to switch based on the current status of each location mode, and the environment returns a reward value.

[0086] Specifically, the three parameters affecting handover are positioning accuracy, terminal power consumption, and time complexity. Considering the ping-pong effect that mobile terminals may experience during handover at indoor and outdoor boundaries, which not only greatly increases terminal power consumption but also weakens the robustness of the algorithm itself, a reward function is constructed by weighted summation and multiplying by a handover penalty factor. The reward function is defined as follows:

[0087] r(s,a)=(A1r P (s,a)+A2r E (s,a)+A3r T (s,a))*β

[0088]

[0089] Among them, A i (i = 1, 2, 3) are the weighting factors of the parameters, calculated using the AHP-entropy weighting method, reflecting the importance of the parameters in the switching decision; r P (s,a), r E (s,a), r T (s,a) represent the reward functions for positioning accuracy, terminal power consumption, and time complexity, respectively.

[0090] Specifically, the reward function for positioning accuracy considers the number of satellites or wireless access points (APs) observed by the GDOP and the mobile terminal, α i i = 1, 2, 3, representing the feasibility factors for BeiDou positioning mode, WIFI positioning mode, and fusion positioning mode, respectively, and K. i i = 1, 2 represents the threshold number of BeiDou or WIFI required for the positioning mode. When the number of BeiDou or WIFI required for positioning does not meet the threshold requirement, this positioning cannot be achieved. Since the principle of each positioning is different, the threshold setting is also different.

[0091] Specifically, since the BeiDou-based positioning algorithm needs to solve for four unknowns—longitude, latitude, altitude, and the clock difference between the receiver and the satellite—the BeiDou positioning mode requires at least four satellites to be observed. Therefore, the value of K1 is set to 4 when calculating the BeiDou reward function. In contrast, the Wi-Fi-based TOA positioning method only needs to receive signals from three wireless access points (APs) to calculate the terminal's location coordinates. Therefore, the value of K2 is set to 3 when calculating the Wi-Fi reward function. The BeiDou + Wi-Fi fusion positioning mode must simultaneously meet the threshold requirements of both K1 and K2. Therefore, the reward function for positioning accuracy is shown in the following formula.

[0092] r P (s,a)=α i f,i=1,2,3

[0093] in:

[0094]

[0095]

[0096]

[0097]

[0098] For the design of terminal energy consumption reward functions for different positioning modes, this embodiment designs corresponding reward functions based on existing research on terminal energy consumption for outdoor navigation positioning and indoor WIFI positioning. Existing related technologies provide a comparison of terminal energy consumption for satellite positioning and WIFI positioning, as shown in the table below. The energy consumption of the terminal when using WIFI positioning is 0.125W, when using BeiDou positioning is 0.275W, and when using fusion positioning is 0.4W. The following formula is used to process these two positioning algorithms, and the processed value is used as the reward function value.

[0099]

[0100]

[0101]

[0102] Similarly, for the design of the positioning time complexity reward function for different positioning modes, the corresponding time complexity reward function values ​​are obtained by statistically analyzing and normalizing the time consumption of different positioning modes. The average time consumption of the mobile terminal using the WIFI positioning mode is 20ms, the average time consumption of the mobile terminal using the Beidou positioning mode is 76ms, and the average time consumption of the mobile terminal using the fusion positioning mode is 95ms. The normalized time complexity reward function values ​​are shown in the table below.

[0103]

[0104] In this embodiment, to address the main problem that subjective weighting methods rely too heavily on individual experience and objective weighting methods collect too little data, resulting in incorrect judgments of subjective and objective weighting results for indicators, the Analytic Hierarchy Process (AHP) and the entropy weight method are used to analyze and judge the subject weight value and object weight value in the indicator, respectively. The least squares method is used to couple the subjective and objective weight values ​​of the indicator, and the Lagrange method is used to solve the model, effectively avoiding the limitations of a single weight.

[0105] Specifically, the Analytic Hierarchy Process (AHP) is a multi-objective decision-making method. AHP transforms the complex comparison of multiple weight parameters into pairwise comparisons to determine the weight of each parameter. Using the AHP algorithm to determine parameter weights, candidate positioning techniques serve as the scheme layer, and switching decision parameters serve as the criterion layer, considering three positioning parameters: positioning accuracy, terminal energy consumption, and time complexity. The switching decision serves as the objective layer, aiming to make accurate switching decisions. The decision matrix is ​​as follows:

[0106]

[0107] The judgment matrix passed the consistency test. The final parameter weights calculated using the AHP method are shown in the table below:

[0108]

[0109] Specifically, according to the concept of information entropy distribution, the greater the degree of discretization of a composite index, the greater its influence on the overall composite index score. Conversely, if the average value difference between a particular composite index is not significant, it indicates that the score of that index has a negligible impact on the overall composite index score. Entropy weighting refers to an objective weighting rule for an indicator, which can most profoundly reflect the objective distinguishing ability of an indicator, thereby ultimately determining its weight.

[0110] The steps for determining the weights of parameter indicators using the entropy weight method are as follows:

[0111] (1) Standardize the data. Standardize different types of data according to the following formula:

[0112]

[0113] We obtain matrix Y = (y ij ) n×m , where y ij Let y be the standardized value of the j-th evaluation index on the i-th evaluation object, and y ij ∈[0,1];

[0114] (2) Normalize the judgment matrix:

[0115]

[0116] (3) Calculate the entropy value of each evaluation index:

[0117]

[0118] The objective weighting coefficients for each indicator are as follows:

[0119]

[0120] Based on the above steps, the weights of each network parameter are calculated using the entropy weight method as follows:

[0121]

[0122] Specifically, the least squares method is used to optimize the combined weight model, and the subjective and objective weights W and W' obtained by the improved AHP and entropy weight method are optimized. i Coupling is performed to obtain the weight W * :

[0123]

[0124] The constraints are:

[0125]

[0126] By solving the model using the Lagrange method, the comprehensive weight W can be obtained. * , where k ij This is a standardized data matrix with m evaluation indicators and n evaluated objects. The weights obtained using a subjective-objective weighting method effectively compensate for the shortcomings of subjective methods, which rely too heavily on expert experience, and objective methods, which only consider the actual data. The final weights of the network parameters obtained using the AHP-entropy weighting method are as follows:

[0127]

[0128] In this embodiment, the DQN model does not need to segment continuous state variables, but directly inputs continuous state variables into the neural network. Moreover, for large-dimensional state variables, the storage space of the Q table in Q-learning is large, and the algorithm has low learning efficiency and long convergence time. The DQN algorithm uses a neural network, which does not require a large memory space, and the training time of the algorithm is relatively efficient.

[0129] See Figure 3 In this embodiment, the designed main network consists of an input layer with 9 neurons, two hidden layers with 12 and 8 neurons respectively, and an output layer with 2 neurons. The two neurons in the output layer represent the value function magnitudes of switching between BeiDou positioning and WIFI positioning in this state.

[0130] Specifically, the main network is used to approximate the state-action value function, which can be expressed by the formula:

[0131]

[0132] In the formula, ω represents the parameters of the main network, Q π (s,a) represents the current network state s, and the expected value of the cumulative discount reward when taking switching action a and following switching policy π, which can be defined as:

[0133] Q π (s,a)=E π (G t |S t =s,A t =a)

[0134] G t =R t+1 +γR t+2 +γ 2 R t+3 +…

[0135] Among them, Gt For cumulative discount rewards, the parameter γ (0≤γ≤1) is a discount factor used to represent the relative proportion of future reward values ​​to current reward values. By adjusting the value of γ, it can be indicated whether the model prioritizes current reward values ​​or future reward values.

[0136] In this embodiment, the input to the main network is:

[0137] state

[0138] =[n,GDOP1,NUM1,GDOP2,NUM2,GDOP3,COST1,COST2,COST3,TIME1,TIME2,TIME3]

[0139] The DQN model takes the current location status and information of the mobile terminal as input and outputs the value function Q(s,a) for each action. It employs an ε-greedy strategy to return the selected action to the mobile terminal. Based on this action, the mobile terminal switches to the target location mode and calculates the reward function after executing the action. Finally, it integrates the four variables—the current state, the selected action, the reward value for that action, and the next state—and stores them in the training database. During network training, small batches of training data are randomly selected from the database to optimize the weights and biases of the neural network.

[0140] Specifically, in the DQN model, neural network training and updates often use the same neural network to obtain both the predicted and actual Q values, which can lead to parameter non-convergence. The DQN model in this embodiment includes two networks: one for calculating the actual Q value and the other for obtaining the predicted Q value. This solves the parameter non-convergence problem caused by using the same network to calculate both values. The two networks have the same network structure and initial parameters, but their update methods differ. The main network updates its parameters with the goal of minimizing the loss function, updating it every time the network is trained (high frequency). The target Q-network, on the other hand, updates only after the main network has updated for several steps. Its update method involves directly copying the weights of the main network to the target network. The target network uses a greedy strategy to select switching actions.

[0141] Specifically, the process of establishing the training database involves introducing an experience replay mechanism, with the database size set to K. The training database is implemented using a queue, which operates on a first-in, first-out (FIFO) principle. At each decision point, the switching decision data for that moment is stored in the training database, simply inserted at the head of the queue. If the queue size exceeds its preset length, the first-in data is deleted before new data is inserted. When updating the neural network parameters, a certain number of training samples are randomly selected from the training database. This reduces the correlation between samples, making the training data more general and closer to reality, thus improving the algorithm's stability.

[0142] Specifically, reinforcement learning training requires strategies that are both expansive and exploratory. Expansiveness means the strategy always chooses the action with the highest value, while exploratoryness means the strategy chooses other unknown actions. The ε-greedy strategy combines both expansiveness and exploratoryness. The execution flow of the ε-greedy strategy is as follows:

[0143] If a value is randomly selected in the interval (0, 1), and the value is less than ε, then the action is selected randomly. Each action has the same probability of being selected and is independent of the Q value, which reflects the exploratory nature of the process.

[0144] If this value is greater than or equal to ε, then when selecting an action, the action with the largest Q value is always chosen, that is, the action with the greatest value is selected, which reflects openness. The greedy strategy, on the other hand, is a greedy algorithm that always selects the switching action with the greatest value.

[0145] In this embodiment, to obtain the optimal switching decision and enable the neural network to converge in the correct direction, the mobile terminal needs to continuously interact with the environment to obtain a certain amount of data. This historical decision data is stored in the training database and randomly retrieved during training. The mean squared error method is used to construct the loss function, and gradient descent is used to update the neural network parameters step by step until complete convergence.

[0146]

[0147] In the formula, Q(s,a;ω) is an estimated value obtained from the output of the main network. Representing the true value, Q(s) - ,a′;ω - The maximum value is obtained from the output of the target network and selected according to the greedy strategy.

[0148] In summary, this application achieves seamless and accurate switching of positioning modes for mobile terminals in indoor and outdoor scenarios with different positioning modes, thereby realizing high-precision and high-reliability seamless positioning, improving the robustness of positioning mode switching, and meeting the positioning needs of terminal services. The DQN model network used in this application considers multiple factors. The reward function takes into account positioning accuracy, terminal power consumption, and time complexity, and is designed using a weighted method. When determining the weights of each parameter, the Analytic Hierarchy Process (AHP) and entropy weight method are used to analyze and judge the subject weights and object weights in the indicators. Furthermore, the least squares multiplication method is used to couple the subject and object weights of the indicators, effectively avoiding the limitations of single weights. Since mobile terminals may experience a ping-pong effect during switching at the indoor / outdoor boundary, which not only greatly increases terminal power consumption but also weakens the robustness of the algorithm itself, the complete reward function is a weighted sum multiplied by a switching penalty factor. The indoor-outdoor seamless switching positioning algorithm based on the DQN model proposed in this invention improves the switching accuracy compared with traditional positioning switching algorithms, and also takes into account the terminal energy consumption and the time complexity of different positioning algorithms, which can better meet the requirements of seamless indoor-outdoor positioning switching under heterogeneous positioning modes.

[0149] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.

[0150] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0151] See Figure 4 Based on the same inventive concept, and corresponding to any of the above embodiments, this application also provides a BeiDou and Wi-Fi seamless indoor / outdoor positioning device, comprising:

[0152] The positioning handover decision module 1 is used to make a positioning handover decision based on the current positioning status of the mobile terminal after a preset time interval, using the DQN model and judgment indicators. The judgment indicators include positioning accuracy, terminal power consumption and time complexity parameters. The set of handover actions for the positioning handover decision includes BeiDou positioning mode, WIFI positioning mode and BeiDou + WIFI fusion positioning mode.

[0153] Reward module 2 is used in the DQN model to construct a reward function for positioning accuracy, terminal energy consumption, and time complexity by combining weighted summation with switching penalty factors.

[0154] The weight coupling module 3 is used in the DQN model to analyze and judge the subject weight value and object weight value in the judgment index using the analytic hierarchy process and the entropy weight method, and to couple the subject weight value and object weight value of the judgment index using the least squares method.

[0155] The device described in the above embodiments is used to implement the corresponding BeiDou and Wi-Fi indoor / outdoor seamless switching positioning method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0156] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the BeiDou and Wi-Fi indoor / outdoor seamless switching positioning method described in any of the above embodiments.

[0157] Figure 5 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0158] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0159] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0160] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0161] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0162] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0163] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0164] The electronic devices described above are used to implement the corresponding BeiDou and Wi-Fi indoor / outdoor seamless switching positioning method in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0165] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the BeiDou and Wi-Fi seamless indoor / outdoor positioning method as described in any of the above embodiments.

[0166] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0167] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the BeiDou and WI-FI indoor-outdoor seamless switching positioning method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0168] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.

[0169] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0170] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0171] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.

Claims

1. A method for seamless indoor / outdoor positioning using BeiDou and Wi-Fi, comprising: After a preset time interval, the current positioning status of the mobile terminal is assessed, and a positioning switching decision is made using the DQN model with judgment indicators. The judgment indicators include positioning accuracy, terminal power consumption, and time complexity parameters. The switching action set for the positioning switching decision includes BeiDou positioning mode, WIFI positioning mode, and BeiDou + WIFI fusion positioning mode. In the DQN model, a reward function for positioning accuracy, terminal energy consumption, and time complexity is constructed by combining weighted summation with switching penalty factors. In the DQN model, the Analytic Hierarchy Process (AHP) and the Entropy Weight Method are used to analyze and judge the subject weight value and object weight value in the indicator, and the least squares method is combined to couple the subject weight value and object weight value of the indicator. The geometrical precision factor (GDOP) is selected as a reference factor for measuring positioning accuracy. The formula for calculating the geometrical precision factor (GDOP) is as follows: In the formula, (x,y,z) represents the location of the tag calculated using k base stations, (Ax k Ay k Az k ) represents the coordinates of the k-th base station, d k This represents the measured distance from the mobile terminal to the k-th base station.

2. The method for seamless indoor / outdoor positioning using BeiDou and Wi-Fi as described in claim 1, wherein, Construct a global positioning model and use it to uniformly convert the location coordinates of mobile terminals in BeiDou positioning mode and WIFI positioning mode; The coordinates of a mobile terminal in BeiDou positioning mode are first converted to a geocentric coordinate system and then to a global coordinate system.

3. The method for seamless indoor / outdoor positioning using BeiDou and Wi-Fi as described in claim 1, wherein, In the DQN model, the state during movement is defined as: state=[n,GDOP1,NUM1,GDOP2,NUM2,GDOP3,COST1,COST2,COST3,TIME1,TIME2,TIME3] In the formula, n represents the positioning mode currently used by the mobile terminal. When n is 1, it represents the Beidou positioning mode; when n is 2, it represents the WIFI positioning mode; and when n is 3, it represents the Beidou + WIFI fusion positioning. GDOP1 represents the geometric precision factor of the BeiDou positioning mode, and NUM1 represents the number of satellites observed by the terminal. GDOP2 represents the geometric precision factor of the WIFI positioning mode; NUM2 represents the number of WIFI access points observed by the terminal. GDOP3 represents the geometric precision factor of the BeiDou + WIFI fusion positioning mode; COST1 represents the terminal power consumption of BeiDou positioning, COST2 represents the terminal power consumption of WIFI positioning; COST3 represents the terminal power consumption of BeiDou + WIFI fusion positioning; TIME1 represents the time complexity of the BeiDou positioning algorithm, TIME2 represents the time complexity of the WIFI positioning algorithm; TIME3 represents the time complexity of the BeiDou + WIFI positioning algorithm.

4. The method for seamless indoor / outdoor positioning using BeiDou and Wi-Fi as described in claim 3, wherein, The reward function is defined as follows: r(s,a)=(A1r P (s,a)+A2r E (s,a)+A3r T (s,a))*β In the formula, A i i = 1, 2, 3 are the weighting factors of the parameters; r P (s,a), r E (s,a), r T (s,a) represent the reward functions for positioning accuracy, terminal power consumption, and time complexity, respectively; β is the handover penalty factor.

5. A method for seamless indoor / outdoor positioning using BeiDou and Wi-Fi as described in claim 4, wherein, The formula for coupling the subject weight value and object weight value of the judgment index using the least squares method is as follows: The constraints are: In the formula, W * Here, W represents the coupling weight, and W represents the main weight value. i k represents the object weight value. ij It is a standardized data matrix with m evaluation indicators and n evaluated objects.

6. The method for seamless indoor / outdoor positioning using BeiDou and Wi-Fi as described in claim 5, wherein, In the DQN model, the formula for approximating the state-action value function using the main network is as follows: In the formula, ω represents the parameters of the main network, Q π (s,a) represents the current network state s, and the switching action a is taken; The expected value of the cumulative discount reward when following the switching strategy π, Q π (s,a) is defined as: Q π (s,a)=E π (G t |S t =s,A t =a) G t =R t+1 +γR t+2 +γ 2 R t+3 +… In the formula, G t For cumulative discount rewards, parameter γ is the discount factor, which is used to represent the relative ratio of future reward value to current reward value; R is the reward value at each step. At each decision moment, the mobile terminal makes a switching decision, selects a positioning technology based on the current positioning information, and obtains a feedback reward value.

7. A method for seamless indoor / outdoor positioning using BeiDou and Wi-Fi as described in claim 6, wherein, In the DQN model, the ε-greedy strategy is used to return the selected action to the mobile terminal. The mobile terminal switches to the target positioning mode according to the switching action and calculates the reward function after executing the switching action. The current state, the selected target switching action, the reward value of switching to the target switching action, and the next state variable are integrated and put into the training database. When training the network, training data is randomly taken from the training database to optimize the weights and biases of the neural network.

8. A method for seamless indoor / outdoor positioning using BeiDou and Wi-Fi as described in claim 7, wherein, The loss function is constructed using mean squared error, and the DQN model network parameters are updated using gradient descent until full convergence.

9. A BeiDou and Wi-Fi indoor / outdoor seamless switching positioning device, employing the BeiDou and Wi-Fi indoor / outdoor seamless switching positioning method according to any one of claims 1 to 8, wherein, include: The positioning handover decision module is used to make positioning handover decisions based on the current positioning status of the mobile terminal after a preset time interval, using the DQN model and judgment indicators. The judgment indicators include positioning accuracy, terminal power consumption and time complexity parameters. The set of handover actions for the positioning handover decision includes BeiDou positioning mode, WIFI positioning mode and BeiDou + WIFI fusion positioning mode. The reward module is used in the DQN model to construct a reward function for positioning accuracy, terminal energy consumption, and time complexity by combining weighted summation with switching penalty factors. The weight coupling module is used in the DQN model to analyze and judge the subject weight value and object weight value in the judgment index using the analytic hierarchy process and the entropy weight method, and to couple the subject weight value and object weight value of the judgment index using the least squares method.

Citation Information

Patent Citations

  • Indoor and outdoor seamless switching method based on pattern classification and system thereof

    CN106879032A

  • Beidou-based seamless switching method under different positioning modes

    CN112198542A