CN114208221A - Positioning method, positioning device, mobile terminal and storage medium - Google Patents

Positioning method, positioning device, mobile terminal and storage medium Download PDF

Info

Publication number
CN114208221A
CN114208221A CN202080026964.7A CN202080026964A CN114208221A CN 114208221 A CN114208221 A CN 114208221A CN 202080026964 A CN202080026964 A CN 202080026964A CN 114208221 A CN114208221 A CN 114208221A
Authority
CN
China
Prior art keywords
air pressure
current
floor
preset
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202080026964.7A
Other languages
Chinese (zh)
Other versions
CN114208221B (en
Inventor
陈尊裕
胡斯洋
方雄
吴珏其
陈欣
吴沛谦
张仲文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fengtuzhi Technology Holding Co ltd
Original Assignee
Fengtuzhi Technology Holding Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fengtuzhi Technology Holding Co ltd filed Critical Fengtuzhi Technology Holding Co ltd
Publication of CN114208221A publication Critical patent/CN114208221A/en
Application granted granted Critical
Publication of CN114208221B publication Critical patent/CN114208221B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/10Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
    • G01C21/12Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning
    • G01C21/16Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/024Guidance services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Navigation (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)

Abstract

A positioning method, a positioning device, a mobile terminal and a storage medium are provided, wherein the method comprises the following steps: determining the current environment according to the acquired real-time GNSS signal (S11); if the current environment is an indoor environment, determining the current building according to the acquired real-time Wi-Fi data and a preset Wi-Fi signal map library (S12); determining the floor where the preset air pressure trigger is located according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state (S13); determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current position is in a preset Wi-Fi signal map library (S14); and determining a second current horizontal coordinate based on the first current horizontal coordinate and the acquired pedestrian trajectory, and taking the current building, the current floor and the second current horizontal coordinate as a positioning result (S15). The method reduces the error rate and complexity of positioning and improves the practicability of the positioning method.

Description

Positioning method, positioning device, mobile terminal and storage medium Technical Field
The present invention relates to the field of positioning technologies, and in particular, to a positioning method, an apparatus, a mobile terminal, and a storage medium.
Background
With the development of mobile internet, location-based services have brought more business opportunities, while also driving the expansion of location acquisition needs from traditional outdoor environments to more complex but more common indoor environments. The indoor positioning technology not only meets the requirement of horizontal position positioning, but also faces more complicated multi-dimensional multi-scene problems of indoor and outdoor environment, building and floor identification and switching.
The existing floor recognition technology mainly utilizes a mobile phone air pressure sensor to obtain a real-time absolute air pressure value of a floor where the mobile phone air pressure sensor is located, and then compares local standard sea level air pressure records to estimate the height and the floor where the mobile phone air pressure sensor is located; or the sensor such as a magnetic field, an accelerometer and the like is used for capturing the signal characteristics of the pedestrian walking in the staircase to estimate the change of the floor where the pedestrian is located. In the aspect of indoor and outdoor environment identification, various sensors such as a proximity sensor, an optical sensor, a magnetic field sensor and the like are mainly used for distinguishing indoor or outdoor environments where pedestrians are located and starting corresponding positioning modules.
The inventor finds that the following problems can exist in the prior art in the process of implementing the invention: firstly, because the absolute air pressure of the indoor environment is influenced by various conditions such as indoor temperature and humidity, air-conditioning refrigeration or heating and the like, and has difference with the outdoor atmospheric pressure, the method for calculating the altitude and the corresponding floor by using the sea level standard atmospheric pressure and the acquired absolute air pressure value has higher error rate; secondly, except for the situation of walking in a staircase, the inertia measurement sensor is difficult to identify the passing process of the pedestrian passenger escalator and the elevator among multiple floors through the signal characteristics of the inertia measurement sensor, and has great limitation in the actual use process; thirdly, in the aspect of the indoor and outdoor environment recognition problem, the complexity of the technical scheme of multi-sensor signal cooperation recognition is high, the calculation consumption and the electric energy consumption of the mobile terminal can be increased, more requirements are provided for the hardware configuration of the mobile terminal, and the practicability of the method is low.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a positioning method, an apparatus, a mobile terminal, and a storage medium, which can meet indoor and outdoor positioning requirements, automatically identify a building and a floor and complete horizontal positioning in an indoor environment, and particularly reduce positioning complexity and a floor identification error rate, thereby improving the practicability of the positioning method. The specific scheme is as follows:
in a first aspect, the invention discloses a positioning method applied to an Android-based mobile terminal, comprising the following steps:
determining the current environment according to the acquired real-time GNSS signal;
if the current environment is an indoor environment, determining the current building according to the acquired real-time Wi-Fi data and a preset Wi-Fi signal map library;
determining a current floor according to the current state of a preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state;
determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current position is located in the preset Wi-Fi signal map library;
and determining a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian track, and taking the building, the floor and the second current horizontal coordinate as positioning results.
Optionally, the determining the current environment according to the acquired real-time GNSS signal includes:
determining target parameters of the acquired real-time GNSS signals;
and inputting the target parameters into a signal classifier obtained in advance, and determining the current environment according to the output of the signal classifier.
Optionally, the determining the current building according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library includes:
determining Wi-Fi fingerprints of all buildings in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library;
respectively determining first similarity of the real-time Wi-Fi data and Wi-Fi fingerprints of the buildings;
and determining the current building according to the first similarity.
Optionally, the determining a first current horizontal coordinate according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the floor where the current floor is located in the preset Wi-Fi signal map library includes:
and determining the first current horizontal coordinate according to the WKNN algorithm, the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current station is located in the preset Wi-Fi signal map library.
Optionally, the determining a second current horizontal coordinate based on the first current horizontal coordinate and the acquired pedestrian trajectory includes:
and determining the second current horizontal coordinate based on a Kalman filtering algorithm, the first current horizontal coordinate and the acquired pedestrian track.
Optionally, after determining the current environment according to the acquired real-time GNSS signal, the method further includes:
if the current environment is an outdoor environment, acquiring a third current horizontal coordinate acquired by a preset positioning device;
and determining a positioning result based on the third current horizontal coordinate and the acquired behavior track.
Optionally, the determining the current floor according to the current state of the preset air pressure trigger includes:
if the preset air pressure trigger is in a floor stable state at present, taking the floor determined when the real-time Wi-Fi data is obtained last time as the floor where the preset air pressure trigger is located at present;
and if the preset air pressure trigger is in a floor switching state currently, determining the floor where the current air pressure trigger is located according to the real-time Wi-Fi data and the Wi-Fi signal map set corresponding to the current building in the preset Wi-Fi signal map library.
Optionally, the determining the current floor according to the real-time Wi-Fi data and the Wi-Fi signal map set corresponding to the current floor in the preset Wi-Fi signal map library includes:
determining a Wi-Fi signal map set corresponding to the building where the current building is located from the preset Wi-Fi signal map library;
respectively determining second similarity of the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal map set, wherein one Wi-Fi signal map of the Wi-Fi signal map set comprises a plurality of Wi-Fi fingerprints, and one Wi-Fi signal map corresponds to one floor;
determining a preselected Wi-Fi fingerprint according to the second similarity;
determining floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprints;
and determining the floor with the largest occurrence frequency in the floor information as the current floor.
Optionally, before determining the current floor according to the current state of the preset air pressure trigger, the method further includes:
and determining the current state of the preset air pressure trigger according to the stored state in the preset air pressure trigger and the acquired real-time instant air pressure.
Optionally, the determining the current state of the preset air pressure trigger according to the stored state in the preset air pressure trigger and the obtained real-time instant air pressure includes:
if the stored state in the preset air pressure trigger is a floor stable state, taking the real-time instant air pressure and first instant air pressure acquired by the preset air pressure trigger as a sliding air pressure sequence, wherein the first instant air pressure is a preset number of instant air pressures acquired before the real-time instant air pressure is acquired;
determining an average value of the sliding air pressure sequence as a first steady-state reference value;
judging whether the difference value between the real-time instantaneous air pressure and the first steady-state reference value is larger than or equal to a first threshold value or not;
and if the difference value between the real-time instantaneous air pressure and the first steady-state reference value is larger than or equal to a first threshold value, judging that the current state of the preset air pressure trigger is a floor switching state.
Optionally, the determining the current state of the preset air pressure trigger according to the stored state in the preset air pressure trigger and the obtained real-time instant air pressure includes:
if the stored state in the preset air pressure trigger is a floor switching state, taking the real-time instant air pressure and second instant air pressure acquired by the preset air pressure trigger as a sliding air pressure sequence, wherein the second instant air pressure is a preset number of instant air pressures acquired before the real-time instant air pressure is acquired;
determining an average value of the sliding air pressure sequence as a dynamic air pressure value;
judging whether the difference value between the dynamic air pressure value and a second steady-state reference value is larger than or equal to a second threshold value or not, wherein the second steady-state reference value is the average value of the instantaneous air pressure obtained last time before the preset air pressure trigger is in the floor switching state and third instantaneous air pressure, and the third instantaneous air pressure is a preset number of instantaneous air pressures obtained before the instantaneous air pressure is obtained last time before the preset air pressure trigger is in the floor switching state;
and if the difference value between the dynamic air pressure value and the second steady-state reference value is larger than or equal to a second threshold value, judging that the current state of the preset air pressure trigger is still the floor switching state.
Optionally, before determining that the current state of the preset air pressure trigger is still the floor switching state, the method further includes:
judging whether the difference value between the average values of the real-time instantaneous air pressure and a fourth instantaneous air pressure is smaller than a third threshold value, wherein the fourth instantaneous air pressure is a preset number of instantaneous air pressures acquired before the real-time instantaneous air pressure is acquired;
and if the difference value between the average values of the real-time instantaneous air pressure and the fourth instantaneous air pressure is smaller than a third threshold value, judging that the air pressure is stable, finishing the floor switching state, and adjusting the preset air pressure trigger from the floor switching state to the floor stable state.
In a second aspect, the present invention discloses a positioning device, which is applied to an Android-based mobile terminal, and the device includes: the system comprises an indoor and outdoor environment identification module, a Wi-Fi fingerprint positioning module and a positioning result fusion module, wherein the Wi-Fi fingerprint positioning module comprises a building identification submodule, a floor identification submodule and a horizontal position positioning submodule;
the indoor and outdoor environment identification module is used for determining the current environment according to the acquired real-time GNSS signal;
the building identification submodule is used for determining the building where the current building is located according to the obtained real-time Wi-Fi data and a preset Wi-Fi signal map library when the current environment is an indoor environment;
the floor identification submodule is used for determining a floor where the preset air pressure trigger is located according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state;
the horizontal position positioning sub-module is used for determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current position is located in the preset Wi-Fi signal map library;
and the positioning result fusion module is used for determining a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian track, and taking the building, the floor and the second current horizontal coordinate as positioning results.
In a third aspect, the present invention discloses an Android-based mobile terminal, including:
a processor and a memory;
wherein the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the steps of the foregoing positioning method.
In a fourth aspect, the present invention also discloses a computer-readable storage medium for storing a computer program, which when executed by a processor implements the steps of the aforementioned positioning method.
Therefore, the invention firstly determines the current environment according to the acquired real-time GNSS signal, if the current environment is an indoor environment, determining the current building according to the obtained real-time Wi-Fi data and a preset Wi-Fi signal map library, determining the current floor according to the current state of a preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state, then determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current position is in the preset Wi-Fi signal map library, a second current horizontal coordinate may then be determined based on the first current horizontal coordinate and the acquired pedestrian trajectory, and taking the current building, the current floor and the second current horizontal coordinate as positioning results. Compared with the processing method for determining whether the current environment is indoor or outdoor by using multi-sensor signals in the prior art, the signal classification method based on the GNSS signals has the advantages of simple calculation and lower hardware complexity, so that the practicability of the positioning method is improved; meanwhile, the Wi-Fi fingerprint identification is utilized to realize building and floor positioning, extra sensor signals are not needed, and the calculation flow is simple; in addition, the floor where the preset air pressure trigger is located is specifically determined to be in a floor stable state or a floor switching state according to the current state of the preset air pressure trigger, an absolute air pressure value or an additional mobile terminal is not needed, the floor identification accuracy is improved, the error rate is reduced, the use cost is lower, and the floor identification device can be compatible with various action scenes such as a passenger elevator or an electric hand ladder, a walk in a staircase and the like, so that the floor identification device can be suitable for different environments. In addition, the method determines whether the current environment is an indoor environment or an outdoor environment, determines the building where the current environment is located if the current environment is the indoor environment, determines the floor where the current environment is located according to the building where the current environment is located, determines the horizontal coordinate according to the floor where the current environment is located, forms a multi-dimensional layer-by-layer progressive indoor positioning method, constructs a complete positioning frame, and has higher practicability.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts
Fig. 1 is a flowchart of a positioning method according to an embodiment of the present invention;
FIG. 2 is a partial flow chart of a specific positioning method disclosed in the embodiments of the present invention;
FIG. 3 is a flow chart of building identification disclosed in an embodiment of the present invention;
FIG. 4 is a partial flow chart of a specific positioning method disclosed in the embodiments of the present invention;
fig. 5 is a flowchart of floor identification according to an embodiment of the present invention;
FIG. 6 is a partial flow chart of a specific positioning method disclosed in the embodiments of the present invention;
fig. 7 is a flow chart illustrating a process of determining a state of an air pressure trigger according to an embodiment of the present invention;
FIG. 8 is a flowchart of a specific positioning method according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of a positioning apparatus according to an embodiment of the present invention;
FIG. 10 is a flowchart illustrating the operation of a positioning apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a mobile terminal based on Android disclosed in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention discloses a positioning method, which is applied to an Android-based mobile terminal, and includes:
step S11: and determining the current environment according to the acquired real-time GNSS signal.
In practical applications, it is necessary to determine the current environment according to an acquired real-time GNSS signal (Global Navigation Satellite System). The real-time GNSS signals include, but are not limited to, beidou signals and GPS (Global Positioning System) signals.
The determining the current environment according to the acquired real-time GNSS signal includes: determining target parameters of the acquired real-time GNSS signals; and inputting the target parameters into a signal classifier obtained in advance, and determining the current environment according to the output of the signal classifier. Wherein the target parameter may be a signal-to-noise ratio parameter. Specifically, signal-to-noise ratio parameters of the acquired real-time GNSS signals may be determined first; and then inputting the signal-to-noise ratio parameter into a pre-obtained signal classifier, and determining the current environment according to the output of the signal classifier.
In practical application, before the signal classifier is used for classifying the acquired real-time GNSS signals to determine the current environment, multiple sets of GNSS signals acquired in indoor environment and outdoor environment are respectively used as training samples, signal-to-noise ratio parameters of the GNSS signals in the training samples are extracted, the signal-to-noise ratio parameters of the GNSS signals in the training samples are input into a training model based on a decision tree algorithm, and the signal classifier is obtained after training is completed.
Step S12: and if the current environment is an indoor environment, determining the current building according to the acquired real-time Wi-Fi data and a preset Wi-Fi signal map library.
After the current environment is determined, if the current environment is an indoor environment, determining the current building according to the acquired real-time Wi-Fi data and a preset Wi-Fi signal map library. Specifically, the Wi-Fi information map library comprises Wi-Fi information maps of different buildings which are acquired in advance, wherein one building corresponds to one or more Wi-Fi information maps, one floor corresponds to one Wi-Fi signal map, one Wi-Fi signal map is a data set for orderly recording a plurality of Wi-Fi fingerprints on the same floor, and Wi-Fi signal characteristics on known horizontal coordinates can be provided for Wi-Fi fingerprint positioning calculation. In the same building, each floor independently corresponds to a Wi-Fi signal map.
Step S13: and determining the floor where the preset air pressure trigger is located according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state.
After the current building is determined, the current floor is determined according to the current state of a preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state. If the current state of the preset air pressure trigger is a floor stable state, the current state is in a floor unchanged state, and if the current state of the preset air pressure trigger is a floor switching state, the current state is in a floor changed state.
Specifically, the determining the current floor according to the current state of the preset air pressure trigger includes: if the preset air pressure trigger is in a floor stable state at present, taking the floor determined when the real-time Wi-Fi data is obtained last time as the floor where the preset air pressure trigger is located at present; and if the preset air pressure trigger is in a floor switching state currently, determining the floor where the current air pressure trigger is located according to the real-time Wi-Fi data and the Wi-Fi signal map set corresponding to the current building in the preset Wi-Fi signal map library. That is, when the current state of the preset air pressure trigger is a stable floor state, the floor determined when the real-time Wi-Fi data is obtained last time can be directly used as the current floor, and if the preset air pressure trigger is in a floor switching state, the current floor is determined according to the real-time Wi-Fi data and the Wi-Fi signal map set corresponding to the current floor in the preset Wi-Fi signal map library.
Correspondingly, before the step of determining the current floor according to the current state of the preset air pressure trigger, the method further includes: and determining the current state of the preset air pressure trigger according to the stored state in the preset air pressure trigger and the acquired real-time instant air pressure.
In practical application, when the preset air pressure trigger is in a stable floor state, the floor recognition algorithm can be closed first, and when the preset air pressure trigger detects that the preset air pressure trigger is in a floor switching state, the floor recognition algorithm is opened, so that the air pressure change is used as an auxiliary floor recognition algorithm triggering mechanism, the floor recognition is carried out when a pedestrian is in the floor switching state, the calculation frequency is effectively controlled, the calculation cost and the energy consumption are reduced, and the recognition error rate is effectively reduced.
Step S14: and determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current position is located in the preset Wi-Fi signal map library.
After the floor where the mobile terminal is located is determined, a first current horizontal coordinate is determined according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the floor where the mobile terminal is located in the preset Wi-Fi signal map library. That is, after the floor where the elevator is located is determined, the specific position on the floor where the elevator is located is not determined, and the first current horizontal coordinate needs to be further determined.
Specifically, the first current horizontal coordinate may be determined according to a WKNN algorithm, the real-time Wi-Fi data, and a Wi-Fi signal map corresponding to a floor where the current floor is located in the preset Wi-Fi signal map library. That is, the similarity between the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal map corresponding to the floor where the current station is located in the preset Wi-Fi signal map library may be calculated, then the weight of the horizontal coordinate corresponding to each Wi-Fi fingerprint in the floor where the current station is located may be determined based on the calculated similarity, and the first current horizontal coordinate may be determined based on the determined weight and each horizontal coordinate in the floor where the current station is located. For example, the Wi-Fi signal map corresponding to the current floor includes A, B, C for three Wi-Fi fingerprints, each Wi-Fi fingerprint corresponds to one horizontal coordinate of the floor where the current floor is located, the similarity between the real-time Wi-Fi data and a is calculated to be 0.4, the similarity between the real-time Wi-Fi data and B is calculated to be 0.5, the similarity between the real-time Wi-Fi data and C is calculated to be 0.6, the weight of the horizontal coordinate corresponding to a is 0.2667, the weight of the horizontal coordinate corresponding to B is 0.3333, and the weight of the horizontal coordinate corresponding to C is 0.4.
Step S15: and determining a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian track, and taking the building, the floor and the second current horizontal coordinate as positioning results.
In a specific implementation process, after the first current horizontal coordinate is determined, a second current horizontal coordinate needs to be determined based on the first current horizontal coordinate and the obtained pedestrian trajectory, and the current building, the current floor, and the second current horizontal coordinate are used as positioning results.
In practical applications, the determining a second current horizontal coordinate based on the first current horizontal coordinate and the acquired pedestrian trajectory includes: and determining the second current horizontal coordinate based on a Kalman filtering algorithm, the first current horizontal coordinate and the acquired pedestrian track. And taking the pedestrian track as an internal inertia predicted value, taking the first current horizontal coordinate as an external measured value, fusing the first current horizontal coordinate and the external measured value based on a Kalman filtering algorithm, and performing optimal estimation on the horizontal position coordinate of the pedestrian to obtain the second horizontal coordinate.
Accordingly, the pedestrian trajectory needs to be acquired first. After entering an indoor environment, entering an initial positioning state, namely sequentially determining a building, a floor and a first horizontal coordinate, taking the first horizontal coordinate as an initial position for pedestrian trajectory calculation, and performing continuous positioning to obtain the pedestrian trajectory.
And determining a second current horizontal coordinate based on the first current horizontal coordinate determined according to the Wi-Fi data and the obtained pedestrian track, so that the position of the second current horizontal coordinate is more accurate, and the problem of larger error caused by independent dependence on Wi-Fi positioning or independent dependence on pedestrian track positioning is solved.
Therefore, the invention firstly determines the current environment according to the acquired real-time GNSS signal, if the current environment is an indoor environment, determining the current building according to the obtained real-time Wi-Fi data and a preset Wi-Fi signal map library, determining the current floor according to the current state of a preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state, then determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current position is in the preset Wi-Fi signal map library, a second current horizontal coordinate may then be determined based on the first current horizontal coordinate and the acquired pedestrian trajectory, and taking the current building, the current floor and the second current horizontal coordinate as positioning results. Compared with the processing method for determining whether the current environment is indoor or outdoor by using multiple sensors in the prior art, the GNSS signal based signal classification method has the advantages of simple calculation and lower hardware complexity, so that the practicability of the positioning method is improved; building and floor positioning is realized by utilizing Wi-Fi fingerprint identification, extra sensor signals are not needed, and the calculation flow is simple; in addition, the floor where the preset air pressure trigger is located is specifically determined to be in a floor stable state or a floor switching state according to the current state of the preset air pressure trigger, an absolute air pressure value or an additional mobile terminal is not needed, the floor identification accuracy is improved, the error rate is reduced, the use cost is lower, and the floor identification device can be compatible with various action scenes such as a passenger elevator or an electric hand ladder, a walk in a staircase and the like, so that the floor identification device can be suitable for different environments. In addition, the method determines whether the current environment is an indoor environment or an outdoor environment, determines the building where the current environment is located if the current environment is the indoor environment, determines the floor where the current environment is located according to the building where the current environment is located, determines the horizontal coordinate according to the floor where the current environment is located, forms a multi-dimensional layer-by-layer progressive indoor positioning method, constructs a complete positioning frame, and has higher practicability.
Referring to fig. 2, determining a current building according to the acquired real-time Wi-Fi data and a preset Wi-Fi signal map library may specifically include:
step S21: and if the current environment is an indoor environment, determining the Wi-Fi fingerprints of all buildings in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library.
After the current environment is determined, if the current environment is an indoor environment, determining the current building according to the acquired real-time Wi-Fi data and a preset Wi-Fi signal map library. Specifically, the Wi-Fi fingerprints of each building in the preset Wi-Fi signal map library are determined according to the preset Wi-Fi signal map library.
The Wi-Fi information map library comprises Wi-Fi information maps of different buildings which are acquired in advance, wherein one building corresponds to one or more Wi-Fi information maps, one floor corresponds to one Wi-Fi signal map, one Wi-Fi signal map is a data set for orderly recording a plurality of Wi-Fi fingerprints on the same floor, and Wi-Fi signal characteristics on a known horizontal coordinate can be provided for Wi-Fi fingerprint positioning calculation. In the same building, each floor independently corresponds to a Wi-Fi signal map. Therefore, the Wi-Fi fingerprints of all buildings in the preset Wi-Fi signal map library need to be determined firstly.
Specifically, the average value of the RSSI (Received Signal Strength Indication) of all APs (Access POINTs) in the building is calculated based on the Wi-Fi Signal maps of all buildings in a preset Wi-Fi Signal map library, and each building forms a Wi-Fi fingerprint taking the building as a unit. Determining the Wi-Fi fingerprint of any building in the preset Wi-Fi signal map library, wherein the step of determining the Wi-Fi fingerprint of any building in the preset Wi-Fi signal map library comprises the following steps: and calculating the average value of the Wi-Fi fingerprints in each Wi-Fi signal map corresponding to the building in the preset Wi-Fi signal map library to obtain the Wi-Fi fingerprint corresponding to the building.
Step S22: and respectively determining first similarity of the real-time Wi-Fi data and Wi-Fi fingerprints of the buildings.
After the Wi-Fi fingerprints corresponding to the buildings in the preset Wi-Fi signal map library are determined, first similarity between the real-time Wi-Fi data and the Wi-Fi fingerprints of the buildings needs to be calculated respectively. The similarity algorithm in the process of determining the first similarity is not specifically limited herein, and may be determined according to actual conditions.
Step S23: and determining the current building according to the first similarity.
After the first similarity is determined, determining the current building according to the first similarity. Specifically, the building corresponding to the maximum first similarity is determined as the current building.
Because continuous positioning is needed indoors, in the indoor continuous positioning state, if the current building is consistent with the last result, the state is kept, and if the current building is inconsistent with the last result, the indoor initial positioning state is entered.
Referring to fig. 3, a flow chart of building identification is shown. And searching the Wi-Fi signal maps of all buildings in a preset Wi-Fi signal map library, then compressing the Wi-Fi signal maps of all buildings to obtain Wi-Fi fingerprints taking the buildings as a unit, namely calculating the RSSI average value of all APs in the buildings, and forming one Wi-Fi fingerprint taking the buildings as a unit by each building. And then calculating the similarity between the real-time Wi-Fi data and the Wi-Fi fingerprints of each building, determining the building corresponding to the maximum similarity as the current building, judging whether the current building is the building determined when the Wi-Fi data is acquired last time, if so, outputting the current building, keeping a continuous positioning state, and if not, outputting the current building to change into an initial positioning state.
Referring to fig. 4, when the preset air pressure trigger is currently in a floor switching state, determining a currently located floor according to the real-time Wi-Fi data and a Wi-Fi signal map set corresponding to a currently located building in the preset Wi-Fi signal map library, specifically including:
step S31: and determining a Wi-Fi signal map set corresponding to the building where the current building is located from the preset Wi-Fi signal map library.
After the current building is determined, the current floor is determined according to the current state of the preset air pressure trigger. And if the preset air pressure trigger is in a floor switching state currently, determining the floor where the current air pressure trigger is located according to the real-time Wi-Fi data and the Wi-Fi signal map set corresponding to the current building in the preset Wi-Fi signal map library.
Specifically, a Wi-Fi signal map set corresponding to the building where the current building is located needs to be determined from the preset Wi-Fi signal map library. The current building can comprise one or more floors, each floor corresponds to one Wi-Fi signal map, so that a Wi-Fi signal map set corresponding to the current building needs to be determined, and the Wi-Fi signal map set can comprise one or more Wi-Fi signal maps.
Step S32: respectively determining second similarity of the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal map set, wherein one Wi-Fi signal map of the Wi-Fi signal map set comprises a plurality of Wi-Fi fingerprints, and one Wi-Fi signal map corresponds to one floor.
After the Wi-Fi signal map set is determined, second similarity between the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal map set can be respectively determined, wherein one Wi-Fi signal map of the Wi-Fi signal map set comprises a plurality of Wi-Fi fingerprints, and one Wi-Fi signal map corresponds to one floor.
For example, if the current building includes 3 floors and the Wi-Fi signal map corresponding to each floor includes 3 Wi-Fi fingerprints, the second similarity between the real-time Wi-Fi data and the 9 Wi-Fi fingerprints needs to be calculated respectively.
Step S33: and determining a preselected Wi-Fi fingerprint according to the second similarity.
After the second similarity is determined, a preset Wi-Fi fingerprint can be determined according to the second similarity. Specifically, the second similarities may be sorted from large to small, and then the Wi-Fi fingerprints corresponding to the first k second similarities are determined as the preselected Wi-Fi fingerprint, where k is a positive integer greater than or equal to 1, and a specific value of k may be determined according to an actual situation, which is not specifically limited herein.
Step S34: and determining floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprints.
After the preselected Wi-Fi fingerprints are determined, the floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprints is also determined. Specifically, the floor corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprints is determined to be which floor of the building where the floor is located currently.
Step S35: and determining the floor with the largest occurrence frequency in the floor information as the current floor.
After the floor information is obtained, the floor with the largest occurrence frequency in the floor information can be determined as the current floor. For example, the preselected Wi-Fi fingerprints include 5 Wi-Fi fingerprints, wherein 3 of the Wi-Fi fingerprints correspond to 6 floors, and 2 of the Wi-Fi fingerprints correspond to 5 floors, so that the floor where the Wi-Fi fingerprint is located is 6 floors.
When the mobile terminal enters an indoor environment, positioning is in an initial positioning state, and floors, buildings and horizontal coordinates need to be obtained, at the moment, the state of the preset air pressure trigger does not need to be judged, and the floor where the mobile terminal is located is directly determined according to the obtained real-time Wi-Fi data and the Wi-Fi signal map set corresponding to the located building in the preset Wi-Fi signal map library.
Referring to fig. 5, a flow chart for floor identification is shown. Firstly, judging whether the building is in an initial positioning state, if so, skipping the state judgment of an air pressure trigger, directly utilizing a floor identification algorithm to identify the floor, namely, loading a Wi-Fi signal map of each floor of the building where the building is located currently according to the building identification result, calculating the similarity between each Wi-Fi fingerprint corresponding to each floor and real-time Wi-Fi data, determining the floor with the highest frequency in the first k Wi-Fi fingerprints with the highest similarity as the current floor, and updating the current floor. Wherein k is a positive integer greater than or equal to 1. And if the floor recognition algorithm is not triggered to be started, keeping the last calculation result as the current floor. And if the floor touch recognition algorithm is triggered to be started, performing floor recognition by using the floor recognition algorithm.
Referring to fig. 6, determining the current state of the preset air pressure trigger according to the saved state of the preset air pressure trigger and the obtained real-time instant air pressure may specifically include:
step S41: and if the stored state in the preset air pressure trigger is a floor stable state, taking the real-time instant air pressure and the first instant air pressure acquired by the preset air pressure trigger as a sliding air pressure sequence, wherein the first instant air pressure is a preset number of instant air pressures acquired before the real-time instant air pressure is acquired.
In a specific implementation process, if the stored state in the preset air pressure trigger is a floor stable state, the real-time instant air pressure and the first instant air pressure acquired by the preset air pressure trigger are used as a sliding air pressure sequence, wherein the first instant air pressure is a preset number of instant air pressures acquired before the real-time instant air pressure is acquired. For example, if the saved state in the preset air pressure trigger is a floor stable state, N-1 instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained are used as first instantaneous air pressures, and then the first instantaneous air pressures and the real-time instantaneous air pressures are used as sliding air pressure sequences to form a sliding air pressure sequence comprising the N instantaneous air pressures. N is a positive integer greater than or equal to 1, and the value of N may be determined according to actual conditions, which is specifically defined herein.
Step S42: determining an average of the sliding air pressure sequence as a first steady state reference value.
After the sliding air pressure sequence is obtained, calculating the average value of the sliding air pressure sequence so as to use the average value of the sliding air pressure sequence as a first steady-state reference value.
Step S43: and judging whether the difference value between the real-time instantaneous air pressure and the first steady-state reference value is larger than or equal to a first threshold value.
After the first steady-state air pressure value is determined, it may be determined whether the difference between the real-time instantaneous air pressure and the first steady-state reference value is greater than or equal to a first threshold value. That is, whether the fluctuation of the currently acquired real-time instantaneous air pressure value relative to the first steady-state reference value exceeds a threshold value is judged, so as to determine whether the current state of the preset air pressure trigger is a floor switching state or a floor stable state.
Step S44: and if the difference value between the real-time instantaneous air pressure and the first steady-state reference value is larger than or equal to a first threshold value, judging that the current state of the preset air pressure trigger is a floor switching state.
And judging whether the difference value between the real-time instantaneous air pressure and the first steady-state reference value is larger than or equal to a first threshold value. And if the difference value between the real-time instantaneous air pressure and the first steady-state reference value is larger than or equal to a first threshold value, judging that the current state of the preset air pressure trigger is a floor switching state. And if the difference value between the real-time instantaneous air pressure and the first steady-state reference value is smaller than a first threshold value, judging that the current state of the preset air pressure trigger is still a floor steady state.
Step S45: and if the stored state in the preset air pressure trigger is a floor switching state, taking the real-time instant air pressure and second instant air pressure acquired by the preset air pressure trigger as a sliding air pressure sequence, wherein the second instant air pressure is a preset number of instant air pressures acquired before the real-time instant air pressure is acquired.
In a specific implementation process, if the stored state in the preset air pressure trigger is a floor switching state, taking the real-time instant air pressure and the second instant air pressure acquired by the preset air pressure trigger as a sliding air pressure sequence, where the second instant air pressure is a preset number of instant air pressures acquired before the real-time instant air pressure is acquired. That is, for example, if the saved state in the preset air pressure trigger is a floor switching state, N-1 instantaneous air pressures acquired before the real-time instantaneous air pressure is acquired are taken as the second instantaneous air pressure, and then the second instantaneous air pressure and the real-time instantaneous air pressure are taken as the sliding air pressure sequence.
Step S46: determining an average of the sliding air pressure sequence as a dynamic air pressure value.
After the sliding air pressure sequence is obtained, the average value of the sliding air pressure sequence can be determined as a dynamic air pressure value so as to judge the current state.
Step S47: and judging whether the difference value between the dynamic air pressure value and a second steady-state reference value is larger than or equal to a second threshold value, wherein the second steady-state reference value is the average value of the instantaneous air pressure obtained last time before the preset air pressure trigger is in the floor switching state and a third instantaneous air pressure, and the third instantaneous air pressure is a preset number of instantaneous air pressures obtained before the instantaneous air pressure is obtained last time before the preset air pressure trigger is in the floor switching state.
After the dynamic air pressure value is obtained, it is further required to determine whether a difference between the dynamic air pressure value and a second steady-state reference value is greater than or equal to a second threshold, where the second steady-state reference value is an average value of an instantaneous air pressure obtained last before the preset air pressure trigger is in the floor switching state and a third instantaneous air pressure, and the third instantaneous air pressure is a preset number of instantaneous air pressures obtained before the instantaneous air pressure is obtained last before the preset air pressure trigger is in the floor switching state, that is, when the preset air pressure trigger is in a floor stable state, an instantaneous air pressure is obtained, which indicates that floor switching starts to occur, and then the average value of the instantaneous air pressure obtained last before the instantaneous air pressure is obtained and N-1 instantaneous air pressures obtained before the instantaneous air pressure is obtained last is determined as the second steady-state reference value, and storing the second steady-state reference value for later recall.
Wherein the first threshold and the second threshold may be the same or different.
Step S48: and if the difference value between the dynamic air pressure value and the second steady-state reference value is larger than or equal to a second threshold value, judging that the current state of the preset air pressure trigger is still the floor switching state.
After judging whether the difference between the dynamic air pressure value and the second steady-state reference value is larger than or equal to a second threshold value, if the difference between the dynamic air pressure value and the second steady-state reference value is larger than or equal to the second threshold value, judging that the current state of the preset air pressure trigger is a floor switching state. And if the difference value between the dynamic air pressure value and the second steady-state reference value is smaller than a second threshold value, the air pressure is abnormal fluctuation, and the current state of the preset air pressure trigger is still the floor steady state.
Before the current state of the preset air pressure trigger is judged to be still the floor switching state, the method further comprises the following steps: judging whether the difference value between the average values of the real-time instantaneous air pressure and a fourth instantaneous air pressure is smaller than a third threshold value, wherein the fourth instantaneous air pressure is a preset number of instantaneous air pressures acquired before the real-time instantaneous air pressure is acquired; and if the difference value between the average values of the real-time instantaneous air pressure and the fourth instantaneous air pressure is smaller than a third threshold value, judging that the air pressure is stable, finishing the floor switching state, and adjusting the preset air pressure trigger from the floor switching state to the floor stable state. That is, when the difference between the real-time instantaneous air pressure and the second steady-state reference value is continuously greater than or equal to the second threshold value, the floor switching state is maintained and the opening of the floor recognition algorithm is maintained, but when the difference between the average value of the first N-1 air pressure data and the current real-time instantaneous air pressure is smaller than the third threshold value, it is considered that the ambient air pressure is stable, the floor change is over, and at this time, the floor switching state is converted into the floor stable state, and the floor recognition algorithm is closed.
The first threshold, the second threshold, and the third threshold may be determined according to an actual application scenario, and are not specifically limited herein.
Referring to fig. 7, a flow chart of the operation of the preset air pressure trigger is shown. Here, the first threshold and the second threshold are the same and are both m hPa, and the third threshold is n hPa. When the preset air pressure trigger is in a floor stable state, calculating reference stable air pressure, then judging whether the difference value between real-time instant air pressure and first stable reference air pressure is greater than m hPa, if so, judging that the current state of the preset air pressure trigger is a floor switching state, starting a floor recognition algorithm, calculating a dynamic air pressure value, judging whether the difference value between the dynamic air pressure value and a second stable reference value is greater than m hPa, if not, judging misjudgment caused by air pressure fluctuation, returning to the floor stable state, and closing the floor recognition algorithm. If yes, the floor switching state is continued, and the floor recognition algorithm is kept started. And updating the dynamic air pressure value, and judging whether the difference value between the current instantaneous air pressure and the previous moment dynamic air pressure value is less than nhPa, wherein the previous moment dynamic air pressure value is the average value of N-1 air pressure data before the current instantaneous air pressure, if not, the floor switching state is continued, and the floor recognition algorithm is kept to be started. If yes, returning to the stable state of the floor, and closing the floor recognition algorithm.
Referring to fig. 8, an embodiment of the present invention discloses a specific positioning method applied to an Android-based mobile terminal, including:
step S51: and determining the current environment according to the acquired real-time GNSS signal.
Step S52: and if the current environment is an indoor environment, determining the current building according to the acquired real-time Wi-Fi data and a preset Wi-Fi signal map library.
Step S53: and determining the floor where the preset air pressure trigger is located according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state.
Step S54: and determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current position is located in the preset Wi-Fi signal map library.
Step S55: and determining a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian track, and taking the building, the floor and the second current horizontal coordinate as positioning results.
The specific implementation process of steps S51 to S55 can refer to the content disclosed in the foregoing embodiments, and will not be described herein again.
Step S56: and if the current environment is the outdoor environment, acquiring a third current horizontal coordinate acquired by the preset positioning device.
And after the current environment is determined, if the current environment is an outdoor environment, acquiring a third current horizontal coordinate acquired by a preset positioning device. Wherein the preset positioning device includes but is not limited to a GPS.
Step S57: and determining a positioning result based on the third current horizontal coordinate and the acquired behavior track.
After the third horizontal coordinate is acquired, a positioning result needs to be determined based on the third current horizontal coordinate and the acquired behavior track. Specifically, the positioning result may be determined based on a kalman filter algorithm, the third current horizontal coordinate, and the acquired behavior trajectory.
When the device is just in an outdoor state, an initial positioning state is carried out, a first horizontal coordinate is acquired by a preset positioning device alone, pedestrian trajectory estimation is initialized by the position, and then the device enters a continuous positioning state. And in a continuous positioning state, processing the horizontal coordinate and the pedestrian track acquired by the preset positioning device based on a Kalman filter to obtain a final positioning result in an outdoor environment.
Referring to fig. 9, an embodiment of the present invention further discloses a positioning apparatus, which is applied to an Android-based mobile terminal, and the apparatus includes: the system comprises an indoor and outdoor environment identification module 11, a Wi-Fi fingerprint positioning module 12 and a positioning result fusion module 13, wherein the Wi-Fi fingerprint positioning module comprises a building identification submodule 121, a floor identification submodule 122 and a horizontal position positioning submodule 123;
the indoor and outdoor environment identification module 11 is configured to determine a current environment according to an acquired real-time GNSS signal;
the building identification submodule 121 is configured to determine a current building according to the obtained real-time Wi-Fi data and a preset Wi-Fi signal map library when the current environment is an indoor environment;
the floor identification submodule 122 is configured to determine a floor where the preset air pressure trigger is currently located according to a current state of the preset air pressure trigger, where the current state of the preset air pressure trigger includes a floor stable state and a floor switching state;
the horizontal position positioning sub-module 123 is configured to determine a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current floor is located in the preset Wi-Fi signal map library;
the positioning result fusion module 13 is configured to determine a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and use the building, the floor, and the second current horizontal coordinate as a positioning result.
Therefore, the invention firstly determines the current environment according to the acquired real-time GNSS signal, if the current environment is an indoor environment, determining the current building according to the obtained real-time Wi-Fi data and a preset Wi-Fi signal map library, determining the current floor according to the current state of a preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state, then determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current position is in the preset Wi-Fi signal map library, a second current horizontal coordinate may then be determined based on the first current horizontal coordinate and the acquired pedestrian trajectory, and taking the current building, the current floor and the second current horizontal coordinate as positioning results. Compared with the processing method for determining whether the current environment is indoor or outdoor by using multiple sensors in the prior art, the GNSS signal-based signal classification method has the advantages of simple calculation and low hardware complexity, so that the practicability of the positioning method is improved; building and floor positioning is realized by utilizing Wi-Fi fingerprint identification, extra sensor signals are not needed, and the calculation flow is simple; in addition, the floor where the preset air pressure trigger is located is specifically determined to be in a floor stable state or a floor switching state according to the current state of the preset air pressure trigger, an absolute air pressure value or an additional mobile terminal is not needed, the floor identification accuracy is improved, the error rate is reduced, the use cost is lower, and the floor identification device can be compatible with various action scenes such as a passenger elevator or an electric hand ladder, a walk in a staircase and the like, so that the floor identification device can be suitable for different environments. In addition, the method determines whether the current environment is an indoor environment or an outdoor environment, determines the building where the current environment is located if the current environment is the indoor environment, determines the floor where the current environment is located according to the building where the current environment is located, determines the horizontal coordinate according to the floor where the current environment is located, forms a multi-dimensional layer-by-layer progressive indoor positioning method, constructs a complete positioning frame, and has higher practicability.
Specifically, the indoor and outdoor environment recognition module 11 is configured to:
determining target parameters of the acquired real-time GNSS signals;
and inputting the target parameters into a signal classifier obtained in advance, and determining the current environment according to the output of the signal classifier.
Specifically, the building identification submodule 121 is configured to:
determining Wi-Fi fingerprints of all buildings in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library;
respectively determining first similarity of the real-time Wi-Fi data and Wi-Fi fingerprints of the buildings;
and determining the current building according to the first similarity.
Further, the horizontal position positioning sub-module 123 is configured to:
and determining the first current horizontal coordinate according to the WKNN algorithm, the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current station is located in the preset Wi-Fi signal map library.
Specifically, the positioning result fusion module 13 is configured to:
and determining the second current horizontal coordinate based on a Kalman filtering algorithm, the first current horizontal coordinate and the acquired pedestrian track.
Further, the positioning device further includes:
the preset positioning device is used for acquiring a third current horizontal coordinate when the current environment is an outdoor environment;
correspondingly, the positioning result fusion module 13 is configured to: and determining a positioning result based on the third current horizontal coordinate and the acquired behavior track.
The floor identification submodule 122 is configured to: when the preset air pressure trigger is in a floor stable state at present, taking the floor determined when the real-time Wi-Fi data is obtained last time as the floor where the preset air pressure trigger is located at present;
and when the preset air pressure trigger is in a floor switching state currently, determining the floor where the preset air pressure trigger is located currently according to the real-time Wi-Fi data and the Wi-Fi signal map set corresponding to the building where the preset air pressure trigger is located currently in the preset Wi-Fi signal map library.
Further, the floor identification submodule 122 is configured to:
determining a Wi-Fi signal map set corresponding to the building where the current building is located from the preset Wi-Fi signal map library;
respectively determining second similarity of the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal map set, wherein one Wi-Fi signal map of the Wi-Fi signal map set comprises a plurality of Wi-Fi fingerprints, and one Wi-Fi signal map corresponds to one floor;
determining a preselected Wi-Fi fingerprint according to the second similarity;
determining floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprints;
and determining the floor with the largest occurrence frequency in the floor information as the current floor.
Specifically, the positioning device further includes:
a pneumatic trigger state determination module to: and determining the current state of the preset air pressure trigger according to the stored state in the preset air pressure trigger and the acquired real-time instant air pressure.
Specifically, the air pressure trigger state determination module is configured to:
when the stored state in the preset air pressure trigger is a floor stable state, taking the real-time instant air pressure and first instant air pressure acquired by the preset air pressure trigger as a sliding air pressure sequence, wherein the first instant air pressure is a preset number of instant air pressures acquired before the real-time instant air pressure is acquired;
determining an average value of the sliding air pressure sequence as a first steady-state reference value;
judging whether the difference value between the real-time instantaneous air pressure and the first steady-state reference value is larger than or equal to a first threshold value or not;
and if the difference value between the real-time instantaneous air pressure and the first steady-state reference value is larger than or equal to a first threshold value, judging that the current state of the preset air pressure trigger is a floor switching state.
Specifically, the air pressure trigger state determination module is configured to:
when the stored state in the preset air pressure trigger is a floor switching state, taking real-time instant air pressure and second instant air pressure acquired by the preset air pressure trigger as a sliding air pressure sequence, wherein the second instant air pressure is a preset number of instant air pressures acquired before the real-time instant air pressure is acquired;
determining an average value of the sliding air pressure sequence as a dynamic air pressure value;
judging whether the difference value between the dynamic air pressure value and a second steady-state reference value is larger than or equal to a second threshold value or not, wherein the second steady-state reference value is the average value of the instantaneous air pressure obtained last time before the preset air pressure trigger is in the floor switching state and third instantaneous air pressure, and the third instantaneous air pressure is a preset number of instantaneous air pressures obtained before the instantaneous air pressure is obtained last time before the preset air pressure trigger is in the floor switching state;
and if the difference value between the dynamic air pressure value and the second steady-state reference value is larger than or equal to a second threshold value, judging that the current state of the preset air pressure trigger is still the floor switching state.
In addition, the pneumatic trigger state determination module is further configured to:
judging whether the difference value between the average values of the real-time instantaneous air pressure and a fourth instantaneous air pressure is smaller than a third threshold value, wherein the fourth instantaneous air pressure is a preset number of instantaneous air pressures acquired before the real-time instantaneous air pressure is acquired;
and if the difference value between the average values of the real-time instantaneous air pressure and the fourth instantaneous air pressure is smaller than a third threshold value, judging that the air pressure is stable, finishing the floor switching state, and adjusting the preset air pressure trigger from the floor switching state to the floor stable state.
In a specific implementation process, the positioning device further comprises a pedestrian trajectory estimation module for determining a pedestrian trajectory.
Referring to fig. 10, a positioning flow chart is shown. The current indoor or outdoor environment is first determined by an indoor-outdoor environment recognition module. And if the environment is the outdoor environment, starting a GPS positioning module (namely the preset positioning device), a pedestrian track calculation module and a positioning result fusion module, and entering an initial positioning state. In the initial positioning state, the GPS positioning module acquires a first horizontal coordinate independently, and the pedestrian trajectory estimation module is initialized by the position, and then the continuous positioning state is entered. And under the continuous positioning state, a positioning result fusion module constructed based on the Kalman filter processes the positioning results respectively obtained by the GPS positioning module and the pedestrian trajectory calculation module to obtain a final positioning result under the outdoor environment. If the environment is indoor, the Wi-Fi fingerprint positioning module, the pedestrian track calculation module and the positioning result fusion module are started, and then the initial positioning state is entered. In the initial positioning state, sequentially calculating the current building, the current floor and a first horizontal coordinate by a building identification submodule, a floor positioning submodule and a horizontal position positioning submodule; then the horizontal coordinate is used as the initial position of the pedestrian track estimation module and enters a continuous positioning state. In the continuous positioning state, the building identification submodule is kept on and calculated, and the floor positioning submodule starts or closes floor identification calculation according to the triggering result of the air pressure trigger. The horizontal position positioning sub-module is kept started and calculated, and the horizontal coordinate of the pedestrian is obtained after the calculation result and the pedestrian track calculation result are processed by the positioning result fusion module. And finally, outputting the current building, floor and horizontal coordinate as a comprehensive positioning result.
Referring to fig. 11, an embodiment of the present invention further discloses an Android-based mobile terminal, including:
a processor 21 and a memory 22;
wherein the memory 22 is used for storing a computer program;
the processor 21 is configured to execute the computer program to implement the positioning method steps disclosed in the foregoing embodiments.
For the specific process of the positioning method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
In addition, the embodiment of the present invention further discloses a computer-readable storage medium for storing a computer program, and the computer program is executed by a processor to implement the steps of the positioning method disclosed in the foregoing embodiment.
For the specific process of the positioning method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or mobile terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or mobile terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or mobile terminal that comprises the element.
The positioning method, the positioning device, the mobile terminal, and the storage medium provided by the present invention are described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (15)

  1. The positioning method is characterized by being applied to a mobile terminal based on Android and comprising the following steps:
    determining the current environment according to the acquired real-time GNSS signal;
    if the current environment is an indoor environment, determining the current building according to the acquired real-time Wi-Fi data and a preset Wi-Fi signal map library;
    determining a current floor according to the current state of a preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state;
    determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current position is located in the preset Wi-Fi signal map library;
    and determining a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian track, and taking the building, the floor and the second current horizontal coordinate as positioning results.
  2. The method according to claim 1, wherein the determining a current environment according to the acquired real-time GNSS signals comprises:
    determining target parameters of the acquired real-time GNSS signals;
    and inputting the target parameters into a signal classifier obtained in advance, and determining the current environment according to the output of the signal classifier.
  3. The positioning method according to claim 1, wherein the determining of the current building according to the acquired real-time Wi-Fi data and a preset Wi-Fi signal map library comprises:
    determining Wi-Fi fingerprints of all buildings in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library;
    respectively determining first similarity of the real-time Wi-Fi data and Wi-Fi fingerprints of the buildings;
    and determining the current building according to the first similarity.
  4. The method according to claim 1, wherein the determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to a floor currently located in the preset Wi-Fi signal map library comprises:
    and determining the first current horizontal coordinate according to the WKNN algorithm, the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current station is located in the preset Wi-Fi signal map library.
  5. The method according to claim 1, wherein determining a second current horizontal coordinate based on the first current horizontal coordinate and the acquired pedestrian trajectory comprises:
    and determining the second current horizontal coordinate based on a Kalman filtering algorithm, the first current horizontal coordinate and the acquired pedestrian track.
  6. The method according to claim 1, wherein after determining the current environment according to the acquired real-time GNSS signals, the method further comprises:
    if the current environment is an outdoor environment, acquiring a third current horizontal coordinate acquired by a preset positioning device;
    and determining a positioning result based on the third current horizontal coordinate and the acquired behavior track.
  7. The method according to claim 1, wherein the determining the current floor according to the current state of the preset air pressure trigger comprises:
    if the preset air pressure trigger is in a floor stable state at present, taking the floor determined when the real-time Wi-Fi data is obtained last time as the floor where the preset air pressure trigger is located at present;
    and if the preset air pressure trigger is in a floor switching state currently, determining the floor where the current air pressure trigger is located according to the real-time Wi-Fi data and the Wi-Fi signal map set corresponding to the current building in the preset Wi-Fi signal map library.
  8. The method of claim 7, wherein the determining the current floor according to the real-time Wi-Fi data and the Wi-Fi signal map set corresponding to the current floor in the preset Wi-Fi signal map library comprises:
    determining a Wi-Fi signal map set corresponding to the building where the current building is located from the preset Wi-Fi signal map library;
    respectively determining second similarity of the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal map set, wherein one Wi-Fi signal map of the Wi-Fi signal map set comprises a plurality of Wi-Fi fingerprints, and one Wi-Fi signal map corresponds to one floor;
    determining a preselected Wi-Fi fingerprint according to the second similarity;
    determining floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprints;
    and determining the floor with the largest occurrence frequency in the floor information as the current floor.
  9. The method according to any one of claims 1 to 8, wherein before determining the current floor according to the current state of the preset air pressure trigger, the method further comprises:
    and determining the current state of the preset air pressure trigger according to the stored state in the preset air pressure trigger and the acquired real-time instant air pressure.
  10. The method according to claim 9, wherein the determining the current state of the preset air pressure trigger according to the saved state of the preset air pressure trigger and the obtained real-time instant air pressure comprises:
    if the stored state in the preset air pressure trigger is a floor stable state, taking the real-time instant air pressure and first instant air pressure acquired by the preset air pressure trigger as a sliding air pressure sequence, wherein the first instant air pressure is a preset number of instant air pressures acquired before the real-time instant air pressure is acquired;
    determining an average value of the sliding air pressure sequence as a first steady-state reference value;
    judging whether the difference value between the real-time instantaneous air pressure and the first steady-state reference value is larger than or equal to a first threshold value or not;
    and if the difference value between the real-time instantaneous air pressure and the first steady-state reference value is larger than or equal to a first threshold value, judging that the current state of the preset air pressure trigger is a floor switching state.
  11. The method according to claim 9, wherein the determining the current state of the preset air pressure trigger according to the saved state of the preset air pressure trigger and the obtained real-time instant air pressure comprises:
    if the stored state in the preset air pressure trigger is a floor switching state, taking the real-time instant air pressure and second instant air pressure acquired by the preset air pressure trigger as a sliding air pressure sequence, wherein the second instant air pressure is a preset number of instant air pressures acquired before the real-time instant air pressure is acquired;
    determining an average value of the sliding air pressure sequence as a dynamic air pressure value;
    judging whether the difference value between the dynamic air pressure value and a second steady-state reference value is larger than or equal to a second threshold value or not, wherein the second steady-state reference value is the average value of the instantaneous air pressure obtained last time before the preset air pressure trigger is in the floor switching state and a third instantaneous air pressure which is a preset number of instantaneous air pressures obtained before the instantaneous air pressure is obtained last time;
    and if the difference value between the dynamic air pressure value and the second steady-state reference value is larger than or equal to a second threshold value, judging that the current state of the preset air pressure trigger is still the floor switching state.
  12. The method according to claim 11, wherein before determining that the preset air pressure trigger is still in the floor switching state, the method further comprises:
    judging whether the difference value between the average values of the real-time instantaneous air pressure and a fourth instantaneous air pressure is smaller than a third threshold value, wherein the fourth instantaneous air pressure is a preset number of instantaneous air pressures acquired before the real-time instantaneous air pressure is acquired;
    and if the difference value between the average values of the real-time instantaneous air pressure and the fourth instantaneous air pressure is smaller than a third threshold value, judging that the air pressure is stable, finishing the floor switching state, and adjusting the preset air pressure trigger from the floor switching state to the floor stable state.
  13. A positioning device is applied to a mobile terminal based on Android, and the device comprises: the system comprises an indoor and outdoor environment identification module, a Wi-Fi fingerprint positioning module and a positioning result fusion module, wherein the Wi-Fi fingerprint positioning module comprises a building identification submodule, a floor identification submodule and a horizontal position positioning submodule;
    the indoor and outdoor environment identification module is used for determining the current environment according to the acquired real-time GNSS signal;
    the building identification submodule is used for determining the building where the current building is located according to the obtained real-time Wi-Fi data and a preset Wi-Fi signal map library when the current environment is an indoor environment;
    the floor identification submodule is used for determining a floor where the preset air pressure trigger is located according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger comprises a floor stable state and a floor switching state;
    the horizontal position positioning sub-module is used for determining a first current horizontal coordinate according to the real-time Wi-Fi data and a Wi-Fi signal map corresponding to the floor where the current position is located in the preset Wi-Fi signal map library;
    and the positioning result fusion module is used for determining a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian track, and taking the building, the floor and the second current horizontal coordinate as positioning results.
  14. A mobile terminal based on Android, characterized by comprising: a memory and a processor;
    wherein the memory is used for storing a computer program;
    the processor is configured to execute the computer program to implement the positioning method according to any one of claims 1 to 12.
  15. A computer-readable storage medium for storing a computer program, wherein the computer program, when being executed by a processor, is adapted to carry out the steps of the positioning method according to any one of claims 1 to 12.
CN202080026964.7A 2020-07-28 Positioning method, positioning device, mobile terminal and storage medium Active CN114208221B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/105024 WO2022021040A1 (en) 2020-07-28 2020-07-28 Positioning method and apparatus, mobile terminal, and storage medium

Publications (2)

Publication Number Publication Date
CN114208221A true CN114208221A (en) 2022-03-18
CN114208221B CN114208221B (en) 2024-06-07

Family

ID=

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014180219A1 (en) * 2013-10-21 2014-11-13 中兴通讯股份有限公司 Locating method, device and terminal and computer storage medium
CN106714102A (en) * 2016-11-15 2017-05-24 南京航空航天大学 Method of using intelligent mobile phone to assist indoor positioning
CN109525935A (en) * 2018-11-23 2019-03-26 武汉大学 A kind of intelligent floor cognitive method and control system for pervasive indoor environment
CN109982245A (en) * 2019-04-04 2019-07-05 南京邮电大学 A kind of interior real-time three-dimensional localization method
CN110231593A (en) * 2019-04-11 2019-09-13 深圳市城市交通规划设计研究中心有限公司 Indoor orientation method, device, computer readable storage medium and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014180219A1 (en) * 2013-10-21 2014-11-13 中兴通讯股份有限公司 Locating method, device and terminal and computer storage medium
CN106714102A (en) * 2016-11-15 2017-05-24 南京航空航天大学 Method of using intelligent mobile phone to assist indoor positioning
CN109525935A (en) * 2018-11-23 2019-03-26 武汉大学 A kind of intelligent floor cognitive method and control system for pervasive indoor environment
CN109982245A (en) * 2019-04-04 2019-07-05 南京邮电大学 A kind of interior real-time three-dimensional localization method
CN110231593A (en) * 2019-04-11 2019-09-13 深圳市城市交通规划设计研究中心有限公司 Indoor orientation method, device, computer readable storage medium and terminal device

Also Published As

Publication number Publication date
JP2023527526A (en) 2023-06-29
WO2022021040A1 (en) 2022-02-03
JP7446644B2 (en) 2024-03-11

Similar Documents

Publication Publication Date Title
CN109298389B (en) Indoor pedestrian combination pose estimation method based on multi-particle swarm optimization
CN109525935B (en) Intelligent floor sensing method and control system for universal indoor environment
Chriki et al. SVM-based indoor localization in wireless sensor networks
WO2022021040A1 (en) Positioning method and apparatus, mobile terminal, and storage medium
CN110958575B (en) Positioning method and system based on WiFi fusion prediction
US9244152B1 (en) Determining device locations using movement, signal strength
CN101271333B (en) Localization method for a moving robot
CN110728650B (en) Well lid depression detection method based on intelligent terminal and related equipment
US8953039B2 (en) System and method for auto-commissioning an intelligent video system
CN108449712B (en) Building floor determination method based on Wi-Fi signal fingerprint information
US11714426B2 (en) Positioning system and method based on neural network model
CN107909027A (en) It is a kind of that there is the quick human body target detection method for blocking processing
KR101652261B1 (en) Method for detecting object using camera
EP3438875A1 (en) Image processing apparatus and control method therefor
CN111639570B (en) Online multi-target tracking method based on motion model and single-target clue
CN113281718B (en) 3D multi-target tracking system and method based on laser radar scene flow estimation
KR101967394B1 (en) Apparatus and method for correcting indoor position
KR20120112293A (en) Apparatus and method for detecting position of moving unit
KR20130091441A (en) Object tracking device and method for controlling thereof
CN108462939B (en) Indoor positioning method for geomagnetic time sequence analysis
CN114208221B (en) Positioning method, positioning device, mobile terminal and storage medium
CN108924753B (en) Method and apparatus for real-time detection of scenes
Wietrzykowski et al. Adopting the FAB-MAP algorithm for indoor localization with WiFi fingerprints
CN114674317A (en) Self-correcting dead reckoning system and method based on activity recognition and fusion filtering
KR102269074B1 (en) Method and apparatus for determining positions in indoor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant