A kind of method and device for updating the mobile terminal time
Technical field
The present invention relates to moving communicating field, more particularly to a kind of method and device for updating the mobile terminal time.
Background technology
It currently there are the mobile communications network of multiple types, such as General Packet Radio System(GPRS,
General Packet Radio System), CDMA(CDMA, Code Division Multiple Access)Communication
Network, Time Division-Synchronous Code Division Multiple Access(TD-SCDMA, Time Division-Synchronous CDMA)Communication network etc..
Because different mobile communications networks needs to use different Subscriber Identity Modules, so currently there are very
Many multi-card multi-standby mobile terminal product meets the demand of different mobile communications networks.
People often check temporal information, such as using hand in the mobile terminal product using these using it
Machine checks temporal information, but when some abnormal operations occur for the mobile terminals such as mobile phone, such as pulls out battery operation, can cause to move
The temporal information of dynamic terminal is reset to the initial value of system default when dispatching from the factory, and now needs user to reset the time, neither
It is convenient also inaccurate.
The technology that the mobile terminal products such as current mobile phone are used in renewal time information is generally to pass through NITZ (Ne
Twork Identity and Time Zone, network identity and time zone)Information obtains temporal information.Believed using the NITZ times
Mode when breath next renewal time is current mobile communications network in the world general a kind of pair.Such as U.S. Patent Application Publication No.
Just to disclose a kind of method and apparatus for updating the mobile terminal standard time in US2008081612 (A1) patent document.Should
In method disclosed in patent document, by calling base station, NITZ temporal informations are obtained from base station, mobile terminal system is then set to
The system time.
But, in practice, it is inaccurate, not in time still to there is the acquisition for mobile terminal time, or even can not be from mobile logical
Communication network obtains the phenomenon of temporal information.The especially mobile terminal of some double-card dual-standbies, multi-card multi-standby, such a defect is more bright
It is aobvious.
Accordingly, it would be desirable to which those skilled in the art find the technical method that another can be convenient, fast and high success rate
To solve this problem.
The content of the invention
It is solved by the invention be current mobile terminal often occur the problem of promptly and accurately can not updating system time.
The problem of to solve above, the present invention provides a kind of method and device for updating the mobile terminal time.
Technical solution of the present invention provides a kind of method for updating the mobile terminal time, including:
In the mobile terminal in the registered Subscriber Identity Module to communication network, currently available user's identification is chosen
Card;On the communication network that the currently available Subscriber Identity Module is attached to its registration;Pass through the currently available user's identification
Card obtains temporal information from communication network;If the currently available Subscriber Identity Module obtains temporal information not successfully, select successively
An available subscribers identification card is removed as currently available Subscriber Identity Module, until the mobile terminal, which is obtained, comes from communication network
Temporal information;The temporal information is set to the system time of the mobile terminal.
Alternatively, it is described to be included by currently available Subscriber Identity Module from communication network acquisition temporal information:Receive described
The message that the communication network of available subscribers identification card attachment is sent, temporal information is obtained from the message.
Alternatively, the currently available Subscriber Identity Module obtains temporal information and refers to that the currently available user knows not successfully
It Ka not be attached to after the communication network, the time of receipt (T of R) does not believe in the message that the communication network is sent within the time of restriction
Breath.
Alternatively, the currently available Subscriber Identity Module selection rule of selection is:It is currently according to the Subscriber Identity Module
System sequential search available subscribers identification card, chooses first available subscribers identification card, and the available subscribers described in this are recognized
Card is labeled as having used.
Alternatively, the currently available Subscriber Identity Module selection rule also available subscribers including the lookup of choosing are recognized
Card is not included labeled as the Subscriber Identity Module used.
Alternatively, the system user identification card current system order refers to according to the groove position where Subscriber Identity Module
The order of decision.
Alternatively, the currently available Subscriber Identity Module of selection is to start choosing after all Subscriber Identity Modules succeed in registration
Take.
Alternatively, the available subscribers identification card refers to that the Subscriber Identity Module of data service can be used.
Alternatively, it is described to refer to obtain NITZ temporal informations from communication network acquisition temporal information.
Alternatively, the mobile terminal can be started by menu at any time updates time of mobile terminal system
Function.
The embodiment of the present invention also provides a kind of device for updating the mobile terminal time, including:Choose unit, connection unit,
Time acquisition unit, setting unit.
The selection unit, in the registered Subscriber Identity Module to communication network of mobile terminal, choosing and working as
Preceding available subscribers identification card;
The connection unit, for the currently available Subscriber Identity Module of the selection unit selection to be attached into its registration
On communication network;
The time acquisition unit, for obtaining temporal information from the communication network accompanying by the connection unit;
The setting unit, the set of time for the time acquisition unit to be obtained is the system of the mobile terminal
Time.
Wherein, if the time acquisition unit obtains temporal information not successfully, selection unit chooses next successively can
With Subscriber Identity Module as currently available Subscriber Identity Module, until the mobile terminal obtains the time letter from communication network
Breath.
Alternatively, currently available Subscriber Identity Module described in the time obtaining unit obtains temporal information and refers to institute not successfully
State currently available Subscriber Identity Module to be attached to after the communication network, do not sent within the time of restriction in the communication network
Time of receipt (T of R) information in message.
Alternatively, the selection currently available Subscriber Identity Module of unit selection is specifically:Work as according to the Subscriber Identity Module
Preceding systematic order searches available subscribers identification card, chooses first available subscribers identification card, and by the available subscribers described in this
Identification card is labeled as having used.
Alternatively, the available subscribers identification card chosen selected by unit is not included labeled as the user's identification used
Card.
Alternatively, available subscribers identification card described in the selection unit refers to that the user's identification of data service can be used
Card.
Alternatively, obtain temporal information from communication network described in the time acquisition unit and refer to that obtaining the NITZ times believes
Breath.
Compared in prior art, technical solution of the present invention at least has advantages below:
In the mobile terminal in the registered Subscriber Identity Module to communication network, currently available user's identification is chosen
Card;On the communication network that the currently available Subscriber Identity Module is attached to its registration;Pass through the currently available user's identification
Card obtains temporal information from communication network;If the currently available Subscriber Identity Module obtains temporal information not successfully, select successively
An available subscribers identification card is removed as currently available Subscriber Identity Module, until the mobile terminal, which is obtained, comes from communication network
Temporal information;The temporal information is set to the system time of the mobile terminal.Moved it is possible to prevente effectively from updating at present
Available subscribers identification card is specified in advance used in dynamic terminal time, adheres to its communication network using the available subscribers identification card
Network, if the Subscriber Identity Module specified is not successfully updated system time, just terminates this renewal, so as to cause mobile whole
Hold the problem of can not upgrading system time in time.The present invention can effectively improve the success rate for updating time of mobile terminal system,
So that renewal time is timely, accurate, convenient.
Brief description of the drawings
Fig. 1 is the method and device embodiment application environment schematic diagram that the present invention updates the mobile terminal time;
Fig. 2 is that the embodiment of the present invention updates mobile terminal time flow schematic diagram;
Fig. 3 is the schematic flow sheet that the embodiment of the present invention updates cell phone system time method;
Fig. 4 is the structural representation of the embodiment for the device that the present invention updates the mobile terminal time.
Embodiment
By research, inventor has found:In general, NITZ information includes network designation and temporal information.Actually should
In, whether the message that mobile communications network is sent to mobile terminal is by the mobile communications network containing NITZ temporal informations
What operator determined, that is to say, that do not include NITZ temporal informations in the message that part mobile communications network is sent.
And for existing double-card dual-standby and multi-card multi-standby mobile terminal, typically using acquiescence card come from mobile communication
Network obtains NITZ information, once the corresponding mobile communications network of acquiescence card does not provide temporal information, then movement just occurs
The phenomenon that the system time of terminal can not update.
In view of this, inventor proposes a kind of scheme of the renewal mobile terminal of innovation, to solve this technical problem.
It is understandable to enable the above objects, features and advantages of the present invention to become apparent, below in conjunction with the accompanying drawings to the present invention
Embodiment be described in detail.Detail is elaborated in the following description to fully understand the present invention.But
It is that the present invention can be implemented with a variety of different from other manner described here, those skilled in the art can be without prejudice to originally
Similar popularization is done in the case of invention intension.Therefore the present invention is not limited by following public embodiment.
Fig. 1 updates the embodiment application environment schematic diagram of the method and device of mobile terminal time for the present invention.Such as Fig. 1 institutes
Show, in an embodiment of the present invention, mobile terminal 1 10 obtains temporal information from communication network 120.
Wherein, the mobile terminal 1 10 can be the mobile terminal device with time display function, and the movement is eventually
End equipment contains one or more Subscriber Identity Module.The Subscriber Identity Module can be SIM(Subscriber Identity
Module, client identification module)Card, USIM(Universal Subscriber Identity Module, Global Subscriber identification
Card)Card or UIM(User Identity Module, subscriber identification module)Card etc..
Specifically, the mobile terminal 1 10 can be that mobile phone, tablet personal computer, notebook computer etc. possess radio communication work(
The electronic equipment of energy.
The communication network 120, for the attachment(Attach)Mobile terminal 1 10 on the communication network is provided
Temporal information.The communication network can include multiple communication networks that there is currently, such as communication network 1, communication network 2
Deng.
It will be understood by those skilled in the art that, what is registered when attachment is the movement of the mobile terminal institute registering communication network
Data packet network, such as GPRS.It is attached to after communication network, the communication network can send location updating letter to mobile terminal
Breath, this information contains temporal information.
Specifically, in an embodiment of the present invention, the communication network 120 can include TD-SCDMA network, GPRS nets
Network, cdma network etc..
Fig. 2 is that the embodiment of the present invention updates mobile terminal time flow schematic diagram.As shown in Fig. 2 the embodiment of the present invention is carried
The method of the renewal mobile terminal time of confession includes:
Step S1, in the mobile terminal in the registered Subscriber Identity Module to communication network, chooses currently available use
Family identification card.
In an embodiment of the present invention, the mobile terminal is looked into order after its all Subscriber Identity Module succeeds in registration
Look for first available subscribers identification card.The available subscribers identification card refers to that the Subscriber Identity Module of data service can be used.Number
It can refer to the data service that 3G etc. can be provided according to business.It is described in order search available subscribers identification card refer to it is all not
It is denoted as in the Subscriber Identity Module that has used, searches available subscribers identification card.The sequential search can use a variety of sequence sides
Formula.Such as a kind of mode can be the order according to the Subscriber Identity Module determined by presently described mobile terminal groove position, then
Random manner can also be such as used, either by the way of the sequence of according to number size or according to the mobile communication registered
The modes such as network sequence.
On step S2, the communication network that the currently available Subscriber Identity Module is attached to its registration.
In an embodiment of the present invention, using the available subscribers identification card found described in step S1, it is attached to its note
The communication network of volume.
Communication network described here can be GPRS, CDMA, TD-SCDMA.
Step S3, temporal information is obtained by the currently available Subscriber Identity Module from communication network.
Wherein, if the currently available Subscriber Identity Module obtains temporal information not successfully, next Zhang Keyong is chosen successively
Subscriber Identity Module is as currently available Subscriber Identity Module, until the mobile terminal obtains the temporal information from communication network.
In an embodiment of the present invention, the message of the communication network is received by the available subscribers identification card, is judged
Receive in the message that the communication network is sent and whether contain temporal information, obtained if then obtaining the message, and therefrom
Take temporal information.
If not containing temporal information in the message that the communication network is sent in the time range of restriction, institute is concluded
State currently available Subscriber Identity Module and obtain temporal information not successfully, disconnect(Detach)The present communications network, and will be described
Current available subscribers identification card is denoted as having used.
It will be understood by those skilled in the art that, disconnect general and can be described as attachment removal.It is described after communication network described in attachment removal
Communication network will not send location updating message to mobile terminal.
The process of repeat step S1, S2 is then proceeded to, next available subscribers identification card is searched in order as currently may be used
With Subscriber Identity Module, until the mobile terminal obtains temporal information or the equal nothing of all Subscriber Identity Modules from communication network
Method obtains the temporal information from communication network.
The time range of the restriction need to be determined according to the concrete condition and requirement of mobile communications network.In general,
Can be within 3-8 seconds.
It is described from communication network obtain temporal information can be obtain NITZ temporal informations.Certainly, by it is other can be from
The communication protocol that communication network obtains temporal information is also possible, and excessive limitation should not be carried out herein.
Step S4, the temporal information is set to the system time of the mobile terminal.
In an embodiment of the present invention, the temporal information that will be obtained in step S3, the system for being set to the mobile terminal
Time, specific method to set up is well known for those skilled in the art, can use existing various means, herein not
Repeat again.
In order to make it easy to understand, the method for the time by taking mobile phone as an example to updating mobile terminal is described in detail below.
Fig. 3 is the schematic flow sheet that the embodiment of the present invention updates cell phone system time method.As shown in figure 3, the present invention is real
Applying the method for example renewal cell phone system time includes:
Step S301, starts and updates cell phone system time function.
When it is implemented, this function can be started by number of ways.This for example can be directly initiated in mobile phone power-on
Function;Can also by cell phone system add renewal time function menu, started more by menu at any time
The function of new cell-phone system time.
Step S302, waits all Subscriber Identity Modules to succeed in registration.
When it is implemented, checking the state of all Subscriber Identity Modules of the mobile phone, all users of the mobile phone are waited to know
Do not block all to search and net successfully.
Step S303, all Subscriber Identity Modules are denoted as being not used.
When it is implemented, after all Subscriber Identity Modules of step S302 are all searched and netted successfully, by all of the mobile phone
Subscriber Identity Module increases a flag bit, and all flag bits are denoted as being not used, and specifically, can put the value of flag bit
Represent that it is not used for 0 or 1 grade.
Step S304, is denoted as in untapped Subscriber Identity Module searching first available subscribers identification card described.
When it is implemented, after step S303 execution, described it be denoted as untapped user all in sequence and know
Not Ka in search first available subscribers identification card.
The looked-up sequence can be the order according to Subscriber Identity Module determined by the mobile phone groove position.It is described can
With Subscriber Identity Module, refer to that the Subscriber Identity Module of data service can be used.
On step S305, the communication network that the currently available Subscriber Identity Module is attached to its registration.
When it is implemented, using the available subscribers identification card found described in step S304, being attached to the logical of its registration
On communication network.
Communication network described here can be GPRS, CDMA, TD-SCDMA.
Step S306, judges whether to obtain temporal information.
When it is implemented, after the step S305, receiving the message that the communication network of the attachment is sent, judging that it disappears
Whether contain NITZ temporal informations in breath.
The message for carrying NITZ temporal informations, can actively be sent by communication network;Or by communication network root
Issued according to the request from mobile phone.
If the message contains temporal information, temporal information is obtained from the message.
If the message does not have in temporal information in the time range of restriction, disconnect the currently available user and know
Do not block the communication network of attachment, the flag bit of the currently available Subscriber Identity Module is denoted as having used, execution is then back to
Step S304.
Specifically, the value of the flag bit of the currently available Subscriber Identity Module can be set to 1 or 0 expression, and it has been used.
Specifically, the time range of restriction described here need to be according to the concrete condition and requirement of mobile communications network come really
It is fixed.In general, can be within 3-8 seconds.
Step S307, the temporal information is set to the system time of the mobile phone.
When it is implemented, the temporal information that will be obtained described in step S306, using ripe for those skilled in the art institute
The existing various technological means known are set to system time.
Compared with the technology that existing mobile phone updates system time, the invention has the advantages that:
It is attached to by the registered Subscriber Identity Module to communication network of mobile phone, choosing currently available Subscriber Identity Module
On its communication network registered, and temporal information is obtained from the communication network of attachment;If currently available Subscriber Identity Module is failed
Temporal information is obtained, then chooses next available subscribers identification card successively and goes to obtain temporal information, until mobile phone is obtained from logical
The temporal information of communication network, and the temporal information is set to the system time of mobile phone.It is possible to prevente effectively from current more new hand
The Subscriber Identity Module of acquiescence connection communication network is specified used in machine system time in advance, if the Subscriber Identity Module specified does not have
Be successfully updated system time, just terminate this renewal so that cause mobile phone can not upgrade in time system time the problem of.This hair
It is bright to effectively improve the success rate for updating time of mobile terminal system.
Correspondingly, the embodiment of the present invention additionally provides a kind of device for updating the mobile terminal time.
Below by taking mobile phone as an example, the course of work for the device for updating the mobile terminal time is illustrated.
With reference to Fig. 4, show that the embodiment of the present invention updates the structural representation of the device of cell phone system time.
The device of described renewal cell phone system time includes:Start unit 101, choose unit 102, connection unit 103,
Time acquisition unit 104, setting unit 105.
Start unit 101, the function of the mobile terminal time is updated for starting.
In specific implementation, wait all Subscriber Identity Modules of mobile phone all to succeed in registration, and all users of the mobile phone are known
A flag bit Ka not increased, and all flag bits are denoted as being not used, then start and choose unit 102.
Unit 102 is chosen, in the registered Subscriber Identity Module to communication network of mobile terminal, choosing current
Available subscribers identification card.
When it is implemented, untapped Subscriber Identity Module can be denoted as all described in start unit 101 in sequence
First available subscribers identification card of middle lookup.The looked-up sequence is according to user's identification determined by the mobile phone groove position
The order of card, the available subscribers identification card refers to that the Subscriber Identity Module of data service can be used.
Connection unit 103, the currently available Subscriber Identity Module for the selection unit 102 to be chosen is attached to its registration
Communication network on.
When it is implemented, using the available subscribers identification card found, being attached to the communication network of its registration.Here
The communication network can be GPRS, CDMA, TD-SCDMA.
Time acquisition unit 104, for obtaining temporal information from the communication network accompanying by the connection unit 103.
If the currently available Subscriber Identity Module obtains temporal information not successfully, choose unit 102 and choose next successively
Available subscribers identification card is opened as currently available Subscriber Identity Module, until the mobile terminal obtains the time from communication network
Information.
When it is implemented, time acquisition unit 104 receives the message that the communication network of the attachment is sent, its message is judged
In whether contain NITZ temporal informations.If the message contains temporal information, temporal information is obtained from the message.If
The message does not have in temporal information in the time range of restriction, then notifies connection unit 103 disconnects described currently available
The communication network of Subscriber Identity Module attachment, and abandon using the currently available Subscriber Identity Module renewal time information, will be described
The flag bit of currently available Subscriber Identity Module is denoted as having used.Enable selection unit 102 and choose next available subscribers identification
Card is used as currently available Subscriber Identity Module.
Setting unit 105, be for the mobile terminal for the set of time that obtains the time acquisition unit 104
The system time.
When it is implemented, the temporal information that will be obtained described in time acquisition unit 104, using for those skilled in the art
Existing various technological means known to member are set to the cell phone system time.
To sum up, the method and device for the renewal mobile phone time information that the present invention is provided, at least has the advantages that:
Known by the registered Subscriber Identity Module to communication network in the mobile terminal, choosing currently available user
On the communication network that its registration Ka be attached to, and temporal information is obtained from the communication network of attachment.If the currently available use
Family identification card obtains temporal information not successfully, then chooses next available subscribers identification card successively as currently available user's identification
Card, until the mobile terminal obtains the temporal information from communication network, the temporal information is set to described mobile whole
The system time at end.Available subscribers identification card is specified used in the cell phone system time in advance it is possible to prevente effectively from updating at present,
Adhere to its communication network using available subscribers identification, if the Subscriber Identity Module specified is not successfully updated system time, just tie
Shu Benci update so that cause mobile phone can not upgrade in time system time the problem of.The present invention can effectively improve renewal movement
The success rate of terminal system time so that renewal time is timely, accurate, convenient.
The application can be used in numerous general or special purpose computing device environment or configuration.For example:Personal computer, service
Device computer, handheld device or portable set, laptop device, multi-processor device including any of the above device or equipment
DCE etc..
The application can be described in the general context of computer executable instructions, such as program
Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type
Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these DCEs, by
Remote processing devices connected by communication network perform task.In a distributed computing environment, program module can be with
Positioned at including in the local and remote computer-readable storage medium including storage device.
Although the present invention is disclosed as above with preferred embodiment, it is not for limiting the present invention, any this area
Technical staff without departing from the spirit and scope of the present invention, may be by the methods and techniques content of the disclosure above to this hair
Bright technical scheme makes possible variation and modification, therefore, every content without departing from technical solution of the present invention, according to the present invention
Any simple modifications, equivalents, and modifications made to above example of technical spirit, belong to technical solution of the present invention
Protection domain.