Abstract:
The invention relates to the technical field of mobile terminals and discloses a mobile terminal and a method and device for updating the setup information thereof. The method comprises: obtaining a National Marine Electronics Association (NMEA) position message through the Global Positioning System (GPS); interpreting the NMEA message to obtain the current time and the current position information of the mobile terminal; obtaining a nation to which the current position belongs according to the position information, recognizing the language of the nation; and updating the setup information of the mobile terminal according to the recognized language and the current time. Through the invention, the setup information of the mobile terminal can be updated according to the location of the mobile terminal.

Description:
TECHNICAL FIELD OF THE INVENTION 
     The invention relates to the technical field of mobile terminals, and in particular to a mobile terminal and a method and device for updating the setup information thereof. 
     BACKGROUND OF THE INVENTION 
     With the continuous development of mobile terminal technology, users have increasing requirements on functions of mobile terminals. 
     Take mobile phones as an example. The activity range increasingly extends as the social circle of people expands. Activities for example: flying to America from China on a business trip; international trade becomes abundant; mobile phones of a same model are sold to both France and Korea; may cause that mobile phones of a same type may be used in different countries. This may require that a mobile phone arriving in each new place needs to be reset for time, language and place information Similarly, after each mobile phone is used for the first time or powered off for a long time, the user also needs to reset time, language and place information of the mobile phone. The user has to know the current time, place and language information in order to reset this information, which brings great inconvenience to the user. 
     How to update the setup information of the mobile terminal in time according to a location of the mobile terminal in order to improve the humanization of the mobile terminal is one of the research directions of the field of mobile terminals. 
     SUMMARY OF THE INVENTION 
     An object of the present invention is to provide a method for updating the setup information of a mobile terminal, to update the setup information of the mobile terminal in time according to a location of the mobile terminal in order to improve the humanization of mobile terminals. 
     The embodiment of the invention is implemented as follows: a method for updating the setup information of a mobile terminal is provided, comprising the following steps:
         obtaining a National Marine Electronics Association (NMEA) position message through a Global Positioning System (GPS);   interpreting the NMEA position message to obtain a current time and a current position information of the mobile terminal;   obtaining a nation to which the current position belongs according to the current position information, and recognizing a language type of the nation corresponding to the current information;   updating the setup information of the mobile terminal according to the recognized language type and the current time.       

     Another object of the embodiment of the invention is to provide a device for updating the setup information of a mobile terminal, comprising:
         a National Marine Electronics Association (NMEA) message obtaining module, configured to obtain a NMEA position message through a GPS;   a NMEA message interpretation module, configured to interpret the NMEA position message to obtain a current time and a current position information of the mobile terminal;   a language type obtaining module, configured to obtain a nation to which the current position belongs according to the position information, and configured to recognize a language type of the nation;   a setup information updating module, configured to update the setup information of the mobile terminal according to the language type and the current time.       

     Still another object of the embodiment according to the present invention is to provide a mobile terminal, and the terminal comprises a device for updating the setup information provided in the embodiment of the invention. 
     In some embodiments of the invention, the mobile terminal obtains the latitude and longitude information and time information of a current location according to the received GPS signal, obtains the nation to which the position corresponds and the language of the nation according to the latitude and longitude information, updates the setup information of the mobile terminal according to the obtained language and time information, so as to be able to update the setup information of the mobile terminal according to the location of the mobile terminal, so that operation of mobile terminals is improved, and the global use of mobile terminals is facilitated. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a flow chart of a method for updating setup information of a mobile terminal, provided in an exemplary embodiment according to the present invention; and 
         FIG. 2  is a structure diagram of a device for updating setup information of a mobile terminal, provided in an exemplary embodiment according to the present invention. 
     
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     To make the purposes, technical solutions and advantages of the invention more clear, the invention will be further described in details below with reference to drawings and embodiments. It should be understood that specific embodiments described herein are only used for explaining the invention, instead of limiting the invention. 
       FIG. 1  illustrates a flow chart of a method for updating the setup information of a mobile terminal, according to an exemplary embodiment of the present invention. 
     In step S 101 , when a mobile terminal is powered on, the GPS is initiated. 
     In step S 102 , a NMEA message position is obtained through the GPS. 
     In step S 103 , the GPS of the mobile terminal is turned off. 
     In step S 104 , the NMEA position message is interpreted to obtain information corresponding to a current time and a current position of the mobile terminal. 
     The position information is a latitude and a longitude of the current position. Of course, the position information may be in other forms, which will not be listed herein. 
     In step S 105 , a nation associated with the current position is obtained according to the position information, and a language type of the nation is recognized. 
     In step S 106 , the setup information of the mobile terminal is updated according to the recognized language type and the current time. 
     In mobile phones, the setup information is generally stored in the file system, for example, in a Non-Volatile Random Access Memory (NVRAM). Each kind of data will be stored in a specifically allocated position in the file system, and allocated with a fixed ID number that corresponds to the fixed physical storage position. When certain data needs updating, the specific position of the data in the file system is found according to the ID number corresponding to the data, and then new data is written into the proper position in the file system. 
     For example, when new time data is obtained, a corresponding position in the file system is found according to an ID number that is allocated to the “TIME” setting item in advance, and then new “TIME” data is written into this position. After new data is written, a variable of “TIME” data in the memory is updated simultaneously. In this way, the display in the UI setting item will also be updated to new time. Similarly, data information of “LOCATION” and “LANGUAGE” may be updated. 
     The NMEA message and the interpretation of the message are described as follows. 
     Most GPS devices follow the NMEA protocol. After the GPS of mobile phones is started, it continuously obtains positioning messages, for example, Recommended Minimum Specific GPS/TRANSIT Data ($ GPRMC), i.e., NMEA messages, and these positioning messages contain the current time and the current position information of mobile phones, for example, latitude and longitude. 
     Communication statements specified by the NMEA communication protocol have already been based on ASCII codes, and the data format of NMEA messages is as follows:
         “$” is the mark at the beginning of statements;   “,” is the domain separator;   “*” is the check and identification mark, the two numbers after it represent the checksum that is the checksum of all character codes between “$” and “*”, but not including “$” and “*” two characters;   “/” is the terminator, with which all statements must end, i.e., “CARRIAGE RETURN” and “LINE-FEEDS” of ASCII characters.       

     $ GPRMC data format is as follows:
         $GPRMC,&lt;1&gt;, &lt;2&gt;, &lt;3&gt;, &lt;4&gt;, &lt;5&gt;, &lt;6&gt;, &lt;7&gt;, &lt;8&gt;, &lt;9&gt;, &lt;10&gt;, &lt;11&gt;, &lt;12&gt;*hh&lt;CR&gt;&lt;LF&gt;       

     Description of each field:
         $ GPRMC: frame header; &lt;1&gt; UTC time: hhmmss.sss; &lt;2&gt; state: A/V; &lt;3&gt; latitude: ddmm.mmmm; &lt;4&gt; north latitude/south latitude: N/S; &lt;5&gt; longitude: dddmm.mmmm; &lt;6&gt; east longitude/west longitude: E/W; &lt;7&gt; speed: section; &lt;8&gt; azimuth: degree; &lt;9&gt; UTC date: ddmmyy; &lt;10&gt; magnetic declination: 000-180; &lt;11&gt; direction of magnetic declination: E/W; &lt;12&gt; mode: A/D/E/N; *hh: check; &lt;CR&gt;&lt;LF&gt;: carriage return and line-feeds.       

     For example:
         $GPRMC,121252.000,A,3958.3032,N,11629.6046,E,15.15,359.95,070306,,,A*54   where, field 1 and field 9 represent the time: Mar. 7, 2006 12:12:52;   field 3 and field 4 represent the latitude: 39° 58.3032′ N;   field 5 and field 6 represent the longitude: 116° 29.6046′ E.       

     Interpretation of GPRMC messages: data is sent by statements for NMEA messages, the GPS of mobile phones may receive statements in many types, but in an exemplary embodiment of the invention, only several fields in GPRMC messages are needed; therefore it is necessary to interpret the received data to obtain the wanted information. 
     The wanted messages are separated by a function, as each kind of message begins with character $ and ends with CR+LF, the function obtains the type of messages first from the header of each message, if the message is found to be $ GPRMC, the function reads the whole complete message, that is, from the message header $ to CR+LF, to start to interpret each field of the message. 
     As message $ GPRMC contains a lot of fields, and each field is separated by “,”, “,” is used as the separator, that is, a “,” indicates the end of one field, the wanted fields are respectively read according to this sequence. 
     Field 1 is read to obtain the current year, month and day information. Field 9 is read to obtain the current hour, minute and second information. Field 3 is read to obtain the north latitude and south latitude, and then field 4 is read to obtain the latitude information. Field 5 is read to obtain east longitude and west longitude, and then field 6 is read to obtain the longitude. 
     Through the values of latitude and longitude in the current mobile phone, a corresponding nation is retrieved from one table, and the language of the nation is obtained. The table defines the range of latitude and longitude of each nation: for example, the range of latitude and longitude of Britain is: 2° E. to 7° W. and 50° N. to 58° N. If the mobile phone is within this range, it is indicated that the current position is in England. 
       FIG. 2  illustrates a structure of a device for updating setup information of a mobile terminal, provided in an exemplary embodiment according to the present invention. 
     GPS control module  21  is configured to control ON/OFF of the GPS function of a mobile terminal. 
     NMEA message obtaining module  22  is configured to obtain a NMEA position message through the GPS function. 
     NMEA message interpretation module  23 , is configured to interpret the NMEA position message to obtain the current time and the current position of a mobile terminal. 
     The position information is the latitude and longitude of the current position. 
     Language type obtaining module  24  is configured to recognize a nation to which the current position belongs to according to the position information, and recognize the language of the nation. 
     Setup information updating module  25  is configured to update the setup information of the mobile terminal according to the recognized language and the current time. 
     An embodiment of the invention further provides a mobile terminal, and the terminal comprises the device for updating the setup information as the device has been described in details above, and it will not described again herein. 
     In some embodiments of the invention, the mobile terminal obtains the latitude and longitude information and time information of the current location according to the received GPS signal, obtains the nation to which the position belongs to and the language of the nation according to the latitude and longitude information, updates the setup information of the mobile terminal according to the obtained language and time information, so as to be able to update the setup information of the mobile terminal according to the location of the mobile terminal, so that the operation of mobile terminals is improved, and the global use of mobile terminals is facilitated. 
     It should be understood that, for those skilled in the art, the invention may have modifications or alternations according to the above description, and these modifications and alternations should be included within the protection scope defined by the claims of the invention.