WO2022021040A1 - Positioning method and apparatus, mobile terminal, and storage medium - Google Patents

Positioning method and apparatus, mobile terminal, and storage medium Download PDF

Info

Publication number
WO2022021040A1
WO2022021040A1 PCT/CN2020/105024 CN2020105024W WO2022021040A1 WO 2022021040 A1 WO2022021040 A1 WO 2022021040A1 CN 2020105024 W CN2020105024 W CN 2020105024W WO 2022021040 A1 WO2022021040 A1 WO 2022021040A1
Authority
WO
WIPO (PCT)
Prior art keywords
air pressure
current
floor
preset
state
Prior art date
Application number
PCT/CN2020/105024
Other languages
French (fr)
Chinese (zh)
Inventor
陈尊裕
胡斯洋
方雄
吴珏其
陈欣
吴沛谦
张仲文
Original Assignee
蜂图志科技控股有限公司
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 蜂图志科技控股有限公司 filed Critical 蜂图志科技控股有限公司
Priority to CN202080026964.7A priority Critical patent/CN114208221B/en
Priority to JP2022571313A priority patent/JP7446644B2/en
Priority to PCT/CN2020/105024 priority patent/WO2022021040A1/en
Publication of WO2022021040A1 publication Critical patent/WO2022021040A1/en

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

