CN107390245B - Positioning method, device, equipment and storage medium - Google Patents

Positioning method, device, equipment and storage medium Download PDF

Info

Publication number
CN107390245B
CN107390245B CN201710569671.3A CN201710569671A CN107390245B CN 107390245 B CN107390245 B CN 107390245B CN 201710569671 A CN201710569671 A CN 201710569671A CN 107390245 B CN107390245 B CN 107390245B
Authority
CN
China
Prior art keywords
positioning
mobile terminal
information
environment
mode
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
CN201710569671.3A
Other languages
Chinese (zh)
Other versions
CN107390245A (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.)
Guangdong Genius Technology Co Ltd
Original Assignee
Guangdong Genius 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 Guangdong Genius Technology Co Ltd filed Critical Guangdong Genius Technology Co Ltd
Priority to CN201710569671.3A priority Critical patent/CN107390245B/en
Publication of CN107390245A publication Critical patent/CN107390245A/en
Application granted granted Critical
Publication of CN107390245B publication Critical patent/CN107390245B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/38Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
    • G01S19/39Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/42Determining position
    • G01S19/45Determining position by combining measurements of signals from the satellite radio beacon positioning system with a supplementary measurement
    • G01S19/46Determining position by combining measurements of signals from the satellite radio beacon positioning system with a supplementary measurement the supplementary measurement being of a radio-wave signal type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management

Landscapes

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

Abstract

The embodiment of the invention discloses a positioning method, a positioning device, positioning equipment and a storage medium, wherein the method comprises the following steps: monitoring a positioning request triggered by a user, and if the positioning request is monitored, acquiring weather information of a current area where the mobile terminal is located; detecting the current actual temperature value of the environment where the mobile terminal is located through a temperature sensor; acquiring current environment information of the mobile terminal according to the weather information and the current actual temperature value, and determining a positioning mode matched with the current environment information; and positioning the mobile terminal by using the positioning mode. The embodiment of the invention can avoid the power consumption problem caused by continuously searching the GPS signal for continuous positioning in the indoor environment, save the electric quantity of the mobile terminal, reduce the time waste caused by not using a matched positioning mode and accelerate the positioning speed.

Description

Positioning method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to an intelligent terminal positioning technology, in particular to a positioning method, a positioning device, positioning equipment and a storage medium.
Background
With the development of mobile communication technology, many conventional electronic products have increased functions related to mobile communication technology, and a telephone watch integrating functions of watch, communication, positioning and the like has been widely used in recent years. The telephone watch is used as a novel communication tool, one important function is positioning, and particularly, the accurate and quick positioning function is necessary for objects needing special care, such as children, old people and the like.
Currently, the positioning function of the existing telephone watch generally adopts a Global positioning system (GPS for short) to perform positioning. However, because of the limited penetration ability of GPS signals, it is difficult for a telephone wristwatch to search for GPS signals and to locate the GPS signals in an indoor environment, and the process of continuously searching for GPS signals for continuous location is power consuming. In the case that positioning cannot be performed through GPS signals, a wireless connectivity (WiFi for short) positioning technology or a base station positioning technology is selected to be used, which wastes positioning time and power consumption.
Disclosure of Invention
The embodiment of the invention provides a positioning method, a positioning device, positioning equipment and a storage medium, and aims to solve the problems that in the prior art, a mobile intelligent terminal is low in indoor positioning speed and wastes electric quantity.
In a first aspect, an embodiment of the present invention provides a positioning method, including:
monitoring a positioning request triggered by a user, and if the positioning request is monitored, acquiring weather information of a current area where the mobile terminal is located;
detecting the current actual temperature value of the environment where the mobile terminal is located through a temperature sensor;
acquiring current environment information of the mobile terminal according to the weather information and the current actual temperature value, and determining a positioning mode matched with the current environment information;
and positioning the mobile terminal by using the positioning mode.
Further, the monitoring a positioning request triggered by a user, and if the positioning request is monitored, before obtaining weather information of a positioning area where the mobile terminal is currently located, further includes:
setting an initial positioning mode of a positioning request, wherein the initial positioning mode comprises GPS positioning, WIFI positioning and base station positioning;
if the positioning within the preset time is successful, acquiring the positioning information of the initialized positioning mode;
and if the positioning fails within the preset time, replacing the initial positioning mode until the positioning is successful.
Further, the obtaining current environment information of the mobile terminal according to the weather information and the current actual temperature value, and determining a positioning mode matched with the current environment information includes:
acquiring season information and temperature values included in the weather information;
calculating a difference value between the temperature value and the current actual temperature value according to the season information, comparing the difference value with a threshold value, acquiring current environment information of the mobile terminal according to a comparison result, and determining a positioning mode matched with the current environment information; the current environment information includes an indoor environment and an outdoor environment.
Further, the calculating a difference between the temperature value and the current actual temperature value according to the seasonal information, comparing the difference with a threshold, obtaining current environment information of the mobile terminal according to a comparison result, and determining a positioning mode matched with the current environment information includes:
when the obtained seasonal information is summer, calculating a difference value between the temperature value and the current actual temperature value, and comparing the difference value with a threshold value;
if the comparison result is that the difference value is larger than or equal to a first threshold value, determining that the current environment information of the mobile terminal is an indoor environment, and determining that a positioning mode matched with the indoor environment is a WIFI positioning mode;
and if the comparison result is that the difference value is smaller than a second threshold value, determining that the positioning mode is the initialized positioning mode.
Further, the calculating a difference between the temperature value and the current actual temperature value according to the seasonal information, comparing the difference with a threshold, obtaining current environment information of the mobile terminal according to a comparison result, and determining a positioning mode matched with the current environment information includes:
when the obtained season information is winter, calculating a difference value between the temperature value and the current actual temperature value, and comparing the difference value with a threshold value;
if the positioning area is a preset northern area and the comparison result is that the difference value is greater than or equal to a third threshold value, determining that the current environment information of the mobile terminal is an indoor environment, and determining that the positioning mode matched with the indoor environment is a WIFI positioning mode;
if the positioning area is a preset northern area and the comparison result is that the difference value is smaller than a fourth threshold value and/or the temperature value is larger than the current actual temperature value, determining that the current environment information of the mobile terminal is an outdoor environment, and determining a priority GPS positioning mode matched with the outdoor environment;
and if the positioning region is a preset southern region, determining that the positioning mode is the initialized positioning mode.
In a second aspect, an embodiment of the present invention further provides a positioning apparatus, including:
the mobile terminal comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for monitoring a positioning request triggered by a user, and acquiring weather information of a current area of the mobile terminal if the positioning request is monitored;
the temperature detection module is used for detecting the current actual temperature value of the environment where the mobile terminal is located through a temperature sensor;
the positioning mode determining module is used for acquiring the current environment information of the mobile terminal according to the weather information and the current actual temperature value and determining a positioning mode matched with the current environment information;
and the positioning module is used for positioning the mobile terminal by using the positioning mode.
Further, the apparatus further comprises:
the initialization module is used for setting an initialization positioning mode of the positioning request, wherein the initialization positioning mode comprises GPS positioning, WIFI positioning and base station positioning;
the positioning information acquisition module is used for acquiring the positioning information of the initialized positioning mode if the positioning is successful within preset time;
and the positioning mode replacing module is used for replacing the initialized positioning mode until the positioning is successful if the positioning is failed within the preset time.
Further, the positioning method determining module includes:
the acquisition unit is used for acquiring season information and temperature values included in the weather information;
a positioning mode determining unit, configured to calculate a difference between the temperature value and the current actual temperature value according to the seasonal information, compare the difference with a threshold, obtain current environment information of the mobile terminal according to a comparison result, and determine a positioning mode matching the current environment information; the current environment information includes an indoor environment and an outdoor environment.
In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
storage means for storing one or more programs;
the temperature sensor is used for detecting the external environment temperature of the mobile terminal;
when executed by the one or more processors, cause the one or more processors to implement a positioning method as in any one of the preceding.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement a positioning method as described in any one of the foregoing.
The embodiment of the invention compares the acquired weather information with the current actual temperature value of the surrounding environment of the mobile terminal acquired by the temperature sensor, and judges whether the current environment of the mobile terminal is an indoor environment or an outdoor environment, thereby determining the positioning mode of the mobile terminal, avoiding the power consumption problem caused by continuously searching GPS signals for continuous positioning in the indoor environment, saving the electric quantity of the mobile terminal, reducing the time waste caused by not using a matched positioning mode and accelerating the positioning speed by perfecting the positioning strategy. The method and the device optimize the positioning strategy of the mobile terminal and have wide applicable range.
Drawings
Fig. 1 is a flowchart of a positioning method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a positioning method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a positioning method in a third embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a positioning apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus in the fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a positioning method according to an embodiment of the present invention, where the embodiment is applicable to a case where a mobile terminal selects a positioning method, and the method may be executed by a positioning apparatus, which may be implemented in a software and/or hardware manner and is generally integrated in the mobile terminal.
The method of the first embodiment of the invention specifically comprises the following steps:
s101, a positioning request triggered by a user is monitored, and if the positioning request is monitored, weather information of the current area of the mobile terminal is obtained.
Specifically, a positioning request triggered by a user is monitored, where the positioning request may be a positioning request triggered by the user at a remote location or a positioning request triggered by the user at a near location. If the positioning request is monitored, weather information of the current area of the mobile terminal is obtained, the weather information can be obtained through a network, for example, a weather prompt received by the mobile terminal within a recent period of time, and the positioning area can be obtained through the last positioning request in the process of continuing the positioning request, so that the weather information of the area is obtained. The weather information comprises information such as regions, seasons, temperatures and weather changes, and the mobile terminal comprises intelligent communication equipment such as a telephone watch, a mobile phone and a tablet personal computer.
S102, detecting the current actual temperature value of the environment where the mobile terminal is located through a temperature sensor.
Specifically, the mobile terminal comprises a temperature sensor capable of measuring a temperature value, and the temperature sensor is used for detecting an actual temperature value of the current environment where the mobile terminal is located.
S103, acquiring current environment information of the mobile terminal according to the weather information and the current actual temperature value, and determining a positioning mode matched with the current environment information.
Specifically, at least season information and temperature values can be obtained according to weather information, different positioning matching relations are set according to different seasons, the current environment of the mobile terminal can be judged with high probability by calculating the difference range between the temperature values and the current actual temperature values obtained by the temperature sensors, and the positioning mode matched with the current environment is determined.
And S104, positioning the mobile terminal by using the positioning mode.
Specifically, the mobile terminal is located by using a locating mode matched with the current environment where the mobile terminal is located, and a locating request triggered by a user is responded.
According to the positioning method provided by the embodiment of the invention, the acquired weather information is compared with the current actual temperature value of the surrounding environment of the mobile terminal acquired by the temperature sensor, and the current environment of the mobile terminal is judged to be an indoor environment or an outdoor environment, so that the positioning mode of the mobile terminal is determined, the power consumption problem caused by continuous searching of GPS signals for continuous positioning in the indoor environment can be avoided, the electric quantity of the mobile terminal is saved, the time waste caused by the fact that a matched positioning mode is not used is reduced by perfecting the positioning strategy, and the positioning speed is accelerated. The method and the device optimize the positioning strategy of the mobile terminal and have wide applicable range.
Example two
Fig. 2 is a flowchart of a positioning method according to a second embodiment of the present invention, where the second embodiment of the present invention is optimized based on the first embodiment, specifically, a positioning request triggered by a monitoring user is monitored, and if the positioning request is monitored, an operation before obtaining weather information of a region where a mobile terminal is currently located is further optimized, as shown in fig. 2, the second embodiment of the present invention specifically includes:
s201, setting an initial positioning mode of the positioning request, wherein the initial positioning mode comprises GPS positioning, WIFI positioning and base station positioning.
Specifically, including GPS location, WIFI location and base station location, the initial location mode may be set to first adopt the GPS location mode to fix a position, and under the unsuccessful condition of GPS location mode location, then adopt the WIFI location mode, under the also failed condition of location of WIFI location mode, finally adopt the base station location mode. The initial positioning mode can also be set to firstly adopt a WIFI positioning mode for positioning, then adopt a GPS positioning mode under the condition that the positioning of the WIFI positioning mode is unsuccessful, and finally adopt a base station positioning mode under the condition that the positioning of the GPS positioning mode is also unsuccessful. According to the practical application, the required initial positioning mode can be specifically set. And presetting an initial positioning mode of the positioning request, and positioning the mobile terminal according to the initial positioning mode.
S202, if the positioning within the preset time is successful, the positioning information of the initialized positioning mode is obtained.
Specifically, the mobile terminal performs positioning according to an initialization positioning manner, and if the positioning is successful within a preset time, the length of the preset time may be specifically set according to an actual application, for example, the preset time may be 3 seconds. And if the positioning is successful in 3 seconds, acquiring the positioning information of the initialized positioning mode. Wherein, the positioning information at least comprises a positioning area.
S203, if the positioning is failed within the preset time, the initialization positioning mode is replaced until the positioning is successful.
Specifically, the mobile terminal performs positioning according to an initial positioning mode, for example, a positioning sequence set by the initial positioning mode is a GPS positioning mode first, a base station positioning mode then, and a WIFI positioning mode last. If the positioning fails in the preset time by adopting the GPS positioning mode, the positioning mode is changed to be the base station positioning mode, and the like, and if the positioning fails in the preset time by adopting the base station positioning mode, the positioning mode is changed to be the WIFI positioning mode until the mobile terminal is successfully positioned.
S204, monitoring a positioning request triggered by a user, and if the positioning request is monitored, acquiring weather information of the current area of the mobile terminal.
S205, detecting the current actual temperature value of the environment where the mobile terminal is located through a temperature sensor.
S206, obtaining the current environment information of the mobile terminal according to the weather information and the current actual temperature value, and determining a positioning mode matched with the current environment information.
And S207, positioning the mobile terminal by using the positioning mode.
In this embodiment, the initial positioning mode is set to firstly adopt a GPS positioning mode to perform positioning, then adopt a WIFI positioning mode under the condition that the GPS positioning mode fails to perform positioning, finally adopt a base station positioning mode under the condition that the WIFI positioning mode also fails to perform positioning, the preset time is set to 4 seconds, and the mobile terminal is a telephone watch. When a first positioning request triggered by a user is monitored, the telephone watch performs positioning according to a preset initial positioning mode, firstly performs positioning in a GPS positioning mode, and if the GPS positioning mode succeeds in positioning within 4 seconds, positioning information of the positioning is acquired. If the GPS positioning mode fails to perform positioning within 4 seconds, the WIFI positioning mode is continuously adopted for positioning, and if the WIFI positioning mode is successfully performed within 4 seconds, the positioning information of the positioning is acquired. And if the WIFI positioning mode fails to position within 4 seconds, continuing to position by adopting the base station positioning mode according to a preset initial positioning mode until the positioning is successful.
And continuously monitoring a continuous positioning request triggered by a user, if the continuous positioning request is monitored, acquiring a positioning region included in positioning information obtained after the initial positioning is successful, and acquiring weather information such as season, temperature, weather change and the like of the region where the telephone watch is located. And detecting the current actual temperature value of the environment where the telephone watch is located by using a temperature sensor in the telephone watch, judging whether the telephone watch is in an indoor environment or an outdoor environment according to the weather information and the current actual temperature value, and determining a positioning mode matched with the environment where the telephone watch is located.
According to the positioning method provided by the embodiment of the invention, the positioning mode is flexibly determined according to the environment of the mobile terminal, the positioning strategy is optimized, the time waste caused by poor positioning strategy can be avoided, the positioning speed is increased, and the user experience is improved.
EXAMPLE III
Fig. 3 is a flowchart of a positioning method provided in the third embodiment of the present invention, which is further illustrated in the third embodiment of the present invention based on the foregoing embodiments, that is, based on the weather information and the current actual temperature value, obtaining current environment information of the mobile terminal, and determining a positioning manner matched with the current environment information, as shown in fig. 3, the method specifically includes:
s301, a positioning request triggered by a user is monitored, and if the positioning request is monitored, weather information of the current area of the mobile terminal is obtained.
S302, detecting the current actual temperature value of the environment where the mobile terminal is located through a temperature sensor.
And S303, acquiring season information and temperature values included in the weather information.
S304, calculating a difference value between the temperature value and the current actual temperature value according to the season information, comparing the difference value with a threshold value, acquiring current environment information of the mobile terminal according to a comparison result, and determining a positioning mode matched with the current environment information; the current environment information includes an indoor environment and an outdoor environment.
Preferably, when the obtained seasonal information is summer, calculating a difference between the temperature value and the current actual temperature value, and comparing the difference with a threshold value;
if the comparison result is that the difference value is larger than or equal to a first threshold value, determining that the current environment information of the mobile terminal is an indoor environment, and determining that a positioning mode matched with the indoor environment is a WIFI positioning mode;
and if the comparison result is that the difference value is smaller than a second threshold value, determining that the positioning mode is the initialized positioning mode.
Preferably, when the obtained seasonal information is winter, calculating a difference between the temperature value and the current actual temperature value, and comparing the difference with a threshold value;
if the positioning area is a preset northern area and the comparison result is that the difference value is greater than or equal to a third threshold value, determining that the current environment information of the mobile terminal is an indoor environment, and determining that the positioning mode matched with the indoor environment is a WIFI positioning mode;
if the positioning area is a preset northern area and the comparison result is that the difference value is smaller than a fourth threshold value and/or the temperature value is larger than the current actual temperature value, determining that the current environment information of the mobile terminal is an outdoor environment, and determining a priority GPS positioning mode matched with the outdoor environment;
and if the positioning region is a preset southern region, determining that the positioning mode is the initialized positioning mode.
Specifically, the temperature value can be obtained through the weather information, the current actual temperature value of the environment where the mobile terminal is located can be obtained through the temperature sensor of the mobile terminal, the difference value between the temperature value and the current actual temperature value is calculated, and the difference value is compared with the threshold value. The threshold includes a first threshold, a second threshold, a third threshold and a fourth threshold, and the thresholds may be equal or unequal according to the actual application. The threshold value, which is a parameter that can be adjusted, can be set according to specific situations, and for example, can be set to 10 degrees celsius.
In this embodiment, when the season information included in the weather information is obtained in summer, if the difference between the temperature value and the current actual temperature value of the environment where the mobile terminal is located is greater than or equal to the first threshold, it can be understood that the temperature difference between the environment where the mobile terminal is located and the outdoor environment is large, that is, the temperature difference between the hot outdoor environment and the cool indoor environment is large, at this time, it is determined that the current environment information of the mobile terminal is the indoor environment, and in the indoor environment, the matched positioning mode is the WIFI positioning mode, and it is determined that the mobile terminal is positioned in the WIFI positioning mode. If the difference value between the temperature value and the current actual temperature value of the environment where the mobile terminal is located is smaller than the second threshold, it can be understood that the temperature difference between the environment where the mobile terminal is located and the outdoor environment is not large, and the environment where the mobile terminal is located cannot be accurately judged to be the indoor environment or the outdoor environment, and the positioning mode of the mobile terminal is determined to be an initialization positioning mode.
When the obtained season information included in the weather information is winter, the region range included in the northern region can be preset according to the region climate condition, for example, the northern region can be set to be a region north of the Chinese river. If the location area is the north area of presetting, winter is chilly area promptly, and the difference of the current actual temperature value of temperature value and the environment that mobile terminal is located is greater than or equal to the third threshold value, can understand that the environment that mobile terminal is located is great with outdoor environment temperature difference, and chilly outdoor environment is great with warm indoor environment temperature difference promptly, at this moment, confirms mobile terminal's current environmental information is indoor environment, and under indoor environment, assorted locate mode is the WIFI locate mode, then confirms that mobile terminal adopts the WIFI locate mode to fix a position. If the positioning area is a preset northern area, and the difference value between the temperature value and the current actual temperature value of the environment where the mobile terminal is located is smaller than the fourth threshold value and/or the temperature value is larger than the current actual temperature value, it can be understood that the difference between the environment where the mobile terminal is located and the outdoor environment temperature is not large, and even the current actual temperature value of the environment where the mobile terminal is located is smaller than the temperature value, at this moment, the current environment information of the mobile terminal is determined to be the outdoor environment, and under the outdoor environment, the matched positioning mode is a GPS positioning mode, and then the mobile terminal is determined to be positioned by adopting the GPS positioning mode. And if the positioning area is a preset southern area, namely a warmer area in winter, the environment where the mobile terminal is located cannot be accurately judged to be an indoor environment or an outdoor environment according to the temperature difference, and the positioning mode of the mobile terminal is determined to be an initialization positioning mode.
S305, positioning the mobile terminal by using the positioning mode.
In the positioning method provided by the third embodiment of the present invention, the difference between the temperature value and the current actual temperature value is compared with the threshold, and the environment where the mobile terminal is located is determined to be an indoor environment or an outdoor environment, so that a positioning mode matched with the indoor environment or the outdoor environment is adopted, the positioning mode is flexibly adjusted, the power consumption problem caused by continuous search of GPS signals for continuous positioning in the indoor environment is avoided, and the electric quantity of the mobile terminal is saved.
Example four
Fig. 4 is a schematic structural diagram of a positioning apparatus in a fourth embodiment of the present invention, where the positioning apparatus is applied to a case where a positioning mode is selected by a mobile terminal, and the positioning apparatus may be implemented in a software and/or hardware manner and is generally integrated in the mobile terminal. As shown in fig. 4, the apparatus includes: an acquisition module 401, a temperature detection module 402, a positioning mode determination module 403, and a positioning module 404.
An obtaining module 401, configured to monitor a positioning request triggered by a user, and if the positioning request is monitored, obtain weather information of an area where a mobile terminal is currently located;
a temperature detection module 402, configured to detect a current actual temperature value of an environment where the mobile terminal is located through a temperature sensor;
a positioning mode determining module 403, configured to obtain current environment information of the mobile terminal according to the weather information and the current actual temperature value, and determine a positioning mode matched with the current environment information;
a positioning module 404, configured to position the mobile terminal using the positioning method.
The embodiment of the invention compares the acquired weather information with the current actual temperature value of the surrounding environment of the mobile terminal acquired by the temperature sensor, and judges whether the current environment of the mobile terminal is an indoor environment or an outdoor environment, thereby determining the positioning mode of the mobile terminal, avoiding the power consumption problem caused by continuously searching GPS signals for continuous positioning in the indoor environment, saving the electric quantity of the mobile terminal, reducing the time waste caused by not using a matched positioning mode and accelerating the positioning speed by perfecting the positioning strategy. The method and the device optimize the positioning strategy of the mobile terminal and have wide applicable range.
On the basis of the above embodiments, the apparatus may include:
the initialization module is used for setting an initialization positioning mode of the positioning request, wherein the initialization positioning mode comprises GPS positioning, WIFI positioning and base station positioning;
the positioning information acquisition module is used for acquiring the positioning information of the initialized positioning mode if the positioning is successful within preset time;
and the positioning mode replacing module is used for replacing the initialized positioning mode until the positioning is successful if the positioning is failed within the preset time.
On the basis of the foregoing embodiments, the positioning method determining module may include:
the acquisition unit is used for acquiring season information and temperature values included in the weather information;
a positioning mode determining unit, configured to calculate a difference between the temperature value and the current actual temperature value according to the seasonal information, compare the difference with a threshold, obtain current environment information of the mobile terminal according to a comparison result, and determine a positioning mode matching the current environment information; the current environment information includes an indoor environment and an outdoor environment.
On the basis of the foregoing embodiments, the positioning method determining unit may include:
the first comparison subunit is used for calculating the difference value between the temperature value and the current actual temperature value when the obtained seasonal information is summer, and comparing the difference value with a threshold value;
the first comparison result subunit is configured to, if the comparison result is that the difference is greater than or equal to a first threshold, determine that the current environment information of the mobile terminal is an indoor environment, and determine that a positioning mode matched with the indoor environment is a WIFI positioning mode;
and the second comparison result subunit is configured to determine that the positioning manner is the initialization positioning manner if the comparison result indicates that the difference is smaller than a second threshold.
On the basis of the foregoing embodiments, the positioning method determining unit may further include:
the second comparison subunit is used for calculating the difference value between the temperature value and the current actual temperature value when the obtained seasonal information is winter, and comparing the difference value with a threshold value;
a third comparison result subunit, configured to, if the location area is a preset northern area and the comparison result is that the difference is greater than or equal to a third threshold, determine that the current environment information of the mobile terminal is an indoor environment, and determine that the location mode matched with the indoor environment is a WIFI location mode;
a fourth comparison result subunit, configured to, if the location area is a preset north area and the comparison result is that the difference is smaller than a fourth threshold and/or the temperature value is greater than the current actual temperature value, determine that the current environment information of the mobile terminal is an outdoor environment, and determine a preferred GPS location mode matching the outdoor environment;
and the area subunit is used for determining that the positioning mode is the initialized positioning mode if the positioning area is the preset southern area.
In this embodiment, an initialization positioning mode of the positioning request is set by the initialization module, if the positioning within the preset time is successful, the positioning information acquisition module is used to acquire the positioning information at least including the positioning area, and if the positioning within the preset time is failed, the module is replaced by the positioning mode, and other positioning modes are replaced according to the initialization positioning mode until the positioning is successful. The preset time is specifically set according to the actual application condition. Monitoring a continuous positioning request triggered by a user, if the positioning request is monitored, acquiring weather information of a region where the mobile terminal is located currently through an acquisition module, detecting an actual temperature value of an environment where the mobile terminal is located currently in a temperature detection module by using a temperature sensor of the mobile terminal, acquiring season information and temperature values included in the weather information by using an acquisition unit of a positioning mode determination module, comparing a difference value between the temperature value and the current actual temperature value with a threshold value according to different seasons, judging whether the environment where the mobile terminal is located is an indoor environment or an outdoor environment according to a comparison result, and determining a positioning mode matched with the environment where the mobile terminal is located in a positioning mode determination unit of the positioning mode determination module.
The positioning mode specifically comprises the following steps: in summer, in a first comparison subunit of the positioning mode determining unit, comparing the difference value between the temperature value and the current actual temperature value with the threshold value, if the comparison result is that the difference value is greater than or equal to the first threshold value, judging that the environment where the mobile terminal is located is an indoor environment through the first comparison result subunit, and determining that the mobile terminal adopts a WIFI positioning mode matched with the indoor environment for positioning. And if the comparison result is that the difference value is smaller than the second threshold value, determining that the positioning mode of the mobile terminal is a preset initialization positioning mode through the second comparison result subunit. In winter, the region ranges of the northern area and the southern area are preset, the difference value between the temperature value and the current actual temperature value and the threshold value are compared in the second comparison subunit of the positioning mode determining unit, under the condition of the preset northern area, if the difference value is larger than or equal to the third threshold value, the environment where the mobile terminal is located is judged to be the indoor environment through the third comparison result subunit, and the mobile terminal is determined to be positioned in a WIFI positioning mode matched with the indoor environment. And if the difference value is smaller than the fourth threshold value and/or the current actual temperature value of the environment where the mobile terminal is located is smaller than the temperature value, judging that the environment where the mobile terminal is located is an outdoor environment through the fourth comparison result subunit, and determining that the mobile terminal is located by adopting a GPS (global positioning system) locating mode matched with the indoor environment. And under the condition of the preset southern area, determining the positioning mode of the mobile terminal to be a preset initial positioning mode through the area subunit.
The embodiment of the invention provides a positioning device, which can avoid the power consumption problem caused by continuous searching of GPS signals for continuous positioning in an indoor environment, reduce the time waste caused by the fact that a matched positioning mode is not used, accelerate the positioning speed and improve the user experience. The method and the device optimize the positioning strategy of the mobile terminal and have wide applicable range.
The positioning device provided by the embodiment of the invention can execute the positioning method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention, as shown in fig. 5, the apparatus includes a processor 501, a memory 502, an input device 503, an output device 504, and a temperature sensor 505; the number of the processors 501 in the device may be one or more, and one processor 501 is taken as an example in fig. 5; the processor 501, the memory 502, the input device 503, the output device 504 and the temperature sensor 505 in the apparatus may be connected by a bus or other means, and fig. 5 illustrates the connection by a bus as an example.
The memory 502 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the positioning method in the embodiment of the present invention (for example, the obtaining module 401, the temperature detecting module 402, the positioning mode determining module 403, and the positioning module 404 in the positioning apparatus). The processor 501 executes software programs, instructions and modules stored in the memory 502 to execute various functional applications of the device and data processing, namely, to realize the positioning method.
The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 502 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 non-volatile solid state storage device. In some examples, memory 502 may further include memory located remotely from processor 501, which may be connected to devices through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 503 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the apparatus. The output device 504 may include a display device such as a display screen.
The temperature sensor 505 may be configured to detect a current actual temperature value of an environment in which the mobile terminal is located, and data of a detection result may be stored in the memory 502 and sent to the processor 501 for data processing, so as to obtain a data processing result. The current actual temperature value may be displayed via the output device 504.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a positioning method, the method including:
monitoring a positioning request triggered by a user, and if the positioning request is monitored, acquiring weather information of a current area where the mobile terminal is located;
detecting the current actual temperature value of the environment where the mobile terminal is located through a temperature sensor;
acquiring current environment information of the mobile terminal according to the weather information and the current actual temperature value, and determining a positioning mode matched with the current environment information;
and positioning the mobile terminal by using the positioning mode.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the positioning method provided by any embodiment of the present invention.
Based on the understanding that the technical solutions of the present invention can be embodied in the form of software products, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a flash Memory (F L ASH), a hard disk or an optical disk of a computer, etc., and include instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the positioning apparatus, the included units and modules are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (6)

