Indoor positioning method, device, electronic equipment and storage medium

By collecting wireless network fingerprints in indoor scenes and combining them with the entrance location coordinates obtained by GPS, the problem of low Wi-Fi positioning accuracy is solved and higher indoor positioning accuracy is achieved.

CN115134753BActive Publication Date: 2024-08-23GUANGDONG XIAOTIANCAI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202210425494.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2024-08-23
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

Existing indoor positioning methods, especially indoor positioning using Wi-Fi, have unsatisfactory accuracy, resulting in large positioning deviations and inability to accurately position in complex indoor environments.

Method used

By collecting the wireless network fingerprint of the terminal device in the indoor scene and combining it with the matching fingerprint in the database, the entrance position coordinates obtained by GPS are used as the current position coordinates to improve positioning accuracy.

Benefits of technology

It improves the accuracy of indoor positioning and reduces positioning errors. Especially in indoor scenes with low GPS signal strength, the position of the terminal device can be determined more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115134753B
    Figure CN115134753B
Patent Text Reader

Abstract

The embodiment of the present application discloses an indoor positioning method, device, electronic device and storage medium, the method comprising: if it is determined that the terminal device is in an indoor scene, collecting a first wireless network fingerprint corresponding to the current location; determining a second wireless network fingerprint matching the first wireless network fingerprint in a database; obtaining the entrance position coordinates corresponding to the second wireless network fingerprint from the database, and determining the entrance position coordinates as the position coordinates corresponding to the current location; the entrance position coordinates are obtained by the terminal device through global positioning system GPS detection before entering the indoor scene. Implementing the embodiment of the present application can improve the accuracy of positioning in indoor scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of positioning technology, and in particular to an indoor positioning method, device, electronic device and storage medium. Background Art

[0002] Due to the high complexity of the indoor environment, the current indoor positioning method usually uses Wi-Fi for positioning. However, the indoor positioning accuracy of Wi-Fi for indoor positioning is not ideal, and large positioning deviations often occur, resulting in inaccurate indoor positioning. Summary of the invention

[0003] The embodiments of the present application disclose an indoor positioning method, device, electronic device and storage medium, which can improve the accuracy of positioning in indoor scenes.

[0004] The present application discloses an indoor positioning method, including:

[0005] If it is determined that the terminal device is in an indoor scene, collecting a first wireless network fingerprint corresponding to the current location;

[0006] Determining a second wireless network fingerprint in a database that matches the first wireless network fingerprint;

[0007] The entrance position coordinates corresponding to the second wireless network fingerprint are obtained from the database, and the entrance position coordinates are determined as the position coordinates corresponding to the current position; the entrance position coordinates are obtained by the terminal device through global positioning system GPS detection before entering the indoor scene.

[0008] In one embodiment, before collecting a first wireless network fingerprint corresponding to the current location if the current location is determined to be indoors, the method further includes:

[0009] Determine the entrance location coordinates of each indoor scene;

[0010] Collecting one or more wireless network fingerprints corresponding to each of the indoor scenes;

[0011] A database is established according to each of the wireless network fingerprints and the corresponding entrance position coordinates of the indoor scene.

[0012] In one embodiment, collecting one or more wireless network fingerprints corresponding to each indoor scene includes:

[0013] Recording the first step number of moving in a first indoor scene; wherein the first indoor scene is any indoor scene among the various indoor scenes;

[0014] According to the first step number, one or more wireless network fingerprints corresponding to the first indoor scene are periodically collected at preset step intervals.

[0015] In one embodiment, determining the entrance position coordinates of each indoor scene includes:

[0016] Acquire multiple first outdoor scene GPS coordinates collected by GPS within a preset time before entering the first indoor scene, and acquire the coordinate accuracy corresponding to each of the first outdoor scene GPS coordinates; wherein the first indoor scene is any indoor scene among the various indoor scenes;

[0017] The first entrance position coordinates of the first indoor scene are determined according to the multiple first outdoor scene GPS coordinates and the coordinate accuracy corresponding to each of the first outdoor scene GPS coordinates.

[0018] In one embodiment, determining the first entrance position coordinates of the first indoor scene according to the plurality of first outdoor scene GPS coordinates and the coordinate accuracy corresponding to each of the first outdoor scene GPS coordinates includes:

[0019] Determine a weight value corresponding to each of the first outdoor scene GPS coordinates according to the coordinate accuracy corresponding to each of the first outdoor scene GPS coordinates;

[0020] The first entrance position coordinates of the first indoor scene are calculated based on the GPS coordinates of each of the first outdoor scenes and the corresponding weight values.

[0021] In one embodiment, the method further comprises:

[0022] If there is no second wireless network fingerprint matching the first wireless network fingerprint in the database, the wireless network positioning coordinates are determined according to the wireless access point and signal strength corresponding to the first wireless network fingerprint, and the wireless network positioning coordinates are determined as the position coordinates corresponding to the current position.

[0023] In one embodiment, determining in a database a second wireless network fingerprint that matches the first wireless network fingerprint includes:

[0024] Calculating a first distance between the first wireless network fingerprint and each wireless network fingerprint in a database;

[0025] A wireless network fingerprint whose first distance is less than a distance threshold is determined as a second wireless network fingerprint matching the first wireless network fingerprint.

[0026] The embodiment of the present application discloses an indoor positioning device, comprising:

