Local zone time acquisition methods, terminal and storage medium based on LBS
Technical field
The present invention relates to field of communication technology, in particular to a kind of local zone time acquisition methods based on LBS, terminal and deposit
Storage media.
Background technique
As the continuous explosion type of global Internet of Things develops, the terminal based on mobile wireless network using more and more extensive,
More and more terminals obtain local precise time by urgent need, for helping various civilian or industrial terminal equipment to provide
Precision clock is supported.
But since most of terminal is all without battery, or can not keep powering to terminal for a long time, so
Terminal may all lose clock information at any time, lead to the terminal for much needing precise time in this way, it is necessary to when providing artificial setting
The interface or method of clock, it is very troublesome in this way, it is highly inconvenient, and the time is also very inaccurate, both increased terminal at
This investment also causes much not being available the very high equipment of time required precision, this is clearly to internet of things equipment each
The universal of industry has a significant impact, and is a problem to be solved.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of local zone time acquisition methods, terminal and storage based on LBS
Time, and the problem that time precision is inadequate must be manually set to solve terminal in medium.
It is as follows that the embodiment of the present invention solves technical solution used by above-mentioned technical problem:
According to an aspect of an embodiment of the present invention, a kind of local zone time acquisition methods based on LBS are provided, are applied to eventually
End, the terminal include based on location-based service (Location Based Service, LBS) interface and pre-stored time zone with
The longitude table of comparisons, this method comprises:
UTC time is obtained to ntp server;
The base station information connecting with the terminal is obtained by the LBS interface;
The longitude information of the base station is obtained based on the base station information;
The time zone and the longitude table of comparisons are inquired, by the time zone and the longitude table of comparisons, is believed with the longitude of the base station
Cease time-zone information of the corresponding time zone as the terminal;
The local zone time of the terminal is calculated according to the UTC time and the time-zone information.
Another aspect according to an embodiment of the present invention provides a kind of terminal, which includes being based on location-based service
(Location Based Service, LBS) interface and pre-stored time zone and the longitude table of comparisons, which at least also wraps
It includes: memory, communication bus and processor, in which: the memory obtains program for storing the local zone time based on LBS;
The communication bus, for realizing the connection communication between processor and memory;The processor, for executing in memory
The local zone time based on LBS of storage obtains program, the step of to realize the above-mentioned local zone time acquisition methods based on LBS.
Another aspect according to an embodiment of the present invention provides a kind of storage medium, and calculating is stored on the storage medium
Machine program when computer program is executed by processor, realizes the above-mentioned local zone time acquisition methods based on LBS applied to terminal
The step of.
Local zone time acquisition methods, terminal and storage medium provided in an embodiment of the present invention based on LBS, is taken by NTP
Business device obtains accurate UTC time, and the longitude information of base station locating for terminal is obtained by LBS interface, and inquiry is preset at terminal
In time zone and the longitude table of comparisons, obtain terminal present position time-zone information, finally by by UTC time plus time zone letter
Breath, to calculate the accurate local time.To solve terminal it must be manually set the time, and time precision is inadequate
Problem greatly facilitates the application range of various industries terminal device, reduces the manual operation of user, and reduces terminal
Design cost, have biggish cost-effectiveness.
Detailed description of the invention
In attached drawing (it is not necessarily drawn to scale), similar appended drawing reference can describe phase in different views
As component.Similar reference numerals with different letter suffix can indicate the different examples of similar component.Attached drawing with example and
Unrestricted mode generally shows each embodiment discussed herein.
A kind of hardware structural diagram of Fig. 1 terminal of each embodiment to realize the present invention;
Fig. 2 is a kind of communications network system architecture diagram provided in an embodiment of the present invention;
Fig. 3 is the process for the local zone time acquisition methods based on LBS applied to terminal that the embodiment of the present invention one provides
Figure;
Fig. 4 is the step flow chart provided by Embodiment 2 of the present invention that UTC time is obtained to ntp server;
Fig. 5 is that a kind of terminal of the present invention forms structural schematic diagram.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
In order to be clearer and more clear technical problems, technical solutions and advantages to be solved, tie below
Drawings and examples are closed, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only
To explain the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element
Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix
Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, plate
Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable
Media player (Portable Media Player, PMP), navigation device, terminal, Intelligent bracelet, pedometer etc. are mobile eventually
End, and the fixed terminals such as number TV, desktop computer.
It will be illustrated by taking terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to being used in particular for
Except the element of mobile purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware structural diagram of its terminal of each embodiment to realize the present invention, the terminal
100 may include: radio frequency unit (Radio Frequency, RF) 101, WiFi module 102, audio output unit 103, A/V
(audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, storage
The components such as device 109, processor 110 and power supply 111.It will be understood by those skilled in the art that mobile terminal shown in Fig. 1
Structure does not constitute the restriction to mobile terminal, and terminal may include components more more or fewer than diagram, or combine certain
Component or different component layouts.
It is specifically introduced below with reference to all parts of the Fig. 1 to terminal 100:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station
Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101
Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating
Frequency unit 101 can also be communicated with network and other equipment by wireless communication.Any communication can be used in above-mentioned wireless communication
Standard or agreement, including but not limited to global system for mobile communications (Global System of Mobile
Communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code it is point more
Location 2000 (Code Division Multiple Access 2000, CDMA2000), wideband code division multiple access (Wideband
Code Division Multiple Access, WCDMA), TD SDMA (Time Division-
Synchronous Code Division Multiple Access, TD-SCDMA), frequency division duplex long term evolution
(Frequency Division Duplexing-Long Term Evolution, FDD-LTE) and time division duplex long term evolution
(Time Division Duplexing-Long Term Evolution, TDD-LTE) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102
Sub- mail, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 1 shows
Go out WiFi module 102, but it is understood that, and it is not belonging to must be configured into for mobile terminal, it completely can be according to need
It to omit within the scope of not changing the essence of the invention.
Audio output unit 103 can be in call signal reception pattern, call mode, logging mode, language in terminal 100
It is radio frequency unit 101 or WiFi module 102 is received or depositing when under the isotypes such as sound recognition mode, broadcast reception mode
The audio data stored in reservoir 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 may be used also
To provide audio output relevant to the specific function that terminal 100 executes (for example, call signal receives sound, message sink sound
Sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor
(Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode
Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out
Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited
Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike
Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042
Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can
To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model.
Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition)
The noise generated during frequency signal or interference.
Terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light
Light and shade adjusts the brightness of display panel 1061, and proximity sensor can close display panel when terminal 100 is moved in one's ear
1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (generally three axis) and add
The size of speed can detect that size and the direction of gravity when static, can be used to identify application (such as the horizontal/vertical screen of mobile phone posture
Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Also as mobile phone
Configurable fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, hygrometer, temperature
The other sensors such as meter, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap
Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used
Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal
Family setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with
And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch operation of user on it or nearby
(for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071
Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection
Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can
To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel
1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap
It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc.
It is one or more, specifically herein without limitation.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or
After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing
The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel
1061 be the function that outputs and inputs of realizing mobile terminal as two independent components, but in certain embodiments, it can
The function that outputs and inputs of terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not limited herein specifically
It is fixed.
Interface unit 108 be used as at least one external device (ED) connect with terminal 100 can by interface.For example, external
Device may include wired or wireless headphone port, external power supply (or battery charger) port, wired or wireless number
According to port, memory card port, port, the port audio input/output (I/O), view for connecting the device with identification module
The port frequency I/O, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, data are believed
Breath, electric power etc.) and by one or more elements that the input received is transferred in terminal 100 or can be used at end
Data are transmitted between end 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area
The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function
Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as
Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy
The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection
A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage
Data in device 109 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place
Managing device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated
Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main
Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 can be with
It is logically contiguous by power-supply management system and processor 110, thus by power-supply management system realize management charging, electric discharge, with
And the functions such as power managed.
Although Fig. 1 is not shown, terminal 100 can also be including bluetooth module etc., and details are not described herein.
Embodiment to facilitate the understanding of the present invention, the communications network system being based below to terminal of the invention are retouched
It states.
Referring to Fig. 2, Fig. 2 is a kind of communications network system architecture diagram provided in an embodiment of the present invention, the communication network system
System is the LTE system of universal mobile communications technology, which includes the user equipment (User of successively communication connection
Equipment, UE) 201, evolved UMTS Terrestrial radio access network (Evolved UMTS Terrestrial Radio
Access Network, E-UTRAN) 202, evolved packet-based core networks (Evolved Packet Core, EPC) 203 and operation
The IP operation 204 of quotient.
Generally, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning
Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203,
ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 may include mobility management entity (Mobility Management Entity, MME) 2031, ownership
Client server (Home Subscriber Server, HSS) 2032, other MME2033, SGW (Serving Gate Way,
Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and policy and rate functional entity
(Policy and Charging Rules Function, PCRF) 2036 etc..Wherein, MME2031 be processing UE201 and
The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers
Such as the function of home location register (not shown) etc, and preserves some related service features, data rates etc. and use
The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 can provide the IP of UE 201
Address distribution and other functions, PCRF2036 are strategy and the charging control strategic decision-making of business data flow and IP bearing resource
Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 may include internet, Intranet, IP multimedia subsystem (IP Multimedia
Subsystem, IMS) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art should know the present invention is not only
Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with
And the following new network system etc., herein without limitation.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the method for the present invention is proposed.
Embodiment one
As shown in figure 3, the step of showing the local zone time acquisition methods based on LBS of the offer of the embodiment of the present invention one stream
Cheng Tu.The sequence for executing step is defined it should be understood that the flow chart in this method embodiment is not used in.This method is answered
For terminal, the terminal includes based on location-based service (Location Based Service, LBS) interface and pre-stored
Time zone and the longitude table of comparisons, this method comprises:
S300, coordinated universal time is obtained to Network Time Protocol (Network Time Protocol, NTP) server
(Universal Time Coordinated,UTC)。
Ntp server is for making a kind of computer time synchronized agreement, it can make computer to its server
Or clock source (such as quartz clock, GPS etc.) synchronizes, it can provide the time adjustment of high accurancy and precision, and (LAN is upper and standard room
Difference is less than 1 millisecond, WAN upper a few tens of milliseconds), and vicious protocol attack can be prevented by the mode of encrypted acknowledgment.
In general, it is believed that UTC time and Greenwich Mean Time (Greenwich Mean Time, GMT) be it is the same, be
Universal time is the zebra time after being corrected to earth speed cycle sex differernce.Therefore, in the present embodiment when UTC
Between can also be called Greenwich Mean Time.Wherein, will implement to the specific steps that ntp server obtains UTC time in the present invention
Example two (Fig. 4) is described in detail.
S302, the base station information connecting with the terminal is obtained by the LBS interface.
Generally, LBS interface mainly calculates the position where terminal by the base station signal difference of mobile communication.Base
Information stand in simple terms, is by position area identification code (Location Area Identification, LAI) and base station number
(Cell Tower Identity, CID) composition.
Wherein, LAI is by Mobile Country Code MCC (Mobile country code, MCC)+Mobile Network Code (Mobile
Network code, MNC)+location area code (Location Area Code, LAC) composition.LAC is 2 byte longs
Hexadecimal binary-coded decimal (not including 0000 and FFFE).CID is the hexadecimal binary-coded decimal of 2 byte longs.It can by LAI and CID
To realize base station location, to obtain the base station of terminal connection.Wherein, it realizes that base station location belongs to by LAI and CID to compare into
Ripe technology, this case repeat no more.
S304, the longitude information that the base station is obtained based on the base station information.
Currently, working as terminal successful registration mobile cellular network, a variety of mobile network's standards can be supported, honeycomb covering the whole world moves
Dynamic network.Therefore, after terminal registration network success, necessary network insertion configuration is carried out, data dial is initiated to base station and asks
It asks, base station is waited to be successfully accessed.
After data dial success, the warp that the base station is obtained based on the base station information is accomplished by the following way in terminal
The step of spending information:
The base station that terminal is accessed by the LBS interface to terminal sends signaling to obtain LAI and the CID letter of the base station
Breath forms HTTP request then according to the LAI of base station information and cid information and preset GIS server request address.Eventually
End sends the HTTP request to specified GIS server, to obtain the latitude and longitude information of this base station, especially longitude information.
The GIS server obtains the longitude information of the base station based on the LAI and cid information, and passes through message
Form returns to GIS server, and terminal receives the message of GIS server passback, and the message returned according to the GIS server
Parse the longitude information of the base station.
S306, the inquiry time zone and the longitude table of comparisons, by the warp in the time zone and the longitude table of comparisons, with the base station
Spend time-zone information of the corresponding time zone of information as the terminal.
Table 1 is the time zone and the longitude table of comparisons that terminal prestores, and has recorded the corresponding relationship of whole world time zone and longitude.Currently,
In the world by global subdivision be 24 time zones, since 0 ° of longitude eastwards, westwards respectively for 7.5 ° be zero zone, by 7.5 ° of E (E tables
Show eastwards) eastwards every 15 ° be divided into a time zone, be respectively designated as Dong Yiqu, the eastern No.12 District Dong Erqu ....By 7.5 ° of W (W tables
Show eastwards) westwards every 15 ° be divided into a time zone.It is respectively designated as Xi Yiqu, the western No.12 District Xi Erqu ....
Table 1
Latitude and longitude information where the base station that terminal receives the terminal access of GIS server passback, especially longitude
After information, terminal is by inquiry time zone time zone corresponding with the available base station longitude information of the longitude table of comparisons, to obtain end
Time-zone information where holding.For example, when the longitude where the base station of GIS server passback is 20 ° of east longitude (20 ° of E), then by looking into
Ask mono- area time zone Wei Dong where time zone and the available terminal of the longitude table of comparisons.
S308, the local zone time that the terminal is calculated according to the UTC time and the time-zone information.
Terminal is according to UTC time (or Greenwich Mean Time) and the time-zone information, by described in the calculating of preset algorithm
The local zone time of terminal.In the present embodiment, preset algorithm is as shown in table 2.Specifically, when it is eastern for obtaining the time zone where terminal
Qu Shi, local zone time=UTC standard time+time zone numerical value * 1 hour.It is local when obtaining the time zone where terminal is western time zone
Time=UTC standard time-time zone * 1 hour.When obtaining the time zone where terminal is zero zone, local zone time=UTC standard
Time.For example, the local zone time of terminal is+1 hour UTC standard time when obtaining time zone mono- area Wei Dong where terminal, than
It such as, is 11:00:am when the UTC standard time, then local zone time is 12:00:am.
Table 2
Further, terminal is also corrected the time of terminal based on the resulting local zone time of calculating, and shows
In the application interface of terminal.
By implementing aforesaid way, accurate UTC time is obtained by ntp server, terminal institute is obtained by LBS interface
The longitude information of the base station at place inquires preset time zone in the terminal and the longitude table of comparisons, obtains the time zone of terminal present position
Information adds time-zone information finally by by UTC time, to calculate the accurate local time.It must to solve terminal
Time, and the problem that time precision is inadequate must be manually set, greatly facilitate the application range of various industries terminal device, subtract
The manual operation of user is lacked, and has reduced the design cost of terminal, there is biggish cost-effectiveness.
Embodiment two
As shown in figure 4, showing the step process provided by Embodiment 2 of the present invention for obtaining UTC time to ntp server
Figure.The sequence for executing step is defined it should be understood that the flow chart in this method embodiment is not used in.The step is specific
Include:
S400, initialization terminal.
S402, starting search mobile network, judge the terminal whether normal registration network.
Specifically, endpoint to register mobile cellular network, can support a variety of mobile network's standards, and honeycomb covering the whole world is mobile
Network.
S404, when the network of the terminal is normal, log-on data dial request is to judge whether the terminal successfully builds
Vertical data connection.
Specifically, after terminal registration network success, network insertion configuration is carried out, then log-on data dial request is to sentence
Whether the terminal of breaking is successfully established data connection, and the access permission of base station is waited to respond.When terminal data dial-up success, then
It is logical data can be provided for the LBS service in Network Time Protocol (Network Time Protocol, NTP) and above-described embodiment
It supports in road.
S406, when the terminal is successfully established data connection, start NTP service.
Wherein, NTP service is the agreement of the time of each computer in synchronizing network.
S408, TCP time service request is sent to the IP of the ntp server.
Wherein, ntp server is the ntp server at preset time service center, and developer can preset more as needed
The ntp server IP address at center when a.Preferably, each continent can preset an IP address, all over the world.
In the present embodiment, terminal sends transmission control protocol according to preset time service central server IP address, poll
(Transmission Control Protocol, TCP) time service request.
S410, the time service message that the ntp server returns is received.
If receiving time service central server response message, terminal can report time service message.If parsing failure, terminal meeting
The next time service central server IP of poll, the time service message until successfully obtaining time service central server.
S412, UTC time is gone out according to the time service packet parsing.
In this way, terminal can parse the UTC standard time after successfully obtaining the time service message of time service central server.Specifically
Analysis mode, belong to the technology of comparative maturity, this case repeats no more.
Embodiment three
The embodiment of the present invention provides a kind of terminal, and Fig. 5 is the composed structure schematic diagram of terminal of the present invention, and the terminal is at least
It include: memory 501, communication bus 502 and processor 503, in which:
The memory 501 obtains program for storing the local zone time based on LBS;
The communication bus 502, for realizing the connection communication between processor and memory;
The processor 503 obtains program for executing the local zone time based on LBS stored in memory, to realize
The step of local zone time acquisition methods based on LBS of above method embodiment.
It should be noted that the terminal of the present embodiment, belongs to same with the local zone time acquisition methods embodiment based on LBS
Design, specific implementation process is shown in embodiment of the method in detail, and the technical characteristic in embodiment of the method is right in the present embodiment
It should be applicable in, which is not described herein again.
Example IV
The embodiment of the invention also provides a kind of computer readable storage medium, it is stored on computer readable storage medium
Computer program when computer program is executed by processor, realizes any embodiment into embodiment two of above-described embodiment one
The step of local zone time acquisition methods based on LBS.
It should be noted that the computer readable storage medium of the embodiment of the present invention, obtains with the local zone time based on LBS
Embodiment of the method belongs to same design, and specific implementation process is shown in embodiment of the method in detail, and the technology in embodiment of the method is special
Sign is corresponding in a computer-readable storage medium to be applicable in, and which is not described herein again.
Local zone time acquisition methods, terminal and storage medium provided in an embodiment of the present invention based on LBS, is taken by NTP
Business device obtains accurate UTC time, and the longitude information of base station locating for terminal is obtained by LBS interface, and inquiry is preset at terminal
In time zone and the longitude table of comparisons, obtain terminal present position time-zone information, finally by by UTC time plus time zone letter
Breath, to calculate the accurate local time.To solve terminal it must be manually set the time, and time precision is inadequate
Problem greatly facilitates the application range of various industries terminal device, reduces the manual operation of user, and reduces terminal
Design cost, have biggish cost-effectiveness.
It will appreciated by the skilled person that whole or certain steps, system, dress in method disclosed hereinabove
Functional module/unit in setting may be implemented as software, firmware, hardware and its pond appropriate and close.
In hardware embodiment, the division between functional module/unit referred in the above description is not necessarily corresponded to
In the division of physics pond part;If for example, a physics pond part can have multiple functions or a function or step can be by
Dry is managed the cooperation of pond part and is executed.Certain physics ponds part or all physics ponds part may be implemented as by processor, such as central processing
The software that device, digital signal processor or microprocessor execute, is perhaps implemented as hardware or is implemented as integrated circuit,
Such as specific integrated circuit.Such software can be distributed on a computer-readable medium, and computer-readable medium may include meter
Calculation machine storage medium (or non-transitory medium) and communication media (or fugitive medium).As known in those of ordinary skill in the art
, term computer storage medium is included in for storing information (such as computer readable instructions, data structure, program module
Or other data) any method or technique in implement volatile and non-volatile, removable and nonremovable medium.It calculates
Machine storage medium includes but is not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc
(DVD) or other optical disc storages, magnetic holder, tape, disk storage or other magnetic memory apparatus or can be used for storing desired
Information and any other medium that can be accessed by a computer.In addition, known to a person of ordinary skill in the art be, communication
Medium generally comprises computer readable instructions, data structure, program module or such as carrier wave or other transmission mechanisms etc
Other data in modulated data signal, and may include any information delivery media.
Preferred embodiments of the present invention have been described above with reference to the accompanying drawings, not thereby limiting the scope of the invention.This
Field technical staff without departing from the scope and spirit of the invention in made by any modifications, equivalent replacements, and improvements, should all this
Within the interest field of invention.