1. A method of positioning, comprising:
monitoring a positioning request triggered by a user, and if the positioning request is monitored, acquiring weather information of a current area where the mobile terminal is located; detecting the current actual temperature value of the environment where the mobile terminal is located through a temperature sensor;
acquiring current environment information of the mobile terminal according to the weather information and the current actual temperature value;
the weather information comprises season information and temperature values;
calculating the difference value between the temperature value and the current actual temperature value according to the season information, comparing the difference value with a threshold value, acquiring the current environment information of the mobile terminal according to the comparison result, and determining a positioning mode matched with the current environment information, wherein the positioning mode comprises the following steps:
the threshold includes a first threshold, a second threshold, a third threshold and a fourth threshold, and the thresholds may be equal or unequal;
the current environment information comprises an indoor environment and an outdoor environment;
when the obtained seasonal information is summer, if the difference value is larger than or equal to a first threshold value according to a comparison result, determining that the current environmental information of the mobile terminal is an indoor environment, and determining that a positioning mode matched with the indoor environment is a WIFI positioning mode; if the comparison result is that the difference value is smaller than a second threshold value, determining that the positioning mode is an initialization positioning mode;
when the obtained seasonal information is in winter, if the positioning area is a preset northern area and the comparison result is that the difference value is greater than or equal to a third threshold value, determining that the current environmental information of the mobile terminal is an indoor environment, and determining that the positioning mode matched with the indoor environment is a WIFI positioning mode; if the positioning area is a preset northern area and the comparison result is that the difference value is smaller than a fourth threshold value and/or the temperature value is larger than the current actual temperature value, determining that the current environment information of the mobile terminal is an outdoor environment, and determining a priority GPS positioning mode matched with the outdoor environment; and if the positioning region is a preset southern region, determining that the positioning mode is the initialization positioning mode, and positioning the mobile terminal by using the positioning mode.
2. The method according to claim 1, wherein the monitoring a positioning request triggered by a user, and if the positioning request is monitored, before obtaining weather information of a region where the mobile terminal is currently located, further comprises:
setting the initial positioning mode of the positioning request, wherein the initial positioning mode comprises GPS positioning, WIFI positioning and base station positioning;
if the positioning within the preset time is successful, acquiring the positioning information of the initialized positioning mode;
and if the positioning fails within the preset time, replacing the initial positioning mode until the positioning is successful.
3. A positioning device, comprising:
the mobile terminal comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for monitoring a positioning request triggered by a user, and acquiring weather information of a current area of the mobile terminal if the positioning request is monitored;
the temperature detection module is used for detecting the current actual temperature value of the environment where the mobile terminal is located through a temperature sensor;
the positioning mode determining module is used for acquiring the current environment information of the mobile terminal according to the weather information and the current actual temperature value and determining a positioning mode matched with the current environment information;
the positioning mode determining module further comprises:
the acquisition unit is used for acquiring season information and temperature values included in the weather information;
a positioning mode determining unit, configured to calculate a difference between the temperature value and the current actual temperature value according to the seasonal information, compare the difference with a threshold, obtain current environment information of the mobile terminal according to a comparison result, and determine a positioning mode matching the current environment information;
the threshold includes a first threshold, a second threshold, a third threshold and a fourth threshold, and the thresholds may be equal or unequal;
the current environment information comprises an indoor environment and an outdoor environment;
the positioning method determining unit further includes:
the first comparison subunit is used for calculating the difference value between the temperature value and the current actual temperature value when the obtained seasonal information is summer, and comparing the difference value with a threshold value;
the first comparison result subunit is configured to, if the comparison result is that the difference is greater than or equal to a first threshold, determine that the current environment information of the mobile terminal is an indoor environment, and determine that a positioning mode matched with the indoor environment is a WIFI positioning mode;
a second comparison result subunit, configured to determine that the positioning manner is an initialization positioning manner if the comparison result indicates that the difference is smaller than a second threshold;
the second comparison subunit is used for calculating the difference value between the temperature value and the current actual temperature value when the obtained seasonal information is winter, and comparing the difference value with a threshold value;
a third comparison result subunit, configured to, if the location area is a preset northern area and the comparison result is that the difference is greater than or equal to a third threshold, determine that the current environment information of the mobile terminal is an indoor environment, and determine that the location mode matched with the indoor environment is a WIFI location mode;
a fourth comparison result subunit, configured to, if the location area is a preset north area and the comparison result is that the difference is smaller than a fourth threshold and/or the temperature value is greater than the current actual temperature value, determine that the current environment information of the mobile terminal is an outdoor environment, and determine a preferred GPS location mode matching the outdoor environment;
the area subunit is used for determining that the positioning mode is the initialized positioning mode if the positioning area is a preset southern area;
and the positioning module is used for positioning the mobile terminal by using the positioning mode.
4. The apparatus of claim 3, further comprising:
the initialization module is used for setting an initialization positioning mode of the positioning request, wherein the initialization positioning mode comprises GPS positioning, WIFI positioning and base station positioning;
the positioning information acquisition module is used for acquiring the positioning information of the initialized positioning mode if the positioning is successful within preset time;
and the positioning mode replacing module is used for replacing the initialized positioning mode until the positioning is successful if the positioning is failed within the preset time.
5. An apparatus, characterized in that the apparatus comprises:
one or more processors;
storage means for storing one or more programs;
the temperature sensor is used for detecting the external environment temperature of the mobile terminal;
when executed by the one or more processors, cause the one or more processors to implement a positioning method as recited in any of claims 1-2.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a positioning method according to any one of claims 1-2.
CN201710569671.3A 2017-07-13 2017-07-13 Positioning method, device, equipment and storage medium Active CN107390245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710569671.3A CN107390245B (en) 2017-07-13 2017-07-13 Positioning method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710569671.3A CN107390245B (en) 2017-07-13 2017-07-13 Positioning method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN107390245A CN107390245A (en) 2017-11-24
CN107390245B true CN107390245B (en) 2020-07-10