[0027] A fingerprint collection module, configured to collect a first wireless network fingerprint corresponding to a current location if it is determined that the terminal device is in an indoor scene;

[0028] A matching module, configured to determine a second wireless network fingerprint in a database that matches the first wireless network fingerprint;

[0029] A location determination module is used to obtain the entrance location coordinates corresponding to the second wireless network fingerprint from the database, and determine the entrance location coordinates as the location coordinates corresponding to the current location; the entrance location coordinates are obtained by the terminal device through the global positioning system GPS detection before entering the indoor scene.

[0030] The present application discloses an electronic device, including:

[0031] A memory storing executable program code;

[0032] a processor coupled to the memory;

[0033] The processor calls the executable program code stored in the memory to execute the method described in any one of the above embodiments.

[0034] An embodiment of the present application discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the method described in any one of the above embodiments.

[0035] The embodiments of the present application disclose an indoor positioning method, device, electronic device and storage medium. When determining that a terminal device is in an indoor scene, the method can collect a first wireless network fingerprint corresponding to the current location, determine a second wireless network fingerprint in a database that matches the first wireless network fingerprint, and obtain the entrance location coordinates corresponding to the second wireless network fingerprint. The entrance location coordinates obtained by GPS can be regarded as the location coordinates of the entrance of the indoor scene. The entrance location coordinates can be used instead of wireless network positioning to determine the entrance location coordinates as the location coordinates corresponding to the current location, thereby improving the accuracy of positioning in indoor scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 It is a schematic diagram of an application scenario of an indoor positioning method disclosed in an embodiment of the present application;

[0038] Figure 2 It is a flowchart of an indoor positioning method disclosed in an embodiment of the present application;

[0039] Figure 3 It is a schematic diagram of a process of establishing a database disclosed in an embodiment of the present application;

[0040] Figure 4 It is a flowchart of another indoor positioning method disclosed in an embodiment of the present application;

[0041] Figure 5 It is a modular schematic diagram of an indoor positioning device disclosed in an embodiment of the present application;

[0042] Figure 6 It is a structural block diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] It should be noted that the terms "including" and "having" in the embodiments of the present application and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0045] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first wireless network fingerprint may be referred to as a second wireless network fingerprint, and similarly, a second wireless network fingerprint difference may be referred to as a first wireless network fingerprint. Both the first wireless network fingerprint and the second wireless network fingerprint are wireless network fingerprints, but they are not the same wireless network fingerprint.

[0046] In the related art, Wi-Fi fingerprint positioning is a common means of indoor positioning. The cost of Wi-Fi fingerprint positioning is low, but the process of collecting data to establish a database is very cumbersome. It is usually necessary to set the location corresponding to the Wi-Fi fingerprint on a virtual grid point. For example, in a 100m*100m (meter) area, it is divided into 50*50 grids (each grid is 2m*2m), and a Wi-Fi fingerprint is collected once in the middle of each grid. Each Wi-Fi fingerprint includes the wireless access point (access point, AP) of the signal received at the grid point, and the signal strength (Received Signal Strength Indication, RSSI) corresponding to each wireless access point. This collection method is very cumbersome, and needs to be updated periodically to adapt to environmental changes.

[0047] The embodiments of the present application disclose an indoor positioning method, device, electronic device and storage medium, which can improve the accuracy of positioning in indoor scenes, and the method of collecting data when establishing a database is simpler and faster, thereby improving the efficiency of indoor positioning.

[0048] The following is a detailed description with reference to the accompanying drawings.

[0049] like Figure 1 As shown, Figure 1 1 is a schematic diagram of an application scenario of an indoor positioning method disclosed in an embodiment of the present application, which includes a terminal device 10 and a house 20. The terminal device 10 may include but is not limited to a mobile phone, a tablet computer, a wearable device, a laptop computer, a PC (Personal Computer), etc. In addition, the operating system of the above-mentioned terminal device 10 may include but is not limited to an Android operating system, an IOS operating system, a Symbian operating system, a BlackBerry operating system, a Windows Phone 8 operating system, etc., which are not limited in the embodiment of the present application. The house 20 includes an entrance 202. The house 20 generally refers to a house with a high degree of complexity of the indoor scene, such as a classroom, a residential building, etc., which are not limited.

[0050] The terminal device 10 is currently inside the house 20, that is, the terminal device 10 is currently in an indoor scene. The GPS signal strength of the terminal device 10 in the indoor scene may be low. In the case of low GPS signal strength, the accuracy of the GPS positioning coordinates obtained through GPS is low. Therefore, the terminal device 10 can use the entrance position coordinates of the entrance 202 as the position coordinates corresponding to the current position. The error caused is usually within a few meters. Compared with obtaining the GPS coordinates corresponding to the current position through GPS as the position coordinates corresponding to the current position, using the entrance position coordinates as the position coordinates corresponding to the current position can improve the accuracy of indoor positioning.

[0051] As an implementation mode, when the area of ​​the indoor scene of the house 20 is not large, the terminal device 10 can use the entrance position coordinates of the entrance 202 as the position coordinates corresponding to the current position, which will cause smaller errors and improve the accuracy of indoor positioning.

[0052] The terminal device 10 may collect a first wireless network fingerprint corresponding to the current position in the indoor scene of the house 20, and determine a second wireless network fingerprint matching the first wireless network fingerprint through a database, wherein the database includes multiple wireless network fingerprints and the entrance position coordinates of the indoor scene corresponding to each wireless network fingerprint. After determining the second wireless network fingerprint, the entrance position coordinates corresponding to the second wireless network fingerprint may be obtained from the database, and the entrance position coordinates may refer to the position coordinates of the entrance 202, and the entrance position coordinates may be determined as the position coordinates corresponding to the current position of the terminal device 10.

[0053] Among them, the wireless network fingerprint may include but is not limited to a Wi-Fi-based location fingerprint, a Bluetooth-based location fingerprint, and an RFID (Radio Frequency Identification)-based location fingerprint, which is not limited in the embodiments of the present application.

[0054] In some embodiments, before using the indoor positioning method, the terminal device 10 needs to first collect data of the house 20 and store it in a database, so that when the second wireless network fingerprint matching the first wireless network fingerprint needs to be determined through the database for indoor positioning, the wireless network fingerprint data can be found in the database as the second wireless network fingerprint. The terminal device 10 needs to collect the GPS positioning coordinates corresponding to the entrance 202 in the outdoor scene of the house 20. The GPS signal strength of the terminal device 10 in the outdoor scene is relatively high, and the accuracy of the collected GPS positioning coordinates can also meet the positioning accuracy requirements. After entering the indoor scene of the house 20, the terminal device can collect wireless network fingerprints corresponding to multiple locations, and establish a corresponding relationship between the multiple wireless network fingerprints and the GPS coordinates of the entrance 202.

[0055] like Figure 2 As shown, Figure 2 : is a flow chart of an indoor positioning method disclosed in an embodiment of the present application. The indoor positioning method can be applied to the terminal device in the above embodiment. The indoor positioning method may include:

[0056] Step 210: If it is determined that the terminal device is in an indoor scene, a first wireless network fingerprint corresponding to the current location is collected.

[0057] The indoor scene is an indoor scene with weak GPS signal strength. If it is determined that the terminal device is in an indoor scene, the terminal device collects a first wireless network fingerprint corresponding to the current location. The first wireless network fingerprint may include one or more wireless access points and the signal strength corresponding to each wireless access point.

[0058] In one embodiment, the terminal device can determine whether the terminal device is in an indoor scene by the number of GPS satellites searched. The terminal device can search for GPS satellites at the current location, and the number of GPS satellites that the terminal device can detect in an open environment is greater than the number of GPS satellites that can be detected in an obstructed environment. Therefore, if the number of GPS satellites that the terminal device can search for is less than a first number threshold, it can be determined that the terminal device is currently in an indoor scene, and if the number of GPS satellites that the terminal device can search for is not less than the first number threshold, it can be determined that the terminal device is currently in an outdoor scene.

[0059] In one embodiment, the terminal device can determine whether the terminal device is in an indoor scene by detecting the GPS signal strength. The terminal device can search for one or more GPS satellites, and determine the GPS signal strength corresponding to the current location by the signal strength of each GPS satellite. For example, the terminal device searches for 4 satellites at the current location, and the signal strengths corresponding to the 4 satellites are A1, A2, A3, and A4 respectively. Then the GPS signal strength A corresponding to the current location can be calculated by formula (1):

[0060]

[0061] Wherein, X represents the number of satellites, and in this example, X=4. If the GPS signal strength is less than the strength threshold, it can be determined that the terminal device is currently in an indoor scene. If the GPS signal strength is not less than the strength threshold, it can be determined that the terminal device is currently in an outdoor scene. By implementing this embodiment, the terminal device can determine whether it is currently in an indoor scene by detecting the signal strength of each GPS satellite, so as to select an appropriate positioning method for positioning and improve the accuracy of positioning.

[0062] As an optional implementation, the terminal device may obtain the GPS positioning coordinates as the position coordinates corresponding to the current position when determining that the GPS signal strength of the terminal device meets the requirements.

[0063] Step 220: Determine a second wireless network fingerprint in the database that matches the first wireless network fingerprint.

[0064] The database includes multiple wireless network fingerprints and the entrance position coordinates of the indoor scenes corresponding to each wireless network fingerprint. Therefore, the terminal device can obtain the second wireless network fingerprint matching the first wireless network fingerprint from the database, and then obtain the entrance position coordinates corresponding to the second wireless network fingerprint, and determine the entrance position coordinates as the position coordinates corresponding to the current position. The database is for the terminal device to collect wireless network fingerprints for each indoor scene and determine the entrance position coordinates of each indoor scene, and then form a database by establishing a corresponding relationship between the wireless network fingerprint and the entrance position coordinates.

[0065] The terminal device may match the first wireless network fingerprint with each wireless network fingerprint in the database, thereby determining a second wireless network fingerprint that matches the first wireless network fingerprint in the database.

[0066] In one embodiment, the terminal device may calculate a first distance between the first wireless network fingerprint and each wireless network fingerprint in the database; and determine a wireless network fingerprint whose first distance is less than a distance threshold as a second wireless network fingerprint matching the first wireless network fingerprint.

[0067] The step includes: the terminal device can determine the same number corresponding to the same wireless access point in the first wireless network fingerprint and the target wireless network fingerprint; wherein the target wireless network fingerprint is any wireless network fingerprint in the database; if the same number is greater than a second number threshold, the first distance between the first wireless network fingerprint and the target wireless network fingerprint is calculated according to the signal strength corresponding to the same wireless access point in the first wireless network fingerprint and the signal strength corresponding to the same wireless access point in the target wireless network fingerprint; if the same number is not greater than the second number threshold, the first distance is determined to be a long distance value not less than the distance threshold, and the long distance value is a fixed value, and the size of the long distance value is set in advance by relevant personnel.