Definitions

  • the present invention relates to the technical field of positioning, and in particular, to a positioning method, a device, a mobile terminal and a storage medium.
  • the existing floor recognition technology mainly uses the mobile phone air pressure sensor to obtain the real-time absolute air pressure value of the floor, and then compares the local standard sea level air pressure record to estimate the height and floor; or uses sensors such as magnetic field and accelerometer to capture the pedestrian walking in the stairwell. Signal characteristics to estimate the change of floor where pedestrians are located.
  • sensors such as proximity sensors, light sensors and magnetic field sensors, to distinguish the indoor or outdoor environment where pedestrians are located and activate the corresponding positioning module.
  • the purpose of the present invention is to provide a positioning method, device, mobile terminal, and storage medium, which can meet indoor and outdoor positioning requirements, and can automatically identify buildings, floors and complete horizontal positioning in indoor environments, especially to reduce positioning. complexity and floor recognition error rate, thereby improving the practicability of the localization method. Its specific plan is as follows:
  • the present invention discloses a positioning method, which is applied to an Android-based mobile terminal, including:
  • the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library;
  • the current floor is determined according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state;
  • a second current horizontal coordinate is 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 a positioning result.
  • determining the current environment according to the acquired real-time GNSS signal including:
  • the target parameter is input into a pre-obtained signal classifier, and the current environment is determined according to the output of the signal classifier.
  • determining the current building according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library including:
  • the current building is determined according to the first similarity.
  • determining the first current horizontal coordinates according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library includes:
  • the first current horizontal coordinate is determined according to the WKNN algorithm, the real-time Wi-Fi data, and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library.
  • determining the second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory including:
  • the second current horizontal coordinate is determined based on the Kalman filter algorithm, the first current horizontal coordinate and the acquired pedestrian trajectory.
  • the method further includes:
  • the current environment is an outdoor environment, acquiring the third current horizontal coordinate collected by the preset positioning device;
  • the positioning result is determined based on the third current horizontal coordinate and the acquired behavior track.
  • the determining the current floor according to the current state of the preset air pressure trigger includes:
  • the floor determined when the real-time Wi-Fi data was acquired last time is used as the current floor;
  • the current Wi-Fi signal atlas corresponding to the current building is determined according to the real-time Wi-Fi data and the preset Wi-Fi signal map library. floor.
  • determining the current floor according to the real-time Wi-Fi data and the Wi-Fi signal atlas corresponding to the current building in the preset Wi-Fi signal atlas including:
  • a Wi-Fi signal map in the Wi-Fi signal atlas includes multiple Wi-Fi fingerprint, a Wi-Fi signal map corresponds to a floor;
  • the floor with the largest number of occurrences in the floor information is determined as the current floor.
  • the method before determining the current floor according to the current state of the preset air pressure trigger, the method further includes:
  • the current state of the preset air pressure trigger is determined according to the saved state of the preset air pressure trigger and the acquired real-time instantaneous air pressure.
  • determining the current state of the preset air pressure trigger according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure including:
  • the real-time instantaneous air pressure and the first instantaneous air pressure obtained by the preset air pressure trigger are used as a sliding air pressure sequence, wherein the first air pressure
  • the instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained;
  • 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, it is determined that the current state of the preset air pressure trigger is a floor switching state.
  • determining the current state of the preset air pressure trigger according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure including:
  • the real-time instantaneous air pressure and the second instantaneous air pressure obtained by the preset air pressure trigger are used as a sliding air pressure sequence, wherein the second instantaneous air pressure
  • the air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained;
  • the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, it is determined that the current state of the preset air pressure trigger is still a floor switching state.
  • the method further includes:
  • the floor switching state ends, and the preset air pressure trigger is adjusted from the floor switching state to the floor stable state.
  • the present invention discloses a positioning device, which is applied to an Android-based mobile terminal.
  • the device includes: an indoor and outdoor environment identification module, a Wi-Fi fingerprint positioning module, and a positioning result fusion module.
  • the Wi-Fi fingerprint includes a building identification sub-module, a floor identification sub-module, and a horizontal position positioning sub-module;
  • the indoor and outdoor environment identification module is used to determine the current environment according to the acquired real-time GNSS signal
  • the building identification sub-module is used to determine the current building according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library when the current environment is an indoor environment;
  • the floor identification sub-module is configured to determine the current floor according to the current state of the preset air pressure trigger, wherein 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 is used to determine the first current horizontal coordinate according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library ;
  • the positioning result fusion module is used to determine the second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and combine the current building, the current floor and the second current horizontal coordinate.
  • the current horizontal coordinate is used as the positioning result.
  • an Android-based mobile terminal comprising:
  • the memory is used to store computer programs
  • the processor is configured to execute the computer program to implement the steps of the aforementioned positioning method.
  • the present invention further discloses a computer-readable storage medium for storing a computer program, which implements the steps of the foregoing positioning method when the computer program is executed by a processor.
  • the present invention first determines the current environment according to the acquired real-time GNSS signals. If the current environment is an indoor environment, the current location is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library. building, and determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes the floor stability state and the floor switching state, and then according to the real-time Wi-Fi
  • the first current horizontal coordinate can be determined based on the data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library, and then the first current horizontal coordinate can be determined based on the first current horizontal coordinate and the obtained pedestrian trajectory.
  • the second current horizontal coordinate, and the currently located building, the currently located floor and the second current horizontal coordinate are used as the positioning result.
  • the signal classification method based on the GNSS signal of the present application has the advantages of simple calculation and low hardware complexity, thereby improving the positioning method.
  • Wi-Fi fingerprint recognition to achieve building and floor positioning, no additional sensor signals are required, and the calculation process is simple; in addition, the current state of the preset air pressure trigger is determined according to whether the current state of the air pressure trigger is the floor stable state or the floor switching state.
  • the current floor does not require an absolute air pressure value or an additional mobile terminal, which improves the accuracy of floor recognition, reduces the error rate, and lowers the cost of use. It is compatible with passenger lifts or escalators, and walking in stairwells, etc. A variety of action scenarios make floor recognition applicable in different environments.
  • the present application first determines whether the current environment is an indoor environment or an outdoor environment, and if the current environment is an indoor environment, then determines the current building, then determines the current floor according to the current building, and then determines the horizontal coordinates according to the current floor. , forming a multi-dimensional progressive indoor positioning method, constructing a complete positioning framework, with stronger practicability.
  • FIG. 1 is a flowchart of a positioning method disclosed in an embodiment of the present invention.
  • FIG. 3 is a flowchart of a building identification disclosed in an embodiment of the present invention.
  • FIG. 5 is a flow chart of a floor identification disclosed in an embodiment of the present invention.
  • FIG. 6 is a partial flowchart of a specific positioning method disclosed in an embodiment of the present invention.
  • FIG. 7 is a flow chart for determining the state of an air pressure trigger disclosed in an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a positioning device disclosed in an embodiment of the present invention.
  • FIG. 10 is a working flowchart of a positioning device disclosed in an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of an Android-based mobile terminal disclosed in an embodiment of the present invention.
  • an embodiment of the present invention discloses a positioning method, which is applied to an Android-based mobile terminal, including:
  • Step S11 Determine the current environment according to the acquired real-time GNSS signal.
  • the real-time GNSS signals include but are not limited to Beidou signals and GPS (Global Positioning System, global positioning system) signals.
  • Determining the current environment according to the acquired real-time GNSS signals includes: determining the acquired target parameters of the real-time GNSS signals; inputting the target parameters into a pre-obtained signal classifier, and classifying them according to the signals The output of the device determines the current environment.
  • the target parameter may be a signal-to-noise ratio parameter.
  • the acquired signal-to-noise ratio parameter of the real-time GNSS signal may be determined first; then the signal-to-noise ratio parameter is input into a pre-obtained signal classifier, and the current environment is determined according to the output of the signal classifier.
  • the signal classifier before using the signal classifier to classify the acquired real-time GNSS signals to determine the current environment, it is also necessary to use multiple sets of GNSS signals collected in the indoor environment and the outdoor environment as training samples. , and extract the signal-to-noise ratio parameter of the GNSS signal in the training sample, input the signal-to-noise ratio parameter of the GNSS signal in the training sample into the training model based on the decision tree algorithm, and obtain the signal classifier after completing the training.
  • Step S12 If the current environment is an indoor environment, the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library.
  • the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library.
  • the Wi-Fi information map library includes pre-collected Wi-Fi information maps of different buildings, wherein one building corresponds to one or more Wi-Fi information maps, and one floor corresponds to one Wi-Fi information map.
  • Fi signal map a Wi-Fi signal map is a data set that records multiple Wi-Fi fingerprints on the same floor in an orderly manner, which can provide Wi-Fi signal characteristics on known horizontal coordinates for Wi-Fi fingerprint positioning calculation. In the same building, each floor independently corresponds to a Wi-Fi signal map.
  • Step S13 Determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state.
  • the current floor needs to be determined according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state. If the current state of the preset air pressure trigger is the floor stable state, it means that it is currently in the floor unchanged state; if the current state of the preset air pressure trigger is the floor switching state, it means that it is currently in the floor change state .
  • the determining the current floor according to the current state of the preset air pressure trigger includes: if the preset air pressure trigger is currently in a stable floor state, determining when the real-time Wi-Fi data is acquired last time If the preset air pressure trigger is currently in the floor switching state, the map library corresponds to the current building according to the real-time Wi-Fi data and the preset Wi-Fi signal.
  • the Wi-Fi signal atlas to determine the current floor. 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 was acquired last time can be directly used as the current floor. If the device is currently in a floor switching state, the current floor is determined according to the real-time Wi-Fi data and the Wi-Fi signal atlas corresponding to the current building in the preset Wi-Fi signal atlas.
  • the method further includes: determining the preset air pressure according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure.
  • the current state of the air pressure trigger is determining the preset air pressure according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure.
  • the floor recognition algorithm can be turned off first, and when the preset air pressure trigger detects that the state is the floor switching state, it is turned on Floor recognition algorithm, which uses air pressure change as an auxiliary trigger mechanism of floor recognition algorithm, and then performs floor recognition when pedestrians are indeed in the state of floor switching, which effectively controls the calculation frequency, reduces calculation overhead and energy consumption, and effectively reduces recognition error rate. .
  • Step S14 Determine the first current horizontal coordinate according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library.
  • the first current horizontal coordinates need to be determined according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library. That is, after the current floor is determined, the specific position on the current floor is still uncertain, and the first current horizontal coordinate needs to be further determined.
  • the first current horizontal coordinate may be determined according to the WKNN algorithm, the real-time Wi-Fi data, and the Wi-Fi signal map corresponding to the current floor 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 current floor in the preset Wi-Fi signal map library can be calculated first, and then The weight of the horizontal coordinates corresponding to each Wi-Fi fingerprint on the current floor is determined based on the calculated similarity, and the first current horizontal coordinate is determined based on the determined weight and each horizontal coordinate on the current floor.
  • the Wi-Fi signal map corresponding to the current floor includes three Wi-Fi fingerprints, namely A, B, and C.
  • Each Wi-Fi fingerprint corresponds to a horizontal coordinate of the current floor, and real-time Wi-Fi data is calculated.
  • the similarity with A is 0.4
  • the similarity between real-time Wi-Fi data and B is 0.5
  • the similarity between real-time Wi-Fi data and C is 0.6
  • the weight of the horizontal coordinate corresponding to A is 0.2667
  • the horizontal coordinate corresponding to B The weight of C is 0.3333
  • the weight of the horizontal coordinate corresponding to C is 0.4.
  • Step S15 Determine a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and use the current building, the current floor and the second current horizontal coordinate as a positioning result.
  • the first current horizontal coordinate is determined, it is also necessary to determine the second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and the current building, the current The floor and the second current horizontal coordinate are used as the positioning result.
  • the determining the second current horizontal coordinate based on the first current horizontal coordinate and the acquired pedestrian trajectory includes: determining based on the Kalman filter algorithm, the first current horizontal coordinate and the acquired pedestrian trajectory the second current horizontal coordinate.
  • the pedestrian trajectory is taken as the intrinsic inertia prediction value
  • the first current horizontal coordinate is the external measurement value
  • the two are fused based on the Kalman filter algorithm
  • the horizontal position coordinate of the pedestrian is optimally estimated to obtain the second horizontal coordinate.
  • the pedestrian trajectory needs to be acquired first.
  • enter the initialization positioning state that is, determine the building, floor and the first horizontal coordinate in turn, use the first horizontal coordinate as the initial position of the pedestrian trajectory estimation, and perform continuous positioning to obtain the pedestrian. trajectory.
  • Determining the second current horizontal coordinate based on the first current horizontal coordinate determined according to the Wi-Fi data and the obtained pedestrian trajectory can make the position of the second current horizontal coordinate more accurate, so as to solve the problem of relying solely on Wi-Fi positioning or The error caused by pedestrian trajectory positioning alone is relatively large.
  • the present invention first determines the current environment according to the acquired real-time GNSS signals. If the current environment is an indoor environment, the current location is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library. building, and determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes the floor stability state and the floor switching state, and then according to the real-time Wi-Fi
  • the first current horizontal coordinate can be determined based on the data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library, and then the first current horizontal coordinate can be determined based on the first current horizontal coordinate and the obtained pedestrian trajectory.
  • the second current horizontal coordinate, and the currently located building, the currently located floor and the second current horizontal coordinate are used as the positioning result.
  • the signal classification method based on the GNSS signal of the present application has the advantages of simple calculation and low hardware complexity, thereby Improve the practicability of the positioning method; use Wi-Fi fingerprint recognition to realize building and floor positioning without additional sensor signals, and the calculation process is simple; in addition, according to the preset pressure trigger, the current state is the floor stable state or the floor switching state Specifically determining the current floor, no absolute air pressure value or additional mobile terminal is required, which improves the accuracy of floor recognition, reduces the error rate, and lowers the cost of use.
  • this application first determines whether the current environment is an indoor environment or an outdoor environment, and if the current environment is an indoor environment, then determines the current building, then determines the current floor according to the current building, and then determines the horizontal coordinates according to the current floor. , forming a multi-dimensional progressive indoor positioning method, constructing a complete positioning framework, with stronger practicability.
  • the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library, which may specifically include:
  • Step S21 If the current environment is an indoor environment, determine the Wi-Fi fingerprints of each building in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library.
  • the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library. Specifically, it is necessary to first determine the Wi-Fi fingerprints of each building in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library.
  • the Wi-Fi information map library includes pre-collected Wi-Fi information maps of different buildings, one building corresponds to one or more Wi-Fi information maps, and one floor corresponds to one Wi-Fi signal Map, a Wi-Fi signal map is a data set that records multiple Wi-Fi fingerprints on the same floor in an orderly manner, which can provide Wi-Fi signal characteristics on known horizontal coordinates for Wi-Fi fingerprint positioning calculation.
  • each floor independently corresponds to a Wi-Fi signal map. Therefore, it is necessary to first determine the Wi-Fi fingerprints of each building in the preset Wi-Fi signal map library.
  • determining the Wi-Fi fingerprint of any building in the preset Wi-Fi signal map library includes: calculating the Wi-Fi fingerprint in each Wi-Fi signal map corresponding to the building in the preset Wi-Fi signal map library -The average value of Fi fingerprints to get the corresponding Wi-Fi fingerprints of the building.
  • Step S22 Determine the first similarity between the real-time Wi-Fi data and the Wi-Fi fingerprints of each of the buildings, respectively.
  • the first similarity between the real-time Wi-Fi data and the Wi-Fi fingerprints of each building needs to be calculated separately.
  • the similarity algorithm in the process of determining the first similarity is not specifically limited here, and may be determined according to the actual situation.
  • Step S23 Determine the current building according to the first similarity.
  • the current building is determined according to the first similarity. Specifically, the building corresponding to the largest first similarity is determined as the current building.
  • FIG. 3 it is a flowchart of building identification.
  • the preset air pressure trigger when the preset air pressure trigger is currently in a floor switching state, according to the real-time Wi-Fi data and the Wi-Fi signal corresponding to the current building in the map library of the preset Wi-Fi signal
  • the Fi signal atlas determines the current floor, including:
  • Step S31 Determine a Wi-Fi signal atlas corresponding to the current building from the preset Wi-Fi signal atlas.
  • the current floor needs to be determined according to the current state of the preset air pressure trigger. If the preset air pressure trigger is currently in a floor switching state, the current Wi-Fi signal atlas corresponding to the current building is determined according to the real-time Wi-Fi data and the preset Wi-Fi signal map library. floor.
  • the current building may include one or more floors, and each floor corresponds to a Wi-Fi signal map, so it is necessary to determine the Wi-Fi signal atlas corresponding to the current building.
  • the Wi-Fi signal atlas can be Include one or more Wi-Fi signal maps.
  • Step S32 Determine the second similarity between the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal atlas, wherein, in a Wi-Fi signal map of the Wi-Fi signal atlas Including multiple Wi-Fi fingerprints, one Wi-Fi signal map corresponds to one floor.
  • the second similarity between the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal atlas can be determined, wherein the Wi-Fi A Wi-Fi signal map of the signal atlas includes multiple Wi-Fi fingerprints, and one Wi-Fi signal map corresponds to one floor.
  • the Wi-Fi signal map corresponding to each floor includes 3 Wi-Fi fingerprints, it is necessary to calculate the difference between the real-time Wi-Fi data and the 9 Wi-Fi fingerprints respectively. the second similarity.
  • Step S33 Determine a preselected Wi-Fi fingerprint according to the second similarity.
  • a preset Wi-Fi fingerprint may be determined according to the second similarity. Specifically, the second degrees of similarity may be sorted in descending order, and then the Wi-Fi fingerprints corresponding to the first k second degrees of similarity are determined as the pre-selected Wi-Fi fingerprints, where k is For a positive integer greater than or equal to 1, the specific value of k can be determined according to the actual situation, which is not specifically limited here.
  • Step S34 Determine the floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprints.
  • the floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprints also needs to be determined. Specifically, it is to determine which floor of the current building the floor corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprint is.
  • Step S35 Determine the floor with the largest number of occurrences in the floor information as the current floor.
  • the floor with the largest number of occurrences in the floor information can be determined as the current floor.
  • the pre-selected Wi-Fi fingerprints include 5 Wi-Fi fingerprints.
  • the floor corresponding to 3 Wi-Fi fingerprints is the 6th floor
  • the floor corresponding to 2 Wi-Fi fingerprints is the 5th floor.
  • the floor is the 6th floor.
  • the positioning is in the initial positioning state, and the floor, building and horizontal coordinates need to be obtained. At this time, it is not necessary to judge the state of the preset air pressure trigger, and directly according to the obtained real-time Wi-Fi data and the Wi-Fi signal atlas corresponding to the building in the preset Wi-Fi signal atlas to determine the floor.
  • FIG. 5 it is a flow chart of floor identification.
  • k is a positive integer greater than or equal to 1.
  • the current state of the preset air pressure trigger is determined according to the saved state in the preset air pressure trigger and the obtained real-time instantaneous air pressure, which may specifically include:
  • Step S41 If the saved state in the preset air pressure trigger is the floor stable state, the real-time instantaneous air pressure and the first instantaneous air pressure obtained by the preset air pressure trigger are used as the sliding air pressure sequence, wherein the The first instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained.
  • the real-time instantaneous air pressure and the first instantaneous air pressure obtained by the preset air pressure trigger are used as the sliding air pressure sequence , wherein the first instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained.
  • the first instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained.
  • the instantaneous air pressure and the real-time instantaneous air pressure are used as a sliding air pressure sequence to form a sliding air pressure sequence including N instantaneous air pressures.
  • N is a positive integer greater than or equal to 1, and the value of N can be determined according to the actual situation, which is specifically limited here.
  • Step S42 Determine the average value of the sliding air pressure sequence as the first steady-state reference value.
  • the average value of the sliding air pressure sequence is calculated, so that the average value of the sliding air pressure sequence is used as the first steady-state reference value.
  • Step S43 Determine 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.
  • the first steady-state air pressure value After the first steady-state air pressure value is determined, it can 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, it is determined whether the fluctuation of the currently obtained real-time instantaneous air pressure value relative to the first steady-state reference value exceeds a threshold value, 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 If 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, determine that the current state of the preset air pressure trigger is a floor switching state.
  • 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. If 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, it is determined that the current state of the preset air pressure trigger is a floor switching state. If the difference between the real-time instantaneous air pressure and the first steady-state reference value is smaller than the first threshold, it is determined that the current state of the preset air pressure trigger is still a floor stable state.
  • Step S45 If the saved state in the preset air pressure trigger is the floor switching state, use the real-time instantaneous air pressure and the second instantaneous air pressure obtained by the preset air pressure trigger as a sliding air pressure sequence, wherein the The second instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained.
  • the real-time instantaneous air pressure and the second instantaneous air pressure obtained by the preset air pressure trigger are used as the sliding air pressure sequence
  • the second instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained. That is, for example, if the saved state in the preset air pressure trigger is the floor switching state, the N-1 instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained as the second instantaneous air pressure, and then the The second instantaneous air pressure and the real-time instantaneous air pressure serve as a sequence of sliding air pressures.
  • Step S46 Determine the average value of the sliding air pressure sequence as the dynamic air pressure value.
  • the average value of the sliding air pressure sequence can be determined as the dynamic air pressure value, so as to judge the current state.
  • Step S47 judging whether the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, wherein the second steady-state reference value is when the preset air pressure trigger is in the The average value of the instantaneous air pressure obtained for the last time before the floor switching state and the third instantaneous air pressure, the third instantaneous air pressure is obtained before the last instantaneous air pressure obtained before the preset air pressure trigger is in the floor switching state The preset number of instantaneous air pressures.
  • the second steady-state reference value is the The average value of the instantaneous air pressure obtained last time before the preset air pressure trigger is in the floor switching state and the third instantaneous air pressure, and the third instantaneous air pressure is the last air pressure before the preset air pressure trigger is in the floor switching state.
  • the preset number of instantaneous air pressures obtained before the instantaneous air pressure is obtained at one time, that is, when the preset air pressure trigger is at a stable floor, an instantaneous air pressure is obtained, and this instantaneous air pressure indicates that floor switching begins to occur.
  • the instantaneous air pressure obtained for the last time before the instantaneous air pressure is obtained and the average value of N-1 instantaneous air pressures obtained before the instantaneous air pressure is obtained for the last time is determined as the second steady-state reference value, and the second steady-state air pressure is determined as the second steady-state reference value.
  • the reference value is stored for subsequent calls.
  • first threshold and the second threshold may be the same or different.
  • Step S48 If the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, it is determined that the current state of the preset air pressure trigger is still a floor switching state.
  • the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, if the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to For the second threshold, it is determined that the current state of the preset air pressure trigger is a floor switching state. If the difference between the dynamic air pressure value and the second steady-state reference value is smaller than the second threshold, it is abnormal air pressure fluctuation, and it is determined that the current state of the preset air pressure trigger is still the floor stable state.
  • the method further includes: judging whether the difference between the real-time instantaneous air pressure and the average value of the fourth instantaneous air pressure is less than a third threshold, wherein the first The four instantaneous air pressures are the preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained; if the difference between the real-time instantaneous air pressure and the average value of the fourth instantaneous air pressure is less than the third threshold, it is determined that the air pressure tends to After stabilization, the floor switching state ends, and the preset air pressure trigger is adjusted from the floor switching state to the floor stable state.
  • the first threshold, the second threshold and the third threshold may be determined according to actual application scenarios, which are not specifically limited herein.
  • the preset air pressure trigger is in the stable state of the floor, calculate the reference steady state air pressure, and then judge whether the difference between the real-time instantaneous air pressure and the first steady state reference air pressure is greater than m hPa, and if so, judge the preset air pressure Set the current state of the air pressure trigger to the floor switching state, open the floor identification algorithm, calculate the dynamic air pressure value, and determine whether the difference between the dynamic air pressure value and the second steady-state reference value is greater than m hPa, if not, it is the air pressure In case of misjudgment caused by fluctuation, return to the stable state of the floor and close the floor recognition algorithm.
  • the floor switching state is continued, and the floor identification algorithm is kept enabled. Update the dynamic air pressure value, and determine whether the difference between the current instantaneous air pressure and the dynamic air pressure value at the previous moment is less than nhPa, wherein the dynamic air pressure value at the previous moment is the average value of N-1 air pressure data before the current instantaneous air pressure, if If not, the floor switching state is continued, and the floor identification algorithm is kept enabled. If yes, return to the floor stable state and close the floor recognition algorithm.
  • an embodiment of the present invention discloses a specific positioning method, which is applied to an Android-based mobile terminal, including:
  • Step S51 Determine the current environment according to the acquired real-time GNSS signal.
  • Step S52 If the current environment is an indoor environment, the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library.
  • Step S53 Determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state.
  • Step S54 Determine the first current horizontal coordinate according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library.
  • Step S55 Determine a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and use the current building, the current floor and the second current horizontal coordinate as a positioning result.
  • Step S56 If the current environment is an outdoor environment, acquire the third current horizontal coordinate collected by the preset positioning device.
  • the preset positioning device includes but is not limited to GPS.
  • Step S57 Determine a positioning result based on the third current horizontal coordinate and the acquired behavior track.
  • a positioning result needs to be determined based on the third current horizontal coordinate and the acquired behavioral trajectory.
  • the positioning result may be determined based on the Kalman filtering algorithm, the third current horizontal coordinate, and the acquired behavior trajectory.
  • the initial positioning state is performed, the first horizontal coordinate is obtained by the preset positioning device alone, and the pedestrian trajectory estimation is initialized from this position, and then the continuous positioning state is entered.
  • the continuous positioning state the horizontal coordinates and pedestrian trajectories collected by the preset positioning device are processed based on the Kalman filter to obtain the final positioning result in the outdoor environment.
  • an embodiment of the present invention also discloses a positioning device, which is applied to an Android-based mobile terminal.
  • the device includes: an indoor and outdoor environment identification module 11 , a Wi-Fi fingerprint positioning module 12 , and a positioning result fusion Module 13, the Wi-Fi fingerprint positioning module includes a building identification sub-module 121, a floor identification sub-module 122, and a horizontal position positioning sub-module 123;
  • the indoor and outdoor environment identification module 11 is used to determine the current environment according to the acquired real-time GNSS signal;
  • the building identification sub-module 121 is used to determine the current building according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library when the current environment is an indoor environment;
  • the floor identification sub-module 122 is configured to determine the current floor according to the current state of the preset air pressure trigger, wherein 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 the first current level according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library coordinate;
  • the positioning result fusion module 13 is used to determine the second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and combine the current building, the current floor and the first current horizontal coordinate. 2.
  • the current horizontal coordinate is used as the positioning result.
  • the present invention first determines the current environment according to the acquired real-time GNSS signals. If the current environment is an indoor environment, the current location is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library. building, and determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes the floor stability state and the floor switching state, and then according to the real-time Wi-Fi
  • the first current horizontal coordinate can be determined based on the data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library, and then the first current horizontal coordinate can be determined based on the first current horizontal coordinate and the obtained pedestrian trajectory.
  • the second current horizontal coordinate, and the currently located building, the currently located floor and the second current horizontal coordinate are used as the positioning result.
  • the signal classification method based on the GNSS signal of the present application has the advantages of simple calculation and low hardware complexity, thereby improving the positioning method. Practicality; use Wi-Fi fingerprint recognition to realize building and floor positioning, without additional sensor signals, and the calculation process is simple; in addition, according to the current state of the preset air pressure trigger, the current state of the floor stability state or the floor switching state is specifically determined.
  • Floor without absolute air pressure or additional mobile terminal, improves the accuracy of floor recognition, reduces the error rate, and lowers the cost of use, and is compatible with various actions such as passenger lifts or escalators, walking in stairwells, etc. scene, so that floor recognition can be applied in different environments.
  • this application first determines whether the current environment is an indoor environment or an outdoor environment, and if the current environment is an indoor environment, then determines the current building, then determines the current floor according to the current building, and then determines the horizontal coordinates according to the current floor. , forming a multi-dimensional progressive indoor positioning method, constructing a complete positioning framework, with stronger practicability.
  • the indoor and outdoor environment identification module 11 is used for:
  • the target parameter is input into a pre-obtained signal classifier, and the current environment is determined according to the output of the signal classifier.
  • the building identification sub-module 121 is used for:
  • the current building is determined according to the first similarity.
  • the horizontal position positioning sub-module 123 is used for:
  • the first current horizontal coordinate is determined according to the WKNN algorithm, the real-time Wi-Fi data, and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library.
  • the positioning result fusion module 13 is used for:
  • the second current horizontal coordinate is determined based on the Kalman filter algorithm, the first current horizontal coordinate and the acquired pedestrian trajectory.
  • the positioning device also includes:
  • the preset positioning device is used to collect the third current horizontal coordinate when the current environment is an outdoor environment
  • the positioning result fusion module 13 is configured to: determine a positioning result based on the third current horizontal coordinate and the acquired behavior track.
  • the floor identification sub-module 122 is configured to: when the preset air pressure trigger is currently in a stable floor state, take the floor determined when the real-time Wi-Fi data was acquired last time as the current floor;
  • the preset air pressure trigger When the preset air pressure trigger is currently in a floor switching state, it is determined according to the real-time Wi-Fi data and the Wi-Fi signal atlas corresponding to the current building in the preset Wi-Fi signal map library The current floor.
  • the floor identification sub-module 122 is used for:
  • a Wi-Fi signal map in the Wi-Fi signal atlas includes multiple Wi-Fi fingerprint, a Wi-Fi signal map corresponds to a floor;
  • the floor with the largest number of occurrences in the floor information is determined as the current floor.
  • the positioning device further includes:
  • the air pressure trigger state determination module is configured to: determine the current state of the preset air pressure trigger according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure.
  • the air pressure trigger state determination module is used for:
  • the real-time instantaneous air pressure and the first instantaneous air pressure obtained by the preset air pressure trigger are used as the sliding air pressure sequence, wherein the first air pressure
  • An instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained;
  • 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, it is determined that the current state of the preset air pressure trigger is a floor switching state.
  • the air pressure trigger state determination module is used for:
  • the real-time instantaneous air pressure and the second instantaneous air pressure obtained by the preset air pressure trigger are used as the sliding air pressure sequence, wherein the second air pressure
  • the instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained;
  • the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, it is determined that the current state of the preset air pressure trigger is still a floor switching state.
  • the air pressure trigger state determination module is also used for:
  • the floor switching state ends, and the preset air pressure trigger is adjusted from the floor switching state to the floor stable state.
  • the positioning device further includes a pedestrian trajectory estimation module for determining the pedestrian trajectory.
  • the current indoor or outdoor environment is determined by the indoor and outdoor environment recognition module. If it is an outdoor environment, turn on the GPS positioning module (that is, the preset positioning device), the pedestrian trajectory estimation module and the positioning result fusion module, and enter the initial positioning state. In the initial positioning state, the GPS positioning module alone obtains the first horizontal coordinate and initializes the pedestrian trajectory estimation module from this position, and then enters the continuous positioning state. In the continuous positioning state, the positioning result fusion module constructed based on the Kalman filter processes the positioning results obtained by the GPS positioning and pedestrian trajectory estimation modules to obtain the final positioning results in the outdoor environment.
  • the GPS positioning module that is, the preset positioning device
  • the pedestrian trajectory estimation module and the positioning result fusion module In the initial positioning state, the GPS positioning module alone obtains the first horizontal coordinate and initializes the pedestrian trajectory estimation module from this position, and then enters the continuous positioning state.
  • the positioning result fusion module constructed based on the Kalman filter processes the positioning results obtained by the GPS positioning and pedestrian trajectory estimation modules to obtain the final positioning results in the outdoor environment.
  • the building identification sub-module, the floor positioning sub-module, and the horizontal position positioning sub-module calculate the current building, floor and the first horizontal coordinate in turn; then the horizontal coordinate is used as the initial position of the pedestrian trajectory estimation module and Enter the continuous positioning state.
  • the building identification sub-module keeps on and calculates, while the floor positioning sub-module turns on or off the floor identification calculation according to the triggering result of its air pressure trigger.
  • the horizontal position positioning sub-module is kept open and calculated, and the calculation result and the pedestrian trajectory estimation result are processed by the positioning result fusion module to obtain the horizontal coordinates of the pedestrian. Finally, the current building, floor and horizontal coordinates are output as the comprehensive positioning result.
  • an embodiment of the present invention further discloses an Android-based mobile terminal, including:
  • processor 21 and memory 22 are processors 21 and memory 22;
  • the memory 22 is used to store computer programs
  • the processor 21 is configured to execute the computer program to implement the steps of the positioning method disclosed in the foregoing embodiments.
  • the embodiments of the present invention also disclose a computer-readable storage medium for storing a computer program, and when the computer program is executed by a processor, the steps of the positioning method disclosed in the foregoing embodiments are implemented.
  • a software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.

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 and apparatus, a mobile terminal, and a storage medium. The method comprises: determining the current environment according to an obtained real-time GNSS signal (S11); if the current environment is an indoor environment, determining the current building according to obtained real-time WiFi data and a preset WiFi signal map library (S12); determining the current floor according to the current status of a preset air pressure trigger, wherein the current status of the air pressure trigger comprises a floor stability status and a floor switching status (S13); determining a first current horizontal coordinate according to the real-time WiFi data and a WiFi signal map corresponding to the current floor in the preset WiFi signal map library (S14); and determining a second current horizontal coordinate on the basis of the first current horizontal coordinate and an obtained pedestrian track, and using the current building, the current floor, and the second current horizontal coordinate as a positioning result (S15). By means of the present method, the error rate and complexity of positioning are reduced, and the practicability of the positioning method is improved.