Family

ID=60340616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710569671.3A Active CN107390245B (en) 2017-07-13 2017-07-13 Positioning method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN107390245B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108076428B (en) * 2017-12-13 2020-01-14 Oppo广东移动通信有限公司 Control method and device based on positioning module, storage medium and mobile terminal
CN108093368B (en) * 2017-12-13 2020-07-31 Oppo广东移动通信有限公司 Control method and device based on positioning module, storage medium and mobile terminal
CN108020851B (en) * 2017-12-13 2020-01-14 Oppo广东移动通信有限公司 Control method and device based on positioning module, storage medium and mobile terminal
CN113691943B (en) * 2018-04-09 2022-11-04 华为技术有限公司 Positioning method and related equipment
CN110514181A (en) * 2018-05-22 2019-11-29 杭州萤石软件有限公司 Electronic equipment positioning method and device
CN108882175A (en) * 2018-08-16 2018-11-23 广东小天才科技有限公司 Positioning method and device, intelligent wearable device and storage medium
CN111750848B (en) * 2019-07-24 2024-03-19 广东小天才科技有限公司 Building positioning method and electronic equipment
CN110784819B (en) * 2019-10-15 2021-05-04 恒鸿达科技有限公司 Self-adaptive positioning method and terminal
CN110990416A (en) * 2019-11-27 2020-04-10 上海掌门科技有限公司 Real-time weather information updating method, device electronic equipment and medium
CN111780763B (en) * 2020-06-30 2022-05-06 杭州海康机器人技术有限公司 Visual positioning method and device based on visual map
CN113176587B (en) * 2021-04-07 2023-02-07 甄十信息科技(上海)有限公司 Indoor and outdoor identification method and system, electronic equipment and computer readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7397357B2 (en) * 2004-11-22 2008-07-08 Microsoft Corporation Sensing and analysis of ambient contextual signals for discriminating between indoor and outdoor locations
CN101826220A (en) * 2010-04-02 2010-09-08 中兴通讯股份有限公司 Attendance record terminal and method for realizing automatic switching of positioning modes
CN106341793A (en) * 2016-11-04 2017-01-18 广东小天才科技有限公司 Positioning method and device
CN106375593A (en) * 2016-09-29 2017-02-01 广东小天才科技有限公司 Method and device for determining positioning mode

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7397357B2 (en) * 2004-11-22 2008-07-08 Microsoft Corporation Sensing and analysis of ambient contextual signals for discriminating between indoor and outdoor locations
CN101826220A (en) * 2010-04-02 2010-09-08 中兴通讯股份有限公司 Attendance record terminal and method for realizing automatic switching of positioning modes
CN106375593A (en) * 2016-09-29 2017-02-01 广东小天才科技有限公司 Method and device for determining positioning mode
CN106341793A (en) * 2016-11-04 2017-01-18 广东小天才科技有限公司 Positioning method and device