[0068] As an optional implementation manner, the step of calculating the first distance between the first wireless network fingerprint and the target wireless network fingerprint according to the signal strength corresponding to the same wireless access point in the first wireless network fingerprint and the signal strength corresponding to the same wireless access point in the target wireless network fingerprint may include: subtracting the signal strength corresponding to the same wireless access point in the target wireless network fingerprint from the signal strength corresponding to the same wireless access point in the first wireless network fingerprint, determining the strength difference of each identical wireless access point, and then averaging the squares of the strength differences of each identical wireless access point, and obtaining the first distance between the first wireless network fingerprint and the target wireless network fingerprint by taking the square root of the average value.

[0069] For example, the first wireless network fingerprint is m, the target wireless network fingerprint is n, and the terminal device can determine that there are 4 identical wireless access points between m and n, that is, the identical number corresponding to the identical wireless access points is 4, and the corresponding signal strengths of the 4 wireless access points in m are {rssi_m1, rssi_m2, rssi_m3, rssi_m4}, and the corresponding signal strengths of the 4 wireless access points in n are {rssi_n2, rssi_n2, rssi_n3, rssi_n4}. The second quantity threshold can be 3, and the identical number 4 is greater than the second quantity threshold 3. The terminal device can calculate the first distance dist between m and n based on {rssi_m1, rssi_m2, rssi_m3, rssi_m4} and {rssi_n2, rssi_n2, rssi_n3, rssi_n4}, and the calculation method is shown in formula (2).

[0070]

[0071] Wherein, Y represents the same number 4, i represents a variable, and i includes 1, 2, 3, and 4. The second number threshold may also be 5, and if the same number 4 is not greater than the second number threshold 5, the terminal device determines that the first distance between m and n is a long distance value, and the long distance value may be 500, 1000, etc., but is not limited thereto.

[0072] Step 230, obtaining the entrance position coordinates corresponding to the second wireless network fingerprint from the database, and determining the entrance position coordinates as the position coordinates corresponding to the current position; the entrance position coordinates are obtained by the terminal device through the global positioning system GPS detection before entering the indoor scene.

[0073] As an optional implementation, the database that stores the wireless network fingerprint and the corresponding entrance location coordinates can be a database in the cloud, or a database of other electronic devices that establish a connection with the terminal device. The terminal device sends the first wireless network fingerprint data to the cloud or other electronic devices, so that the cloud or electronic device matches the database according to the first wireless network fingerprint, and the terminal device can also receive the matching result sent by the cloud or electronic device. If the matching result includes the second wireless network fingerprint, the terminal device determines that the match is successful and continues with the subsequent steps. If the matching result indicates that the match fails, the terminal device determines that there is no second wireless network fingerprint matching the first wireless network fingerprint in the database. By implementing this implementation, the terminal device may not need to save the database locally, retaining more storage space for the terminal device.

[0074] As another optional implementation, the database may be a local database, and the terminal device may directly obtain the entrance location coordinates corresponding to the second wireless network fingerprint from the database.

[0075] In one embodiment, if there is no second wireless network fingerprint matching the first wireless network fingerprint in the database, the terminal device determines the wireless network positioning coordinates according to the wireless access point and signal strength corresponding to the first wireless network fingerprint, and determines the wireless network positioning coordinates as the location coordinates corresponding to the current location.

[0076] Optionally, the method for the terminal device to determine the wireless network location coordinates may include any one of a deterministic location algorithm, a probabilistic location algorithm, etc., which is not limited in the embodiment of the present application. In the embodiment of the present application, a fingerprint database may be used to determine the wireless network location coordinates according to the wireless access point and signal strength corresponding to the first wireless network fingerprint. The fingerprint database includes multiple wireless network fingerprints and location coordinates corresponding to each wireless network fingerprint, and the location coordinates are the coordinates of the specific location where each wireless network fingerprint is collected.

[0077] The deterministic positioning algorithm includes: the terminal device determines the wireless network fingerprint with the closest Euclidean distance to the first wireless network fingerprint among the wireless network fingerprints in the fingerprint database, and then uses the location coordinates corresponding to the wireless network fingerprint as the location coordinates corresponding to the current location. The probabilistic positioning algorithm includes: the terminal device calculates the first probability of generating the first wireless network fingerprint from each location coordinate in the fingerprint database, and selects the location coordinates corresponding to the largest first probability among each first probability as the location coordinates corresponding to the current location.

[0078] By implementing this embodiment, when there is no second wireless network fingerprint matching the first wireless network fingerprint in the database, the terminal device can determine the position coordinates corresponding to the current position through a variety of other positioning methods, thereby increasing the scope of application of the indoor positioning method.

[0079] The embodiments of the present application disclose an indoor positioning method, device, electronic device and storage medium. When determining that a terminal device is in an indoor scene, the method can collect a first wireless network fingerprint corresponding to the current location, determine a second wireless network fingerprint in a database that matches the first wireless network fingerprint, and obtain the entrance location coordinates corresponding to the second wireless network fingerprint. The entrance location coordinates obtained by GPS can be regarded as the location coordinates of the entrance of the indoor scene. The entrance location coordinates can be used instead of wireless network positioning to determine the entrance location coordinates as the location coordinates corresponding to the current location, thereby improving the accuracy of positioning in indoor scenes.

[0080] like Figure 3 As shown, Figure 3 This is a flowchart of establishing a database disclosed in an embodiment of the present application. In one embodiment, in step 210, if it is determined that the terminal device is in an indoor scene, before collecting the first wireless network fingerprint corresponding to the current location, it is necessary to collect data of various indoor scenes through the device to establish a database. The terminal device may include the following steps to establish a database:

[0081] Step 310: Determine the entrance position coordinates of each indoor scene.

[0082] The terminal device can determine the entrance position coordinates of each indoor scene through GPS. Optionally, the terminal device can determine the time of entering each indoor scene from the outdoor scene through the GPS signal strength, and select the position coordinates corresponding to the time of entering each indoor scene as the entrance position coordinates of each indoor scene. For example, if the GPS signal strength detected by the terminal device at 12 o'clock is greater than the strength threshold, and the GPS signal strength in the next second is not greater than the strength threshold, it means that the position coordinates corresponding to 12 o'clock are the entrance position coordinates of the indoor scene.

[0083] In one embodiment, the terminal device can obtain multiple first outdoor scene GPS coordinates collected by GPS within a preset time before entering the first indoor scene, and obtain the coordinate accuracy corresponding to each first outdoor scene GPS coordinate; wherein the first indoor scene is any indoor scene of the various indoor scenes; the first entrance position coordinates of the first indoor scene are determined according to the multiple first outdoor scene GPS coordinates and the coordinate accuracy corresponding to each first outdoor scene GPS coordinate.

[0084] Among them, the first outdoor scene can be the surrounding area of ​​the first indoor scene. Preferably, the first outdoor scene can be the surrounding area of ​​the entrance position of the first indoor scene. The terminal device can continuously collect the GPS coordinates of the first outdoor scene before entering the first indoor scene, and the coordinate accuracy corresponding to the GPS coordinates of the first outdoor scene, so as to generate a trajectory between entering the first indoor scene. After entering the first indoor scene, the terminal device can obtain multiple first outdoor scene GPS coordinates collected within a preset time before entering the first indoor scene, and obtain the coordinate accuracy corresponding to each first outdoor scene GPS coordinate. The preset time is the time set by the relevant personnel before the terminal device leaves the factory, so as to collect enough data to determine the entrance position coordinates. For example, the terminal device can obtain multiple first outdoor scene GPS coordinates collected by GPS within 6 seconds before entering the first indoor scene, and the coordinate accuracy corresponding to each first outdoor scene GPS coordinate. The terminal device then determines the first entrance position coordinates of the first indoor scene through comparison or calculation based on the acquired multiple first outdoor scene GPS coordinates and the coordinate accuracies corresponding to each first outdoor scene GPS coordinates. For example, the terminal device can determine the maximum coordinate accuracy among the coordinate accuracies corresponding to each first outdoor scene GPS coordinates, and determine the first outdoor scene GPS coordinates corresponding to the maximum coordinate accuracy as the first entrance position coordinates of the first indoor scene.

[0085] As an optional implementation, the step of determining the first entrance position coordinates of the first indoor scene based on multiple first outdoor scene GPS coordinates and the coordinate accuracy corresponding to each first outdoor scene GPS coordinates may include: determining the weight value corresponding to each first outdoor scene GPS coordinate according to the coordinate accuracy corresponding to each first outdoor scene GPS coordinate; and calculating the first entrance position coordinates of the first indoor scene according to each first outdoor scene GPS coordinate and the corresponding weight value.

[0086] The terminal device can obtain the coordinate accuracy and the coordinate accuracy corresponding to each first outdoor scene GPS coordinate according to the coordinate accuracy corresponding to each first outdoor scene GPS coordinate, and then calculate the coordinate accuracy and the coordinate accuracy corresponding to each first outdoor scene GPS coordinate to obtain the weight value weigh corresponding to each first outdoor scene GPS coordinate. The calculation method can be shown in formula (3):

[0087]

[0088] Wherein, T represents the number of first outdoor scene GPS coordinates, pr represents the corresponding coordinate accuracy of the first outdoor scene GPS coordinates, j ranges from 1 to T, weigh represents the weight value corresponding to the first outdoor scene GPS coordinates, k ranges from 1 to T, and the value of k corresponds to the weight value corresponding to each first outdoor scene GPS coordinate. The terminal device then performs weighted calculation on each obtained first weight and the corresponding longitude and latitude of the first outdoor scene GPS coordinates. The calculation method of the latitude coordinates can be shown in formula (4), and the calculation method of the longitude coordinates can be shown in formula (5).

[0089]

[0090]

[0091] Wherein, la represents the latitude coordinate of the first outdoor scene GPS coordinate, lo represents the longitude coordinate of the first outdoor scene GPS coordinate, P la The latitude coordinates representing the first entrance position coordinates of the first indoor scene, P lo The longitude coordinates representing the first entrance position coordinates of the first indoor scene, k ranges from 1 to T. By implementing this implementation, the terminal device can obtain the entrance position coordinates through weighted calculation, thereby improving the accuracy of the entrance position coordinates and thus improving the accuracy of indoor positioning.