Description

一种定位方法、装置、移动终端、存储介质A positioning method, device, mobile terminal, and storage medium 技术领域technical field
本发明涉及定位技术领域,特别涉及一种定位方法、装置、移动终端、存储介质。The present invention relates to the technical field of positioning, and in particular, to a positioning method, a device, a mobile terminal and a storage medium.
背景技术Background technique
随着移动互联网的发展,基于位置的服务带来了更多的商业机会,同时也推动了位置获取需求从传统的室外环境拓展至更为复杂但更为常见的室内环境。室内定位技术除了满足水平位置定位需求外,还需面对更为复杂的室内外环境、楼宇、楼层识别与切换的多维度多场景问题。With the development of the mobile Internet, location-based services have brought more business opportunities, and also promoted the expansion of location acquisition needs from traditional outdoor environments to more complex but more common indoor environments. In addition to meeting the needs of horizontal position positioning, indoor positioning technology also needs to face more complex multi-dimensional and multi-scene problems of indoor and outdoor environment, building, floor recognition and switching.
现有的楼层识别技术主要利用手机气压传感器获取所处楼层实时绝对气压值,而后对比当地标准海平面气压记录来估算高度及所在楼层;或利用磁场、加速度计等传感器捕捉行人行走于楼梯间的信号特征来估算行人所在楼层的变化。而在室内外环境识别方面,主要是利用多种传感器,如接近传感器、光传感器和磁场传感器等,区分行人所在的室内或室外环境并启动相应的定位模块。The existing floor recognition technology mainly uses the mobile phone air pressure sensor to obtain the real-time absolute air pressure value of the floor, and then compares the local standard sea level air pressure record to estimate the height and floor; or uses sensors such as magnetic field and accelerometer to capture the pedestrian walking in the stairwell. Signal characteristics to estimate the change of floor where pedestrians are located. In terms of indoor and outdoor environment recognition, it mainly uses a variety of sensors, such as proximity sensors, light sensors and magnetic field sensors, to distinguish the indoor or outdoor environment where pedestrians are located and activate the corresponding positioning module.
发明人在实现本发明的过程中发现,现有技术可能存在以下问题:首先,由于室内环境的绝对气压受室内温湿度、空调制冷或制热等多种条件影响,与室外大气压存在差异,所以利用海平面标准大气压和采集到的绝对气压值计算海拔高度和对应楼层的方法错误率较高;其次,除了步行于楼梯间的情景外,惯性测量传感器较难通过其自身信号特征识别行人乘用电扶手梯与升降梯在多楼层间通行的过程在实际使用过程中存在较大的局限性;其三,在室内外环境识别问题上,多传感器信号协作识别的技术方案其复杂度较高,会增加移动移动终端的计算消耗和电能消耗,同时对移动移动终端的硬件配置提出了更多要求,导致该方法实用性较低。In the process of realizing the present invention, the inventor found that the prior art may have the following problems: First, because the absolute air pressure of the indoor environment is affected by various conditions such as indoor temperature and humidity, air-conditioning refrigeration or heating, and is different from the outdoor atmospheric pressure, so Using the sea level standard atmospheric pressure and the collected absolute pressure value to calculate the altitude and the corresponding floor has a high error rate; secondly, except for the scene of walking in the stairwell, it is difficult for the inertial measurement sensor to identify the pedestrian using its own signal characteristics. The process of passing escalators and elevators between multiple floors has great limitations in the actual use process; thirdly, in the problem of indoor and outdoor environment recognition, the technical solution of multi-sensor signal cooperative recognition has high complexity. It will increase the computing consumption and power consumption of the mobile terminal, and at the same time put forward more requirements on the hardware configuration of the mobile terminal, resulting in low practicability of the method.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明的目的在于提供一种定位方法、装置、移动终端、存储介质,能够满足室内外定位需求,且在室内环境下可自动识别楼宇、楼层和完成水平定位,尤其能降低定位复杂度和楼层识别错误率,从而提高定位方法的实用性。其具体方案如下:In view of this, the purpose of the present invention is to provide a positioning method, device, mobile terminal, and storage medium, which can meet indoor and outdoor positioning requirements, and can automatically identify buildings, floors and complete horizontal positioning in indoor environments, especially to reduce positioning. complexity and floor recognition error rate, thereby improving the practicability of the localization method. Its specific plan is as follows:
第一方面,本发明公开了一种定位方法,应用于基于Android的移动终端,包括:In a first aspect, the present invention discloses a positioning method, which is applied to an Android-based mobile terminal, including:
根据获取到的实时GNSS信号确定当前所处环境;Determine the current environment according to the acquired real-time GNSS signals;
如果当前所处环境为室内环境,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇;If the current environment is an indoor environment, the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library;
根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态;The current floor is determined according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state;
根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标;Determine the first current horizontal coordinate according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library;
基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将当前所处楼宇、当前所处楼层以及所述第二当前水平坐标作为定位结果。A second current horizontal coordinate is 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 a positioning result.
可选的,所述根据获取到的实时GNSS信号确定当前所处环境,包括:Optionally, determining the current environment according to the acquired real-time GNSS signal, including:
确定获取到的所述实时GNSS信号的目标参数;determining the acquired target parameters of the real-time GNSS signal;
将所述目标参数输入预先得到的信号分类器中,并根据所述信号分类器的输出确定当前所处环境。The target parameter is input into a pre-obtained signal classifier, and the current environment is determined according to the output of the signal classifier.
可选的,所述根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇,包括:Optionally, determining the current building according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library, including:
根据所述预设Wi-Fi信号地图库确定出所述预设Wi-Fi信号地图库中各个楼宇的Wi-Fi指纹;Determine the Wi-Fi fingerprints of each building in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library;
分别确定所述实时Wi-Fi数据与各个所述楼宇的Wi-Fi指纹的第一相似度;respectively determining the first similarity between the real-time Wi-Fi data and the Wi-Fi fingerprints of each of the buildings;
根据所述第一相似度确定当前所处楼宇。The current building is determined according to the first similarity.
可选的,所述根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标,包括:Optionally, determining the first current horizontal coordinates according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library includes:
根据WKNN算法、所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中当前所处楼层对应的Wi-Fi信号地图确定所述第一当前水平坐标。The first current horizontal coordinate is determined according to the WKNN algorithm, the real-time Wi-Fi data, and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library.
可选的,所述基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,包括:Optionally, determining the second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, including:
基于卡尔曼滤波算法、所述第一当前水平坐标和获取到的行人轨迹确定所述第二当前水平坐标。The second current horizontal coordinate is determined based on the Kalman filter algorithm, the first current horizontal coordinate and the acquired pedestrian trajectory.
可选的,所述根据获取到的实时GNSS信号确定当前所处环境之后,还包括: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 the third current horizontal coordinate collected by the preset positioning device;
基于所述第三当前水平坐标和获取到的行为轨迹确定定位结果。The positioning result is determined 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:
如果所述预设气压触发器当前处于楼层稳定状态,则将上一次获取到实时Wi-Fi数据时确定出的楼层作为当前所处楼层;If the preset air pressure trigger is currently in a stable floor state, the floor determined when the real-time Wi-Fi data was acquired last time is used as the current floor;
如果所述预设气压触发器当前处于楼层切换状态,则根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼宇对应的Wi-Fi信号地图集确定当前所处楼层。If the preset air pressure trigger is currently in a floor switching state, the current Wi-Fi signal atlas corresponding to the current building is determined according to the real-time Wi-Fi data and the preset Wi-Fi signal map library. floor.
可选的,所述根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼宇对应的Wi-Fi信号地图集确定当前所处楼层,包括:Optionally, determining the current floor according to the real-time Wi-Fi data and the Wi-Fi signal atlas corresponding to the current building in the preset Wi-Fi signal atlas, including:
从所述预设Wi-Fi信号地图库中确定出与当前所处楼宇对应的Wi-Fi信号地图集;Determine the Wi-Fi signal atlas corresponding to the current building from the preset Wi-Fi signal atlas;
分别确定所述实时Wi-Fi数据与所述Wi-Fi信号地图集中各个Wi-Fi指纹的第二相似度,其中,所述Wi-Fi信号地图集的一个Wi-Fi信号地图中包括多个Wi-Fi指纹,一个Wi-Fi信号地图对应一个楼层;Respectively determine the second similarity between the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal atlas, wherein a Wi-Fi signal map in the Wi-Fi signal atlas includes multiple Wi-Fi fingerprint, a Wi-Fi signal map corresponds to a floor;
根据所述第二相似度确定出预选Wi-Fi指纹;determining a preselected Wi-Fi fingerprint according to the second similarity;
确定所述预选Wi-Fi指纹中各个Wi-Fi指纹对应的楼层信息;determining the floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprint;
将所述楼层信息中出现次数最多的楼层确定为当前所处楼层。The floor with the largest number of occurrences in the floor information is determined 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:
根据所述预设气压触发器中的已保存状态和获取到的实时瞬时气压确定所述预设气压触发器当前所处状态。The current state of the preset air pressure trigger is determined according to the saved state of the preset air pressure trigger and the acquired real-time instantaneous air pressure.
可选的,所述根据所述预设气压触发器中的已保存状态和获取到的实时瞬时气压确定所述预设气压触发器当前所处状态,包括:Optionally, determining the current state of the preset air pressure trigger according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure, including:
如果所述预设气压触发器中的已保存状态为楼层稳定状态,则将所述预设气压触发器获取到的实时瞬时气压和第一瞬时气压作为滑动气压序列,其中,所述第一瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压;If the saved state in the preset air pressure trigger is the floor stable state, the real-time instantaneous air pressure and the first instantaneous air pressure obtained by the preset air pressure trigger are used as a sliding air pressure sequence, wherein the first air pressure The instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained;
将所述滑动气压序列的平均值确定为第一稳态基准值;determining the average value of the sliding air pressure sequence as the first steady-state reference value;
判断所述实时瞬时气压与所述第一稳态基准值之间的差值是否大于或等于第一阈值;judging 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;
如果所述实时瞬时气压与所述第一稳态基准值之间的差值大于或等于第一阈值,则判定所述预设气压触发器当前所处状态为楼层切换状态。If 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, it is determined that the current state of the preset air pressure trigger is a floor switching state.
可选的,所述根据所述预设气压触发器中的已保存状态和获取到的实时瞬时气压确定所述预设气压触发器当前所处状态,包括:Optionally, determining the current state of the preset air pressure trigger according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure, including:
如果所述预设气压触发器中的已保存状态为楼层切换状态,则将所述预设气压触发器获取到的实时瞬时气压和第二瞬时气压作为滑动气压序列,其中,所述第二瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压;If the saved state in the preset air pressure trigger is the floor switching state, the real-time instantaneous air pressure and the second instantaneous air pressure obtained by the preset air pressure trigger are used as a sliding air pressure sequence, wherein the second instantaneous air pressure The air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained;
将所述滑动气压序列的平均值确定为动态气压值;determining the average value of the sliding air pressure sequence as a dynamic air pressure value;
判断所述动态气压值与第二稳态基准值之间的差值是否大于或等于第二阈值,其中,所述第二稳态基准值为所述预设气压触发器处于所述楼层切换状态之前最后一次获取到的瞬时气压和第三瞬时气压的平均值,所述第三瞬时气压为所述预设气压触发器处于所述楼层切换状态之前最后一次获取到瞬时气压之前获取到的预设数量个瞬时气压;Determine whether the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, wherein the second steady-state reference value is in the floor switching state of the preset air pressure trigger The average value of the instantaneous air pressure obtained for the last time before and the third instantaneous air pressure, the third instantaneous air pressure is the preset air pressure obtained before the last instantaneous air pressure obtained before the preset air pressure trigger is in the floor switching state Number of instantaneous air pressure;
如果所述动态气压值与所述第二稳态基准值之间的差值大于或等于第二阈值,则判定所述预设气压触发器当前所处状态仍为楼层切换状态。If the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, it is determined that the current state of the preset air pressure trigger is still a 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:
判断所述实时瞬时气压以及第四瞬时气压的平均值之间的差值是否小于第三阈值,其中,所述第四瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压;Determine whether the difference between the real-time instantaneous air pressure and the average value of the fourth instantaneous air pressure is less than a third threshold, wherein the fourth instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained air pressure;
如果所述实时瞬时气压以及第四瞬时气压的平均值之间的差值小于第三阈值,则判定气压趋于稳定,楼层切换状态结束,所述预设气压触发器由楼层切换状态调整为楼层稳定状态。If the difference between the real-time instantaneous air pressure and the average value of the fourth instantaneous air pressure is smaller than the third threshold, it is determined that the air pressure tends to be stable, the floor switching state ends, and the preset air pressure trigger is adjusted from the floor switching state to the floor stable state.
第二方面,本发明公开了一种定位装置,应用于基于Android的移动终端,所述装置包括:室内外环境识别模块、Wi-Fi指纹定位模块、定位结果融合模块,所述Wi-Fi指纹定位模块包括楼宇识别子模块、楼层识别子模块、水平位置定位子模块;In a second aspect, the present invention discloses a positioning device, which is applied to an Android-based mobile terminal. The device includes: an indoor and outdoor environment identification module, a Wi-Fi fingerprint positioning module, and a positioning result fusion module. The Wi-Fi fingerprint The positioning module includes a building identification sub-module, a floor identification sub-module, and a horizontal position positioning sub-module;
其中,所述室内外环境识别模块,用于根据获取到的实时GNSS信号确定当前所处环境;Wherein, the indoor and outdoor environment identification module is used to determine the current environment according to the acquired real-time GNSS signal;
所述楼宇识别子模块,用于在当前所处环境为室内环境时,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇;The building identification sub-module is used to determine the current building according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library when the current environment is an indoor environment;
所述楼层识别子模块,用于根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态;The floor identification sub-module is configured to determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state;
所述水平位置定位子模块,用于根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与所述当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标;The horizontal position positioning sub-module is used to determine the first current horizontal coordinate according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library ;
所述定位结果融合模块,用于基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将所述当前所处楼宇、所述当前所处楼层以及所述第二当前水平坐标作为定位结果。The positioning result fusion module is used to determine the second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and combine the current building, the current floor and the second current horizontal coordinate. The current horizontal coordinate is used as the positioning result.
第三方面,本发明公开了一种基于Android的移动终端,包括:In a third aspect, the present invention discloses an Android-based mobile terminal, comprising:
处理器以及存储器;processor and memory;
其中,所述存储器,用于存储计算机程序;Wherein, the memory is used to store computer programs;
所述处理器,用于执行所述计算机程序,以实现前述定位方法的步骤。The processor is configured to execute the computer program to implement the steps of the aforementioned positioning method.
第四方面,本发明还公开了一种计算机可读存储介质,用于存储计算机程序,所述计算机程序被处理器执行时实现前述定位方法的步骤。In a fourth aspect, the present invention further discloses a computer-readable storage medium for storing a computer program, which implements the steps of the foregoing positioning method when the computer program is executed by a processor.
可见,本发明先根据获取到的实时GNSS信号确定当前所处环境,如果当前所处环境为室内环境,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇,并根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态,然后再根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标,接着便可基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将当前所处楼宇、当前所处楼层以及所述第二当前水平坐标作为定位结果。相比现有技术使用多传感器信号确定当前所处环境为室内还是室外的处理方法,本申请以GNSS信号为基础的信号分类办法具有计算简单、硬件复杂度较低的优点,从而提高了定位方法的实用性;同时,利用Wi-Fi指纹识别实现楼宇、楼层定位,无需额外的传感器信号,计算流程简单;此外,根据预设气压触发器当前所处状态为楼层稳定状态或楼层切换状态具体确定当前所处楼层,无需绝对气压值或额外移动终端,提高了楼层识别的准确度,降低了错误率,且使用成本更低,并可兼容乘用升降梯或电扶手梯、步行于楼梯间等多种行动场景,使得楼层识别在不同的环境下均能适用。此外,本申请先确定当前环境为室内环境还是室外环境,如果当前环境为室内环境,再确定当前所处楼宇,再根据当前所述楼宇确定当前所处楼层,接着根据当前所处楼层确定水平坐标,形成多维度层层递进的室内定位方法,构建了完整的定位框架,有更强的实用性。It can be seen that the present invention first determines the current environment according to the acquired real-time GNSS signals. If the current environment is an indoor environment, the current location is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library. building, and determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes the floor stability state and the floor switching state, and then according to the real-time Wi-Fi The first current horizontal coordinate can be determined based on the data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library, and then the first current horizontal coordinate can be determined based on the first current horizontal coordinate and the obtained pedestrian trajectory. The second current horizontal coordinate, and the currently located building, the currently located floor and the second current horizontal coordinate are used as the positioning result. Compared with the processing method in the prior art that uses multi-sensor signals to determine whether the current environment is indoor or outdoor, the signal classification method based on the GNSS signal of the present application has the advantages of simple calculation and low hardware complexity, thereby improving the positioning method. At the same time, using Wi-Fi fingerprint recognition to achieve building and floor positioning, no additional sensor signals are required, and the calculation process is simple; in addition, the current state of the preset air pressure trigger is determined according to whether the current state of the air pressure trigger is the floor stable state or the floor switching state. The current floor does not require an absolute air pressure value or an additional mobile terminal, which improves the accuracy of floor recognition, reduces the error rate, and lowers the cost of use. It is compatible with passenger lifts or escalators, and walking in stairwells, etc. A variety of action scenarios make floor recognition applicable in different environments. In addition, the present application first determines whether the current environment is an indoor environment or an outdoor environment, and if the current environment is an indoor environment, then determines the current building, then determines the current floor according to the current building, and then determines the horizontal coordinates according to the current floor. , forming a multi-dimensional progressive indoor positioning method, constructing a complete positioning framework, with stronger practicability.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图*In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without creative work.*
图1为本发明实施例公开的一种定位方法流程图;1 is a flowchart of a positioning method disclosed in an embodiment of the present invention;
图2为本发明实施例公开的一种具体的定位方法部分流程图;2 is a partial flowchart of a specific positioning method disclosed in an embodiment of the present invention;
图3为本发明实施例公开的一种楼宇识别流程图;3 is a flowchart of a building identification disclosed in an embodiment of the present invention;
图4为本发明实施例公开的一种具体的定位方法部分流程图;4 is a partial flowchart of a specific positioning method disclosed in an embodiment of the present invention;
图5为本发明实施例公开的一种楼层识别流程图;5 is a flow chart of a floor identification disclosed in an embodiment of the present invention;
图6为本发明实施例公开的一种具体的定位方法部分流程图;6 is a partial flowchart of a specific positioning method disclosed in an embodiment of the present invention;
图7为本发明实施例公开的一种气压触发器所处状态确定流程图;FIG. 7 is a flow chart for determining the state of an air pressure trigger disclosed in an embodiment of the present invention;
图8为本发明实施例公开的一种具体的定位方法流程图;8 is a flowchart of a specific positioning method disclosed in an embodiment of the present invention;
图9为本发明实施例公开的一种定位装置结构示意图;9 is a schematic structural diagram of a positioning device disclosed in an embodiment of the present invention;
图10为本发明实施例公开的一种定位装置工作流程图;10 is a working flowchart of a positioning device disclosed in an embodiment of the present invention;
图11为本发明实施例公开的一种基于Android的移动终端结构示意图。FIG. 11 is a schematic structural diagram of an Android-based mobile terminal disclosed in an 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 accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
参见图1所示,本发明实施例公开了一种定位方法,应用于基于Android的移动终端,包括:Referring to FIG. 1 , an embodiment of the present invention discloses a positioning method, which is applied to an Android-based mobile terminal, including:
步骤S11:根据获取到的实时GNSS信号确定当前所处环境。Step S11: Determine the current environment according to the acquired real-time GNSS signal.
在实际应用中,需要先根据获取到的实时GNSS信号(Global Navigation Satellite System,全球导航卫星系统)确定当前所处环境。其中,所述实时GNSS信号包括但不限于北斗信号、GPS(Global Positioning System,全球定位系统)信号。In practical applications, it is necessary to first determine the current environment according to the acquired real-time GNSS signals (Global Navigation Satellite System, Global Navigation Satellite System). Wherein, the real-time GNSS signals include but are not limited to Beidou signals and GPS (Global Positioning System, global positioning system) signals.
所述根据获取到的实时GNSS信号确定当前所处环境,包括:确定获取到的所述实时GNSS信号的目标参数;将所述目标参数输入预先得到的信号分类器中,并根据所述信号分类器的输出确定当前所处环境。其中,所述目标参数可以是信噪比参数。具体的,可以先确定获取到的实时GNSS 信号的信噪比参数;然后将所述信噪比参数输入到预先得到的信号分类器中,根据所述信号分类器的输出确定当前所处环境。Determining the current environment according to the acquired real-time GNSS signals includes: determining the acquired target parameters of the real-time GNSS signals; inputting the target parameters into a pre-obtained signal classifier, and classifying them according to the signals The output of the device determines the current environment. Wherein, the target parameter may be a signal-to-noise ratio parameter. Specifically, the acquired signal-to-noise ratio parameter of the real-time GNSS signal may be determined first; then the signal-to-noise ratio parameter is input into a pre-obtained signal classifier, and the current environment is determined according to the output of the signal classifier.
在实际应用中,在利用所述信号分类器对获取到的实时GNSS信号进行分类,以确定当前所处环境之前,还需要分别利用室内环境和室外环境下采集到的多组GNSS信号作为训练样本,并提取训练样本中的GNSS信号的信噪比参数,将训练样本中的GNSS信号的信噪比参数输入到基于决策树算法的训练模型中,完成训练之后,得到所述信号分类器。In practical applications, before using the signal classifier to classify the acquired real-time GNSS signals to determine the current environment, it is also necessary to use multiple sets of GNSS signals collected in the indoor environment and the outdoor environment as training samples. , and extract the signal-to-noise ratio parameter of the GNSS signal in the training sample, input the signal-to-noise ratio parameter of the GNSS signal in the training sample into the training model based on the decision tree algorithm, and obtain the signal classifier after completing the training.
步骤S12:如果当前所处环境为室内环境,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇。Step S12: If the current environment is an indoor environment, the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library.
在确定出当前所处环境之后,如果当前所处环境为室内环境,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇。具体的,所述Wi-Fi信息地图库中包括预先采集到的不同楼宇的Wi-Fi信息地图,其中,一栋楼宇对应着一个或多个Wi-Fi信息地图,一层楼对应一个Wi-Fi信号地图,一个Wi-Fi信号地图为有序记录同一楼层上多个Wi-Fi指纹的数据集,可以为Wi-Fi指纹定位计算提供已知水平坐标上的Wi-Fi信号特征。同一楼宇内,各楼层均独立对应一个Wi-Fi信号地图。After the current environment is determined, if the current environment is an indoor environment, the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library. Specifically, the Wi-Fi information map library includes pre-collected Wi-Fi information maps of different buildings, wherein one building corresponds to one or more Wi-Fi information maps, and one floor corresponds to one Wi-Fi information map. Fi signal map, a Wi-Fi signal map is a data set that records multiple Wi-Fi fingerprints on the same floor in an orderly manner, which can provide Wi-Fi signal characteristics on known horizontal coordinates for Wi-Fi fingerprint positioning calculation. In the same building, each floor independently corresponds to a Wi-Fi signal map.
步骤S13:根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态。Step S13: Determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state.
在确定出当前所处楼宇之后,还需要根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态。如果所述预设气压触发器当前所处状态为楼层稳定状态,则表示当前处于楼层不变状态,如果所述预设气压触发器当前所处状态为楼层切换状态,则表示当前处于楼层变化状态。After the current building is determined, the current floor needs to be determined according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state. If the current state of the preset air pressure trigger is the floor stable state, it means that it is currently in the floor unchanged state; if the current state of the preset air pressure trigger is the floor switching state, it means that it is currently in the floor change state .
具体的,所述根据预设气压触发器当前所处状态确定当前所处楼层,包括:如果所述预设气压触发器当前处于楼层稳定状态,则将上一次获取到实时Wi-Fi数据时确定出的楼层作为当前所处楼层;如果所述预设气压触发器当前处于楼层切换状态,则根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼宇对应的Wi-Fi信号地图集确定当前所处楼层。也即,所述预设气压触发器当前所处状态为楼层稳定状态时,可 以直接将上一次获取到实时Wi-Fi数据时确定出的楼层作为当前所处楼层,如果所述预设气压触发器当前处于楼层切换状态,则根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼宇对应的Wi-Fi信号地图集确定当前所处楼层。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 currently in a stable floor state, determining when the real-time Wi-Fi data is acquired last time If the preset air pressure trigger is currently in the floor switching state, the map library corresponds to the current building according to the real-time Wi-Fi data and the preset Wi-Fi signal. The Wi-Fi signal atlas to determine the current floor. 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 was acquired last time can be directly used as the current floor. If the device is currently in a floor switching state, the current floor is determined according to the real-time Wi-Fi data and the Wi-Fi signal atlas corresponding to the current building in the preset Wi-Fi signal atlas.
相应的,所述根据预设气压触发器当前所处状态确定当前所处楼层之前,还包括:根据所述预设气压触发器中的已保存状态和获取到的实时瞬时气压确定所述预设气压触发器当前所处状态。Correspondingly, before determining the current floor according to the current state of the preset air pressure trigger, the method further includes: determining the preset air pressure according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure. The current state of the air pressure trigger.
在实际应用中,当所述预设气压触发器所处状态为楼层稳定状态时,可以先关闭楼层识别算法,当所述预设气压触发器检测到所处状态为楼层切换状态时,则开启楼层识别算法,这样以气压变化作为辅助的楼层识别算法触发机制,在行人确实处在楼层切换状态下再进行楼层识别,有效控制了计算频次,可降低计算开销及能耗并有效降低识别错误率。In practical application, when the state of the preset air pressure trigger is the floor stable state, the floor recognition algorithm can be turned off first, and when the preset air pressure trigger detects that the state is the floor switching state, it is turned on Floor recognition algorithm, which uses air pressure change as an auxiliary trigger mechanism of floor recognition algorithm, and then performs floor recognition when pedestrians are indeed in the state of floor switching, which effectively controls the calculation frequency, reduces calculation overhead and energy consumption, and effectively reduces recognition error rate. .
步骤S14:根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标。Step S14: Determine the first current horizontal coordinate according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library.
在确定出当前所处楼层之后,还需要根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标。也即,确定出当前所处楼层之后,在当前所处楼层上的具体位置尚不确定,需进一步确定出第一当前水平坐标。After the current floor is determined, the first current horizontal coordinates need to be determined according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library. That is, after the current floor is determined, the specific position on the current floor is still uncertain, and the first current horizontal coordinate needs to be further determined.
具体的,可以根据WKNN算法、所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中当前所处楼层对应的Wi-Fi信号地图确定所述第一当前水平坐标。也即,可以先计算所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中当前所处楼层对应的Wi-Fi信号地图中的各个Wi-Fi指纹之间的相似度,然后基于计算得到的相似度确定当前所处楼层中各个Wi-Fi指纹对应的水平坐标的权重,并基于确定出的权重和当前所处楼层中各个水平坐标确定第一当前水平坐标。例如,当前楼层对应的Wi-Fi信号地图中包括三个Wi-Fi指纹,分别为A、B、C,每个Wi-Fi指纹对应当前所处楼层的一个水平坐标,计算实时Wi-Fi数据与A的相似度为0.4,实时Wi-Fi数据与B的相似度为0.5,实时Wi-Fi数据与C的相似度为0.6,则A对应的水平坐标的权重为0.2667,B对应的水平坐标的权重为0.3333,C对应的水平坐标的权重为0.4。Specifically, the first current horizontal coordinate may be determined according to the WKNN algorithm, the real-time Wi-Fi data, and the Wi-Fi signal map corresponding to the current floor 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 current floor in the preset Wi-Fi signal map library can be calculated first, and then The weight of the horizontal coordinates corresponding to each Wi-Fi fingerprint on the current floor is determined based on the calculated similarity, and the first current horizontal coordinate is determined based on the determined weight and each horizontal coordinate on the current floor. For example, the Wi-Fi signal map corresponding to the current floor includes three Wi-Fi fingerprints, namely A, B, and C. Each Wi-Fi fingerprint corresponds to a horizontal coordinate of the current floor, and real-time Wi-Fi data is calculated. The similarity with A is 0.4, the similarity between real-time Wi-Fi data and B is 0.5, and the similarity between real-time Wi-Fi data and C is 0.6, then the weight of the horizontal coordinate corresponding to A is 0.2667, and the horizontal coordinate corresponding to B The weight of C is 0.3333, and the weight of the horizontal coordinate corresponding to C is 0.4.
步骤S15:基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将当前所处楼宇、当前所处楼层以及所述第二当前水平坐标作为定位结果。Step S15: Determine a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and use the current building, the current floor and the second current horizontal coordinate as a positioning result.
在具体的实施过程中,确定出所述第一当前水平坐标之后,还需要基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将当前所处楼宇、当前所处楼层以及所述第二当前水平坐标作为定位结果。In the specific implementation process, after the first current horizontal coordinate is determined, it is also necessary to determine the second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and the current building, the current The floor and the second current horizontal coordinate are used as the positioning result.
在实际应用中,所述基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,包括:基于卡尔曼滤波算法、所述第一当前水平坐标和获取到的行人轨迹确定所述第二当前水平坐标。将行人轨迹作为内在惯性预测值,第一当前水平坐标为外在测量值,基于卡尔曼滤波算法将二者融合,对行人的水平位置坐标做最优估计,得到所述第二水平坐标。In practical applications, the determining the second current horizontal coordinate based on the first current horizontal coordinate and the acquired pedestrian trajectory includes: determining based on the Kalman filter algorithm, the first current horizontal coordinate and the acquired pedestrian trajectory the second current horizontal coordinate. The pedestrian trajectory is taken as the intrinsic inertia prediction value, the first current horizontal coordinate is the external measurement value, and the two are fused based on the Kalman filter algorithm, and the horizontal position coordinate of the pedestrian is optimally estimated to obtain the second horizontal coordinate.
相应的,就需要先获取所述行人轨迹。在进入室内环境之后,进入初始化定位状态,也即依次确定所处楼宇、楼层和第一个水平坐标,将第一个水平坐标作为行人轨迹推算的初始位置,并进行连续定位,得到所述行人轨迹。Accordingly, the pedestrian trajectory needs to be acquired first. After entering the indoor environment, enter the initialization positioning state, that is, determine the building, floor and the first horizontal coordinate in turn, use the first horizontal coordinate as the initial position of the pedestrian trajectory estimation, and perform continuous positioning to obtain the pedestrian. trajectory.
基于根据Wi-Fi数据确定出的第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,可以使得所述第二当前水平坐标的位置更精确,以解决单独依靠Wi-Fi定位或单独依靠行人轨迹定位带来的误差较大问题。Determining the second current horizontal coordinate based on the first current horizontal coordinate determined according to the Wi-Fi data and the obtained pedestrian trajectory can make the position of the second current horizontal coordinate more accurate, so as to solve the problem of relying solely on Wi-Fi positioning or The error caused by pedestrian trajectory positioning alone is relatively large.
可见,本发明先根据获取到的实时GNSS信号确定当前所处环境,如果当前所处环境为室内环境,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇,并根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态,然后再根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标,接着便可基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将当前所处楼宇、当前所处楼层以及所述第二当前水平坐标作为定位结果。相比现有技术使用多传感器确定当前所处环境为室内还是室外的处理方法,本申请以GNSS信号本申请以GNSS信号为基础的信号分类办法具有计算简单、硬件复杂度较低的优点,从而提高了定位方法的实用性; 利用Wi-Fi指纹识别实现楼宇、楼层定位,无需额外的传感器信号,计算流程简单;此外,根据预设气压触发器当前所处状态为楼层稳定状态或楼层切换状态具体确定当前所处楼层,无需绝对气压值或额外移动终端,提高了楼层识别的准确度,降低了错误率,且使用成本更低,并可兼容乘用升降梯或电扶手梯、步行于楼梯间等多种行动场景,使得楼层识别在不同的环境下均能适用。此外,本申请先确定当前环境为室内环境还是室外环境,如果当前环境为室内环境,再确定当前所处楼宇,再根据当前所述楼宇确定当前所处楼层,接着根据当前所处楼层确定水平坐标,形成多维度层层递进的室内定位方法,构建了完整的定位框架,有更强的实用性。It can be seen that the present invention first determines the current environment according to the acquired real-time GNSS signals. If the current environment is an indoor environment, the current location is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library. building, and determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes the floor stability state and the floor switching state, and then according to the real-time Wi-Fi The first current horizontal coordinate can be determined based on the data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library, and then the first current horizontal coordinate can be determined based on the first current horizontal coordinate and the obtained pedestrian trajectory. The second current horizontal coordinate, and the currently located building, the currently located floor and the second current horizontal coordinate are used as the positioning result. Compared with the prior art using multiple sensors to determine whether the current environment is indoor or outdoor, the signal classification method based on the GNSS signal of the present application has the advantages of simple calculation and low hardware complexity, thereby Improve the practicability of the positioning method; use Wi-Fi fingerprint recognition to realize building and floor positioning without additional sensor signals, and the calculation process is simple; in addition, according to the preset pressure trigger, the current state is the floor stable state or the floor switching state Specifically determining the current floor, no absolute air pressure value or additional mobile terminal is required, which improves the accuracy of floor recognition, reduces the error rate, and lowers the cost of use. It is compatible with passenger lifts or escalators, and walking on stairs. Room and other action scenarios, so that floor recognition can be applied in different environments. In addition, this application first determines whether the current environment is an indoor environment or an outdoor environment, and if the current environment is an indoor environment, then determines the current building, then determines the current floor according to the current building, and then determines the horizontal coordinates according to the current floor. , forming a multi-dimensional progressive indoor positioning method, constructing a complete positioning framework, with stronger practicability.
参见图2所示,根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇,具体可以包括:Referring to Figure 2, the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library, which may specifically include:
步骤S21:如果当前所处环境为室内环境,则根据所述预设Wi-Fi信号地图库确定出所述预设Wi-Fi信号地图库中各个楼宇的Wi-Fi指纹。Step S21: If the current environment is an indoor environment, determine the Wi-Fi fingerprints of each building in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library.
在确定出当前所处环境之后,如果当前所处环境为室内环境,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇。具体的,需要先根据所述预设Wi-Fi信号地图库确定出所述预设Wi-Fi信号地图库中各个楼宇的Wi-Fi指纹。After the current environment is determined, if the current environment is an indoor environment, the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library. Specifically, it is necessary to first determine the Wi-Fi fingerprints of each building in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library.
由于所述Wi-Fi信息地图库中包括预先采集到的不同楼宇的Wi-Fi信息地图,其中,一栋楼宇对应着一个或多个Wi-Fi信息地图,一层楼对应一个Wi-Fi信号地图,一个Wi-Fi信号地图为有序记录同一楼层上多个Wi-Fi指纹的数据集,可以为Wi-Fi指纹定位计算提供已知水平坐标上的Wi-Fi信号特征。同一楼宇内,各楼层均独立对应一个Wi-Fi信号地图。所以需要先确定出所述预设Wi-Fi信号地图库中各个楼宇的Wi-Fi指纹。Because the Wi-Fi information map library includes pre-collected Wi-Fi information maps of different buildings, one building corresponds to one or more Wi-Fi information maps, and one floor corresponds to one Wi-Fi signal Map, a Wi-Fi signal map is a data set that records multiple Wi-Fi fingerprints on the same floor in an orderly manner, which can provide Wi-Fi signal characteristics on known horizontal coordinates for Wi-Fi fingerprint positioning calculation. In the same building, each floor independently corresponds to a Wi-Fi signal map. Therefore, it is necessary to first determine the Wi-Fi fingerprints of each building in the preset Wi-Fi signal map library.
具体的,基于预设Wi-Fi信号地图库中各楼宇的Wi-Fi信号地图,计算楼宇中所有AP(ACCESS POINT,接入点)在该楼宇中的RSSI(Received Signal Strength Indication,接收的信号强度指示)平均值,每个楼宇形成一个以楼宇为单位的Wi-Fi指纹。其中,确定所述预设Wi-Fi信号地图库中任一楼宇的Wi-Fi指纹,包括:计算所述预设Wi-Fi信号地图库中该楼宇 对应的各个Wi-Fi信号地图中的Wi-Fi指纹的平均值,得到该楼宇对应的Wi-Fi指纹。Specifically, based on the Wi-Fi signal map of each building in the preset Wi-Fi signal map library, calculate the RSSI (Received Signal Strength Indication, received signal of all APs (ACCESS POINT, access points) in the building in the building Intensity indication) average, each building forms a building-by-building Wi-Fi fingerprint. Wherein, determining the Wi-Fi fingerprint of any building in the preset Wi-Fi signal map library includes: calculating the Wi-Fi fingerprint in each Wi-Fi signal map corresponding to the building in the preset Wi-Fi signal map library -The average value of Fi fingerprints to get the corresponding Wi-Fi fingerprints of the building.
步骤S22:分别确定所述实时Wi-Fi数据与各个所述楼宇的Wi-Fi指纹的第一相似度。Step S22: Determine the first similarity between the real-time Wi-Fi data and the Wi-Fi fingerprints of each of the buildings, respectively.
在确定出所述预设Wi-Fi信号地图库中的各个楼宇对应的Wi-Fi指纹之后,还需要分别计算所述实时Wi-Fi数据与各个所述楼宇的Wi-Fi指纹的第一相似度。对于确定所述第一相似度的过程中的相似度算法在此不做具体限定,可以根据实际情况确定。After the Wi-Fi fingerprints corresponding to each building in the preset Wi-Fi signal map library are determined, the first similarity between the real-time Wi-Fi data and the Wi-Fi fingerprints of each building needs to be calculated separately. Spend. The similarity algorithm in the process of determining the first similarity is not specifically limited here, and may be determined according to the actual situation.
步骤S23:根据所述第一相似度确定当前所处楼宇。Step S23: Determine the current building according to the first similarity.
在确定出所述第一相似度之后,根据所述第一相似度确定当前所处楼宇。具体的,将最大的第一相似度对应的楼宇确定为当前所处楼宇。After the first similarity is determined, the current building is determined according to the first similarity. Specifically, the building corresponding to the largest first similarity is determined as the current building.
由于在室内需要进行连续定位,所以在室内连续定位状态下,若当前所处楼宇与上次结果一致,则保持该状态,若不一致,进入室内初始定位状态。Since continuous positioning is required indoors, in the indoor continuous positioning state, if the current building is consistent with the previous result, this state will be maintained; if not, the indoor initial positioning state will be entered.
参见图3所示,为楼宇识别流程图。检索预设Wi-Fi信号地图库中各个楼宇的Wi-Fi信号地图,然后压缩各个楼宇的Wi-Fi信号地图,获得以楼宇为单位的Wi-Fi指纹,也即计算楼宇中所有AP在该楼宇中的RSSI平均值,每个楼宇形成一个以楼宇为单位的Wi-Fi指纹。然后计算所述实时Wi-Fi数据和各个楼宇的Wi-Fi指纹之间的相似度,将最大的相似度对应的楼宇确定为当前楼宇,判断当前楼宇是否为上次获取到Wi-Fi数据时确定的楼宇,如果是,则输出当前楼宇,保持连续定位状态,如果不是,则输出当前楼宇,变为初始定位状态。Referring to Figure 3, it is a flowchart of building identification. Retrieve the Wi-Fi signal map of each building in the preset Wi-Fi signal map library, and then compress the Wi-Fi signal map of each building to obtain the Wi-Fi fingerprint in units of buildings, that is, calculate the location of all APs in the building. Average RSSI in buildings, each building forms a Wi-Fi fingerprint per building. Then calculate the similarity between the real-time Wi-Fi data and the Wi-Fi fingerprints of each building, determine the building corresponding to the maximum similarity as the current building, and determine whether the current building is the last time the Wi-Fi data was obtained. If the building is determined, output the current building and keep the continuous positioning state; if not, output the current building and change to the initial positioning state.
参见图4所示,在所述预设气压触发器当前处于楼层切换状态时,根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼宇对应的Wi-Fi信号地图集确定当前所处楼层,具体包括:Referring to FIG. 4 , when the preset air pressure trigger is currently in a floor switching state, according to the real-time Wi-Fi data and the Wi-Fi signal corresponding to the current building in the map library of the preset Wi-Fi signal The Fi signal atlas determines the current floor, including:
步骤S31:从所述预设Wi-Fi信号地图库中确定出与当前所处楼宇对应的Wi-Fi信号地图集。Step S31: Determine a Wi-Fi signal atlas corresponding to the current building from the preset Wi-Fi signal atlas.
在确定出当前所处楼宇之后,还需要据预设气压触发器当前所处状态 确定当前所处楼层。如果所述预设气压触发器当前处于楼层切换状态,则根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼宇对应的Wi-Fi信号地图集确定当前所处楼层。After the current building is determined, the current floor needs to be determined according to the current state of the preset air pressure trigger. If the preset air pressure trigger is currently in a floor switching state, the current Wi-Fi signal atlas corresponding to the current building is determined according to the real-time Wi-Fi data and the preset Wi-Fi signal map library. floor.
具体的,需要先从所述预设Wi-Fi信号地图库中确定出与当前所处楼宇对应的Wi-Fi信号地图集。当前所处楼宇可以包括一个或多个层楼,每个楼层对应一个Wi-Fi信号地图,所以需要确定出当前所处楼宇对应的Wi-Fi信号地图集,所述Wi-Fi信号地图集中可以包括一个或多个Wi-Fi信号地图。Specifically, it is necessary to first determine the Wi-Fi signal atlas corresponding to the current building from the preset Wi-Fi signal atlas. The current building may include one or more floors, and each floor corresponds to a Wi-Fi signal map, so it is necessary to determine the Wi-Fi signal atlas corresponding to the current building. The Wi-Fi signal atlas can be Include one or more Wi-Fi signal maps.
步骤S32:分别确定所述实时Wi-Fi数据与所述Wi-Fi信号地图集中各个Wi-Fi指纹的第二相似度,其中,所述Wi-Fi信号地图集的一个Wi-Fi信号地图中包括多个Wi-Fi指纹,一个Wi-Fi信号地图对应一个楼层。Step S32: Determine the second similarity between the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal atlas, wherein, in a Wi-Fi signal map of the Wi-Fi signal atlas Including multiple Wi-Fi fingerprints, one Wi-Fi signal map corresponds to one floor.
确定出所述Wi-Fi信号地图集之后,便可以分别确定所述实时Wi-Fi数据与所述Wi-Fi信号地图集中各个Wi-Fi指纹的第二相似度,其中,所述Wi-Fi信号地图集的一个Wi-Fi信号地图中包括多个Wi-Fi指纹,一个Wi-Fi信号地图对应一个楼层。After the Wi-Fi signal atlas is determined, the second similarity between the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal atlas can be determined, wherein the Wi-Fi A Wi-Fi signal map of the signal atlas includes multiple Wi-Fi fingerprints, and one Wi-Fi signal map corresponds to one floor.
例如,当前所处楼宇包括3层楼,每层楼对应的Wi-Fi信号地图中包括3个Wi-Fi指纹,则需要分别计算所述实时Wi-Fi数据与这9个Wi-Fi指纹之间的第二相似度。For example, if the current building includes 3 floors, and the Wi-Fi signal map corresponding to each floor includes 3 Wi-Fi fingerprints, it is necessary to calculate the difference between the real-time Wi-Fi data and the 9 Wi-Fi fingerprints respectively. the second similarity.
步骤S33:根据所述第二相似度确定出预选Wi-Fi指纹。Step S33: Determine a preselected Wi-Fi fingerprint according to the second similarity.
在确定出所述第二相似度之后,便可以根据所述第二相似度,确定出预设Wi-Fi指纹。具体的,可以将所述第二相似度按照从大到小的顺序进行排序,然后将前k个第二相似度对应的Wi-Fi指纹确定为所述预选Wi-Fi指纹,其中,k为大于或等于1的正整数,k的具体取值可以根据实际情况确定,在此不做具体限定。After the second similarity is determined, a preset Wi-Fi fingerprint may be determined according to the second similarity. Specifically, the second degrees of similarity may be sorted in descending order, and then the Wi-Fi fingerprints corresponding to the first k second degrees of similarity are determined as the pre-selected Wi-Fi fingerprints, where k is For a positive integer greater than or equal to 1, the specific value of k can be determined according to the actual situation, which is not specifically limited here.
步骤S34:确定所述预选Wi-Fi指纹中各个Wi-Fi指纹对应的楼层信息。Step S34: Determine the floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprints.
在确定出所述预选Wi-Fi指纹之后,还需要确定所述预选Wi-Fi指纹中各个Wi-Fi指纹对应的楼层信息。具体的,就是确定所述预选Wi-Fi指纹中各个Wi-Fi指纹对应的楼层是当前所处楼宇的哪一层。After the preselected Wi-Fi fingerprints are determined, the floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprints also needs to be determined. Specifically, it is to determine which floor of the current building the floor corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprint is.
步骤S35:将所述楼层信息中出现次数最多的楼层确定为当前所处楼层。Step S35: Determine the floor with the largest number of occurrences in the floor information as the current floor.
得到所述楼层信息之后,便可以将所述楼层信息中出现次数最多的楼层确定为当前所述楼层。例如,所述预选Wi-Fi指纹中包括5个Wi-Fi指纹,其中,有3个Wi-Fi指纹对应的楼层为6楼,2个Wi-Fi指纹对应的楼层为5楼,则当前所处楼层为6楼。After the floor information is obtained, the floor with the largest number of occurrences in the floor information can be determined as the current floor. For example, the pre-selected Wi-Fi fingerprints include 5 Wi-Fi fingerprints. Among them, the floor corresponding to 3 Wi-Fi fingerprints is the 6th floor, and the floor corresponding to 2 Wi-Fi fingerprints is the 5th floor. The floor is the 6th floor.
在刚刚进入室内环境时,定位处于初始定位状态,需要获取楼层、楼宇和水平坐标,此时,可以不需要判断所述预设气压触发器所处状态,直接根据获取到的实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与所处楼宇对应的Wi-Fi信号地图集确定所处楼层。When just entering the indoor environment, the positioning is in the initial positioning state, and the floor, building and horizontal coordinates need to be obtained. At this time, it is not necessary to judge the state of the preset air pressure trigger, and directly according to the obtained real-time Wi-Fi data and the Wi-Fi signal atlas corresponding to the building in the preset Wi-Fi signal atlas to determine the floor.
参见图5所示,为楼层识别流程图。首先判断是否处于初始定位状态,如果是,则跳过气压触发器的状态判断,直接利用楼层识别算法进行楼层识别,也即,根据楼宇识别结果加载当前所处楼宇各个楼层的Wi-Fi信号地图,并计算各个楼层对应的各个Wi-Fi指纹和实时Wi-Fi数据的相似度,将相似度最大的前k个Wi-Fi指纹中出现频次最多的楼层确定为当前楼层,并更新当前楼层。其中,k为大于或等于1的正整数。如果处于连续定位状态,则判断预设气压触发器是否触发楼层识别算法开启,如果未触发楼层识别算法开启,则保持最后一次计算结果作为当前楼层。如果触发触楼层识别算法开启,则利用楼层识别算法进行楼层识别。Referring to Figure 5, it is a flow chart of floor identification. First judge whether it is in the initial positioning state, if so, skip the state judgment of the air pressure trigger, and directly use the floor recognition algorithm to perform floor recognition, that is, load the Wi-Fi signal map of each floor of the current building according to the building recognition result , and calculate the similarity of each Wi-Fi fingerprint corresponding to each floor and the real-time Wi-Fi data, determine the floor with the most frequent occurrences among the top k Wi-Fi fingerprints with the largest similarity as the current floor, and update the current floor. Among them, k is a positive integer greater than or equal to 1. If it is in the continuous positioning state, it is judged whether the preset air pressure trigger triggers the opening of the floor identification algorithm. If the floor identification algorithm is not triggered to open, the last calculation result is kept as the current floor. If the triggering floor recognition algorithm is turned on, the floor recognition algorithm is used for floor recognition.
参见图6所示,根据所述预设气压触发器中的已保存状态和获取到的实时瞬时气压确定所述预设气压触发器当前所处状态,具体可以包括:Referring to FIG. 6 , the current state of the preset air pressure trigger is determined according to the saved state in the preset air pressure trigger and the obtained real-time instantaneous air pressure, which may specifically include:
步骤S41:如果所述预设气压触发器中的已保存状态为楼层稳定状态,则将所述预设气压触发器获取到的实时瞬时气压和第一瞬时气压作为滑动气压序列,其中,所述第一瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压。Step S41: If the saved state in the preset air pressure trigger is the floor stable state, the real-time instantaneous air pressure and the first instantaneous air pressure obtained by the preset air pressure trigger are used as the sliding air pressure sequence, wherein the The first instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained.
在具体的实施过程中,如果所述预设气压触发器中的已保存状态为楼层稳定状态,则将所述预设气压触发器获取到的实时瞬时气压和第一瞬时气压作为滑动气压序列,其中,所述第一瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压。例如,如果所述预设气压触发器中的已保存状态为楼层稳定状态,则将获取到所述实时瞬时气压之前获取 到的N-1个瞬时气压作为第一瞬时气压,然后将第一瞬时气压和所述实时瞬时气压作为滑动气压序列,形成一个包括N个瞬时气压的滑动气压序列。N为大于或等于1的正整数,N的取值可以根据实际情况确定,在此具体限定。In a specific implementation process, if the saved state in the preset air pressure trigger is the floor stable state, the real-time instantaneous air pressure and the first instantaneous air pressure obtained by the preset air pressure trigger are used as the sliding air pressure sequence , wherein the first instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained. For example, if the saved state in the preset air pressure trigger is the floor stable state, the N-1 instantaneous air pressures obtained before the real-time instantaneous air pressure are obtained as the first instantaneous air pressure, and then the first instantaneous air pressure is used as the first instantaneous air pressure. The instantaneous air pressure and the real-time instantaneous air pressure are used as a sliding air pressure sequence to form a sliding air pressure sequence including N instantaneous air pressures. N is a positive integer greater than or equal to 1, and the value of N can be determined according to the actual situation, which is specifically limited here.
步骤S42:将所述滑动气压序列的平均值确定为第一稳态基准值。Step S42: Determine the average value of the sliding air pressure sequence as the first steady-state reference value.
在得到所述滑动气压序列之后,计算所述滑动气压序列的平均值,以便将所述滑动气压序列的平均值作为第一稳态基准值。After the sliding air pressure sequence is obtained, the average value of the sliding air pressure sequence is calculated, so that the average value of the sliding air pressure sequence is used as the first steady-state reference value.
步骤S43:判断所述实时瞬时气压与所述第一稳态基准值之间的差值是否大于或等于第一阈值。Step S43: Determine 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.
确定出所述第一稳态气压值之后,便可以判断所述实时瞬时气压与所述第一稳态基准值之间的差值是否大于或等于第一阈值。也即判断当前获取到的实时瞬时气压值相对第一稳态基准值的波动是否超过阈值,以确定所述预设气压触发器当前所处状态为楼层切换状态,还是楼层稳定状态。After the first steady-state air pressure value is determined, it can 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, it is determined whether the fluctuation of the currently obtained real-time instantaneous air pressure value relative to the first steady-state reference value exceeds a threshold value, so as to determine whether the current state of the preset air pressure trigger is a floor switching state or a floor stable state.
步骤S44:如果所述实时瞬时气压与所述第一稳态基准值之间的差值大于或等于第一阈值,则判定所述预设气压触发器当前所处状态为楼层切换状态。Step S44: If 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, determine that the current state of the preset air pressure trigger is a floor switching state.
判断所述实时瞬时气压与所述第一稳态基准值之间的差值是否大于或等于第一阈值。如果所述实时瞬时气压与所述第一稳态基准值之间的差值大于或等于第一阈值,则判定所述预设气压触发器当前所处状态为楼层切换状态。如果所述实时瞬时气压与所述第一稳态基准值之间的差值小于第一阈值,则判定所述预设气压触发器当前所处状态依然为楼层稳定状态。It is judged 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. If 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, it is determined that the current state of the preset air pressure trigger is a floor switching state. If the difference between the real-time instantaneous air pressure and the first steady-state reference value is smaller than the first threshold, it is determined that the current state of the preset air pressure trigger is still a floor stable state.
步骤S45:如果所述预设气压触发器中的已保存状态为楼层切换状态,则将所述预设气压触发器获取到的实时瞬时气压和第二瞬时气压作为滑动气压序列,其中,所述第二瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压。Step S45: If the saved state in the preset air pressure trigger is the floor switching state, use the real-time instantaneous air pressure and the second instantaneous air pressure obtained by the preset air pressure trigger as a sliding air pressure sequence, wherein the The second instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained.
在具体的实施过程中,如果所述预设气压触发器中的已保存状态为楼层切换状态,则将所述预设气压触发器获取到的实时瞬时气压和第二瞬时气压作为滑动气压序列,其中,所述第二瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压。也即,例如,如果所述预设气压 触发器中的已保存状态为楼层切换状态,则将获取到所述实时瞬时气压之前获取到的N-1个瞬时气压作为第二瞬时气压,然后将第二瞬时气压和所述实时瞬时气压作为滑动气压序列。In a specific implementation process, if the saved state in the preset air pressure trigger is the floor switching state, the real-time instantaneous air pressure and the second instantaneous air pressure obtained by the preset air pressure trigger are used as the sliding air pressure sequence, The second instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained. That is, for example, if the saved state in the preset air pressure trigger is the floor switching state, the N-1 instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained as the second instantaneous air pressure, and then the The second instantaneous air pressure and the real-time instantaneous air pressure serve as a sequence of sliding air pressures.
步骤S46:将所述滑动气压序列的平均值确定为动态气压值。Step S46: Determine the average value of the sliding air pressure sequence as the 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 the dynamic air pressure value, so as to judge the current state.
步骤S47:判断所述动态气压值与第二稳态基准值之间的差值是否大于或等于第二阈值,其中,所述第二稳态基准值为所述预设气压触发器处于所述楼层切换状态之前最后一次获取到的瞬时气压和第三瞬时气压的平均值,所述第三瞬时气压为所述预设气压触发器处于所述楼层切换状态之前最后一次获取到瞬时气压之前获取到的预设数量个瞬时气压。Step S47: judging whether the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, wherein the second steady-state reference value is when the preset air pressure trigger is in the The average value of the instantaneous air pressure obtained for the last time before the floor switching state and the third instantaneous air pressure, the third instantaneous air pressure is obtained before the last instantaneous air pressure obtained before the preset air pressure trigger is in the floor switching state The preset number of instantaneous air pressures.
在得到所述动态气压值之后,还需要判断所述动态气压值与第二稳态基准值之间的差值是否大于或等于第二阈值,其中,所述第二稳态基准值为所述预设气压触发器处于所述楼层切换状态之前最后一次获取到的瞬时气压和第三瞬时气压的平均值,所述第三瞬时气压为所述预设气压触发器处于所述楼层切换状态之前最后一次获取到瞬时气压之前获取到的预设数量个瞬时气压,也即,当所述预设气压触发器在处于楼层稳定时,获取到一个瞬时气压,这个瞬时气压表明开始出现楼层切换,则将获取到这个瞬时气压之前最后一次获取到的瞬时气压以及最后一次获取到瞬时气压之前获取到的N-1个瞬时气压的平均值确定为第二稳态基准值,并对所述第二稳态基准值进行存储,以便后续调用。After the dynamic air pressure value is obtained, it is also necessary to determine whether the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, wherein the second steady-state reference value is the The average value of the instantaneous air pressure obtained last time before the preset air pressure trigger is in the floor switching state and the third instantaneous air pressure, and the third instantaneous air pressure is the last air pressure before the preset air pressure trigger is in the floor switching state. The preset number of instantaneous air pressures obtained before the instantaneous air pressure is obtained at one time, that is, when the preset air pressure trigger is at a stable floor, an instantaneous air pressure is obtained, and this instantaneous air pressure indicates that floor switching begins to occur. The instantaneous air pressure obtained for the last time before the instantaneous air pressure is obtained and the average value of N-1 instantaneous air pressures obtained before the instantaneous air pressure is obtained for the last time is determined as the second steady-state reference value, and the second steady-state air pressure is determined as the second steady-state reference value. The reference value is stored for subsequent calls.
其中,所述第一阈值和所述第二阈值可以相同也可以不相同。Wherein, the first threshold and the second threshold may be the same or different.
步骤S48:如果所述动态气压值与所述第二稳态基准值之间的差值大于或等于第二阈值,则判定所述预设气压触发器当前所处状态仍为楼层切换状态。Step S48: If the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, it is determined that the current state of the preset air pressure trigger is still a floor switching state.
判断所述动态气压值与第二稳态基准值之间的差值是否大于或等于第二阈值之后,如果所述动态气压值与所述第二稳态基准值之间的差值大于或等于第二阈值,则判定所述预设气压触发器当前所处状态为楼层切换状态。如果所述动态气压值与所述第二稳态基准值之间的差值小于第二阈值, 则为气压异常波动,判定所述预设气压触发器当前所处状态依然为楼层稳定状态。After judging whether the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, if the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to For the second threshold, it is determined that the current state of the preset air pressure trigger is a floor switching state. If the difference between the dynamic air pressure value and the second steady-state reference value is smaller than the second threshold, it is abnormal air pressure fluctuation, and it is determined that the current state of the preset air pressure trigger is still the floor stable state.
判定预设气压触发器当前所处状态仍为楼层切换状态之前,还包括:判断所述实时瞬时气压以及第四瞬时气压的平均值之间的差值是否小于第三阈值,其中,所述第四瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压;如果所述实时瞬时气压以及第四瞬时气压的平均值之间的差值小于第三阈值,则判定气压趋于稳定,楼层切换状态结束,所述预设气压触发器由楼层切换状态调整为楼层稳定状态。也即,当实时瞬时气压与第二稳态基准值之间的差值持续大于或等于第二阈值时,保持楼层切换状态并保持楼层识别算法的开启,但在前N-1个气压数据的平均值与当前的实时瞬时气之间的差值小于第三阈值时,视为环境气压趋于稳定,楼层变化结束,此时,由楼层切换状态转为楼层稳定状态,关闭楼层识别算法。Before judging that the current state of the preset air pressure trigger is still the floor switching state, the method further includes: judging whether the difference between the real-time instantaneous air pressure and the average value of the fourth instantaneous air pressure is less than a third threshold, wherein the first The four instantaneous air pressures are the preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained; if the difference between the real-time instantaneous air pressure and the average value of the fourth instantaneous air pressure is less than the third threshold, it is determined that the air pressure tends to After stabilization, the floor switching state ends, and the preset air pressure trigger is adjusted 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, the floor switching state is maintained and the floor recognition algorithm is kept on, but in the first N-1 air pressure data When the difference between the average value and the current real-time instantaneous gas is less than the third threshold, it is considered that the ambient air pressure tends to be stable, and the floor change ends.
其中,所述第一阈值、所述第二阈值以及所述第三阈值可以根据实际应用场景确定,在此不做具体限定。The first threshold, the second threshold and the third threshold may be determined according to actual application scenarios, which are not specifically limited herein.
参见图7所示,为预设气压触发器工作流程图。其中,此处前述的第一阈值和第二阈值相同,均为m hPa,第三阈值为n hPa。当所述预设气压触发器处于楼层稳定状态时,计算基准稳态气压,然后判断实时瞬时气压和第一稳态基准气压之间的差值是否大于m hPa,如果是,则判定所述预设气压触发器当前所处状态为楼层切换状态,开启楼层识别算法,计算动态气压值,判断动态气压值与第二稳态基准值之间的差值是否大于m hPa,如果否,则为气压波动导致的误判,返回楼层稳定状态,关闭楼层识别算法。如果是,则持续楼层切换状态,保持开启楼层识别算法。更新动态气压值,判断当前瞬时气压以及前一刻动态气压值之间的差值是否小于nhPa,其中,所述前一刻动态气压值为当前瞬时气压之前的N-1个气压数据的平均值,如果否,则持续楼层切换状态,保持开启楼层识别算法。如果是,则返回楼层稳定状态,关闭楼层识别算法。Referring to Figure 7, it is a working flow chart of the preset air pressure trigger. Wherein, the aforementioned first threshold and second threshold are the same as m hPa, and the third threshold is n hPa. When the preset air pressure trigger is in the stable state of the floor, calculate the reference steady state air pressure, and then judge whether the difference between the real-time instantaneous air pressure and the first steady state reference air pressure is greater than m hPa, and if so, judge the preset air pressure Set the current state of the air pressure trigger to the floor switching state, open the floor identification algorithm, calculate the dynamic air pressure value, and determine whether the difference between the dynamic air pressure value and the second steady-state reference value is greater than m hPa, if not, it is the air pressure In case of misjudgment caused by fluctuation, return to the stable state of the floor and close the floor recognition algorithm. If it is, the floor switching state is continued, and the floor identification algorithm is kept enabled. Update the dynamic air pressure value, and determine whether the difference between the current instantaneous air pressure and the dynamic air pressure value at the previous moment is less than nhPa, wherein the dynamic air pressure value at the previous moment is the average value of N-1 air pressure data before the current instantaneous air pressure, if If not, the floor switching state is continued, and the floor identification algorithm is kept enabled. If yes, return to the floor stable state and close the floor recognition algorithm.
参见图8所示,本发明实施例公开了一种具体的定位方法,应用于基于Android的移动终端,包括:Referring to FIG. 8 , an embodiment of the present invention discloses a specific positioning method, which is applied to an Android-based mobile terminal, including:
步骤S51:根据获取到的实时GNSS信号确定当前所处环境。Step S51: Determine the current environment according to the acquired real-time GNSS signal.
步骤S52:如果当前所处环境为室内环境,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇。Step S52: If the current environment is an indoor environment, the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library.
步骤S53:根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态。Step S53: Determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state.
步骤S54:根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标。Step S54: Determine the first current horizontal coordinate according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library.
步骤S55:基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将当前所处楼宇、当前所处楼层以及所述第二当前水平坐标作为定位结果。Step S55: Determine a second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and use the current building, the current floor and the second current horizontal coordinate as a positioning result.
其中,步骤S51至步骤S55的具体实施实施过程可知参考前述实施例中公开的内容,在此不再进行赘述。For the specific implementation process of steps S51 to S55, reference can be made to the contents disclosed in the foregoing embodiments, and details are not repeated here.
步骤S56:如果当前所处环境为室外环境,则获取预设定位装置采集到的第三当前水平坐标。Step S56: If the current environment is an outdoor environment, acquire the third current horizontal coordinate collected by the preset positioning device.
在确定出当前所述环境之后,如果当前所处环境为室外环境,则获取预设定位装置采集到的第三当前水平坐标。其中,所述预设定位装置包括但不限于GPS。After the current environment is determined, if the current environment is an outdoor environment, the third current horizontal coordinate collected by the preset positioning device is acquired. Wherein, the preset positioning device includes but is not limited to GPS.
步骤S57:基于所述第三当前水平坐标和获取到的行为轨迹确定定位结果。Step S57: Determine 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 behavioral trajectory. Specifically, the positioning result may be determined based on the Kalman filtering algorithm, the third current horizontal coordinate, and the acquired behavior trajectory.
在刚处于室外状态时,进行初始定位状态,单独由预设定位装置获取第一个水平坐标并由该位置初始化行人轨迹推算,然后进入连续定位状态。在连续定位状态下,基于卡尔曼滤波器对预设定位装置采集到的水平坐标与行人轨迹进行处理,获得室外环境下的最终定位结果。When it is just in the outdoor state, the initial positioning state is performed, the first horizontal coordinate is obtained by the preset positioning device alone, and the pedestrian trajectory estimation is initialized from this position, and then the continuous positioning state is entered. In the continuous positioning state, the horizontal coordinates and pedestrian trajectories collected by the preset positioning device are processed based on the Kalman filter to obtain the final positioning result in the outdoor environment.
参见图9所示,本发明实施例还相应公开了一种定位装置,应用于基于Android的移动终端,所述装置包括:室内外环境识别模块11、Wi-Fi指纹定位模块12、定位结果融合模块13,所述Wi-Fi指纹定位模块包括楼宇识别子模块121、楼层识别子模块122、水平位置定位子模块123;Referring to FIG. 9 , an embodiment of the present invention also discloses a positioning device, which is applied to an Android-based mobile terminal. The device includes: an indoor and outdoor environment identification module 11 , a Wi-Fi fingerprint positioning module 12 , and a positioning result fusion Module 13, the Wi-Fi fingerprint positioning module includes a building identification sub-module 121, a floor identification sub-module 122, and a horizontal position positioning sub-module 123;
其中,所述室内外环境识别模块11,用于根据获取到的实时GNSS信号确定当前所处环境;Wherein, the indoor and outdoor environment identification module 11 is used to determine the current environment according to the acquired real-time GNSS signal;
所述楼宇识别子模块121,用于在当前所处环境为室内环境时,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇;The building identification sub-module 121 is used to determine the current building according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library when the current environment is an indoor environment;
所述楼层识别子模块122,用于根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态;The floor identification sub-module 122 is configured to determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state;
所述水平位置定位子模块123,用于根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与所述当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标;The horizontal position positioning sub-module 123 is configured to determine the first current level according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library coordinate;
所述定位结果融合模块13,用于基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将所述当前所处楼宇、所述当前所处楼层以及所述第二当前水平坐标作为定位结果。The positioning result fusion module 13 is used to determine the second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and combine the current building, the current floor and the first current horizontal coordinate. 2. The current horizontal coordinate is used as the positioning result.
可见,本发明先根据获取到的实时GNSS信号确定当前所处环境,如果当前所处环境为室内环境,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇,并根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态,然后再根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标,接着便可基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将当前所处楼宇、当前所处楼层以及所述第二当前水平坐标作为定位结果。相比现有技术中使用多传感器确定当前所处环境为室内还是室外的处理方法,本申请以GNSS信号为基础的信号分类办法具有计算简单、硬件复杂度低的优点,从而提高了定位方法的实用性;利用Wi-Fi指纹识别实现楼宇、楼层定位,无需额外的传感器信号,计算流程简单; 此外,根据预设气压触发器当前所处状态为楼层稳定状态或楼层切换状态具体确定当前所处楼层,无需绝对气压值或额外移动终端,提高了楼层识别的准确度,降低了错误率,且使用成本更低,且可兼容乘用升降梯或电扶手梯、步行于楼梯间等多种行动场景,使得楼层识别在不同的环境下均能适用。此外,本申请先确定当前环境为室内环境还是室外环境,如果当前环境为室内环境,再确定当前所处楼宇,再根据当前所述楼宇确定当前所处楼层,接着根据当前所处楼层确定水平坐标,形成多维度层层递进的室内定位方法,构建了完整的定位框架,有更强的实用性。It can be seen that the present invention first determines the current environment according to the acquired real-time GNSS signals. If the current environment is an indoor environment, the current location is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library. building, and determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes the floor stability state and the floor switching state, and then according to the real-time Wi-Fi The first current horizontal coordinate can be determined based on the data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library, and then the first current horizontal coordinate can be determined based on the first current horizontal coordinate and the obtained pedestrian trajectory. The second current horizontal coordinate, and the currently located building, the currently located floor and the second current horizontal coordinate are used as the positioning result. Compared with the processing method of using multiple sensors to determine whether the current environment is indoor or outdoor in the prior art, the signal classification method based on the GNSS signal of the present application has the advantages of simple calculation and low hardware complexity, thereby improving the positioning method. Practicality; use Wi-Fi fingerprint recognition to realize building and floor positioning, without additional sensor signals, and the calculation process is simple; in addition, according to the current state of the preset air pressure trigger, the current state of the floor stability state or the floor switching state is specifically determined. Floor, without absolute air pressure or additional mobile terminal, improves the accuracy of floor recognition, reduces the error rate, and lowers the cost of use, and is compatible with various actions such as passenger lifts or escalators, walking in stairwells, etc. scene, so that floor recognition can be applied in different environments. In addition, this application first determines whether the current environment is an indoor environment or an outdoor environment, and if the current environment is an indoor environment, then determines the current building, then determines the current floor according to the current building, and then determines the horizontal coordinates according to the current floor. , forming a multi-dimensional progressive indoor positioning method, constructing a complete positioning framework, with stronger practicability.
具体的,所述室内外环境识别模块11,用于:Specifically, the indoor and outdoor environment identification module 11 is used for:
确定获取到的所述实时GNSS信号的目标参数;determining the acquired target parameters of the real-time GNSS signal;
将所述目标参数输入预先得到的信号分类器中,并根据所述信号分类器的输出确定当前所处环境。The target parameter is input into a pre-obtained signal classifier, and the current environment is determined according to the output of the signal classifier.
具体的,所述楼宇识别子模块121,用于:Specifically, the building identification sub-module 121 is used for:
根据所述预设Wi-Fi信号地图库确定出所述预设Wi-Fi信号地图库中各个楼宇的Wi-Fi指纹;Determine the Wi-Fi fingerprints of each building in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library;
分别确定所述实时Wi-Fi数据与各个所述楼宇的Wi-Fi指纹的第一相似度;respectively determining the first similarity between the real-time Wi-Fi data and the Wi-Fi fingerprints of each of the buildings;
根据所述第一相似度确定当前所处楼宇。The current building is determined according to the first similarity.
进一步的,所述水平位置定位子模块123,用于:Further, the horizontal position positioning sub-module 123 is used for:
根据WKNN算法、所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中当前所处楼层对应的Wi-Fi信号地图确定所述第一当前水平坐标。The first current horizontal coordinate is determined according to the WKNN algorithm, the real-time Wi-Fi data, and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library.
具体的,所述定位结果融合模块13,用于:Specifically, the positioning result fusion module 13 is used for:
基于卡尔曼滤波算法、所述第一当前水平坐标和获取到的行人轨迹确定所述第二当前水平坐标。The second current horizontal coordinate is determined based on the Kalman filter algorithm, the first current horizontal coordinate and the acquired pedestrian trajectory.
进一步的,所述定位装置,还包括:Further, the positioning device also includes:
预设定位装置,用于在当前所处环境为室外环境,则采集到第三当前水平坐标;The preset positioning device is used to collect the third current horizontal coordinate when the current environment is an outdoor environment;
相应的,所述定位结果融合模块13,用于:基于所述第三当前水平坐标和获取到的行为轨迹确定定位结果。Correspondingly, the positioning result fusion module 13 is configured to: determine a positioning result based on the third current horizontal coordinate and the acquired behavior track.
所述楼层识别子模块122,用于:在所述预设气压触发器当前处于楼层稳定状态时,则将上一次获取到实时Wi-Fi数据时确定出的楼层作为当前所处楼层;The floor identification sub-module 122 is configured to: when the preset air pressure trigger is currently in a stable floor state, take the floor determined when the real-time Wi-Fi data was acquired last time as the current floor;
在所述预设气压触发器当前处于楼层切换状态时,则根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼宇对应的Wi-Fi信号地图集确定当前所处楼层。When the preset air pressure trigger is currently in a floor switching state, it is determined according to the real-time Wi-Fi data and the Wi-Fi signal atlas corresponding to the current building in the preset Wi-Fi signal map library The current floor.
进一步的,所述楼层识别子模块122,用于:Further, the floor identification sub-module 122 is used for:
从所述预设Wi-Fi信号地图库中确定出与当前所处楼宇对应的Wi-Fi信号地图集;Determine the Wi-Fi signal atlas corresponding to the current building from the preset Wi-Fi signal atlas;
分别确定所述实时Wi-Fi数据与所述Wi-Fi信号地图集中各个Wi-Fi指纹的第二相似度,其中,所述Wi-Fi信号地图集的一个Wi-Fi信号地图中包括多个Wi-Fi指纹,一个Wi-Fi信号地图对应一个楼层;Respectively determine the second similarity between the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal atlas, wherein a Wi-Fi signal map in the Wi-Fi signal atlas includes multiple Wi-Fi fingerprint, a Wi-Fi signal map corresponds to a floor;
根据所述第二相似度确定出预选Wi-Fi指纹;determining a preselected Wi-Fi fingerprint according to the second similarity;
确定所述预选Wi-Fi指纹中各个Wi-Fi指纹对应的楼层信息;determining the floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprint;
将所述楼层信息中出现次数最多的楼层确定为当前所处楼层。The floor with the largest number of occurrences in the floor information is determined as the current floor.
具体的,所述定位装置,还包括:Specifically, the positioning device further includes:
气压触发器状态确定模块,用于:根据所述预设气压触发器中的已保存状态和获取到的实时瞬时气压确定所述预设气压触发器当前所处状态。The air pressure trigger state determination module is configured to: determine the current state of the preset air pressure trigger according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure.
具体的,所述气压触发器状态确定模块,用于:Specifically, the air pressure trigger state determination module is used for:
在所述预设气压触发器中的已保存状态为楼层稳定状态时,则将所述预设气压触发器获取到的实时瞬时气压和第一瞬时气压作为滑动气压序列,其中,所述第一瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压;When the saved state in the preset air pressure trigger is the floor stable state, the real-time instantaneous air pressure and the first instantaneous air pressure obtained by the preset air pressure trigger are used as the sliding air pressure sequence, wherein the first air pressure An instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained;
将所述滑动气压序列的平均值确定为第一稳态基准值;determining the average value of the sliding air pressure sequence as the first steady-state reference value;
判断所述实时瞬时气压与所述第一稳态基准值之间的差值是否大于或等于第一阈值;judging 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;
如果所述实时瞬时气压与所述第一稳态基准值之间的差值大于或等于第一阈值,则判定所述预设气压触发器当前所处状态为楼层切换状态。If 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, it is determined that the current state of the preset air pressure trigger is a floor switching state.
具体的,所述气压触发器状态确定模块,用于:Specifically, the air pressure trigger state determination module is used for:
在所述预设气压触发器中的已保存状态为楼层切换状态时,则将所述预设气压触发器获取到的实时瞬时气压和第二瞬时气压作为滑动气压序列,其中,所述第二瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压;When the saved state in the preset air pressure trigger is the floor switching state, the real-time instantaneous air pressure and the second instantaneous air pressure obtained by the preset air pressure trigger are used as the sliding air pressure sequence, wherein the second air pressure The instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained;
将所述滑动气压序列的平均值确定为动态气压值;determining the average value of the sliding air pressure sequence as a dynamic air pressure value;
判断所述动态气压值与第二稳态基准值之间的差值是否大于或等于第二阈值,其中,所述第二稳态基准值为所述预设气压触发器处于所述楼层切换状态之前最后一次获取到的瞬时气压和第三瞬时气压的平均值,所述第三瞬时气压为所述预设气压触发器处于所述楼层切换状态之前最后一次获取到瞬时气压之前获取到的预设数量个瞬时气压;Determine whether the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, wherein the second steady-state reference value is in the floor switching state of the preset air pressure trigger The average value of the instantaneous air pressure obtained for the last time before and the third instantaneous air pressure, the third instantaneous air pressure is the preset air pressure obtained before the last instantaneous air pressure obtained before the preset air pressure trigger is in the floor switching state Number of instantaneous air pressure;
如果所述动态气压值与所述第二稳态基准值之间的差值大于或等于第二阈值,则判定所述预设气压触发器当前所处状态仍为楼层切换状态。If the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, it is determined that the current state of the preset air pressure trigger is still a floor switching state.
此外,所述气压触发器状态确定模块,还用于:In addition, the air pressure trigger state determination module is also used for:
判断所述实时瞬时气压以及第四瞬时气压的平均值之间的差值是否小于第三阈值,其中,所述第四瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压;Determine whether the difference between the real-time instantaneous air pressure and the average value of the fourth instantaneous air pressure is less than a third threshold, wherein the fourth instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained air pressure;
如果所述实时瞬时气压以及第四瞬时气压的平均值之间的差值小于第三阈值,则判定气压趋于稳定,楼层切换状态结束,所述预设气压触发器由楼层切换状态调整为楼层稳定状态。If the difference between the real-time instantaneous air pressure and the average value of the fourth instantaneous air pressure is smaller than the third threshold, it is determined that the air pressure tends to be stable, the floor switching state ends, and the preset air pressure trigger is adjusted from the floor switching state to the floor stable state.
在具体的实施过程中,所述定位装置,还包括行人轨迹推算模块,用于确定行人轨迹。In a specific implementation process, the positioning device further includes a pedestrian trajectory estimation module for determining the pedestrian trajectory.
参见图10所示,为一种定位流程图。首先由室内外环境识别模块确定当前室内或室外环境。若为室外环境,开启GPS定位模块(也即所述预设定位装置)、行人轨迹推算模块和定位结果融合模块,并进入初始定位状态。在初始定位状态下,单独由GPS定位模块获取第一个水平坐标并由该位置初始化行人轨迹推算模块,然后进入连续定位状态。在连续定位状态下,基于卡尔曼滤波器构建的定位结果融合模块将GPS定位与行人轨迹推算模块各自得到的定位结果进行处理,获得室外环境下的最终定位结果。若为室内环境,开启Wi-Fi指纹定位模块、行人轨迹推算模块和定位结果融 合模块后首先进入初始定位状态。在初始定位状态下,依次由楼宇识别子模块、楼层定位子模块、水平位置定位子模块计算当前所在楼宇、楼层和第一个水平坐标;然后由该水平坐标作为行人轨迹推算模块的初始位置并进入连续定位状态。在连续定位状态下,楼宇识别子模块保持开启和计算,而楼层定位子模块则根据其气压触发器触发结果开启或关闭楼层识别计算。水平位置定位子模块保持开启和计算,且计算结果与行人轨迹推算结果经定位结果融合模块处理后再得到行人的水平坐标。最后,当前楼宇、楼层和水平坐标作为综合定位结果输出。Referring to Fig. 10, it is a flow chart of positioning. First, the current indoor or outdoor environment is determined by the indoor and outdoor environment recognition module. If it is an outdoor environment, turn on the GPS positioning module (that is, the preset positioning device), the pedestrian trajectory estimation module and the positioning result fusion module, and enter the initial positioning state. In the initial positioning state, the GPS positioning module alone obtains the first horizontal coordinate and initializes the pedestrian trajectory estimation module from this position, and then enters the continuous positioning state. In the continuous positioning state, the positioning result fusion module constructed based on the Kalman filter processes the positioning results obtained by the GPS positioning and pedestrian trajectory estimation modules to obtain the final positioning results in the outdoor environment. If it is an indoor environment, turn on the Wi-Fi fingerprint positioning module, the pedestrian trajectory estimation module and the positioning result fusion module, and then enter the initial positioning state first. In the initial positioning state, the building identification sub-module, the floor positioning sub-module, and the horizontal position positioning sub-module calculate the current building, floor and the first horizontal coordinate in turn; then the horizontal coordinate is used as the initial position of the pedestrian trajectory estimation module and Enter the continuous positioning state. In the continuous positioning state, the building identification sub-module keeps on and calculates, while the floor positioning sub-module turns on or off the floor identification calculation according to the triggering result of its air pressure trigger. The horizontal position positioning sub-module is kept open and calculated, and the calculation result and the pedestrian trajectory estimation result are processed by the positioning result fusion module to obtain the horizontal coordinates of the pedestrian. Finally, the current building, floor and horizontal coordinates are output as the comprehensive positioning result.
参见图11所示,本发明实施例还公开了一种基于Android的移动终端,包括:Referring to FIG. 11 , an embodiment of the present invention further discloses an Android-based mobile terminal, including:
处理器21以及存储器22; processor 21 and memory 22;
其中,所述存储器22,用于存储计算机程序;Wherein, the memory 22 is used to store computer programs;
所述处理器21,用于执行所述计算机程序,以实现前述实施例中公开的定位方法步骤。The processor 21 is configured to execute the computer program to implement the steps of the positioning method disclosed in the foregoing embodiments.
其中,关于上述定位方法的具体过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For the specific process of the above positioning method, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
另外,本发明实施例还公开了一种计算机可读存储介质,用于存储计算机程序,计算机程序被处理器执行时实现前述实施例中公开的定位方法的步骤。In addition, the embodiments of the present invention also disclose a computer-readable storage medium for storing a computer program, and when the computer program is executed by a processor, the steps of the positioning method disclosed in the foregoing embodiments are implemented.
其中,关于上述定位方法的具体过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For the specific process of the above positioning method, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各 示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals may further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the possibilities of hardware and software. Interchangeability, the above description has generally described the components and steps of each example in terms of functionality. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in conjunction with the embodiments disclosed herein may be directly implemented in hardware, a software module executed by a processor, or a combination of the two. A software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者移动终端不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者移动终端所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者移动终端中还存在另外的相同要素。Finally, it should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or there is any such actual relationship or sequence between operations. Furthermore, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or mobile terminal that includes a list of elements includes not only those elements, but also a non-exclusive list of elements. other elements, or also include elements inherent to such a process, method, article or mobile terminal. Without further limitation, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or mobile terminal that includes the element.
以上对本发明所提供的一种定位方法、装置、移动终端、存储介质进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A positioning method, device, mobile terminal, and storage medium provided by the present invention have been described in detail above. The principles and implementations of the present invention are described with specific examples in this paper. The descriptions of the above embodiments are only used to help Understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. In summary, the content of this specification does not It should be understood as a limitation of the present invention.

