CN113395652B - Indoor positioning method and device and storage medium - Google Patents

Indoor positioning method and device and storage medium Download PDF

Info

Publication number
CN113395652B
CN113395652B CN202110622433.0A CN202110622433A CN113395652B CN 113395652 B CN113395652 B CN 113395652B CN 202110622433 A CN202110622433 A CN 202110622433A CN 113395652 B CN113395652 B CN 113395652B
Authority
CN
China
Prior art keywords
positioning
positioning terminal
database
terminal
position information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110622433.0A
Other languages
Chinese (zh)
Other versions
CN113395652A (en
Inventor
姜绍宇
李凯
宋亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN202110622433.0A priority Critical patent/CN113395652B/en
Publication of CN113395652A publication Critical patent/CN113395652A/en
Application granted granted Critical
Publication of CN113395652B publication Critical patent/CN113395652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/021Services related to particular areas, e.g. point of interest [POI] services, venue services or geofences
    • 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/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
    • 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/025Services making use of location information using location based information parameters
    • 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/025Services making use of location information using location based information parameters
    • H04W4/027Services making use of location information using location based information parameters using movement velocity, acceleration information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/33Services specially adapted for particular environments, situations or purposes for indoor environments, e.g. buildings
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The disclosure relates to the field of computers, and discloses an indoor positioning method, an indoor positioning device and a storage medium, wherein the indoor positioning method comprises the following steps: when the positioning terminal monitors that a preset positioning trigger condition is met, judging whether displacement data of the positioning terminal acquired for N times are consistent or not, if the displacement data are consistent, namely the positioning terminal is in a static state, selecting position data of a mass center corresponding to a timestamp with the minimum time interval at the judgment moment from a first database, and taking the position data as a target positioning result; if the plurality of displacement data are not consistent, namely the positioning terminal is not in a static state, calculating corresponding reference distances based on the current geographic longitude and latitude of the positioning terminal and the position data of each mass center in the first database, and taking the position data of the mass center with the minimum reference distance as a target positioning result.

Description

Indoor positioning method and device and storage medium
Technical Field
The present application relates to computer technologies, and in particular, to a method, an apparatus, and a storage medium for indoor positioning.
Background
With the progress of science and technology, more and more positioning terminals with positioning functions are used by people.
For example, in order to prevent children from missing a designed portable phone watch and a mobile phone application terminal equipped for parents, during use, the phone watch can position the position of the children in real time, so that the parents can acquire the position of the children by looking at the mobile phone application terminal.
The positioning process of the positioning terminal is generally divided into different situations of outdoor positioning and indoor positioning. In order to obtain an accurate Positioning position, when the mobile terminal is in an outdoor environment, a Global Positioning System (GPS) is often used for Positioning; when in an indoor environment, a scheme of GPS in combination with Location Based Services (LBS) is often employed for positioning.
The reason is that GPS is a positioning system for high-precision radio navigation based on artificial earth satellites, which generally provides accurate geographical position, driving speed and precise time information in an outdoor environment; in the indoor environment, the positioning terminal may not acquire the GPS signal and may be difficult to perform accurate positioning due to the fact that the satellite signal is weak when reaching the ground and cannot penetrate through the building, and therefore, the indoor LBS positioning needs to be started in the indoor environment.
However, in the process of indoor positioning, that is, when the geographical location information of the positioning terminal is acquired at intervals, even if the positioning terminal is not moved, the location of the positioning terminal acquired each time is not an accurate fixed point, but a plurality of different points are gathered together. The positioning process may even have a large range of offset points, i.e. the positioning terminal is actually at location a, but can be positioned to location B.
In conclusion, in the existing indoor positioning process, the positioning accuracy is poor.
Disclosure of Invention
The embodiment of the disclosure provides an indoor positioning method, an indoor positioning device and a storage medium, which are used for improving the indoor positioning precision.
The specific technical scheme provided by the disclosure is as follows:
in a first aspect, a method of indoor localization, comprises:
when the indoor positioning terminal monitors that a preset positioning trigger condition is met, whether displacement data of the positioning terminal collected for N times continuously are consistent or not is judged, wherein N is a preset natural number.
And if so, selecting the position data of the mass center corresponding to the timestamp with the minimum time interval at the judgment moment from the first database by the positioning terminal as a target positioning result. Wherein, the centroid is the position point of the representation positioning terminal.
Otherwise, the positioning terminal calculates corresponding reference distances based on the current geographic latitude and longitude of the positioning terminal and the position data of each centroid in the first database, and the position data of the centroid with the minimum reference distance is used as a target positioning result.
In some possible embodiments, before the positioning terminal monitors that the preset positioning trigger condition is met, the method further includes:
the positioning terminal constructs a second database by the following method:
when the positioning terminal obtains one piece of geographical position information, whether the currently obtained geographical position information is obtained through a Global Positioning System (GPS) is judged.
If yes, the positioning terminal stores the geographical position information into the second database.
Otherwise, the positioning terminal calculates a corresponding speed value based on the currently acquired geographical position information and the other geographical position information acquired at the last moment, and if the speed value is not greater than a set speed threshold, the geographical position information is stored in a second database.
After the positioning terminal builds the second database, the first database is built in the following way:
the positioning terminal judges whether the displacement data of the positioning terminal obtained for M times are consistent, wherein M is a preset natural number.
If so, the positioning terminal respectively clusters the geographic position information in the second database, calculates the position data of a plurality of centroids, and stores the position data of each centroid into the first database.
Otherwise, the positioning terminal acquires a piece of geographical position information again.
In some possible embodiments, before the positioning terminal calculates a corresponding speed value based on one piece of currently acquired geographical location information and another piece of geographical location information acquired at the last time, and stores one piece of geographical location information corresponding to the speed value not greater than the speed threshold into the second database, the method further includes:
the positioning terminal calculates a first distance value corresponding to first geographic position information acquired at a first moment and initial geographic position information acquired at an initial moment, wherein the first moment is behind the initial moment.
And the positioning terminal calculates a second distance value corresponding to the second geographic position information acquired at the second moment and the initial geographic position information acquired at the initial moment, wherein the second moment is behind the first moment.
And the positioning terminal calculates a third distance value corresponding to the second geographical position information acquired at the second moment and the first geographical position information acquired at the first moment.
And if the difference value between the first distance value and the third distance value and the difference value between the second distance value and the third distance value are both greater than a preset difference threshold value, the positioning terminal stores both the first geographical position information acquired at the first moment and the second geographical position information acquired at the second moment into a second database.
In some possible embodiments, when the positioning terminal monitors that a preset positioning trigger condition is met, determining whether displacement data of the positioning terminal acquired N times are consistent includes:
when a set positioning period is reached or a positioning starting signal of the control terminal is received, the positioning terminal determines that a preset positioning triggering condition is met.
The positioning terminal acquires a plurality of displacement data of the positioning terminal through the sensor for N times continuously, and judges whether the plurality of displacement data are consistent or not, wherein the sensor comprises an acceleration sensor or a gyroscope sensor.
In some possible embodiments, the selecting, by the positioning terminal, the position data of the centroid corresponding to the timestamp with the smallest time interval at the judgment time from the first database as the target positioning result includes:
the positioning terminal selects the position data of a plurality of centroids, wherein the wireless fidelity multiple access channel WIFI MAC and the CELL identification code CELL ID in the position data of the centroids are respectively the same as the WIFI MAC and the CELL ID at the judgment moment, from the first database.
And the positioning terminal selects the position data of the mass center corresponding to the time stamp with the minimum time interval at the judgment time from the position data of the mass centers as a target positioning result.
In some possible embodiments, the calculating, by the positioning terminal, a corresponding reference distance based on the current geographic longitude and latitude of the positioning terminal and the location data of each centroid in the first database, and using the location data of the centroid with the smallest reference distance as the target positioning result includes:
and the positioning terminal compares the WIFI MAC and the CELL ID with network access data corresponding to the position data of each mass center stored in the first database respectively.
And if the comparison result of the WIFI MAC and the access component in the network access data is the same, and the comparison result of the CELL ID and the CELL code component in the network access data is the same, calculating the corresponding reference distance by the positioning terminal according to the current geographical longitude and latitude and the position data of each mass center in the first database.
And the positioning terminal takes the position data of the centroid with the minimum reference distance and the reference distance smaller than the interval threshold value in the first database as a target positioning result.
In some possible embodiments, after the positioning terminal obtains the target positioning result, the method further includes:
and the positioning terminal uploads the target positioning result to the server so that the control terminal associated with the positioning terminal checks the target positioning result, and the control terminal generates an action track related to the positioning terminal according to the checked target positioning result.
In a second aspect, an indoor positioning device includes:
and the judging module is used for judging whether the displacement data of the positioning terminal collected for N times are consistent when the positioning terminal positioned indoors monitors that the preset positioning triggering condition is met, wherein N is a preset natural number.
And the selecting module is used for selecting the position data of the mass center corresponding to the timestamp with the minimum time interval at the judgment moment from the first database by the positioning terminal as a target positioning result if the position data of the mass center is the target positioning result. Wherein, the centroid is the position point of the representation positioning terminal.
And the calculating module is used for calculating corresponding reference distances by the positioning terminal based on the current geographic longitude and latitude of the positioning terminal and the position data of each centroid in the first database, and taking the position data of the centroid with the minimum reference distance as a target positioning result.
In a third aspect, an indoor positioning device comprises:
a memory for storing a computer program executable by the controller.
The controller is connected to the memory and is configured to perform the method of any of the first aspects described above.
In a fourth aspect, a computer-readable storage medium, wherein instructions, when executed by a processor, enable the processor to perform the method of any of the first aspect.
In summary, in the embodiment of the present disclosure, when the positioning terminal located indoors monitors that a preset positioning trigger condition is met, it is determined whether displacement data of the positioning terminal acquired N times continuously are consistent, so as to determine whether the positioning terminal is in a stationary and positionable state, and if the displacement data are all consistent, that is, the positioning terminal is in a stationary state, the positioning terminal selects, from the first database, position data of a centroid corresponding to a timestamp with a minimum time interval at the determination time as a target positioning result, where the centroid is a position point representing the positioning terminal; if the plurality of displacement data are not consistent, namely the positioning terminal is not in a static state, the positioning terminal calculates corresponding reference distances based on the current geographical longitude and latitude of the positioning terminal and the position data of each mass center in the first database, and the position data of the mass center with the minimum reference distance is used as a target positioning result, so that the positioning position can be quickly and accurately obtained through the pre-established database in the indoor positioning process, and the positioning precision is further improved on the basis of reducing power consumption.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a positioning terminal according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a software architecture of a positioning terminal according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a system architecture for indoor positioning by a positioning terminal in the embodiment of the present application;
fig. 4 is a schematic flowchart of a positioning terminal constructing a second database in an embodiment of the present application;
fig. 5 is a schematic flowchart illustrating a process of screening initial geographic position information at an initial time by a positioning terminal in an embodiment of the present application;
fig. 6 is a schematic flowchart of a positioning terminal constructing a first database in an embodiment of the present application;
fig. 7 is a schematic flowchart of indoor positioning performed by the positioning terminal in the embodiment of the present application;
fig. 8 is a schematic flowchart illustrating a process of acquiring a plurality of displacement data by a positioning terminal in an embodiment of the present application;
fig. 9 is a schematic flowchart of a process of a positioning terminal obtaining a target positioning result from a first database in an embodiment of the present application;
fig. 10 is a schematic flowchart illustrating another positioning terminal in the embodiment of the present application obtaining a target positioning node from a first database;
fig. 11 is a schematic diagram of indoor positioning performed by a positioning terminal in an application scenario according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a logic architecture of an indoor positioning apparatus according to an embodiment of the disclosure;
fig. 13 is a schematic physical architecture diagram of an indoor positioning device in an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
It is noted that the terms "first," "second," and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Referring to fig. 1, a block diagram of a hardware configuration of a positioning terminal 100 according to an exemplary embodiment is exemplarily shown in fig. 1. As shown in fig. 1, the terminal 100 includes: a Radio Frequency (RF) circuit 110, a memory 120, a display unit 130, a camera 140, a sensor 150, an audio circuit 160, a Wireless Fidelity (Wi-Fi) module 170, a processor 180, a bluetooth module 181, and a power supply 190.
The RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and may receive downlink data of a base station and then send the downlink data to the processor 180 for processing; the uplink data may be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
The memory 120 may be used to store software programs and data. The processor 180 performs various functions of the terminal 100 and data processing by executing software programs or data stored in the memory 120. The memory 120 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The memory 120 stores an operating system that enables the terminal 100 to operate. The memory 120 may store an operating system and various application programs, and may also store program codes for performing the methods described in the embodiments of the present application.
The display unit 130 may be used to receive input numeric or character information and generate signal input related to user settings and function control of the terminal 100, and particularly, the display unit 130 may include a touch screen 131 disposed on the front surface of the terminal 100 and may collect touch operations of a user thereon or nearby, such as clicking a button, dragging a scroll box, and the like.
The display unit 130 may also be used to display a Graphical User Interface (GUI) of information input by or provided to the user and various menus of the terminal 100. Specifically, the display unit 130 may include a display screen 132 disposed on the front surface of the terminal 100. The display screen 132 may be configured in the form of a liquid crystal display, a light emitting diode, or the like. The display unit 130 may be used to display a mailing list interface described herein.
The touch screen 131 may cover the display screen 132, or the touch screen 131 and the display screen 132 may be integrated to implement the input and output functions of the terminal 100, and after the integration, the touch screen may be referred to as a touch display screen for short. In the present application, the display unit 130 may display the application programs and the corresponding operation steps.
The camera 140 may be used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing elements convert the optical signals into electrical signals which are then passed to the processor 180 for conversion into digital image signals.
The terminal 100 may further comprise at least one sensor 150, such as an acceleration sensor 151, a distance sensor 152, a fingerprint sensor 153, a temperature sensor 154. The terminal 100 may also be configured with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, light sensor, motion sensor, etc.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and terminal 100. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161. The terminal 100 may also be provided with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 162 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 160, and outputs the audio data to the RF circuit 110 to be transmitted to, for example, another terminal or outputs the audio data to the memory 120 for further processing.
Wi-Fi belongs to a short-distance wireless transmission technology, and the terminal 100 can help a user to receive and send e-mails, browse web pages, access streaming media and the like through the Wi-Fi module 170, and provides wireless broadband internet access for the user.
The processor 180 is a control center of the terminal 100, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal 100 and processes data by running or executing software programs stored in the memory 120 and calling data stored in the memory 120. In some embodiments, processor 180 may include one or more processing units; the processor 180 may also integrate an application processor, which mainly handles operating systems, user interfaces, applications, etc., and a baseband processor, which mainly handles wireless communications. It will be appreciated that the baseband processor described above may not be integrated into the processor 180. In the present application, the processor 180 may run an operating system, an application program, a user interface display, and a touch response, and the processing method described in the embodiments of the present application. Further, the processor 180 is coupled with the display unit 130.
And the bluetooth module 181 is configured to perform information interaction with other bluetooth devices having a bluetooth module through a bluetooth protocol. For example, the terminal 100 may establish a bluetooth connection with a wearable electronic device (e.g., a smart watch) having a bluetooth module via the bluetooth module 181, so as to perform data interaction.
The terminal 100 also includes a power supply 190 (e.g., a battery) to power the various components. The power supply may be logically connected to the processor 180 through a power management system to manage charging, discharging, power consumption, etc. through the power management system. The terminal 100 may also be configured with power buttons for powering the terminal on and off, and locking the screen.
Referring to fig. 2, fig. 2 is a block diagram of a software structure of the positioning terminal 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system may be divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer, from top to bottom, respectively.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, short messages, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying a picture.
The phone manager is used to provide a communication function of the terminal 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources, such as localized strings, icons, pictures, layout files, video files, etc., to the application.
The notification manager allows the application to display notification information (e.g., message digest of short message, message content) in the status bar, can be used to convey notification-type messages, and can automatically disappear after a short dwell without user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, text information is prompted in the status bar, a prompt tone is given, the terminal vibrates, an indicator light flashes, and the like.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
A 2D (an animation mode) graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The terminal 100 in the embodiment of the present application may be a mobile phone, a tablet computer, a wearable device, a notebook computer, a television, and the like.
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Referring to fig. 3, in the embodiment of the present disclosure, the system includes at least one positioning terminal, a control terminal, and a server, in fig. 3, the positioning terminal and the control terminal are both connected to the server, and the positioning terminal is connected to the control terminal. In the implementation process, the positioning terminal can start indoor positioning when receiving a positioning starting signal of the control terminal, and upload a target positioning result to the server after the positioning is finished and a target positioning result is obtained, so that the control terminal can check the target positioning result and the like.
In the embodiment of the present disclosure, before the positioning terminal performs the specific indoor positioning, that is, before the positioning terminal monitors that the preset positioning trigger condition is met, the positioning terminal further includes a process of learning the first database and the second database in advance. Here, the learning process of the first database and the second database may be understood as a process in which the positioning terminal stores the geographical position of the positioning point in advance in a pre-positioning manner, so that when the positioning terminal performs positioning formally, the corresponding geographical position may be directly called from the first database and the second database, thereby effectively improving the positioning efficiency, and further saving the power consumption of the positioning terminal on the premise of ensuring the positioning accuracy. The learning process of the first database and the second database specifically includes:
(1) the positioning terminal constructs the second database in the following manner, referring to fig. 4, and the specific steps include:
step 401: when the positioning terminal obtains one piece of geographical position information, whether the currently obtained geographical position information is obtained through a Global Positioning System (GPS) is judged. If yes, go to step 402, otherwise go to step 403.
Since the GPS can provide an accurate geographical position in radio positioning based on artificial earth satellites. Although in an indoor environment, a situation may occur in which the signal is weak, so that the positioning terminal cannot acquire the GPS signal. However, if the geographical location information can be acquired by GPS once in an indoor environment, the positioning terminal may still use the geographical location information acquired by GPS as accurate geographical location information.
In the implementation process, in order to acquire accurate geographical position information most conveniently, each time the positioning terminal acquires one geographical position information, whether the currently acquired geographical position information is acquired through the GPS is judged, so that the power consumption of the positioning terminal can be reduced to a certain extent.
Step 402: the positioning terminal stores a geographical location information in the second database.
After determining that the geographical location information is acquired through the GPS after the determination in step 401, the positioning terminal stores the geographical location information into the second database.
It should be noted that the second database is used for storing accurate geographical location information so as to record the location where the positioning terminal is located in real time.
Step 403: and the positioning terminal calculates a corresponding speed value based on one piece of currently acquired geographical position information and the other piece of geographical position information acquired at the last moment, and stores one piece of geographical position information into a second database if the speed value is not greater than a set speed threshold.
The positioning terminal may be moving in real time during indoor positioning of the positioning terminal itself. In consideration of the validity of the one geographic location information obtained in the positioning process, in an implementation process, the positioning terminal assumes that the other geographic location information obtained at the previous time is accurate and valid, and then, based on the currently obtained one geographic location information and the other geographic location information obtained at the previous time, the positioning terminal calculates a corresponding speed value, that is, a corresponding speed value is calculated by the positioning terminal through a distance between two points corresponding to the one geographic location information and the other geographic location information and a time difference between the current time and the previous time.
And, the positioning terminal presets the upper limit speed considered reasonable as a speed threshold, for example, 500km/h, and when the speed value calculated by the positioning terminal comparison is not greater than the speed threshold, the positioning terminal stores the geographical location information into the second database to be used as the real-time location of the positioning terminal for determining the accuracy.
Since it is assumed in the above process that another piece of geographical location information acquired at the last time is accurate and valid, the currently acquired one piece of geographical location information can be determined to be valid on the basis. However, in the above processing, the validity of another geographical location information originally obtained cannot be identified.
In view of this, before the positioning terminal calculates a corresponding speed value based on one piece of currently acquired geographical location information and another piece of geographical location information acquired at the previous moment, and stores one piece of geographical location information corresponding to the speed value not greater than the speed threshold value in the second database, as shown in fig. 5, the process specifically includes the following steps:
step 501: the positioning terminal calculates a first distance value corresponding to first geographic position information acquired at a first moment and initial geographic position information acquired at an initial moment, wherein the first moment is behind the initial moment.
In the implementation process, the first geographical location information acquired by the positioning terminal in the positioning process is called initial geographical location information, and correspondingly, the first-come and last-come positioning time is respectively an initial time, a first time and a second time, namely the initial time is acquired as the initial geographical location information, the first time is acquired as the first geographical location information, and the second time is acquired as the second geographical location information.
In order to determine the validity of the initial geographic position information, the positioning terminal first calculates a first distance value corresponding to the first geographic position information acquired at the first time and the initial geographic position information acquired at the initial time, that is, calculates a distance between two points corresponding to the first geographic position information and the initial geographic position information by using the first distance value.
Step 502: and the positioning terminal calculates a second distance value corresponding to the second geographic position information acquired at the second moment and the initial geographic position information acquired at the initial moment, wherein the second moment is behind the first moment.
Correspondingly, the positioning terminal calculates a second distance value corresponding to the second geographical position information acquired at the second time and the initial geographical position information acquired at the initial time, that is, calculates the distance between two points corresponding to the second geographical position information and the initial geographical position information according to the second distance value.
Step 503: and the positioning terminal calculates a third distance value corresponding to the second geographical position information acquired at the second moment and the first geographical position information acquired at the first moment.
Correspondingly, the positioning terminal calculates a third distance value corresponding to the second geographical position information acquired at the second moment and the first geographical position information acquired at the first moment, that is, calculates the distance between two points corresponding to the second geographical position information and the first geographical position information by using the third distance value.
Step 504: and if the difference value between the first distance value and the third distance value and the difference value between the second distance value and the third distance value are both greater than a preset difference threshold value, the positioning terminal stores both the first geographical position information acquired at the first moment and the second geographical position information acquired at the second moment into a second database.
In the implementation process, the positioning terminal also sets a preset difference threshold, namely, a reasonable difference value is preset, after the first distance value, the second distance value and the third distance value are obtained, the positioning terminal respectively calculates the difference value between the first distance value and the third distance value, and the difference value between the second distance value and the third distance value, namely, when the geographical position information corresponding to the second moment and the first moment is respectively compared to be far from the initial geographical position information corresponding to the initial moment, at this moment, the initial geographical position information is determined to be greatly deviated, namely, the initial geographical position information is invalid.
Under the condition, the positioning terminal stores the first geographical position information acquired at the first moment and the second geographical position information acquired at the second moment into the second database, namely after the initial geographical position information corresponding to the initial moment is eliminated, the positioning terminal determines the first geographical position information acquired at the first moment and the second geographical position information acquired at the second moment as effective geographical position information and stores the effective geographical position information into the second database.
(2) After the positioning terminal establishes the second database, the first database is established in the following manner, with reference to fig. 6, and the specific steps include:
step 601: the positioning terminal judges whether the displacement data of the positioning terminal obtained for M times are consistent, wherein M is a preset natural number. If yes, go to step 602, otherwise, go to step 603.
In the implementation process, whether the positioning terminal is in a static state is judged by judging whether the displacement data of the positioning terminal obtained for M times continuously are consistent through the positioning terminal, in the specific implementation process, M displacement data collected by the sensor need to be consistent, and the displacement data of the positioning terminal obtained for M times continuously is determined to be uniform under the condition that a WIreless FIdelity Multiple Access Channel (WIFI MAC) and a Cell identity code (CELL ID) which are connected with the positioning terminal are not changed, wherein the value of M can be flexibly set according to a use scene.
Step 602: and the positioning terminal respectively clusters the geographical position information in the second database, calculates the position data of a plurality of centroids and stores the position data of each centroid into the first database.
And under the condition that the displacement data of the positioning terminal obtained for M times are consistent, the positioning terminal respectively clusters the geographic position information in the second database, and the result of the clustering calculation is to calculate the position data of a plurality of centroids. Through the clustering processing process, a more accurate position can be obtained.
Furthermore, the positioning terminal stores the obtained position data of each mass center into the first database, so that the positioning terminal can be conveniently called in the positioning process.
Step 603: and the positioning terminal acquires a piece of geographical position information again.
In the case that the displacement data of the positioning terminals obtained M times are not all consistent, it is stated that the positioning terminal is always in motion, and in this case, the positioning terminal itself is not positioned at an accurate position, so that it is not possible to cluster the positioning terminal, and in the implementation process, the positioning terminal needs to obtain a geographic position information again to start operation from step 401 again.
After the first database and the second database are constructed, the positioning terminal formally enters the process of indoor positioning, as shown in fig. 7, a specific indoor positioning process includes:
step 701: when the indoor positioning terminal monitors that a preset positioning trigger condition is met, whether displacement data of the positioning terminal collected for N times continuously are consistent or not is judged, wherein N is a preset natural number. If so, go to step 702, otherwise go to step 703.
When the positioning terminal is positioned in an indoor environment to position the positioning terminal, firstly, whether the positioning terminal monitors that a preset positioning trigger condition is met, namely, a condition for starting a positioning process by the positioning terminal is judged; the positioning terminal further determines whether the positioning terminal is in a stationary state, that is, the positioning terminal determines whether the displacement data of the positioning terminal acquired N times are consistent, where it should be noted that the displacement data is continuously acquired, and whether the positioning terminal is stationary is determined by whether the displacement data acquired N times are consistent. In the specific implementation process, N displacement data collected by the sensor are kept consistent, and the displacement data of the positioning terminal obtained for N times are determined to be consistent under the condition that the WIFI MAC and the CELL ID connected with the positioning terminal are not changed, wherein the specific value of N can be flexibly set according to the use scene.
In a specific implementation process, as shown in fig. 8, the process of step 701 specifically includes the following steps:
step 7011: when a set positioning period is reached or a positioning starting signal of the control terminal is received, the positioning terminal determines that a preset positioning triggering condition is met.
Specifically, the condition that the preset positioning trigger condition is satisfied may be a positioning period set for the positioning terminal, for example, positioning is performed every 15 minutes, or may be a positioning start signal from the control terminal, for example, a positioning update signal sent by the control terminal.
In the implementation process, when the positioning terminal reaches a set positioning period or receives a positioning starting signal of the control terminal, the positioning terminal determines that the preset positioning triggering condition is met, and then the positioning terminal starts the indoor positioning process.
Step 7012: the positioning terminal acquires a plurality of displacement data of the positioning terminal through the sensor for N times continuously, and judges whether the plurality of displacement data are consistent or not, wherein the sensor comprises an acceleration sensor or a gyroscope sensor.
In the positioning process, the displacement data are collected by a sensor, specifically, the sensor includes an acceleration sensor or a gyroscope sensor.
The acceleration sensor is a sensor capable of measuring acceleration, and the acceleration sensor is generally composed of a mass block, a damper, an elastic element, a sensing element, an adjusting circuit and the like. In the acceleration process, the acceleration sensor obtains an acceleration value by measuring the inertial force borne by the mass block and utilizing a Newton's second law. In a specific implementation process, if the value acquired by the positioning terminal through the acceleration sensor is 0, the positioning terminal represents that a plurality of displacement data acquired by the positioning terminal for N consecutive times are consistent, that is, the positioning terminal is in a static state.
The gyroscope sensor is a simple and easy-to-use positioning control system based on free space movement and gestures, and the measurement and control principle is that the direction pointed by the rotating shaft cannot be changed when the direction is not influenced by external force, so that the gyroscope sensor can be used for measuring whether the angular velocity of a terminal applying the gyroscope sensor changes or not. In a specific implementation process, if the value acquired by the positioning terminal through the gyroscope sensor is 0, the displacement data representing that the positioning terminal is continuously acquired for N times are consistent, that is, the positioning terminal is in a static state.
Step 702: and the positioning terminal selects the position data of the mass center corresponding to the time stamp with the minimum time interval at the judgment moment from the first database as a target positioning result. Wherein, the mass center is a position point representing the positioning terminal.
After determining that the positioning terminal is in a stationary state, the position data of the corresponding centroid may be directly selected from the first database as a target positioning result, as shown in fig. 9, where the specific process of the step 702 includes the following steps:
step 7021: and the positioning terminal selects the position data of a plurality of centroids, wherein the WIFI MAC and the CELL ID in the position data of the centroids are respectively the same as the WIFI MAC and the CELL ID at the judgment moment, from the first database.
In step 701, it is determined whether the positioning terminal is in a stationary state by determining whether the displacement data of the positioning terminal is consistent. However, in practical applications, the displacement data of the positioning terminal is not changed and does not represent that the geographic location of the positioning terminal has not changed. For example, when the positioning terminal is on a moving object (e.g., a high-speed rail), although the collected displacement data of the positioning terminal is consistent, the geographical position of the positioning terminal is actually changed.
In view of this, in the implementation process, the positioning terminal may also refer to the WIFI MAC and the CELL ID to determine whether the positioning terminal really has a location change. Therefore, the positioning terminal extracts WIFI MAC and CELL ID in the displacement data at the judgment moment, compares the WIFI MAC and CELL ID with the position data of the multiple centroids in the first database respectively, and selects the position data of the multiple corresponding centroids in the first database when the WIFI MAC and CELL ID are consistent.
Step 7022: and the positioning terminal selects the position data of the mass center corresponding to the time stamp with the minimum time interval at the judgment time from the position data of the mass centers as a target positioning result.
The first database is the position of the positioning terminal stored in advance, and has a certain difference with the position data of the centroid corresponding to the judgment moment. For this reason, the positioning terminal needs to further filter the position data of the most accurate centroid as the target positioning result.
In the implementation process, in consideration of the continuity of the displacement process, the above-mentioned manner of screening the most accurate position data of the centroid is that the positioning terminal selects the timestamp with the minimum time interval with the judgment time from the first database, and the position data of the centroid corresponding to the timestamp is determined as the position closest to the actual position of the positioning terminal, so as to use the position data of the centroid corresponding to the timestamp as the target positioning result.
Step 703: and the positioning terminal calculates corresponding reference distances based on the current geographical longitude and latitude of the positioning terminal and the position data of each centroid in the first database, and takes the position data of the centroid with the minimum reference distance as a target positioning result.
In the implementation process, when it is determined that the positioning terminal is not in a static state, the position data of the closest centroid is selected from the first database as a target positioning result by combining the current geographical longitude and latitude of the positioning terminal. Referring to fig. 10, the process of the step 703 specifically includes the following steps:
step 7031: and the positioning terminal compares the WIFI MAC and the CELL ID with network access data corresponding to the position data of each mass center stored in the first database respectively.
Similarly, it is considered that whether the positioning terminal is in the stationary state is determined by whether the displacement data of the positioning terminal is consistent in step 701. However, in practical applications, the unchanged displacement data of the positioning terminal does not mean that the geographic location of the positioning terminal has not changed.
After the positioning terminal is judged not to be in a static state, the positioning terminal firstly compares the current WIFI MAC and CELL ID with the network access data corresponding to the position data of each centroid stored in the first database respectively. It should be added that the network access data includes an access component and a cell code component, where the access component is used to indicate a channel access situation corresponding to the position data of the centroid, and the cell code component is used to indicate a connection situation of a cell corresponding to the position data of the centroid.
Step 7032: and if the comparison result of the WIFI MAC and the access component in the network access data is the same, and the comparison result of the CELL ID and the CELL code component in the network access data is the same, calculating the corresponding reference distance by the positioning terminal according to the current geographical longitude and latitude and the position data of each mass center in the first database.
In the implementation process, when the comparison result of comparing the WIFI MAC with the access component in the network access data is the same, and the comparison result of the CELL ID with the CELL code component in the network access data is the same, the position data of the centroid closest to the actual position of the positioning terminal is effectively discriminated through the comparison.
In this case, the positioning terminal further finds the position data of the centroid closest to the actual position of the positioning terminal in the first database by the distance between the actual position and the centroid. The calculation of the specific distance is that the positioning terminal calculates the current geographical longitude and latitude and the position data of any one centroid in the position data of each centroid in the first database one by one, and the reference distance between the two points.
Step 7033: and the positioning terminal takes the position data of the mass center with the minimum reference distance and the reference distance smaller than the interval threshold value in the first database as a target positioning result.
In the implementation process, the positioning terminal compares the calculated reference distances one by one, and in order to obtain the position data of the centroid closest to the actual position of the positioning terminal, the positioning terminal selects the position data of the centroid with the smallest reference distance in the comparison process.
In addition, in order to eliminate the situation that the position data of the centroid with the minimum reference distance still has a large error with the actual position of the positioning terminal, the positioning terminal sets an interval threshold value, and the interval threshold value is used for representing an acceptable upper limit value of a more accurate position range. And after the position data of the centroid with the minimum reference distance is determined, the positioning terminal selects the position data of the centroid with the reference distance smaller than the interval threshold value as a target positioning result.
In addition, in the implementation process, after the positioning terminal obtains the target positioning result, the method further includes:
and the positioning terminal uploads the target positioning result to the server so that the control terminal associated with the positioning terminal checks the target positioning result, and the control terminal generates an action track related to the positioning terminal according to the checked target positioning result.
In order to facilitate the control terminal to check the target positioning result, the positioning terminal uploads the selected target positioning result to the server, so that when the control terminal has the requirements of checking and the like, the control terminal can directly check the target positioning result on the server. For example, when the positioning terminal is a smart watch worn by a child and the control terminal is a mobile phone of a parent, the smart watch and the mobile phone are associated in advance, so that when the parent wants to acquire the position of the child, the target positioning result uploaded by the smart watch can be acquired from the server through the mobile phone.
Further, in order to track the action track of the positioning terminal, the control terminal may obtain a plurality of target positioning results from the server, and generate the action track of the positioning terminal according to the plurality of target positioning results.
The above embodiments are further described in detail below using a specific application scenario.
Application scenarios:
referring to fig. 11, first, it is assumed that the positioning terminal a is a smart watch worn by a child at home (e.g., kitchen, living room, toilet, etc.), and the control terminal a' is a smart phone carried by a parent at a company. The positioning terminal a constructs a database a (here, the database a represents the second database), and the specific construction process is as follows:
the positioning terminal A judges whether a piece of currently acquired geographical position information A is acquired through a GPS, if the currently acquired geographical position information A is acquired through the GPS, the positioning terminal A stores the geographical position information A into a database a; if the information is not acquired through the GPS, the positioning terminal A calculates a distance 1 between one geographical position information A and another geographical position information B acquired at the previous moment and a time difference 1 between the current moment (for example, 12 points) and the previous moment (for example, 11 points), calculates a corresponding speed value 1 as a quotient of the distance 1 and the time difference 1, determines whether one geographical position information A is accurate or not by comparing the speed value 1 with a set speed threshold value 1 (namely, the maximum upper limit value of reasonable speed), and determines that the one geographical position information A is accurate when the speed value 1 is not greater than the set speed threshold value 1 and stores the one geographical position information A into a second database. By analogy, the positioning terminal a acquires a piece of geographical sub-information of the next current time (for example, 13 o 'clock), and the next current time (for example, 14 o' clock), so as to construct the second database.
Secondly, after the positioning terminal a builds the database a, it builds a database b (here, the first database is represented by the database b) in the following way, and the concrete building process is as follows:
the positioning terminal A judges whether the displacement data of the positioning terminal A obtained for M times continuously are consistent, wherein M is a preset natural number, namely whether the positioning terminal A is static within the time corresponding to the M times of obtaining process is judged by the method. If the displacement data are consistent, namely the positioning terminal A is static, and if the children watch the television in the living room, the positioning terminal A respectively clusters the geographic position information in the database a, calculates the position data of a plurality of centroids, and stores the position data of the centroids into the database b. If the displacement data are not consistent, namely the positioning terminal A is not static, under the condition that a child runs in a living room and a kitchen, the positioning terminal acquires geographical position information A again and continuously judges whether the geographical position information A is accurate or not.
After the database a and the database b have been constructed, the positioning terminal a formally starts the indoor positioning process, and obtains the positioning position, i.e. the target positioning result:
in a specific implementation process, after the indoor positioning terminal a reaches a set positioning period C, displacement data of the positioning terminal a are continuously acquired N times by the gyroscope sensor, and whether the N displacement data are consistent or not is judged, where the purpose of the judgment is to determine that the positioning terminal a is in a static state and then position the positioning terminal a.
If the N pieces of displacement data are consistent, the positioning terminal A selects the position data of the centroid corresponding to the time stamp with the minimum judgment time interval from the database b as a target positioning result, namely, directly selects the position data of the centroid matched with the positioning terminal A from the database b, and takes the position data of the centroid as the target positioning result. Specifically, the positioning terminal A selects a plurality of centroid position data with the WIFI MAC and the CELL ID respectively identical to the WIFI MAC and the CELL ID at the judgment moment from the database b; and the positioning terminal A selects the position data of the mass center corresponding to the time stamp with the minimum time interval at the judgment time from the position data of the mass centers as a target positioning result.
If the N displacement data are not consistent, the positioning terminal A calculates corresponding reference distances based on the current geographic longitude and latitude D of the positioning terminal A and the position data of each centroid in the database b, and the position data of the centroid with the minimum reference distance is used as a target positioning result. Specifically, the positioning terminal a compares the WIFI MAC and the CELL ID with network access data corresponding to the position data of each centroid stored in the database b, respectively, where the network access data specifically includes an access component and a CELL code component; in the comparison process, if the comparison result of the WIFI MAC and the access component in the network access data is the same, and the comparison result of the CELLID and the cell code component in the network access data is the same, the positioning terminal A calculates a corresponding reference distance E according to the current geographical longitude and latitude D and the position data of each centroid in the database b, namely calculates the reference distance E between the current geographical longitude and latitude D and the position data of the centroid in the database b; the positioning terminal a takes the position data of the centroid in the database b, in which the reference distance E is the smallest and the reference distance E is smaller than the interval threshold (i.e., the upper limit value of the position range, for example, 10 meters), as the target positioning result.
After introducing the indoor positioning method provided by the embodiment of the present application, based on the same inventive concept, the indoor positioning apparatus provided by the embodiment of the present application is described in detail below:
referring to fig. 12, the indoor positioning apparatus includes a determining module 1210, a selecting module 1220 and a calculating module 1230, specifically:
the determining module 1210 is configured to determine whether displacement data of the positioning terminal acquired N times in succession are consistent when the positioning terminal located indoors monitors that a preset positioning trigger condition is met, where N is a preset natural number.
The selecting module 1220 is configured to select, by the positioning terminal, the position data of the centroid corresponding to the timestamp with the smallest time interval at the judgment time from the first database, as the target positioning result. Wherein, the centroid is the position point of the representation positioning terminal.
The calculating module 1230 is configured to calculate, by the positioning terminal, a corresponding reference distance based on the current geographic latitude and longitude of the positioning terminal and the position data of each centroid in the first database, and use the position data of the centroid with the smallest reference distance as a target positioning result.
After introducing the indoor positioning device provided in the embodiment of the present application, based on the same inventive concept, the indoor positioning apparatus provided in the embodiment of the present application is described in detail below:
referring to fig. 13, the indoor positioning apparatus includes a memory 1301 and a controller 1302, specifically:
a memory 1301 for storing a computer program executable by the controller 1302.
The controller 1302 is coupled to the memory and is configured to perform:
when the indoor positioning terminal monitors that a preset positioning trigger condition is met, whether displacement data of the positioning terminal collected for N times continuously are consistent or not is judged, wherein N is a preset natural number.
If so, the positioning terminal selects the position data of the mass center corresponding to the timestamp with the minimum time interval at the judgment moment from the first database as a target positioning result; wherein, the centroid is the position point of the representation positioning terminal.
Otherwise, the positioning terminal calculates corresponding reference distances based on the current geographical longitude and latitude of the positioning terminal and the position data of each centroid in the first database, and takes the position data of the centroid with the minimum reference distance as a target positioning result.
In some possible embodiments, before the controller 1302 performs calculating a corresponding speed value based on one geographical location information currently acquired and another geographical location information acquired at the last time, and storing one geographical location information corresponding to a speed value not greater than the speed threshold in the second database, the controller 1302 is further configured to:
the positioning terminal calculates a first distance value corresponding to first geographic position information acquired at a first moment and initial geographic position information acquired at an initial moment, wherein the first moment is behind the initial moment.
And the positioning terminal calculates a second distance value corresponding to the second geographic position information acquired at the second moment and the initial geographic position information acquired at the initial moment, wherein the second moment is after the first moment.
And the positioning terminal calculates a third distance value corresponding to the second geographical position information acquired at the second moment and the first geographical position information acquired at the first moment.
And if the difference value between the first distance value and the third distance value and the difference value between the second distance value and the third distance value are both greater than a preset difference threshold value, the positioning terminal stores both the first geographical position information acquired at the first moment and the second geographical position information acquired at the second moment into a second database.
In some possible embodiments, when monitoring that the preset positioning trigger condition is met, the controller 1302 determines whether displacement data of the positioning terminal acquired N times consecutively is consistent, including:
when a set positioning period is reached or a positioning starting signal of the control terminal is received, the positioning terminal determines that a preset positioning triggering condition is met.
The positioning terminal acquires a plurality of displacement data of the positioning terminal through the sensor for N times continuously, and judges whether the plurality of displacement data are consistent or not, wherein the sensor comprises an acceleration sensor or a gyroscope sensor.
In some possible embodiments, the controller 1302 performs selecting, from the first database, the position data of the centroid corresponding to the timestamp with the smallest time interval at the judgment time as the target positioning result, including:
the positioning terminal selects the position data of a plurality of centroids, wherein a wireless fidelity multiple access channel WIFI MAC and a CELL identification code CELL ID in the position data of the centroids are respectively the same as the WIFI MAC and the CELL ID at the judgment moment, from the first database.
And the positioning terminal selects the position data of the mass center corresponding to the time stamp with the minimum time interval at the judgment time from the position data of the mass centers as a target positioning result.
In some possible embodiments, the controller 1302 performs calculating a corresponding reference distance based on the current geographical latitude and longitude of the positioning terminal and the position data of each centroid in the first database, and using the position data of the centroid with the smallest reference distance as the target positioning result, including:
and the positioning terminal compares the WIFI MAC and the CELL ID with network access data corresponding to the position data of each mass center stored in the first database respectively.
And if the comparison result of the WIFI MAC and the access component in the network access data is the same, and the comparison result of the CELL ID and the CELL code component in the network access data is the same, calculating the corresponding reference distance by the positioning terminal according to the current geographical longitude and latitude and the position data of each mass center in the first database.
And the positioning terminal takes the position data of the centroid with the minimum reference distance and the reference distance smaller than the interval threshold value in the first database as a target positioning result.
In some possible embodiments, after the controller 1302 performs obtaining the target positioning result, the controller 1302 is further configured to:
and the positioning terminal uploads the target positioning result to the server so that the control terminal associated with the positioning terminal checks the target positioning result, and the control terminal generates an action track related to the positioning terminal according to the checked target positioning result.
Having described the indoor positioning apparatus provided by the embodiments of the present application, based on the same inventive concept, the embodiments of the present application further provide a computer-readable storage medium, wherein when executed by a processor, the instructions of the storage medium enable the processor to perform the following method:
when the indoor positioning terminal monitors that a preset positioning trigger condition is met, whether displacement data of the positioning terminal collected for N times continuously are consistent or not is judged, wherein N is a preset natural number.
If so, the positioning terminal selects the position data of the mass center corresponding to the timestamp with the minimum time interval at the judgment moment from the first database as a target positioning result; wherein, the centroid is the position point of the representation positioning terminal.
Otherwise, the positioning terminal calculates corresponding reference distances based on the current geographical longitude and latitude of the positioning terminal and the position data of each centroid in the first database, and takes the position data of the centroid with the minimum reference distance as a target positioning result.
In summary, in the embodiment of the present disclosure, when the positioning terminal located indoors monitors that a preset positioning trigger condition is met, it is determined whether displacement data of the positioning terminal acquired N times are consistent, so as to determine whether the positioning terminal is in a stationary and positionable state, and if the displacement data are consistent, that is, the positioning terminal is in a stationary state, the positioning terminal selects, from the first database, position data of a centroid corresponding to a timestamp with a minimum time interval at the determination time as a target positioning result, where the centroid is a position point representing the positioning terminal; if the plurality of displacement data are not consistent, namely the positioning terminal is not in a static state, the positioning terminal calculates corresponding reference distances based on the current geographical longitude and latitude of the positioning terminal and the position data of each mass center in the first database, and the position data of the mass center with the minimum reference distance is used as a target positioning result, so that the positioning position can be quickly and accurately obtained through the pre-established database in the indoor positioning process, and the positioning precision is further improved on the basis of reducing power consumption.
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (9)

1. A method of indoor positioning, the method comprising:
when monitoring that a preset positioning trigger condition is met, a positioning terminal located indoors judges whether displacement data of the positioning terminal acquired for N times are consistent, wherein N is a preset natural number;
if so, the positioning terminal selects the position data of the mass center corresponding to the timestamp with the minimum time interval at the judgment moment from the first database as a target positioning result; wherein the centroid is a location point characterizing the positioning terminal;
otherwise, the positioning terminal calculates corresponding reference distances based on the current geographical longitude and latitude of the positioning terminal and the position data of each centroid in the first database, and takes the position data of the centroid with the minimum reference distance as a target positioning result;
before the positioning terminal monitors that a preset positioning trigger condition is met, a second database is constructed by the positioning terminal in the following mode:
when the positioning terminal acquires a piece of geographical position information, judging whether the currently acquired geographical position information is acquired through a Global Positioning System (GPS);
if yes, the positioning terminal stores the geographical position information into the second database;
otherwise, the positioning terminal calculates a corresponding speed value based on the currently acquired geographical position information and another geographical position information acquired at the last moment, and stores the geographical position into the second database if the speed value is not greater than a set speed threshold;
after the positioning terminal builds the second database, the first database is built in the following way:
the positioning terminal judges whether displacement data of the positioning terminal obtained for M times are consistent, wherein M is a preset natural number;
if yes, the positioning terminal respectively clusters the geographic position information in the second database, calculates position data of a plurality of centroids, and stores the position data of each centroid in the first database;
otherwise, the positioning terminal acquires the geographical position information again.
2. The method as claimed in claim 1, wherein before the positioning terminal calculates a corresponding speed value based on the currently obtained one geographical location information and another geographical location information obtained at the previous time, and stores the one geographical location corresponding to the speed value not greater than the speed threshold into the second database, the method further comprises:
the positioning terminal calculates a first distance value corresponding to first geographical position information acquired at a first moment and initial geographical position information acquired at an initial moment, wherein the first moment is behind the initial moment;
the positioning terminal calculates a second distance value corresponding to second geographic position information acquired at a second moment and initial geographic position information acquired at an initial moment, wherein the second moment is behind the first moment;
the positioning terminal calculates a third distance value corresponding to the second geographical position information acquired at the second moment and the first geographical position information acquired at the first moment;
if the difference value between the first distance value and the third distance value and the difference value between the second distance value and the third distance value are both larger than a preset difference threshold value, the positioning terminal stores the first geographical position information acquired at the first moment and the second geographical position information acquired at the second moment into the second database.
3. The method of claim 1, wherein when the positioning terminal monitors that a preset positioning trigger condition is met, determining whether displacement data of the positioning terminal acquired for N consecutive times are consistent comprises:
when a set positioning period is reached or a positioning starting signal of a control terminal is received, the positioning terminal determines that a preset positioning triggering condition is met;
the positioning terminal acquires the plurality of displacement data of the positioning terminal through a sensor for N times continuously and judges whether the plurality of displacement data are consistent or not, wherein the sensor comprises an acceleration sensor or a gyroscope sensor.
4. The method as claimed in claim 1, wherein the selecting, by the positioning terminal, the position data of the centroid corresponding to the timestamp with the smallest time interval at the judgment time from the first database as the target positioning result comprises:
the positioning terminal selects the position data of a plurality of centroids from the first database, wherein a wireless fidelity multiple access channel (WIFI MAC) and a CELL identification code (CELL ID) in the position data of the centroids are respectively the same as the WIFI MAC and the CELL ID at the judgment moment;
and the positioning terminal selects the position data of the mass center corresponding to the time stamp with the minimum time interval at the judgment time from the position data of the mass centers as a target positioning result.
5. The method as claimed in claim 4, wherein the positioning terminal calculates a corresponding reference distance based on the current geographical latitude and longitude of the positioning terminal and the position data of each centroid in the first database, and takes the position data of the centroid with the smallest reference distance as the target positioning result, including:
the positioning terminal compares the WIFI MAC and the CELL ID with network access data corresponding to the position data of each mass center stored in the first database respectively;
if the comparison result of the WIFI MAC and the access component in the network access data is the same, and the comparison result of the CELL ID and the CELL code component in the network access data is the same, the positioning terminal calculates the corresponding reference distance according to the current geographical longitude and latitude and the position data of each centroid in the first database;
and the positioning terminal takes the position data of the centroid with the minimum reference distance and the reference distance smaller than the interval threshold in the first database as the target positioning result.
6. The method of claim 1, wherein after the positioning terminal obtains the target positioning result, the method further comprises:
and the positioning terminal uploads the target positioning result to a server so that a control terminal associated with the positioning terminal checks the target positioning result, and the control terminal generates an action track related to the positioning terminal according to the checked target positioning result.
7. An indoor positioning device, comprising:
the positioning terminal comprises a judging module, a judging module and a judging module, wherein the judging module is used for judging whether displacement data of the positioning terminal acquired for N times continuously are consistent when the positioning terminal positioned indoors monitors that a preset positioning trigger condition is met, and N is a preset natural number;
the selecting module is used for selecting the position data of the mass center corresponding to the timestamp with the minimum time interval at the judging moment from the first database as a target positioning result by the positioning terminal if the positioning terminal is in the first database; wherein the centroid is a location point characterizing the positioning terminal;
a calculating module, configured to calculate, by the positioning terminal, a corresponding reference distance based on the current geographic longitude and latitude of the positioning terminal and the location data of each centroid in the first database, and use the location data of the centroid with the smallest reference distance as a target positioning result;
before the positioning terminal monitors that a preset positioning trigger condition is met, a second database is constructed by the positioning terminal in the following mode:
when the positioning terminal acquires a piece of geographical position information, judging whether the currently acquired geographical position information is acquired through a Global Positioning System (GPS);
if yes, the positioning terminal stores the geographical position information into the second database;
otherwise, the positioning terminal calculates a corresponding speed value based on the currently acquired geographical position information and another geographical position information acquired at the last moment, and stores the geographical position into the second database if the speed value is not greater than a set speed threshold;
after the positioning terminal builds the second database, the first database is built in the following way:
the positioning terminal judges whether displacement data of the positioning terminal obtained for M times are consistent, wherein M is a preset natural number;
if so, the positioning terminal respectively clusters the geographic position information in the second database, calculates the position data of a plurality of centroids, and stores the position data of each centroid into the first database;
otherwise, the positioning terminal acquires the geographical position information again.
8. An indoor positioning apparatus, comprising:
a memory for storing a computer program executable by the controller;
a controller is coupled to the memory and configured to perform the method of any of claims 1-6.
9. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor, enable the processor to perform the method of any of claims 1-6.
CN202110622433.0A 2021-06-04 2021-06-04 Indoor positioning method and device and storage medium Active CN113395652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110622433.0A CN113395652B (en) 2021-06-04 2021-06-04 Indoor positioning method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110622433.0A CN113395652B (en) 2021-06-04 2021-06-04 Indoor positioning method and device and storage medium

Publications (2)

Publication Number Publication Date
CN113395652A CN113395652A (en) 2021-09-14
CN113395652B true CN113395652B (en) 2022-09-23

Family

ID=77618194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110622433.0A Active CN113395652B (en) 2021-06-04 2021-06-04 Indoor positioning method and device and storage medium

Country Status (1)

Country Link
CN (1) CN113395652B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352069A (en) * 2018-12-24 2020-06-30 珠海格力电器股份有限公司 Indoor positioning method, server, storage medium and program product

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102111871B (en) * 2009-12-23 2013-08-07 中国移动通信集团公司 Terminal location method and device based on cell identifier location technology
CN105101082A (en) * 2015-07-14 2015-11-25 青岛海信网络科技股份有限公司 Positioning method and device
CN106953928A (en) * 2017-04-28 2017-07-14 上海与德科技有限公司 The acquisition methods and device of positional information
CN110719568B (en) * 2018-07-13 2022-03-25 腾讯大地通途(北京)科技有限公司 Indoor positioning method, device, medium and equipment
CN110516017B (en) * 2019-08-02 2022-05-20 Oppo广东移动通信有限公司 Location information processing method and device based on terminal equipment, electronic equipment and storage medium
CN111368014B (en) * 2019-12-23 2024-04-19 广东小天才科技有限公司 Motion trail generation method, terminal equipment and storage medium
CN111148046B (en) * 2019-12-31 2021-02-19 广西信恒科技有限公司 Track recording method, device and system
CN111970633A (en) * 2020-08-24 2020-11-20 桂林电子科技大学 Indoor positioning method based on WiFi, Bluetooth and pedestrian dead reckoning fusion

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352069A (en) * 2018-12-24 2020-06-30 珠海格力电器股份有限公司 Indoor positioning method, server, storage medium and program product

Also Published As

Publication number Publication date
CN113395652A (en) 2021-09-14

Similar Documents

Publication Publication Date Title
US10962633B2 (en) Three-dimensional space detection system, positioning method and system
CN104123004A (en) Portable terminal reflecting user's environment and method for operating the same
CN113110939A (en) Method and device for processing running data, computer equipment and storage medium
CN113473074B (en) Detection method, electronic equipment, detection equipment and storage medium
CN113835569A (en) Terminal device, quick start method for internal function of application and storage medium
CN113835571A (en) Terminal device, information display method and storage medium
CN111857531A (en) Mobile terminal and file display method thereof
CN114241415A (en) Vehicle position monitoring method, edge calculation device, monitoring device and system
CN114374813A (en) Multimedia resource management method, recorder and server
CN113055585B (en) Thumbnail display method of shooting interface and mobile terminal
CN113395652B (en) Indoor positioning method and device and storage medium
CN114371895B (en) Terminal equipment, mail marking method and storage medium
CN114513753A (en) Terminal device, track monitoring method and storage medium
CN113179432B (en) Display method and display device for video acquisition position
CN114675786A (en) Large-capacity storage mounting method, device, terminal and medium
CN114020379A (en) Terminal device, information feedback method and storage medium
CN113507614A (en) Video playing progress adjusting method and display equipment
CN114007202A (en) Method for establishing binding relationship and related equipment
CN113490052A (en) Terminal device, free viewpoint video playing method and server
CN115334604A (en) Terminal device, network control method and storage medium
CN112929858B (en) Method and terminal for simulating access control card
CN114356500A (en) Terminal device, automatic navigation method and storage medium
EP4357936A1 (en) Map display method, electronic device, and system
US11917487B2 (en) System and method of geo-location for building sites
WO2022222743A1 (en) Data processing method, system, and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.