[0092] Step 320: collect one or more wireless network fingerprints corresponding to each indoor scene.

[0093] The terminal device can collect one or more wireless network fingerprints corresponding to each indoor scene, that is, each indoor scene can correspond to one wireless network fingerprint or multiple wireless network fingerprints. Optionally, if there are indoor scenes corresponding to multiple wireless network fingerprints, since the indoor scenes corresponding to the multiple wireless network fingerprints are the same indoor scene, the entrance position coordinates corresponding to the multiple wireless network fingerprints are also the same entrance position coordinates. The location for collecting each wireless network fingerprint can be the same or different, because the wireless network fingerprints collected at different times at the same location are not the same wireless network fingerprint.

[0094] As an optional implementation, the terminal device may detect a trigger operation for generating a collection instruction. The terminal device may also generate a collection instruction when the duration of the GPS signal strength being less than the strength threshold reaches a time threshold, and then start collecting one or more wireless network fingerprints corresponding to each indoor scene according to the collection instruction. For example, the time threshold may be 10 seconds (seconds). The terminal device detects the GPS signal strength, and generates a collection instruction when the duration of the GPS signal strength being less than the strength threshold reaches 10 seconds. The terminal device then starts collecting wireless network fingerprints according to the set collection strategy according to the collection instruction.

[0095] In one embodiment, the terminal device can record the first step number of moving in the first indoor scene; wherein the first indoor scene is any indoor scene among the various indoor scenes; based on the first step number, one or more wireless network fingerprints corresponding to the first indoor scene are periodically collected at a preset step interval.

[0096] For each indoor scene, the number of steps of the terminal device recorded can be used to collect a wireless network fingerprint every time the number of steps of the terminal device reaches a preset step interval. Taking the first indoor scene of each indoor scene as an example, the first indoor scene can be any indoor scene.

[0097] The terminal device may collect a wireless network fingerprint as the wireless network fingerprint corresponding to the first indoor space at each preset step interval based on the recorded first step number. For example, the terminal device may start recording the first step number after entering the indoor scene, and the preset step interval may be 5 steps. The terminal device may collect a wireless network fingerprint every 5 steps, that is, the terminal device may collect a wireless network fingerprint at each of the 5th step, the 10th step, the 15th step, the 20th step, etc., which are 5 steps apart. The collected wireless network fingerprint may be used as the wireless network fingerprint corresponding to the first indoor space.

[0098] As an optional implementation, if it is detected that the first step number reaches the step number threshold, the terminal device ends the step of collecting one or more wireless network fingerprints corresponding to the first indoor scene. The terminal device detects the first step number of the current movement in real time, wherein the device used by the terminal device to detect the step number may include but is not limited to PDR (Pedestrian Dead Reckoning, pedestrian navigation calculation), acceleration sensor, etc., and the present application does not impose any restrictions on this. If it is detected that the first step number reaches the step number threshold, it means that the wireless network fingerprint collected in the first indoor scene is sufficient to meet the requirements for establishing a database, and the collection step is ended. By implementing this implementation, the terminal device can determine that the currently collected wireless network fingerprint can establish a database through the first step number, without the need to end the collection by detecting a manual trigger operation, thereby improving the convenience of establishing a database.

[0099] As an optional implementation, if the height change is detected to be greater than the floor height, the terminal device will clear the first step recorded and restart recording the first step. The terminal device can not only detect the number of steps moved in the two-dimensional plane, but also determine the height change in the three-dimensional space by detecting the change in air pressure. The height change refers to the height difference between the current position and the entrance position. By comparing the value of the height change with the height change threshold, if the height change is detected to be greater than the floor height, it means that the terminal device has gone downstairs or upstairs. The terminal device can clear the first step recorded and restart recording the first step. The terminal continues to periodically collect one or more wireless network fingerprints corresponding to the first indoor scene according to the preset step interval based on the first step recorded again. For example, if the terminal device detects that the current height change is 5m and the floor height is 3m, then the height change is greater than the floor height. The terminal device can detect that the current height change is greater than the floor height, and the terminal device can clear the first step of the current record, step 47, and start recording again from step 0, and collect the wireless network fingerprint every 5 steps after restarting the recording, that is, the terminal device can collect the wireless network fingerprint once at the 5th step, the 10th step, the 15th step, the 20th step, etc., which are 5 steps apart when restarting the recording, and use the collected wireless network fingerprint as one or more wireless network fingerprints corresponding to the first indoor. By implementing this implementation, the terminal device can collect wireless network fingerprints for different floors respectively, improve the accuracy of the data in the database, and thus improve the accuracy of indoor positioning.

[0100] Step 330: Establish a database based on each wireless network fingerprint and the corresponding entrance position coordinates of the indoor scene.

[0101] The terminal device may establish a correspondence between each wireless network fingerprint and the corresponding entrance position coordinate of the indoor scene, and then save each wireless network fingerprint, the corresponding entrance position coordinate of the indoor scene and the correspondence in a database.

[0102] It should be noted that the terminal device that collects data of various indoor scenes to establish a database can be a terminal device used to implement the indoor positioning method, or it can be other terminal devices, and this application does not limit this.

[0103] In an embodiment of the present application, the terminal device can collect data for each indoor scene separately to establish a database, and correspond the wireless network fingerprints collected at multiple locations in the indoor scene to the entrance location coordinates, thereby increasing the amount of data in the database, so that calling the database during indoor positioning can improve the success rate of data matching, thereby improving the accuracy of indoor positioning.