Claims (15)

  1. 一种定位方法,其特征在于,应用于基于Android的移动终端,包括:A positioning method, characterized in that, applied to an Android-based mobile terminal, comprising:
    根据获取到的实时GNSS信号确定当前所处环境;Determine the current environment according to the acquired real-time GNSS signals;
    如果当前所处环境为室内环境,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇;If the current environment is an indoor environment, the current building is determined according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library;
    根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态;The current floor is determined according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state;
    根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标;Determine the first current horizontal coordinate according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library;
    基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将当前所处楼宇、当前所处楼层以及所述第二当前水平坐标作为定位结果。A second current horizontal coordinate is 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 a positioning result.
  2. 根据权利要求1所述的定位方法,其特征在于,所述根据获取到的实时GNSS信号确定当前所处环境,包括:The positioning method according to claim 1, wherein the determining the current environment according to the acquired real-time GNSS signal comprises:
    确定获取到的所述实时GNSS信号的目标参数;determining the acquired target parameters of the real-time GNSS signal;
    将所述目标参数输入预先得到的信号分类器中,并根据所述信号分类器的输出确定当前所处环境。The target parameter is input into a pre-obtained signal classifier, and the current environment is determined according to the output of the signal classifier.
  3. 根据权利要求1所述的定位方法,其特征在于,所述根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇,包括:The positioning method according to claim 1, wherein determining the current building according to the acquired real-time Wi-Fi data and a preset Wi-Fi signal map library, comprising:
    根据所述预设Wi-Fi信号地图库确定出所述预设Wi-Fi信号地图库中各个楼宇的Wi-Fi指纹;Determine the Wi-Fi fingerprints of each building in the preset Wi-Fi signal map library according to the preset Wi-Fi signal map library;
    分别确定所述实时Wi-Fi数据与各个所述楼宇的Wi-Fi指纹的第一相似度;respectively determining the first similarity between the real-time Wi-Fi data and the Wi-Fi fingerprints of each of the buildings;
    根据所述第一相似度确定当前所处楼宇。The current building is determined according to the first similarity.
  4. 根据权利要求1所述的定位方法,其特征在于,所述根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标,包括:The positioning method according to claim 1, characterized in that, determining the first Wi-Fi signal map according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library Current horizontal coordinates, including:
    根据WKNN算法、所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中当前所处楼层对应的Wi-Fi信号地图确定所述第一当前水平坐标。The first current horizontal coordinate is determined according to the WKNN algorithm, the real-time Wi-Fi data, and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library.
  5. 根据权利要求1所述的定位方法,其特征在于,所述基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,包括:The positioning method according to claim 1, wherein the determining the second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, comprising:
    基于卡尔曼滤波算法、所述第一当前水平坐标和获取到的行人轨迹确定所述第二当前水平坐标。The second current horizontal coordinate is determined based on the Kalman filter algorithm, the first current horizontal coordinate and the acquired pedestrian trajectory.
  6. 根据权利要求1所述的定位方法,其特征在于,所述根据获取到的实时GNSS信号确定当前所处环境之后,还包括:The positioning method according to claim 1, wherein after determining the current environment according to the acquired real-time GNSS signal, the method further comprises:
    如果当前所处环境为室外环境,则获取预设定位装置采集到的第三当前水平坐标;If the current environment is an outdoor environment, acquiring the third current horizontal coordinate collected by the preset positioning device;
    基于所述第三当前水平坐标和获取到的行为轨迹确定定位结果。The positioning result is determined based on the third current horizontal coordinate and the acquired behavior track.
  7. 根据权利要求1所述的定位方法,其特征在于,所述根据预设气压触发器当前所处状态确定当前所处楼层,包括:The positioning method according to claim 1, wherein the determining the current floor according to the current state of the preset air pressure trigger comprises:
    如果所述预设气压触发器当前处于楼层稳定状态,则将上一次获取到实时Wi-Fi数据时确定出的楼层作为当前所处楼层;If the preset air pressure trigger is currently in a stable floor state, the floor determined when the real-time Wi-Fi data was acquired last time is used as the current floor;
    如果所述预设气压触发器当前处于楼层切换状态,则根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼宇对应的Wi-Fi信号地图集确定当前所处楼层。If the preset air pressure trigger is currently in a floor switching state, the current Wi-Fi signal atlas corresponding to the current building is determined according to the real-time Wi-Fi data and the preset Wi-Fi signal map library. floor.
  8. 根据权利要求7所述的定位方法,其特征在于,所述根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与当前所处楼宇对应的Wi-Fi信号地图集确定当前所处楼层,包括:The positioning method according to claim 7, wherein the determining is based on the real-time Wi-Fi data and the Wi-Fi signal atlas corresponding to the current building in the preset Wi-Fi signal atlas. The current floor, including:
    从所述预设Wi-Fi信号地图库中确定出与当前所处楼宇对应的Wi-Fi信号地图集;Determine the Wi-Fi signal atlas corresponding to the current building from the preset Wi-Fi signal atlas;
    分别确定所述实时Wi-Fi数据与所述Wi-Fi信号地图集中各个Wi-Fi指纹的第二相似度,其中,所述Wi-Fi信号地图集的一个Wi-Fi信号地图中包括多个Wi-Fi指纹,一个Wi-Fi信号地图对应一个楼层;Respectively determine the second similarity between the real-time Wi-Fi data and each Wi-Fi fingerprint in the Wi-Fi signal atlas, wherein a Wi-Fi signal map in the Wi-Fi signal atlas includes multiple Wi-Fi fingerprint, a Wi-Fi signal map corresponds to a floor;
    根据所述第二相似度确定出预选Wi-Fi指纹;determining a preselected Wi-Fi fingerprint according to the second similarity;
    确定所述预选Wi-Fi指纹中各个Wi-Fi指纹对应的楼层信息;determining the floor information corresponding to each Wi-Fi fingerprint in the preselected Wi-Fi fingerprint;
    将所述楼层信息中出现次数最多的楼层确定为当前所处楼层。The floor with the largest number of occurrences in the floor information is determined as the current floor.
  9. 根据权利要求1至8任一项所述的定位方法,其特征在于,所述根据预设气压触发器当前所处状态确定当前所处楼层之前,还包括:The positioning 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:
    根据所述预设气压触发器中的已保存状态和获取到的实时瞬时气压确定所述预设气压触发器当前所处状态。The current state of the preset air pressure trigger is determined according to the saved state of the preset air pressure trigger and the acquired real-time instantaneous air pressure.
  10. 根据权利要求9所述的定位方法,其特征在于,所述根据所述预设气压触发器中的已保存状态和获取到的实时瞬时气压确定所述预设气压触发器当前所处状态,包括:The positioning method according to claim 9, wherein the determining the current state of the preset air pressure trigger according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure, comprising: :
    如果所述预设气压触发器中的已保存状态为楼层稳定状态,则将所述预设气压触发器获取到的实时瞬时气压和第一瞬时气压作为滑动气压序列,其中,所述第一瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压;If the saved state in the preset air pressure trigger is the floor stable state, the real-time instantaneous air pressure and the first instantaneous air pressure obtained by the preset air pressure trigger are used as a sliding air pressure sequence, wherein the first air pressure The instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained;
    将所述滑动气压序列的平均值确定为第一稳态基准值;determining the average value of the sliding air pressure sequence as the first steady-state reference value;
    判断所述实时瞬时气压与所述第一稳态基准值之间的差值是否大于或等于第一阈值;judging 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;
    如果所述实时瞬时气压与所述第一稳态基准值之间的差值大于或等于第一阈值,则判定所述预设气压触发器当前所处状态为楼层切换状态。If 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, it is determined that the current state of the preset air pressure trigger is a floor switching state.
  11. 根据权利要求9所述的定位方法,其特征在于,所述根据所述预设气压触发器中的已保存状态和获取到的实时瞬时气压确定所述预设气压触发器当前所处状态,包括:The positioning method according to claim 9, wherein the determining the current state of the preset air pressure trigger according to the saved state in the preset air pressure trigger and the acquired real-time instantaneous air pressure, comprising: :
    如果所述预设气压触发器中的已保存状态为楼层切换状态,则将所述预设气压触发器获取到的实时瞬时气压和第二瞬时气压作为滑动气压序列,其中,所述第二瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压;If the saved state in the preset air pressure trigger is the floor switching state, the real-time instantaneous air pressure and the second instantaneous air pressure obtained by the preset air pressure trigger are used as a sliding air pressure sequence, wherein the second instantaneous air pressure The air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained;
    将所述滑动气压序列的平均值确定为动态气压值;determining the average value of the sliding air pressure sequence as the dynamic air pressure value;
    判断所述动态气压值与第二稳态基准值之间的差值是否大于或等于第二阈值,其中,所述第二稳态基准值为所述预设气压触发器处于所述楼层切换状态之前最后一次获取到的瞬时气压和第三瞬时气压的平均值,所述第三瞬时气压为最后一次获取到瞬时气压之前获取到的预设数量个瞬时气压;Determine whether the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, wherein the second steady-state reference value is in the floor switching state of the preset air pressure trigger The average value of the instantaneous air pressure obtained for the last time and the third instantaneous air pressure, where the third instantaneous air pressure is a preset number of instantaneous air pressures obtained before the instantaneous air pressure is obtained for the last time;
    如果所述动态气压值与所述第二稳态基准值之间的差值大于或等于第二阈值,则判定所述预设气压触发器当前所处状态仍为楼层切换状态。If the difference between the dynamic air pressure value and the second steady-state reference value is greater than or equal to a second threshold, it is determined that the current state of the preset air pressure trigger is still a floor switching state.
  12. 根据权利要求11所述的定位方法,其特征在于,所述判定预设气压触发器当前所处状态仍为楼层切换状态之前,还包括:The positioning method according to claim 11, wherein before determining that the current state of the preset air pressure trigger is still the floor switching state, the method further comprises:
    判断所述实时瞬时气压以及第四瞬时气压的平均值之间的差值是否小于第三阈值,其中,所述第四瞬时气压为获取到所述实时瞬时气压之前获取到的预设数量个瞬时气压;Determine whether the difference between the real-time instantaneous air pressure and the average value of the fourth instantaneous air pressure is less than a third threshold, wherein the fourth instantaneous air pressure is a preset number of instantaneous air pressures obtained before the real-time instantaneous air pressure is obtained air pressure;
    如果所述实时瞬时气压以及第四瞬时气压的平均值之间的差值小于第三阈值,则判定气压趋于稳定,楼层切换状态结束,所述预设气压触发器由楼层切换状态调整为楼层稳定状态。If the difference between the real-time instantaneous air pressure and the average value of the fourth instantaneous air pressure is smaller than the third threshold, it is determined that the air pressure tends to be stable, the floor switching state ends, and the preset air pressure trigger is adjusted from the floor switching state to the floor stable state.
  13. 一种定位装置,其特征在于,应用于基于Android的移动终端,所述装置包括:室内外环境识别模块、Wi-Fi指纹定位模块、定位结果融合模块,所述Wi-Fi指纹定位模块包括楼宇识别子模块、楼层识别子模块、水平位置定位子模块;A positioning device, characterized in that it is applied to an Android-based mobile terminal, the device comprising: 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 includes a building Identification sub-module, floor identification sub-module, horizontal position positioning sub-module;
    其中,所述室内外环境识别模块,用于根据获取到的实时GNSS信号确定当前所处环境;Wherein, the indoor and outdoor environment identification module is used to determine the current environment according to the acquired real-time GNSS signal;
    所述楼宇识别子模块,用于在当前所处环境为室内环境时,则根据获取到的实时Wi-Fi数据和预设Wi-Fi信号地图库确定当前所处楼宇;The building identification sub-module is used to determine the current building according to the acquired real-time Wi-Fi data and the preset Wi-Fi signal map library when the current environment is an indoor environment;
    所述楼层识别子模块,用于根据预设气压触发器当前所处状态确定当前所处楼层,其中,所述预设气压触发器当前所处状态包括楼层稳定状态和楼层切换状态;The floor identification sub-module is configured to determine the current floor according to the current state of the preset air pressure trigger, wherein the current state of the preset air pressure trigger includes a floor stable state and a floor switching state;
    所述水平位置定位子模块,用于根据所述实时Wi-Fi数据和所述预设Wi-Fi信号地图库中与所述当前所处楼层对应的Wi-Fi信号地图确定第一当前水平坐标;The horizontal position positioning sub-module is used to determine the first current horizontal coordinate according to the real-time Wi-Fi data and the Wi-Fi signal map corresponding to the current floor in the preset Wi-Fi signal map library ;
    所述定位结果融合模块,用于基于所述第一当前水平坐标和获取到的行人轨迹确定第二当前水平坐标,并将所述当前所处楼宇、所述当前所处楼层以及所述第二当前水平坐标作为定位结果。The positioning result fusion module is used to determine the second current horizontal coordinate based on the first current horizontal coordinate and the obtained pedestrian trajectory, and combine the current building, the current floor and the second current horizontal coordinate. The current horizontal coordinate is used as the positioning result.
  14. 一种基于Android的移动终端,其特征在于,包括:存储器和处理器;An Android-based mobile terminal, comprising: a memory and a processor;
    其中,所述存储器,用于存储计算机程序;Wherein, the memory is used to store computer programs;
    所述处理器,用于执行所述计算机程序,以实现权利要求1至12任一项所述的定位方法。The processor is configured to execute the computer program to implement the positioning method according to any one of claims 1 to 12.
  15. 一种计算机可读存储介质,用于存储计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至12任一项所述定位方法的步骤。A computer-readable storage medium for storing a computer program, characterized in that, when the computer program is executed by a processor, the steps of the positioning method according to any one of claims 1 to 12 are implemented.
