Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for updating location data, including:
step 101, obtaining first position information of a mobile terminal at the current moment and second position information of the mobile terminal at the last moment.
In this step, the first location information of the mobile terminal at the current time and the second location information of the mobile terminal at the previous time are not acquired through a positioning system, and the rough location information of the mobile terminal can be intelligently sensed through a mobile network or a wireless network.
And step 102, determining the geographical position variation of the mobile terminal according to the first position information and the second position information.
And 103, if the geographical position variation is larger than a preset value, updating ephemeris data required by positioning and/or system time of the mobile terminal.
In this step, in order to avoid the waste of resources and power consumption of the mobile terminal caused by the real-time update of the positioning data by the mobile terminal, the mobile terminal or the base station may be configured with a preset value in advance, and when the position change of the mobile terminal is large (that is, the geographical position variation is larger than the preset value), the mobile terminal is triggered to actively update the ephemeris data and/or the system time of the mobile terminal.
For example, if the geographical location variation of the mobile terminal is greater than 50KM, the mobile terminal actively requests the network server to send ephemeris data and/or system time of the mobile terminal, so that the time required by the satellite searching process when the user initiates positioning next time is shortened, and the positioning time is shortened.
In the embodiment of the invention, by detecting the geographical position variation of the mobile terminal, the ephemeris data required by the mobile terminal to actively update the positioning and/or the system time of the mobile terminal can be triggered when the geographical position variation of the mobile terminal is larger than a preset value, so that the problem of long satellite search time or satellite search failure caused by periodically updating the time of the mobile terminal and the ephemeris data is solved, the positioning speed is improved, and the mobile terminal can be ensured to quickly complete the positioning function at any moment.
Preferably, in the above embodiment of the present invention, step 101 includes:
the method comprises the steps of obtaining first position information of a mobile terminal at the current moment and second position information of the mobile terminal at the previous moment through a base station accessed by the mobile terminal.
After the mobile terminal is connected to the mobile network, the information of the currently accessed base station can be acquired, the position of the base station is known, the relative position between the mobile terminal and the base station at the current moment is used as the first position information of the mobile terminal at the current moment, and the relative position between the mobile terminal and the base station at the last moment is used as the second position information of the mobile terminal at the last moment. Furthermore, the terminal compares the first position information with the second position information to obtain the geographical position variation of the mobile terminal.
Alternatively, step 101 comprises:
the method comprises the steps of obtaining first position information of a mobile terminal at the current moment and second position information of the mobile terminal at the previous moment through a wireless network accessed by the mobile terminal.
When the mobile terminal is not inserted with a mobile card (SIM card, Nano SIM card or Micro SIM card), the mobile terminal cannot acquire the base station information; at this time, if the mobile terminal is connected to a wireless network (e.g., wifi network), the wireless network may acquire the location information of the wireless network entity. And taking the relative position between the mobile terminal and the wireless network entity at the current moment as the first position information of the mobile terminal at the current moment, and taking the relative position between the mobile terminal and the wireless network entity at the last moment as the second position information of the mobile terminal at the last moment. Furthermore, the terminal compares the first position information with the second position information to obtain the geographical position variation of the mobile terminal. The wireless network entity may specifically include: wireless routers, wireless network cards, etc., are not enumerated herein.
Accordingly, step 103 includes:
if the geographical position variation is larger than a preset value, acquiring the current geographical position of the mobile terminal according to a base station accessed by the mobile terminal or a wireless network accessed by the mobile terminal;
sending request information to a positioning server, wherein the request information carries the current geographic position of the mobile terminal;
and receiving ephemeris data which is sent by the positioning server and is matched with the current geographic position of the mobile terminal and is required for positioning and/or the system time of the mobile terminal.
Since the ephemeris data is related to the geographical position of the mobile terminal, i.e. mobile terminals at different positions have different ephemeris data; when the geographical position of the mobile terminal changes greatly, the mobile terminal requests the positioning server to send ephemeris data corresponding to the current geographical position according to the current geographical position, so that the time required by the satellite searching process when the user initiates positioning next time is optimized.
Further, in order to maximize the efficiency of updating the data required for its positioning, the system time of the mobile terminal may be updated simultaneously when the ephemeris data required for positioning is updated.
According to the embodiment of the invention, when the geographical position variation of the mobile terminal is larger than the preset value, the ephemeris data and/or the system time of the mobile terminal are/is actively updated, and under the condition that the hardware performance of the antenna of the mobile terminal is not changed, the satellite searching speed is optimized, the positioning speed and the positioning accuracy are improved, so that the better positioning speed is brought, and the user experience is improved.
Bearing the above example, the updating method provided by the above embodiment of the present invention further includes:
if the geographical position variation is smaller than or equal to the preset value and the mobile terminal is located outdoors at the current moment, acquiring the last positioning starting time of the mobile terminal;
and if the time difference between the current time and the last positioning starting time is larger than a threshold value, updating ephemeris data required by positioning and/or the system time of the mobile terminal.
The mobile terminal is provided with a mobile network, a wireless network, photosensitive and geomagnetic sensor equipment and the like, and the mobile terminal can be judged whether to be indoors or outdoors at the current moment by intelligently detecting one or more of photosensitive, geomagnetic data, mobile network signal intensity and wireless network signal intensity.
Preferably, the mobile terminal is located indoors or outdoors at the current time, and may further perform identification according to a determination condition of machine learning in advance based on the current time, the ambient light intensity, the geomagnetic intensity, the mobile base station signal intensity, and the wireless signal intensity.
Further, in the above embodiment of the present invention, if the time difference between the current time and the time of starting the positioning last time is greater than a threshold value, the step of updating ephemeris data required for positioning and/or the system time of the mobile terminal includes:
if the time difference between the current time and the last positioning starting time is larger than a threshold value, sending a positioning request to a positioning server; in order to avoid the waste of resources and power consumption of the mobile terminal caused by the fact that the mobile terminal updates the data required by positioning in real time, the mobile terminal or the base station can be configured with a threshold value in advance, and the mobile terminal is triggered to actively update the data required by positioning when the time difference between the last positioning starting time of the current time interval exceeds the threshold value.
Receiving navigation message data sent by the positioning server, wherein the navigation message data comprises satellite time and ephemeris data of the positioning server;
updating the system time of the mobile terminal required by positioning according to the satellite time of the positioning server; and/or updating positioning data required by positioning according to the ephemeris data.
The positioning server generally adopts a cesium atomic clock or a rubidium atomic clock, so that the accuracy is extremely high; the clock accuracy of the mobile terminal is lower than that of the satellite clock of the positioning server, and when time synchronization is not performed for a long time, the deviation between the mobile terminal and the satellite clock is larger and larger, so that the positioning accuracy and the positioning speed are influenced.
And when the mobile terminal is in an outdoor open state, the mobile terminal can receive satellite signals, and the navigation message data sent by the positioning server contains time information: the time of week (TOW) and the satellite time, when the navigation message data is received and the positioning is completed, the mobile terminal can further update the time obtained by calculating the navigation message data to the system time of the mobile terminal, and the system time of the mobile terminal is completely the same as or has a very small difference with the satellite time, so that the positioning speed of the next time when the user actively initiates the positioning is improved.
However, since the local time of the positioning receiver of the mobile terminal and the satellite time are greatly deviated after a certain period of time, it can be set that the operation is triggered when the time exceeds 1 day or 2 days and the mobile terminal is in an outdoor environment, so as to update the system time of the mobile terminal required for positioning.
Also, in order to maximize the efficiency of updating the data required for its position determination, the ephemeris data may be updated simultaneously when updating the system time of the mobile terminal required for the position determination.
In the embodiment of the invention, when the terminal is located outdoors and the time difference between the current time and the last positioning starting time is greater than a threshold value, ephemeris data required by positioning and/or the system time of the mobile terminal are/is updated, and under the condition that the performance of mobile terminal antenna hardware is not changed, the satellite searching speed is optimized, the positioning speed and accuracy are improved, better positioning speed is brought, and user experience is improved.
It should be noted that, the above-mentioned embodiments of the present invention refer to a location server including: the GPS (Global Positioning System), the beidou Positioning System, the Galileo satellite navigation System or the GLONASS Global satellite navigation System, which are not limited herein.
In summary, the embodiments of the present invention can implement triggering the mobile terminal to actively update ephemeris data and/or system time of the mobile terminal when the geographical location variation of the mobile terminal is greater than a preset value by detecting the geographical location variation of the mobile terminal, and actively update the ephemeris data and/or system time of the mobile terminal when the geographical location variation of the mobile terminal is less than or equal to the preset value and the mobile terminal is located outdoors, so as to solve the problem of long satellite search time or satellite search failure caused by periodically updating the time and the ephemeris data of the mobile terminal, improve the positioning speed, and ensure that the mobile terminal can quickly complete the positioning function at any time.
As shown in fig. 2, an embodiment of the present invention further provides a mobile terminal 200, including:
a position obtaining module 201, configured to obtain first position information of a mobile terminal at a current time and second position information of the mobile terminal at a previous time;
a change determining module 202, configured to determine a geographical location change amount of the mobile terminal according to the first location information and the second location information;
a first updating module 203, configured to update ephemeris data required for positioning and/or system time of the mobile terminal if the geographic location variation is greater than a preset value.
In the embodiment of the invention, by detecting the geographical position variation of the mobile terminal, the ephemeris data required by the mobile terminal to actively update the positioning and/or the system time of the mobile terminal can be triggered when the geographical position variation of the mobile terminal is larger than a preset value, so that the problem of long satellite search time or satellite search failure caused by periodically updating the time of the mobile terminal and the ephemeris data is solved, the positioning speed is improved, and the mobile terminal can be ensured to quickly complete the positioning function at any moment.
Preferably, in the above embodiment of the present invention, as shown in fig. 3, the mobile terminal further includes:
a time obtaining module 204, configured to obtain the last time when the mobile terminal starts positioning if the geographic position variation is smaller than or equal to the preset value and the mobile terminal is located outdoors at the current moment;
a second updating module 205, configured to update ephemeris data required for positioning and/or system time of the mobile terminal if a time difference between the current time and the time of last positioning start is greater than a threshold value.
Preferably, in the above embodiment of the present invention, the position obtaining module 201 includes:
a first location obtaining sub-module 2011, configured to obtain, through a base station to which the mobile terminal is accessed, first location information of the mobile terminal at a current time and second location information of the mobile terminal at a previous time; and/or the presence of a gas in the gas,
the second location obtaining sub-module 2012 is configured to obtain, through a wireless network to which the mobile terminal is accessed, first location information of the mobile terminal at the current time and second location information of the mobile terminal at the previous time.
Preferably, in the above embodiment of the present invention, the first updating module 203 includes:
an obtaining sub-module 2031, configured to, if the geographic position variation is greater than a preset value, obtain a current geographic position of the mobile terminal according to a base station to which the mobile terminal is accessed or a wireless network to which the mobile terminal is accessed;
a first request submodule 2032, configured to send request information to a positioning server, where the request information carries a current geographic location of the mobile terminal;
a first updating sub-module 2033, configured to receive ephemeris data and/or system time of the mobile terminal, which are sent by the positioning server and are matched with the current geographic location of the mobile terminal.
Preferably, in the above embodiment of the present invention, the second updating module 205 includes:
a second request sub-module 2051, configured to send a positioning request to the positioning server if a time difference between the current time and the time when positioning was started last is greater than a threshold value;
a data receiving submodule 2052, configured to receive navigation message data sent by the positioning server, where the navigation message data includes satellite time and ephemeris data of the positioning server;
a second updating submodule 2053, configured to update the system time of the mobile terminal required for positioning according to the satellite time of the positioning server; and/or updating positioning data required by positioning according to the ephemeris data.
The mobile terminal provided by the embodiment of the invention can realize each process realized by the mobile terminal in the method embodiment, and is not described again in order to avoid repetition.
In summary, the embodiment of the present invention can trigger the mobile terminal to actively update ephemeris data and/or system time of the mobile terminal when the geographical location variation of the mobile terminal is greater than a preset value by detecting the geographical location variation of the mobile terminal; and when the geographical position variation of the mobile terminal is smaller than or equal to the preset value and the mobile terminal is located outdoors, the ephemeris data required by positioning and/or the system time of the mobile terminal are/is actively updated, so that the problem that the satellite searching time is long or the satellite searching fails due to the fact that the time and the ephemeris data of the mobile terminal are periodically updated is solved, the positioning speed is improved, and the mobile terminal can be ensured to quickly complete the positioning function at any moment.
It should be noted that, the mobile terminal provided in the embodiments of the present invention is a mobile terminal capable of executing the above-mentioned method for updating location data, and all embodiments of the above-mentioned method for updating location data are applicable to the mobile terminal, and can achieve the same or similar beneficial effects.
Figure 4 is a schematic diagram of a hardware configuration of a mobile terminal implementing various embodiments of the present invention,
the mobile terminal 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 4 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 410 is configured to obtain first location information of the mobile terminal at a current time and second location information of the mobile terminal at a previous time; the mobile terminal is used for determining the geographical position variation of the mobile terminal according to the first position information and the second position information; and if the geographical position variation is larger than a preset value, updating ephemeris data required by positioning and/or system time of the mobile terminal.
In summary, the embodiments of the present invention can implement triggering the mobile terminal to actively update ephemeris data and/or system time of the mobile terminal when the geographical position variation of the mobile terminal is greater than a preset value by detecting the geographical position variation of the mobile terminal, so as to solve the problem of long satellite search time or satellite search failure caused by periodically updating the time and ephemeris data of the mobile terminal, improve the positioning speed, and ensure that the mobile terminal can quickly complete the positioning function at any time.
It should be noted that, the mobile terminal provided in the embodiments of the present invention is a mobile terminal capable of executing the above-mentioned method for updating location data, and all embodiments of the above-mentioned method for updating location data are applicable to the mobile terminal, and can achieve the same or similar beneficial effects.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 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. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the mobile terminal 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The mobile terminal 400 also includes at least one sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 4061 and/or the backlight when the mobile terminal 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 408 is an interface through which an external device is connected to the mobile terminal 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 400 or may be used to transmit data between the mobile terminal 400 and external devices.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 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 processor 410 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby integrally monitoring the mobile terminal. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The mobile terminal 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the mobile terminal 400 includes some functional modules that are not shown, and thus, are not described in detail herein.
Preferably, as shown in fig. 5, an embodiment of the present invention further provides a mobile terminal, which includes a processor 500, a memory 510, and a computer program stored in the memory 510 and capable of running on the processor 500, where the computer program is executed by the processor 500 to implement each process of the above-mentioned embodiment of the method for updating location data, and can achieve the same technical effect, and in order to avoid repetition, it is not described herein again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned method for updating location data, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.