[0104] like Figure 4 As shown, Figure 4is a flow chart of another indoor positioning method disclosed in an embodiment of the present application. The indoor positioning method may include:

[0105] Step 410, determine whether the terminal device is in an indoor scene, if so, execute step 420, if not, execute step 430.

[0106] Step 420 , collect a first wireless network fingerprint corresponding to the current location, and execute step 440 .

[0107] Step 430, obtaining GPS positioning coordinates as position coordinates corresponding to the current position.

[0108] Step 440 , performing a match in the database according to the first wireless network fingerprint to determine whether the match is successful, if so, executing step 450 , if not, executing step 470 .

[0109] Step 450 , determine a second wireless network fingerprint in the database that matches the first wireless network fingerprint, and execute step 460 .

[0110] Step 460, obtaining the entrance position coordinates corresponding to the second wireless network fingerprint from the database, and determining the entrance position coordinates as the position coordinates corresponding to the current position; the entrance position coordinates are obtained by the terminal device through the global positioning system GPS detection before entering the indoor scene.

[0111] Step 470: determine the wireless network positioning coordinates according to the wireless access point and signal strength corresponding to the first wireless network fingerprint, and determine the wireless network positioning coordinates as the position coordinates corresponding to the current position.

[0112] In an embodiment of the present application, the terminal device can locate the current position in an appropriate manner according to the GPS signal strength of the current position and the data matching status of the database to improve the accuracy of indoor positioning.

[0113] like Figure 5 As shown, Figure 5 is a modular schematic diagram of an indoor positioning device disclosed in an embodiment of the present application. The indoor positioning device 500 includes a fingerprint collection module 510, a fingerprint determination module 520, and a position determination module 530, wherein:

[0114] The fingerprint collection module 510 is used to collect a first wireless network fingerprint corresponding to the current location if it is determined that the terminal device is in an indoor scene.

[0115] The matching module 520 is configured to determine a second wireless network fingerprint in a database that matches the first wireless network fingerprint.

[0116] The location determination module 530 is used to obtain the entrance location coordinates corresponding to the second wireless network fingerprint from the database, and determine the entrance location coordinates as the location coordinates corresponding to the current location; the entrance location coordinates are obtained by the terminal device through the global positioning system GPS detection before entering the indoor scene.

[0117] In one embodiment, the indoor positioning device 500 further includes a database establishment module, wherein:

[0118] The database establishment module is used to determine the entrance position coordinates of each indoor scene; collect one or more wireless network fingerprints corresponding to each indoor scene; and establish a database according to each wireless network fingerprint and the entrance position coordinates of the corresponding indoor scene.

[0119] In one embodiment, the database establishment module is also used to record the first step number of moving in the first indoor scene; wherein the first indoor scene is any indoor scene among the various indoor scenes; according to the first step number, one or more wireless network fingerprints corresponding to the first indoor scene are periodically collected at a preset step interval.

[0120] In one embodiment, the database establishment module is also used to obtain multiple first outdoor scene GPS coordinates collected by GPS within a preset time before entering the first indoor scene, and obtain the coordinate accuracy corresponding to each first outdoor scene GPS coordinate; wherein the first indoor scene is any indoor scene among the various indoor scenes; the first entrance position coordinates of the first indoor scene are determined according to the multiple first outdoor scene GPS coordinates and the coordinate accuracy corresponding to each first outdoor scene GPS coordinate.

[0121] In one embodiment, the database establishment module is also used to determine the weight value corresponding to each first outdoor scene GPS coordinate based on the coordinate accuracy corresponding to each first outdoor scene GPS coordinate; and calculate the first entrance position coordinates of the first indoor scene based on each first outdoor scene GPS coordinate and the corresponding weight value.

[0122] In one embodiment, the indoor positioning device 500 further includes a wireless positioning module, wherein:

[0123] The wireless positioning module is used to determine the wireless network positioning coordinates according to the wireless access point and signal strength corresponding to the first wireless network fingerprint if there is no second wireless network fingerprint matching the first wireless network fingerprint in the database, and determine the wireless network positioning coordinates as the position coordinates corresponding to the current position.

[0124] In one embodiment, the matching module 520 is further configured to calculate a first distance between the first wireless network fingerprint and each wireless network fingerprint in the database; and determine a wireless network fingerprint whose first distance is less than a distance threshold as a second wireless network fingerprint matching the first wireless network fingerprint.

[0125] The embodiments of the present application disclose an indoor positioning method, device, electronic device and storage medium. When determining that a terminal device is in an indoor scene, the method can collect a first wireless network fingerprint corresponding to the current location, determine a second wireless network fingerprint in a database that matches the first wireless network fingerprint, and obtain the entrance location coordinates corresponding to the second wireless network fingerprint. The entrance location coordinates obtained by GPS can be regarded as the location coordinates of the entrance of the indoor scene. The entrance location coordinates can be used instead of wireless network positioning to determine the entrance location coordinates as the location coordinates corresponding to the current location, thereby improving the accuracy of positioning in indoor scenes.

[0126] like Figure 6 As shown, in one embodiment, an electronic device is provided, which may include:

[0127] A memory 610 storing executable program codes;

[0128] a processor 620 coupled to the memory 610;