PCT/CN2020/105024 2020-07-28 2020-07-28 Positioning method and apparatus, mobile terminal, and storage medium WO2022021040A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202080026964.7A CN114208221B (en) 2020-07-28 Positioning method, positioning device, mobile terminal and storage medium
JP2022571313A JP7446644B2 (en) 2020-07-28 2020-07-28 Positioning methods, devices, mobile terminals, storage media
PCT/CN2020/105024 WO2022021040A1 (en) 2020-07-28 2020-07-28 Positioning method and apparatus, mobile terminal, and storage medium

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 (1)

Publication Number Publication Date
WO2022021040A1 true WO2022021040A1 (en) 2022-02-03

Family

ID=80038033

Family Applications (1)

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

Country Status (2)

Country Link
JP (1) JP7446644B2 (en)
WO (1) WO2022021040A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114608576A (en) * 2022-02-18 2022-06-10 北京建筑大学 Indoor positioning method and device
CN115924664A (en) * 2022-12-23 2023-04-07 泰州雷德波达定位导航科技有限公司 Vertical elevator identification method, system, medium, equipment, terminal and application
CN116184312A (en) * 2022-12-22 2023-05-30 泰州雷德波达定位导航科技有限公司 Indoor crowdsourcing fingerprint library construction method based on semantic Wi-Fi

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106500690A (en) * 2016-09-22 2017-03-15 中国电子科技集团公司第二十二研究所 A kind of indoor autonomic positioning method and device based on multi-modal fusion
CN106714102A (en) * 2016-11-15 2017-05-24 南京航空航天大学 Method of using intelligent mobile phone to assist indoor positioning
CN106851585A (en) * 2017-01-12 2017-06-13 杭州电子科技大学 A kind of mixing floor location method based on barometer and WiFi
CN107121140A (en) * 2017-06-05 2017-09-01 南京邮电大学 A kind of location acquiring method based on Multiple Source Sensor
CN107830862A (en) * 2017-10-13 2018-03-23 桂林电子科技大学 A kind of method of the indoor positioning pedestrian tracking based on smart mobile phone
US20180295484A1 (en) * 2016-05-11 2018-10-11 Mapsted Corp. Scalable indoor navigation and positioning systems and methods
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
US20200049854A1 (en) * 2018-08-13 2020-02-13 Mapsted Corp. Method and system for managing mobile devices in extreme ambient conditions

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9131347B2 (en) 2013-04-26 2015-09-08 Qualcomm Incorporated Utilizing a pressure profile to determine a location context identifier
US10244362B2 (en) 2013-10-08 2019-03-26 Gozio Inc. Use of RF-based fingerprinting for indoor positioning by mobile technology platforms
CN103916821A (en) 2014-04-11 2014-07-09 北京工业大学 Floor distinguishing method based on RSSI difference between floors
US9918202B2 (en) 2014-05-12 2018-03-13 Microsoft Technology Licensing, Llc Adaptive position determination
WO2016187746A1 (en) 2015-05-22 2016-12-01 华为技术有限公司 Method and device for improving positioning performance of artificial neural network
CN108293238B (en) 2015-11-19 2022-07-05 香港科技大学 Facilitating indoor positioning and fingerprint updating under access point signal change
JP6717115B2 (en) 2016-08-23 2020-07-01 株式会社デンソー Position estimation device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180295484A1 (en) * 2016-05-11 2018-10-11 Mapsted Corp. Scalable indoor navigation and positioning systems and methods
CN106500690A (en) * 2016-09-22 2017-03-15 中国电子科技集团公司第二十二研究所 A kind of indoor autonomic positioning method and device based on multi-modal fusion
CN106714102A (en) * 2016-11-15 2017-05-24 南京航空航天大学 Method of using intelligent mobile phone to assist indoor positioning
CN106851585A (en) * 2017-01-12 2017-06-13 杭州电子科技大学 A kind of mixing floor location method based on barometer and WiFi
CN107121140A (en) * 2017-06-05 2017-09-01 南京邮电大学 A kind of location acquiring method based on Multiple Source Sensor
CN107830862A (en) * 2017-10-13 2018-03-23 桂林电子科技大学 A kind of method of the indoor positioning pedestrian tracking based on smart mobile phone
US20200049854A1 (en) * 2018-08-13 2020-02-13 Mapsted Corp. Method and system for managing mobile devices in extreme ambient conditions
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

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114608576A (en) * 2022-02-18 2022-06-10 北京建筑大学 Indoor positioning method and device
CN116184312A (en) * 2022-12-22 2023-05-30 泰州雷德波达定位导航科技有限公司 Indoor crowdsourcing fingerprint library construction method based on semantic Wi-Fi
CN116184312B (en) * 2022-12-22 2023-11-21 泰州雷德波达定位导航科技有限公司 Indoor crowdsourcing fingerprint library construction method based on semantic Wi-Fi
CN115924664A (en) * 2022-12-23 2023-04-07 泰州雷德波达定位导航科技有限公司 Vertical elevator identification method, system, medium, equipment, terminal and application

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2022021040A1 (en) Positioning method and apparatus, mobile terminal, and storage medium
CN109525935B (en) Intelligent floor sensing method and control system for universal indoor environment
CA2991505C (en) Scalable indoor navigation and positioning systems and methods
CN109874112B (en) Positioning method and terminal
CN107339992B (en) Indoor positioning and landmark semantic identification method based on behaviors
CA2983540C (en) Systems and methods for determining indoor location and floor of a mobile device
CN107396321B (en) Unsupervised indoor positioning method based on mobile phone sensor and iBeacon
CN101271333B (en) Localization method for a moving robot
CN108873001A (en) A kind of accurate method for judging robot localization precision
CN109982398B (en) Indoor and outdoor seamless positioning method, device, equipment and medium
CN108919177B (en) Positioning map construction method based on virtual information source estimation and track correction
CN108931802B (en) Indoor and outdoor scene detection method
CN110579207B (en) Indoor positioning system and method based on combination of geomagnetic signals and computer vision
KR20140009737A (en) Hybrid map based localization method of robot
CN108449712B (en) Building floor determination method based on Wi-Fi signal fingerprint information
CN111353496B (en) Real-time detection method for infrared dim targets
JP5027758B2 (en) Image monitoring device
CN111639570B (en) Online multi-target tracking method based on motion model and single-target clue
Song et al. Improved indoor position estimation algorithm based on geo-magnetism intensity
US11481990B2 (en) Detection device, detection method, and recording medium for detecting an object in an image
CN114208221B (en) Positioning method, positioning device, mobile terminal and storage medium
KR102283053B1 (en) Real-Time Multi-Class Multi-Object Tracking Method Using Image Based Object Detection Information
CN114170677A (en) Network model training method and equipment for detecting smoking behavior
CN110824525A (en) Self-positioning method of robot
Ai et al. Floor identification with commercial smartphones in wifi-based indoor localization system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20946852

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022571313

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20946852

Country of ref document: EP

Kind code of ref document: A1