An indoor-outdoor seamless positioning method, system, device and medium
By combining GPS, WiFi, and an improved KNN algorithm, a smooth transition and seamless connection between indoor and outdoor positioning is achieved, solving the problems of inconsistent positioning and uneven accuracy in mixed indoor and outdoor scenarios, and improving positioning accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN UNIV OF POSTS & TELECOMM
- Filing Date
- 2022-10-24
- Publication Date
- 2026-04-10
AI Technical Summary
In mixed indoor and outdoor scenarios, existing positioning technologies suffer from the ping-pong effect and uneven positioning accuracy, resulting in unsmooth positioning and reduced accuracy.
GPS positioning technology is used outdoors, WiFi location fingerprint positioning technology is used indoors, and an improved KNN algorithm is used for fusion positioning in the indoor-outdoor boundary area. The location coordinates of the current positioning point are determined by combining the weighted fingerprint Euclidean distance and the physical location distance.
It achieves a smooth transition and seamless connection between indoor and outdoor positioning, improves positioning accuracy and stability in various scenarios, and solves the problem of unsmooth switching between positioning technologies.
Smart Images

Figure CN115665668B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information systems, in particular to an indoor and outdoor seamless positioning method, system, device and medium. BACKGROUND
[0002] In the emerging industry of new generation information technology, Location Based Services (LBS) plays an important role. In outdoor environment, the Global Positioning System (GPS) can provide relatively accurate location services, but due to signal shielding and multipath effect in the "urban canyon", the positioning signal of the satellite is weakened, resulting in lack of indoor positioning capability. In order to make up for the positioning blind area of the satellite positioning system, indoor positioning technology has developed rapidly, and indoor positioning technologies such as ultra-wideband, near field communication, WiFi, and radio frequency identification have emerged, realizing high-precision indoor positioning.
[0003] With the continuous development of the field of location-based services, LBS is no longer limited to single indoor or outdoor positioning services, and location services in various complex scenarios have also become a current research hotspot. At present, in the mixed indoor and outdoor scene, multiple positioning technologies are usually used to achieve seamless coverage of positioning, realizing seamless positioning in mixed scenes, but the ping-pong effect of repeated switching of positioning technologies often occurs in the indoor and outdoor interface area. To avoid the waste of operation caused by the ping-pong effect, some scholars propose an intelligent switching algorithm based on threshold mechanism, and fuse the indoor and outdoor positioning information in the indoor and outdoor interface area, realizing smooth transition of positioning technology and precision in different scenes. When some scholars fuse multiple positioning information, although they realize smooth switching of different positioning areas, they ignore the precision difference of different positioning technologies, resulting in reduced positioning accuracy in some areas.
[0004] At present, there are still many problems to be solved and improved in indoor and outdoor seamless positioning. It is very important to maintain and improve the accuracy of combined positioning through the research of seamless positioning technology. SUMMARY
[0005] The purpose of the present application is to provide an indoor and outdoor seamless positioning method, system, device and medium to realize smooth transition and seamless connection of indoor and outdoor positioning.
[0006] To achieve the above purpose, the present application provides the following solutions:
[0007] An indoor and outdoor seamless positioning method, the method comprising:
[0008] obtaining the wireless signal strength of the current positioning point;
[0009] judging a region type where the current positioning point is located according to the wireless signal strength; the region type comprises an indoor region, an outdoor region and an indoor-outdoor interface region;
[0010] when the current positioning point is located in the indoor region, adopting a WiFi position fingerprint positioning technology to determine a position coordinate of the current positioning point; when the current positioning point is located in the outdoor region, adopting a GPS positioning technology to determine the position coordinate of the current positioning point; when the current positioning point is located in the indoor-outdoor interface region, adopting an indoor-outdoor fusion positioning technology based on a KNN algorithm to determine the position coordinate of the current positioning point;
[0011] the indoor-outdoor fusion positioning technology based on the KNN algorithm to determine the position coordinate of the current positioning point specifically comprises:
[0012] adopting the WiFi position fingerprint positioning technology to determine online position fingerprint data of the current positioning point;
[0013] according to the online position fingerprint data and an offline position fingerprint database, determining position coordinates of k nearest neighbor points as position coordinates of k reference points with minimum weighted fingerprint Euclidean distances from the current positioning point; wherein k is a positive integer; the offline position fingerprint database is a data set pre-acquired including position coordinates of multiple different reference points and corresponding position fingerprint data;
[0014] adopting the GPS positioning technology to determine a position coordinate of a k+1th nearest neighbor point of the current positioning point;
[0015] according to the online position fingerprint data and the offline position fingerprint database, determining a weighted fingerprint Euclidean distance between the k+1th nearest neighbor point and the current positioning point;
[0016] calculating physical position distances between each of the nearest neighbor points and the current positioning point;
[0017] according to the position coordinates of each of the nearest neighbor points, the weighted fingerprint Euclidean distances and the physical position distances, determining the position coordinate of the current positioning point.
[0018] Optionally, the determining the position coordinates of the k nearest neighbor points as the position coordinates of the k reference points with the minimum weighted fingerprint Euclidean distances from the current positioning point according to the online position fingerprint data and the offline position fingerprint database specifically comprises:
[0019] calculating a probability that a signal strength difference between the wireless access access point of the current positioning point and each reference point in the offline position fingerprint database is less than a set value;
[0020] According to the online location fingerprint data and the offline location fingerprint database, a fingerprint Euclidean distance between the current positioning point and each of the reference points is calculated;
[0021] According to the probability and the fingerprint Euclidean distance, a weighted fingerprint Euclidean distance between the current positioning point and each of the reference points is calculated;
[0022] The weighted fingerprint Euclidean distances are compared, and position coordinates of the first k reference points with the smallest weighted fingerprint Euclidean distances are determined as position coordinates of the k nearest neighbor points.
[0023] Optionally, the position coordinates of the k+1 nearest neighbor point of the current positioning point are determined by using the GPS positioning technology, and specifically include:
[0024] The geodetic coordinates of the current positioning point are obtained;
[0025] The geodetic coordinates are converted into Gauss plane coordinates;
[0026] According to a conversion parameter matrix, the Gauss plane coordinates are converted into indoor location coordinates, and the indoor location coordinates are determined as the position coordinates of the k+1 nearest neighbor point of the current positioning point; the parameter conversion matrix is determined according to at least two groups of known indoor location coordinates and corresponding Gauss plane coordinates.
[0027] Optionally, the position coordinates of the current positioning point are determined according to the position coordinates of each of the nearest neighbor points, the weighted fingerprint Euclidean distance and the physical location distance, and specifically include:
[0028] The nearest neighbor points with a physical location distance from the current positioning point within a set range are taken as target nearest neighbor points;
[0029] According to the weighted fingerprint Euclidean distance and the physical location distance, a similarity weight coefficient between the current positioning point and each of the target nearest neighbor points is determined;
[0030] According to the position coordinates of each of the target nearest neighbor points and each of the similarity weight coefficients, the position coordinates of the current positioning point are determined.
[0031] Optionally, the set range is [R-0.5, R+0.5] meters; wherein R is a unit movement distance of the object to be positioned, and is determined according to a physical location distance between two adjacent historical positioning points.
[0032] Optionally, the weighted fingerprint Euclidean distance between the current positioning point and each of the reference points is calculated according to the probability and the fingerprint Euclidean distance, and a specific formula is:
[0033]
[0034] wherein: D 0,i is the weighted fingerprint Euclidean distance between the current positioning point and the i th reference point; P i is the probability that the signal strength difference between the current positioning point and the i th reference point is less than a set value; E i is the fingerprint Euclidean distance between the current positioning point and the i th reference point.
[0035] Optionally, the similarity weight coefficient of the current positioning point and each target neighbor point is determined according to the weighted fingerprint Euclidean distance and the physical position distance, and the specific formula is as follows:
[0036]
[0037] wherein: W i is the similarity weight coefficient of the current positioning point and the i th target neighbor point; D 1,i is the weighted fingerprint Euclidean distance between the current positioning point and the i th target neighbor point; l i is the physical position distance between the i th target neighbor point and the current positioning point; k0 is the number of target neighbor points, and k0≤k+1.
[0038] The application further provides an indoor and outdoor seamless positioning system, which is applied to the above method, and the system comprises:
[0039] a signal strength acquisition module, which is used for acquiring the wireless signal strength of a current positioning point;
[0040] a region type determination module, which is used for judging the region type where the current positioning point is located according to the wireless signal strength; the region type comprises an indoor region, an outdoor region and an indoor and outdoor interface region;
[0041] an indoor region position coordinate determination module, which is used for determining the position coordinate of the current positioning point by using a WiFi position fingerprint positioning technology when the current positioning point is located in the indoor region;
[0042] an outdoor region position coordinate determination module, which is used for determining the position coordinate of the current positioning point by using a GPS positioning technology when the current positioning point is located in the outdoor region;
[0043] an indoor and outdoor interface region position coordinate determination module, which is used for determining the position coordinate of the current positioning point by using an indoor and outdoor fusion positioning technology based on a KNN algorithm when the current positioning point is located in the indoor and outdoor interface region;
[0044] the indoor and outdoor interface region position coordinate determination module specifically comprises:
[0045] an online location fingerprint data determination unit configured to determine online location fingerprint data of the current positioning point by using a WiFi location fingerprint positioning technology;
[0046] a first near neighbor point determination unit configured to determine position coordinates of k near neighbor points according to the online location fingerprint data and an offline location fingerprint database, wherein the position coordinates of the k near neighbor points are position coordinates of the first k reference points with the minimum weighted fingerprint Euclidean distance from the current positioning point, and k is a positive integer; the offline location fingerprint database is a data set pre-acquired and including position coordinates of a plurality of different reference points and corresponding location fingerprint data;
[0047] a second near neighbor point determination unit configured to determine position coordinates of the k+1 near neighbor point of the current positioning point by using a GPS positioning technology;
[0048] a weighted fingerprint Euclidean distance determination unit configured to determine a weighted fingerprint Euclidean distance between the k+1 near neighbor point and the current positioning point according to the online location fingerprint data and the offline location fingerprint database;
[0049] a physical location distance calculation unit configured to calculate a physical location distance between each of the near neighbor points and the current positioning point;
[0050] a current positioning point position coordinate determination unit configured to determine position coordinates of the current positioning point according to the position coordinates of each of the near neighbor points, the weighted fingerprint Euclidean distance and the physical location distance.
[0051] The application further provides an electronic device including a memory and a processor, the memory is used for storing a computer program, and the processor runs the computer program to make the electronic device execute the indoor and outdoor seamless positioning method.
[0052] The application further provides a computer readable storage medium storing a computer program, and the computer program is executed by a processor to implement the indoor and outdoor seamless positioning method.
[0053] According to the embodiments of the application, the following technical effects are achieved:
[0054] The indoor and outdoor seamless positioning method provided by the application combines the GPS positioning technology, the WiFi location fingerprint positioning technology and the indoor and outdoor fusion positioning technology based on the KNN algorithm, and can realize smooth switching of indoor and outdoor positioning, and ensure smooth transition and seamless connection of positioning technologies, algorithms, precision and coverage range in various scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described below only illustrate some of the embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without creative effort based on these drawings also belong to the protection scope of the present application.
[0056] Figure 1 The schematic diagram of the indoor and outdoor seamless positioning method provided by the embodiments of the present application;
[0057] Figure 2 The flowchart of the indoor and outdoor seamless positioning method provided by the embodiments of the present application;
[0058] Figure 3 The flowchart of the indoor and outdoor fusion positioning technology based on the KNN algorithm provided by the embodiments of the present application;
[0059] Figure 4 The module diagram of the indoor and outdoor seamless positioning system provided by the embodiments of the present application.
[0060] Symbol explanation: signal strength acquisition module-1, area type determination module-2, indoor area position coordinate determination module-3, outdoor area position coordinate determination module-4, indoor and outdoor interface area position coordinate determination module-5, online position fingerprint data determination unit-51, first nearest neighbor point determination unit-52, second nearest neighbor point determination unit-53, weighted fingerprint Euclidean distance determination unit-54, physical position distance calculation unit-55, current positioning point position coordinate determination unit-56. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only represent some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the protection scope of the present application.
[0062] The purpose of the present application is to provide an indoor and outdoor seamless positioning method, system, device and medium, so as to realize the smooth transition and seamless connection of indoor and outdoor positioning.
[0063] In view of the low positioning accuracy and the unsmooth switching of positioning technologies in current indoor and outdoor seamless positioning, the present application proposes an indoor and outdoor seamless positioning scheme based on GPS and WiFi location fingerprint by studying and improving the K-Nearest Neighbor (KNN) algorithm. In the scheme, GPS positioning is used outdoors, improved WiFi location fingerprint positioning is used indoors to improve indoor positioning accuracy, and the improved KNN algorithm is used to fuse indoor and outdoor positioning data in the indoor and outdoor interface area to realize smooth switching of different positioning technologies.
[0064] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0065] Embodiment One
[0066] The present embodiment provides an indoor and outdoor seamless positioning method, Figure 1 The schematic diagram of the indoor and outdoor seamless positioning method provided by the present embodiment, Figure 2 The flowchart of the indoor and outdoor seamless positioning method provided by the present embodiment. As shown in Figure 1 and Figure 2 The method comprises:
[0067] Step S1: acquiring the wireless signal strength of a current positioning point.
[0068] Step S2: judging the area type where the current positioning point is located according to the wireless signal strength; the area type comprises an indoor area, an outdoor area and an indoor and outdoor interface area.
[0069] Specifically, since no wireless AP (i.e. wireless access access point) is deployed outdoors, the WiFi signal gradually weakens and finally loses the positioning capability. Therefore, the present application sets two thresholds for the WiFi signal strength, i.e. an upper limit of signal strength and a lower limit of signal strength (and the upper limit of signal strength is higher than the lower limit of signal strength), regards the part with the strongest signal, i.e. the wireless signal strength higher than the upper limit of signal strength, as the indoor area, regards the part with the weakest signal, i.e. the wireless signal strength lower than the lower limit of signal strength, as the outdoor area, and regards the part between the two as the indoor and outdoor interface area.
[0070] Step S3: when the current positioning point is located in the indoor area, using the WiFi location fingerprint positioning technology to determine the position coordinates of the current positioning point.
[0071] In practical applications, indoor area positioning adopts WiFi position fingerprint positioning, mainly relying on online fingerprint data and offline fingerprint database position matching. The traditional position fingerprint positioning method measures the similarity difference between two points by fingerprint Euclidean distance, but simple Euclidean distance has limitations, for example, when there is a large error in the collection of a received signal strength indicator (RSSI) of a certain point in the online fingerprint data, even if the remaining RSSI is similar to the reference point in the vicinity, the calculated Euclidean distance will be larger, so that the reference point is not selected as the nearest neighbor point. In order to reduce the influence of simple Euclidean distance, the present application assigns a weight coefficient to the Euclidean distance of the current positioning point, and calculates the probability that the signal strength difference value of the to-be-positioned point and the reference point is less than a set value based on the similarity of the fingerprint data, and takes the reciprocal of the probability as the weight coefficient of the Euclidean distance, and the set value is preferably 1dBm.
[0072] The improved Euclidean distance calculation formula is:
[0073]
[0074]
[0075] In the formula, D i is the weighted fingerprint Euclidean distance between the to-be-positioned point and the i-th reference point (i.e. the improved fingerprint Euclidean distance); P i is the probability that the signal strength difference value is less than 1dBm; rssi ij is the RSSI value of the j-th AP collected in real time at the current positioning point; RSSI ij is the RSSI value of the j-th AP collected at the i-th reference point in the offline position fingerprint data; n AP is the number of APs; n i(RSSI-rssi)<1 represents the number of signal strength difference values less than 1dBm; n AP represents the number of APs. According to the above method of measuring the fingerprint Euclidean distance between two points, the first k nearest neighbor points closest to the current positioning point can be selected in the offline position fingerprint database.
[0076] Step S4: when the current positioning point is located in an outdoor area, the position coordinates of the current positioning point are determined by using GPS positioning technology.
[0077] In practical applications, the outdoor GPS positioning system adopts the geodetic coordinate system (H, B, L), that is, geodetic longitude L, geodetic latitude B and geodetic height H. The indoor positioning system generally adopts the plane coordinate system (x, y), and in the seamless indoor and outdoor positioning, the coordinate systems of indoor and outdoor need to be unified. The present application adopts the Gauss projection method for the coordinate conversion of the outdoor positioning system, and the conversion process is as follows:
[0078] Firstly, the geodetic coordinates (L, B) are converted into the Gauss plane coordinates (X, Y):
[0079]
[0080]
[0081] Wherein, t, m, η, L p are intermediate parameters in the calculation process, and t = sin B, m = L p cos B, η = e'cos B, L p = L-L0.
[0082] In the formula, W is the arc length of the meridian, N is the meridian radius of the colure corresponding to the point to be solved, e' is the second eccentricity of the ellipse (the mathematical surface representing the size and shape of the earth, which is close to the ellipsoid, and is usually represented by the reference ellipsoid to represent the shape and size of the earth ellipsoid), B is the latitude of the point to be solved, L is the longitude of the point to be solved, and L0 is the longitude of the central meridian of the 3-degree zone.
[0083] Then, the obtained Gauss plane coordinates (X, Y) are converted into the rectangular coordinates (x, y) under the indoor system. At least two sets of corresponding (X, Y) and (x, y) data need to be determined to calculate the conversion parameter matrix U:
[0084]
[0085] The position coordinates in the indoor coordinate system can be obtained through the above coordinate conversion. In the indoor and outdoor interface area, the position coordinates are taken as one of the neighbor points that can be selected in the KNN positioning algorithm.
[0086] Step S5: When the current positioning point is located in the indoor and outdoor interface area, the indoor and outdoor fusion positioning technology based on the KNN algorithm is adopted to determine the position coordinates of the current positioning point.
[0087] Specifically, the indoor-outdoor interface area utilizes the KNN algorithm to select the first k nearest neighbors in the offline fingerprint database of the WiFi location fingerprint positioning, and takes the positioning result of the GPS as the selectable k+1th nearest neighbor, judges the k+1th nearest neighbors through range limitation, selects the more valuable nearest neighbor for the final positioning estimation. Therefore, the positioning of the indoor-outdoor interface area comprehensively considers the positioning result of the GPS and the positioning result of the WiFi location fingerprint positioning, and is more accurate.
[0088] Figure 3 The flowchart of the indoor-outdoor fusion positioning technology based on the KNN algorithm provided by the embodiment of the application is shown in Fig. 1. Figure 3 As shown in Fig. 1, step S5 specifically includes:
[0089] Step S51: determining the online location fingerprint data of the current positioning point by using the WiFi location fingerprint positioning technology.
[0090] Step S52: determining the position coordinates of the first k reference points with the minimum weighted fingerprint Euclidean distance of the current positioning point as the position coordinates of the k nearest neighbors according to the online location fingerprint data and the offline location fingerprint database; wherein k is a positive integer; the offline location fingerprint database is a data set pre-acquired including the position coordinates and the corresponding location fingerprint data of multiple different reference points.
[0091] The specific flow of step S52 is as follows:
[0092] (1) calculating the probability that the signal strength difference of the wireless access access point between the current positioning point and each reference point in the offline location fingerprint database is less than a set value.
[0093] (2) calculating the fingerprint Euclidean distance between the current positioning point and each reference point according to the online location fingerprint data and the offline location fingerprint database.
[0094] (3) calculating the weighted fingerprint Euclidean distance between the current positioning point and each reference point according to the probability and the fingerprint Euclidean distance, and the specific formula is as follows:
[0095]
[0096]
[0097] wherein D i is the weighted fingerprint Euclidean distance between the current positioning point and the i th reference point; P i is the probability that the signal strength difference of the wireless access access point between the current positioning point and the i th reference point is less than a set value; E i is the fingerprint Euclidean distance between the current positioning point and the i th reference point. 0,i i i is the weighted fingerprint Euclidean distance between the current positioning point and the i-th reference point, which is calculated in the same way as in step S3 and will not be repeated here.
[0098] (4) Comparing the sizes of the weighted fingerprint Euclidean distances, and determining the position coordinates of the first k reference points with the smallest weighted fingerprint Euclidean distance from the current positioning point as the position coordinates of the k nearest neighbors.
[0099] Step S53: Determining the position coordinates of the k+1-th nearest neighbor of the current positioning point using GPS positioning technology.
[0100] The specific process of step S53 is as follows:
[0101] (1) Obtaining the geodetic coordinates of the current positioning point.
[0102] (2) Converting the geodetic coordinates into Gauss plane coordinates.
[0103] (3) Converting the Gauss plane coordinates into indoor position coordinates according to the conversion parameter matrix, and determining the indoor position coordinates as the position coordinates of the k+1-th nearest neighbor of the current positioning point; the parameter conversion matrix is determined according to at least two groups of known indoor position coordinates and corresponding Gauss plane coordinates. The above calculation process is the same as in step S4 and will not be repeated here.
[0104] Step S54: Determining the weighted fingerprint Euclidean distance between the k+1-th nearest neighbor and the current positioning point according to the online position fingerprint data and the offline position fingerprint database.
[0105] Step S55: Calculating the physical position distance between each nearest neighbor and the current positioning point, and the specific formula is:
[0106]
[0107] wherein: l i is the physical position distance between the i-th nearest neighbor and the current positioning point; (x pre ,y pre ) is the position coordinates of the current positioning point; (x i ,y i ) is the position coordinates of the i-th nearest neighbor.
[0108] Step S56: Determining the position coordinates of the current positioning point according to the position coordinates of each nearest neighbor, the weighted fingerprint Euclidean distance, and the physical position distance.
[0109] The specific process of step S56 is as follows:
[0110] (1) The neighbor points within a set range from the physical position of the last positioning point are selected as target neighbor points. Preferably, the set range is [R-0.5, R+0.5] meters; wherein R is the unit moving distance of the positioned object, which is determined according to the physical position distance between two adjacent historical positioning points. The present application uses the above range to determine the k+1 target neighbor points: taking the last positioning point as the reference point, and selecting the neighbor points within R±0.5 meters from the reference point as the target neighbor points. The target neighbor points are more valuable neighbor points near the current positioning point, which can make the subsequent position estimation more accurate. In the embodiment, the value of R is 2.
[0111] (2) According to the weighted fingerprint Euclidean distance and the physical position distance, the similarity weight coefficient of the current positioning point and each target neighbor point is determined.
[0112] In actual application, after selecting the k0 target neighbor points, a weight decision mechanism is used for positioning estimation, a similarity-based weight coefficient is introduced, and the final positioning estimation point is obtained by weighted average of the target neighbor points. The fingerprint distance and the physical position distance are used to measure the similarity between the neighbor points and the to-be-positioned point. Since the actual position of the current positioning point is unknown, and the moving distance is limited within a continuous sampling time, the physical position distance between the last positioning point and the neighbor points can be used as the basis for calculation. The calculation formula of the similarity weight coefficient of the current positioning point and each target neighbor point is specifically:
[0113]
[0114] In the formula, W i is the similarity weight coefficient of the current positioning point and the i-th target neighbor point; D 1,i is the weighted fingerprint Euclidean distance of the current positioning point and the i-th target neighbor point; l i is the physical position distance between the i-th target neighbor point and the last positioning point; and k0 is the number of target neighbor points, and k0≤k+1.
[0115] (3) According to the position coordinates of each target neighbor point and each similarity weight coefficient, the position coordinates of the current positioning point are determined. The final positioning result is represented as:
[0116]
[0117] In the formula, (x, y) is the position coordinates of the current positioning point.
[0118] Embodiment Two
[0119] In order to perform the method corresponding to the above embodiment one, to realize the corresponding functions and technical effects, the following provides an indoor and outdoor seamless positioning system, Figure 4A module diagram of an indoor-outdoor seamless positioning system is provided for an embodiment of the present application. As shown in Figure 4 the system comprises:
[0120] a signal strength acquisition module 1, configured to acquire wireless signal strength of a current positioning point.
[0121] a region type determination module 2, configured to determine a region type in which the current positioning point is located according to the wireless signal strength; the region type comprises: an indoor region, an outdoor region and an indoor-outdoor interface region.
[0122] an indoor region position coordinate determination module 3, configured to determine a position coordinate of the current positioning point by using a WiFi position fingerprint positioning technology when the current positioning point is located in the indoor region.
[0123] an outdoor region position coordinate determination module 4, configured to determine a position coordinate of the current positioning point by using a GPS positioning technology when the current positioning point is located in the outdoor region.
[0124] an indoor-outdoor interface region position coordinate determination module 5, configured to determine a position coordinate of the current positioning point by using a KNN algorithm-based indoor-outdoor fusion positioning technology when the current positioning point is located in the indoor-outdoor interface region.
[0125] The indoor-outdoor interface region position coordinate determination module 5 specifically comprises:
[0126] an online position fingerprint data determination unit 51, configured to determine online position fingerprint data of the current positioning point by using the WiFi position fingerprint positioning technology.
[0127] a first near neighbor point determination unit 52, configured to determine position coordinates of k near neighbor points as position coordinates of the first k reference points with the minimum weighted fingerprint Euclidean distance from the current positioning point according to the online position fingerprint data and an offline position fingerprint database; wherein k is a positive integer; the offline position fingerprint database is a data set pre-acquired and comprising position coordinates and corresponding position fingerprint data of a plurality of different reference points.
[0128] a second near neighbor point determination unit 53, configured to determine a position coordinate of a k+1 near neighbor point of the current positioning point by using the GPS positioning technology.
[0129] a weighted fingerprint Euclidean distance determination unit 54, configured to determine a weighted fingerprint Euclidean distance between the k+1 near neighbor point and the current positioning point according to the online position fingerprint data and the offline position fingerprint database.
[0130] a physical position distance calculation unit 55, configured to calculate physical position distances between the near neighbor points and the current positioning point.
[0131] The current positioning point position coordinate determination unit 56 is configured to determine the position coordinate of the current positioning point according to the position coordinates of the neighboring points, the weighted fingerprint Euclidean distance and the physical position distance.
[0132] Embodiment three
[0133] The embodiment of the present application also provides an electronic device, including a memory and a processor, the memory is used for storing a computer program, and the processor is used for running the computer program to enable the electronic device to execute the indoor and outdoor seamless positioning method in the embodiment one. The electronic device can be a server.
[0134] In addition, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the indoor and outdoor seamless positioning method in the embodiment one.
[0135] At present, there are still many problems to be solved and improved in the indoor and outdoor seamless positioning, and it is very important to maintain and improve the accuracy of the combined positioning through the research on the seamless positioning technology. The present application provides an indoor and outdoor seamless positioning scheme based on GPS and WiFi, and the KNN algorithm is used to realize the smooth switching of indoor and outdoor positioning, so as to ensure the smooth transition and seamless connection of the positioning technology, algorithm, accuracy and coverage range in various scenes.
[0136] In the present application, the GPS positioning is used outdoors, and the latitude and longitude data of the positioning is first converted into the positioning data in the indoor coordinate system, so as to realize the fusion and switching of the indoor and outdoor data. The WiFi position fingerprint positioning based on the KNN algorithm is used indoors, and the distance measurement and positioning estimation are improved, so as to improve the accuracy of the indoor positioning. In the indoor and outdoor interface area, the KNN algorithm is used to select the first K neighboring points in the offline fingerprint database of the WiFi position fingerprint positioning, and the positioning result of the GPS is used as the selectable neighboring point. The K+1 neighboring points are judged by the range limiting method, and the more valuable neighboring point is selected for the final positioning estimation. Compared with the prior art, the indoor and outdoor seamless positioning method provided by the present application solves the defects of low positioning accuracy and unsmooth switching of the positioning technology in the indoor and outdoor seamless positioning, and effectively improves the accuracy and stability of the positioning.
[0137] The embodiments in the present application are described in a progressive way, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the system disclosed in the embodiments, the description is relatively simple because it corresponds to the method disclosed in the embodiments, and the relevant parts can be referred to the description of the method.
[0138] The principles and implementations of the present application are described in the specific examples in this article, and the above examples are only used to help understand the core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation and application range will be changed. Therefore, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A seamless indoor-outdoor positioning method, characterized by, The method comprises: acquiring a wireless signal strength of a current positioning point; judging a region type where the current positioning point is located according to the wireless signal strength; the region type comprises: an indoor region, an outdoor region and an indoor-outdoor interface region; when the current positioning point is located in the indoor region, adopting a WiFi position fingerprint positioning technology to determine a position coordinate of the current positioning point; when the current positioning point is located in the outdoor region, adopting a GPS positioning technology to determine the position coordinate of the current positioning point; when the current positioning point is located in the indoor-outdoor interface region, adopting an indoor-outdoor fusion positioning technology based on a KNN algorithm to determine the position coordinate of the current positioning point; the indoor-outdoor fusion positioning technology based on the KNN algorithm to determine the position coordinate of the current positioning point specifically comprises: adopting the WiFi position fingerprint positioning technology to determine online position fingerprint data of the current positioning point; according to the online position fingerprint data and an offline position fingerprint database, determining position coordinates of k nearest neighbor points as position coordinates of k reference points with the smallest weighted fingerprint Euclidean distance to the current positioning point; wherein k is a positive integer; the offline position fingerprint database is a data set pre-acquired and comprising position coordinates and corresponding position fingerprint data of a plurality of different reference points; adopting the GPS positioning technology to determine a position coordinate of a k+1th nearest neighbor point of the current positioning point; according to the online position fingerprint data and the offline position fingerprint database, determining a weighted fingerprint Euclidean distance between the k+1th nearest neighbor point and the current positioning point; calculating physical position distances between each of the nearest neighbor points and the current positioning point; according to the position coordinates of each of the nearest neighbor points, the weighted fingerprint Euclidean distance and the physical position distances, determining the position coordinate of the current positioning point.
2. The indoor-outdoor seamless positioning method according to claim 1, wherein, the determining of the position coordinates of the k nearest neighbor points as the position coordinates of the k reference points with the smallest weighted fingerprint Euclidean distance to the current positioning point according to the online position fingerprint data and the offline position fingerprint database specifically comprises: calculating a probability that a signal strength difference between the current positioning point and a wireless access point of each of the reference points in the offline position fingerprint database is less than a set value; according to the online position fingerprint data and the offline position fingerprint database, calculating a fingerprint Euclidean distance between the current positioning point and each of the reference points; according to the probability and the fingerprint Euclidean distance, calculating a weighted fingerprint Euclidean distance between the current positioning point and each of the reference points; comparing sizes of each of the weighted fingerprint Euclidean distances, and determining position coordinates of k reference points with the smallest weighted fingerprint Euclidean distance to the current positioning point as position coordinates of k nearest neighbor points.
3. The seamless indoor-outdoor positioning method of claim 1, wherein, the adopting of the GPS positioning technology to determine the position coordinate of the k+1th nearest neighbor point of the current positioning point specifically comprises: acquiring geodetic coordinates of the current positioning point; converting the geodetic coordinates into Gauss plane coordinates; convert the Gaussian plane coordinates into indoor position coordinates according to a conversion parameter matrix, and determine the indoor position coordinates as position coordinates of a k+1th neighbor point of the current positioning point; the conversion parameter matrix is determined according to at least two groups of known indoor position coordinates and corresponding Gaussian plane coordinates.
4. The seamless indoor-outdoor positioning method of claim 1, wherein, The method further comprises: target neighbor points are determined according to the physical position distances of the neighbor points from the current positioning point; similarity weight coefficients of the current positioning point and each of the target neighbor points are determined according to the weighted fingerprint Euclidean distances and the physical position distances; position coordinates of the current positioning point are determined according to the position coordinates of each of the target neighbor points and the similarity weight coefficients.
5. The seamless indoor-outdoor positioning method of claim 4, wherein, The set range is [R-0.5, R+0.5] meters; wherein, R is a unit moving distance of the positioned object, and is determined according to a physical position distance between two adjacent historical positioning points.
6. The seamless indoor-outdoor positioning method of claim 2, wherein, The weighted fingerprint Euclidean distances of the current positioning point and each of the reference points are calculated according to the probabilities and the fingerprint Euclidean distances, and a specific formula is: wherein: D 0,i is the weighted fingerprint Euclidean distance between the current location point and the i-th reference point; P i is the probability that the difference between the signal strength of the wireless access access point at the current location point and the i-th reference point is less than a set value; E i is the fingerprint Euclidean distance between the current location point and the i-th reference point.
7. The seamless indoor-outdoor positioning method of claim 4, wherein, The similarity weight coefficients of the current positioning point and each of the target neighbor points are determined according to the weighted fingerprint Euclidean distances and the physical position distances, and a specific formula is: wherein: W i is the similarity weight coefficient of the current positioning point and the i-th target near neighbor point; D 1,i is the weighted fingerprint Euclidean distance of the current positioning point and the i-th target near neighbor point; l i is the physical location distance of the i-th target near neighbor point and the previous positioning point; k0 is the number of target near neighbor points, and k0≤k+1.
8. An indoor-outdoor seamless positioning system, characterized by The system comprises: a signal strength acquisition module configured to acquire wireless signal strength of a current positioning point; a region type determination module configured to determine a region type in which the current positioning point is located according to the wireless signal strength; the region type comprises an indoor region, an outdoor region and an indoor-outdoor interface region; an indoor region position coordinate determination module configured to determine position coordinates of the current positioning point by using a WiFi position fingerprint positioning technology when the current positioning point is located in the indoor region; an outdoor region position coordinate determination module configured to determine position coordinates of the current positioning point by using a GPS positioning technology when the current positioning point is located in the outdoor region; an indoor-outdoor interface region position coordinate determination module configured to determine position coordinates of the current positioning point by using a KNN algorithm-based indoor-outdoor fusion positioning technology when the current positioning point is located in the indoor-outdoor interface region; The indoor-outdoor interface region position coordinate determination module comprises: an online position fingerprint data determination unit configured to determine online position fingerprint data of the current positioning point by using the WiFi position fingerprint positioning technology; a first neighbor point determination unit configured to determine position coordinates of k neighbor points by using the online position fingerprint data and an offline position fingerprint database, wherein the position coordinates of the k neighbor points are position coordinates of k reference points with the smallest weighted fingerprint Euclidean distances from the current positioning point; the offline position fingerprint database is a data set comprising position coordinates and corresponding position fingerprint data of a plurality of different reference points; and k is a positive integer; a second neighbor point determination unit configured to determine position coordinates of a k+1th neighbor point of the current positioning point by using the GPS positioning technology. a weighted fingerprint Euclidean distance determination unit configured to determine a weighted fingerprint Euclidean distance between the k+1th nearest neighbor point and the current positioning point according to the online location fingerprint data and the offline location fingerprint database; a physical location distance calculation unit configured to calculate a physical location distance between each of the nearest neighbor points and the current positioning point; a current positioning point location coordinate determination unit configured to determine a location coordinate of the current positioning point according to the location coordinates of each of the nearest neighbor points, the weighted fingerprint Euclidean distances and the physical location distances.
9. An electronic device, comprising: An electronic device comprising a memory configured to store a computer program and a processor configured to execute the computer program to cause the electronic device to perform the indoor-outdoor seamless positioning method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program product, which stores a computer program and is configured to be executed by a processor to implement the indoor-outdoor seamless positioning method according to any one of claims 1 to 7.