[0129] The processor 620 calls the executable program code stored in the memory 610 to implement the indoor positioning method provided in the above embodiments.

[0130] The memory 610 may include a random access memory (RAM) or a read-only memory (ROM). The memory 610 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 610 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device during use, etc.

[0131] The processor 620 may include one or more processing cores. The processor 620 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 610, and calling data stored in the memory 610. Optionally, the processor 620 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 620 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 620, but may be implemented separately through a communication chip.

[0132] It is understandable that the electronic device may include more or fewer structural elements than those in the above structural block diagram, for example, a power module, physical buttons, a WiFi (Wireless Fidelity) module, a speaker, a Bluetooth module, a sensor, etc., and no limitation is made here.

[0133] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the methods described in the above embodiments.

[0134] In addition, an embodiment of the present application further discloses a computer program product. When the computer program product is run on a computer, the computer can execute all or part of the steps in any one of the indoor positioning methods described in the above embodiments.

[0135] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0136] The above is a detailed introduction to an indoor positioning method, device, electronic device and storage medium disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An indoor positioning method, characterized in that: Applied to terminal equipment, including: If it is determined that the terminal device is in an indoor scene, collecting a first wireless network fingerprint corresponding to the current location; Determine a second wireless network fingerprint matching the first wireless network fingerprint in a database; the database includes the entrance position coordinates of each indoor scene and multiple wireless network fingerprints corresponding to each indoor scene; the entrance position coordinates are obtained by the terminal device through the global positioning system GPS detection before entering the indoor scene; The entry position coordinates corresponding to the second wireless network fingerprint are obtained from the database, and the entry position coordinates corresponding to the second wireless network fingerprint are determined as the position coordinates corresponding to the current position.

2. The method according to claim 1, characterized in that Before collecting the first wireless network fingerprint corresponding to the current location if it is determined that the terminal device is in an indoor scene, the method further includes: Determine the entrance location coordinates of each indoor scene; Collecting multiple wireless network fingerprints corresponding to each of the indoor scenes; A database is established according to each of the wireless network fingerprints and the corresponding entrance position coordinates of the indoor scene.

3. The method according to claim 2, characterized in that The collecting of multiple wireless network fingerprints corresponding to each indoor scene includes: Recording the first step number of moving in a first indoor scene; wherein the first indoor scene is any indoor scene among the various indoor scenes; According to the first step number, multiple wireless network fingerprints corresponding to the first indoor scene are periodically collected at preset step intervals.

4. The method according to claim 2, characterized in that: Determining the entrance position coordinates of each indoor scene includes: Acquire multiple first outdoor scene GPS coordinates collected by GPS within a preset time before entering the first indoor scene, and acquire the coordinate accuracy corresponding to each of the first outdoor scene GPS coordinates; wherein the first indoor scene is any indoor scene among the various indoor scenes; The first entrance position coordinates of the first indoor scene are determined according to the multiple first outdoor scene GPS coordinates and the coordinate accuracy corresponding to each of the first outdoor scene GPS coordinates.

5. The method according to claim 4, characterized in that The determining the first entrance position coordinates of the first indoor scene according to the multiple first outdoor scene GPS coordinates and the coordinate accuracy corresponding to each of the first outdoor scene GPS coordinates includes: Determine a weight value corresponding to each of the first outdoor scene GPS coordinates according to the coordinate accuracy corresponding to each of the first outdoor scene GPS coordinates; The first entrance position coordinates of the first indoor scene are calculated based on the GPS coordinates of each of the first outdoor scenes and the corresponding weight values.

6. The method according to claim 1, characterized in that The method further comprises: If there is no second wireless network fingerprint matching the first wireless network fingerprint in the database, the wireless network positioning coordinates are determined according to the wireless access point and signal strength corresponding to the first wireless network fingerprint, and the wireless network positioning coordinates are determined as the position coordinates corresponding to the current position.

7. The method according to claim 1, characterized in that The determining a second wireless network fingerprint in a database that matches the first wireless network fingerprint includes: Calculating a first distance between the first wireless network fingerprint and each wireless network fingerprint in a database; A wireless network fingerprint whose first distance is less than a distance threshold is determined as a second wireless network fingerprint matching the first wireless network fingerprint.

8. An indoor positioning device, characterized in that: Applied to terminal equipment, including: A fingerprint collection module, configured to collect a first wireless network fingerprint corresponding to a current location if it is determined that the terminal device is in an indoor scene; A matching module, used to determine a second wireless network fingerprint in a database that matches the first wireless network fingerprint; the database includes the entrance position coordinates of each indoor scene and multiple wireless network fingerprints corresponding to each indoor scene; the entrance position coordinates are obtained by the terminal device through the global positioning system GPS detection before entering the indoor scene; The location determination module is used to obtain the entry location coordinates corresponding to the second wireless network fingerprint from the database, and determine the entry location coordinates corresponding to the second wireless network fingerprint as the location coordinates corresponding to the current location.

9. An electronic device, characterized in that: include: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Indoor locating method for mobile device

    CN104113912A

  • Positioning method and device based on Wi-Fi position fingerprints

    CN110113708A

  • Multi-GPS positioning method and system of logistics unmanned aerial vehicle, device and storage medium

    CN110412626A

  • Multi-source fused WiFi fingerprint database updating method and electronic equipment

    CN111757246A

  • Indoor entrance positioning method and electronic equipment

    CN111757284A