Also Published As

Publication number Publication date
CN107390245A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
CN107390245B (en) Positioning method, device, equipment and storage medium
CN108040318B (en) Positioning method, electronic equipment and computer readable storage medium
CN106507445B (en) Wireless fidelity Wi-Fi scanning method and mobile terminal
CN112703714B (en) Application processing method and device, computer equipment and computer readable storage medium
CN108931802B (en) Indoor and outdoor scene detection method
CN111316673B (en) Electronic fence updating method and communication device
KR102656490B1 (en) Electronic device and method for determining positions
EP3107335A1 (en) Network searching method of terminal and terminal
WO2017219598A1 (en) Positioning method and wearable device
WO2016134625A1 (en) Wifi access system
CN108917762B (en) Method and system for positioning electric appliance, storage medium and home system
EP3017321A1 (en) Methods and apparatuses for use in providing location parameters to mobile applications
CN108870753B (en) Control method of intelligent water heater and intelligent water heater
CN107357606B (en) Application program starting method and device of mobile terminal
WO2017088111A1 (en) Position information acquisition method and system
CN109816830B (en) Unlocking method and device
CN103236183A (en) Automatic car-searching system, automatic car-searching method and mobile terminal based on wireless geomagnetism detection
CN104459749A (en) Positioning method and device capable of correcting base station positioning
CN104751086A (en) Terminal anti-theft method
CN106597509B (en) Positioning method and device
CN112913267B (en) Resource processing method, device, terminal, server and readable storage medium
CN112711516B (en) Data processing method and related device
CN106941566B (en) Alarm clock setting method and device of mobile terminal
CN111123326B (en) Positioning method, positioning device, storage medium and terminal
US10828957B2 (en) Vehicle system, vehicle, and information processing device

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