CN103034634B - A kind of method of recording geographical position, device and mobile terminal - Google Patents

A kind of method of recording geographical position, device and mobile terminal Download PDF

Info

Publication number
CN103034634B
CN103034634B CN201110294750.0A CN201110294750A CN103034634B CN 103034634 B CN103034634 B CN 103034634B CN 201110294750 A CN201110294750 A CN 201110294750A CN 103034634 B CN103034634 B CN 103034634B
Authority
CN
China
Prior art keywords
file
state
mobile terminal
location information
geographical location
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110294750.0A
Other languages
Chinese (zh)
Other versions
CN103034634A (en
Inventor
陈柯
伊藤浩
下远野享
杨锦平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201110294750.0A priority Critical patent/CN103034634B/en
Publication of CN103034634A publication Critical patent/CN103034634A/en
Application granted granted Critical
Publication of CN103034634B publication Critical patent/CN103034634B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

A kind of method that the invention discloses recording geographical position, is applied to mobile terminal, and described method includes, and when described mobile terminal accessing the first file, preserves the current state of described mobile terminal and the first geographical location information;Described method also includes: when described mobile mobile access the second file, it is judged that described mobile terminal is accessing the first file to accessing between the second file, and whether the state of described mobile terminal change occurred;If there is not change, then the position of record access the second file is the first geographical location information;Wherein, described first file and the second file are identical file or different files.The application present invention, it is to avoid positioner frequently calculate operation, save system resource, thus geographical location information when accessing file can be recorded effectively, turn avoid resource consumption.

Description

A kind of method of recording geographical position, device and mobile terminal
Technical field
The present invention relates to technical field of mobile terminals, particularly to a kind of method of recording geographical position, device and mobile terminal.
Background technology
Record the geographical position at user place during each file access, good supplementary means can be provided for user search file, because user usually can remember somewhere employs which file, and can find, by the prompting in geographical position, the file required to look up easily.
But, if when accessing file every time, all opening global positioning system (GPS, GlobalPositioningSystem) or utilize adopting wireless fidelity technology (WIFI, wirelessfidelity) calculating location information, beyond doubt a kind of very serious resource consumption.How can effectively recording geographical location information when accessing file, can reduce again resource consumption is the problem needing solution badly.
Summary of the invention
The embodiment of the present invention is in that to provide a kind of method of recording geographical position, device and mobile terminal, can effectively record geographical location information when accessing file, is avoided that again resource consumption.
A kind of method embodiments providing recording geographical position, is applied to mobile terminal,
When described mobile terminal accessing the first file, preserve the current state of described mobile terminal and the first geographical location information;
Described method also includes:
When described mobile mobile access the second file,
Judging that described mobile terminal is accessing the first file to accessing between the second file, whether the state of described mobile terminal there is change;
If there is not change, then the position of record access the second file is the first geographical location information;Wherein, described first file and the second file are identical file or different files.
Wherein, described mobile terminal is accessing the first file to accessing between the second file, if the state of described mobile terminal changes, described method also includes:
Obtain the current state of described mobile terminal;
According to described current state, it is thus achieved that and the geographical location information of record access the second file.
Wherein, the mode obtaining described mobile terminal current state includes: by the detection of acceleration sensor in described mobile terminal, it is thus achieved that the state of described mobile terminal;Or, by the detection of the pace of change of base station cell, it is thus achieved that the state of described mobile terminal.
Wherein, if the current state of described mobile terminal is the first state;According to described current state, it is thus achieved that and the step of the geographical location information of record access the second file includes:
The geographical location information that described mobile terminal is current is calculated by positioner,
The geographical location information calculated is recorded as the geographical location information accessing the second file.
Wherein, if the current state of described mobile terminal is the second state;According to described current state, it is thus achieved that and the step of the geographical location information of record access the second file includes:
Obtain the travel information that described mobile terminal is current,
Described travel information is recorded as the geographical location information accessing the second file.
Wherein, described travel information includes starting point, terminal and stroke ID;
The step that described travel information is recorded as the geographical location information accessing the second file includes:
Detect when described mobile terminal produces the first variable condition, produce a new stroke ID, the geographical location information corresponding to the original state of described first variable condition is recorded as starting point geographical location information;Wherein, described first variable condition is for be become the second state from the first state;
In the second state time-continuing process, stroke ID is recorded as the terminal geographical location information accessing the second file;
Detect when described mobile terminal produces the second variable condition, the geographical location information corresponding to the end-state of described second variable condition is recorded as terminal geographical location information;Wherein, described second variable condition is for be become the first state from the second state, and does not have the first state to become the second state within a predetermined period of time.
Wherein, described travel information includes starting point, terminal and stroke ID;
The step that described travel information is recorded as the geographical location information accessing the second file includes:
In the second state time-continuing process, using stroke ID as being recorded as the geographical location information accessing the second file;
Detect when described mobile terminal produces the second variable condition, send geographical position record information;
Receive starting point geographical location information and the terminal geographical location information of user's input;
Received starting point geographical location information and terminal geographical location information are recorded as the geographical location information accessing the second file.
Wherein, if the current state of described mobile terminal is the third state;According to described current state, it is thus achieved that and the step of the geographical location information of record access the second file includes:
Current accessed the second file time with on once access the interval of the first file less than or equal to first threshold time, then the position of record access the second file is the first geographical location information;
Current accessed the second file time with on once access the first file interval greater than first threshold time, calculate, by positioner, the geographical location information that described mobile terminal is current, the geographical location information calculated is recorded as the geographical location information accessing the second file.
Wherein, after calculating, by positioner, the geographical location information that described mobile terminal is current, described method also includes: close positioner.
Wherein, the described geographical location information recorded when accessing file is saved in an information table, described information table includes accessed file and the corresponding relation of geographic location information when accessing, or, the described geographical location information recorded when accessing file is saved in the attribute of accessed file.
Wherein, described access file includes one of following operation or combination in any: read operation, write operation, deletion, amendment operation.
The embodiment of the present invention additionally provides the device of a kind of recording geographical position, is applied to mobile terminal, and described device includes:
Storage unit, for when described mobile terminal accessing the first file, preserving the current state of described mobile terminal and the first geographical location information;Described device also includes:
Judging unit, for when described mobile mobile access the second file, it is judged that described mobile terminal is accessing the first file to accessing between the second file, and whether the state of described mobile terminal change occurred;
First record unit, is accessing the first file to accessing between the second file for described mobile terminal, and when change did not occur the state of described mobile terminal, the position of record access the second file is the first geographical location information;Wherein, described first file and the second file are identical file or different files.
Wherein, described device also includes:
State acquiring unit, is used at described mobile terminal accessing the first file to accessing between the second file, when the state of described mobile terminal changes, obtains the current state of described mobile terminal;
Second record unit, for according to described current state, it is thus achieved that and the geographical location information of record access the second file.
Wherein, if the current state of described mobile terminal is the first state, described second record unit includes:
Computation subunit, for calculating, by positioner, the geographical location information that described mobile terminal is current,
First record subelement, for being recorded as the geographical location information accessing the second file by the geographical location information calculated.
Wherein, if the current state of described mobile terminal is the second state, described second record unit includes:
Stroke acquiring unit, for obtaining the travel information that described mobile terminal is current,
Second record subelement, for being recorded as the geographical location information accessing the second file by described travel information.
Wherein, described travel information includes starting point, terminal and stroke ID;Described second record subelement includes:
First processes subelement, is used for detecting when described mobile terminal produces the first variable condition, produces a new stroke ID, the geographical location information corresponding to the original state of described first variable condition is recorded as starting point geographical location information;Wherein, described first variable condition is for be become the second state from the first state;
Second processes subelement, for, in the second state time-continuing process, stroke ID being recorded as the terminal geographical location information accessing the second file;
3rd processes subelement, is used for detecting when described mobile terminal produces the second variable condition, the geographical location information corresponding to the end-state of described second variable condition is recorded as terminal geographical location information;Wherein, described second variable condition is for be become the first state from the second state, and does not have the first state to become the second state within a predetermined period of time.
Wherein, described travel information includes starting point, terminal and stroke ID;Described second record subelement includes:
Fourth process subelement, in the second state time-continuing process, using stroke ID as being recorded as the geographical location information accessing the second file;
5th processes subelement, is used for detecting when described mobile terminal produces the second variable condition, sends geographical position record information;Receive starting point geographical location information and the terminal geographical location information of user's input;Received starting point geographical location information and terminal geographical location information are recorded as the geographical location information accessing the second file.
Wherein, if the current state of described mobile terminal is the third state, described second record unit includes:
3rd record subelement, for the time of current accessed the second file with on once access the interval of the first file less than or equal to first threshold time, then the position of record access the second file is the first geographical location information;
4th record subelement, for the time of current accessed the second file with on once access the first file interval greater than first threshold time, calculate, by positioner, the geographical location information that described mobile terminal is current, the geographical location information calculated is recorded as the geographical location information accessing the second file.
Wherein, described device also includes:
Closing unit, for, after calculating, by positioner, the geographical location information that described mobile terminal is current, closing positioner.
Wherein, the described geographical location information recorded when accessing file is saved in an information table, and described information table includes accessed file and the corresponding relation of geographic location information when accessing, or,
The described geographical location information recorded when accessing file is saved in the attribute of accessed file.
The embodiment of the present invention additionally provides a kind of mobile terminal, including:
Memory element, for when described mobile terminal accessing the first file, preserving the current state of described mobile terminal and the first geographical location information;Described mobile terminal also includes:
Processing unit, for when described mobile mobile access the second file, it is judged that described mobile terminal is accessing the first file to accessing between the second file, and whether the state of described mobile terminal change occurred;If described mobile terminal is accessing the first file to accessing between the second file, there is not change in the state of described mobile terminal, then the position of record access the second file is the first geographical location information;Wherein, described first file and the second file are identical file or different files.
Wherein, described processing unit, it is additionally operable at described mobile terminal accessing the first file to accessing between the second file, when the state of described mobile terminal changes, obtains the current state of described mobile terminal;According to described current state, it is thus achieved that and the geographical location information of record access the second file.
Method, device and the mobile terminal that the application embodiment of the present invention provides, when described mobile terminal is accessing the first file to accessing between the second file, when the state of mobile terminal did not occur to change, it is the first geographical location information by the position of record access the second file, the positioner avoided frequently calculate operation, save system resource, thus geographical location information when accessing file can be recorded effectively, turn avoid resource consumption.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the method flow diagram of the recording geographical position that the embodiment of the present invention provides;
Fig. 2 is the device logical structure schematic diagram of the recording geographical position that the embodiment of the present invention provides;
Fig. 3 is the logical structure schematic diagram of the mobile terminal that the embodiment of the present invention provides.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
Referring to Fig. 1, it is the method flow diagram of the recording geographical position that the embodiment of the present invention provides, and the present embodiment is applied to mobile terminal, specifically includes:
Step 101, when described mobile terminal accessing the first file, preserves the current state of described mobile terminal and the first geographical location information;
Here, for how mobile terminal obtains current state, and the concrete grammar how obtaining the first geographical location information is not specifically limited, and it both can adopt the method for prior art, it would however also be possible to employ method involved in subsequent descriptions herein.
Step 102, when described mobile mobile access the second file, it is judged that described mobile terminal is accessing the first file to accessing between the second file, and whether the state of described mobile terminal change occurred;
Step 103, if there is not change, then the position of record access the second file is the first geographical location information;Wherein, described first file and the second file are identical file or different files.
It should be noted that if described mobile terminal is accessing the first file to accessing between the second file, the state of described mobile terminal changes, and method shown in Fig. 1 can also include: obtain the current state of described mobile terminal;According to described current state, it is thus achieved that and the geographical location information of record access the second file.
Here the mode obtaining described mobile terminal current state may include that by the detection of acceleration sensor in described mobile terminal, it is thus achieved that the state of described mobile terminal;Or, by the detection of the pace of change of base station cell, it is thus achieved that the state of described mobile terminal.
A kind of it might be that the current state of described mobile terminal is the first state, such as resting state;Alternatively possible situation is, the current state of described mobile terminal is the second state, such as high-speed motion state, for instance aboard, on expressway etc.;Another is it might be that the current state of described mobile terminal is the third state, such as low-speed motion state, for instance walking or cycling etc..Wherein, low-speed motion state and high-speed motion state are through-rate threshold value and the persistent period is distinguished, if the speed that namely mobile terminal is current is higher than, be more than or equal to default rate-valve value and persistent period, the very first time length preset, then mobile terminal is currently high-speed motion, speed as current in mobile terminal is higher than, lower than default rate-valve value and persistent period, the second time span preset, then mobile terminal is currently low-speed motion.Certainly, very first time length here can be equal to the second time span, it is also possible to is not equal to the second time span.
How it is described separately according to described current state below for various states, it is thus achieved that and the geographical location information of record access the second file.
Situation 1, if the current state of described mobile terminal is the first state, such as resting state, then according to described current state, it is thus achieved that and the step of the geographical location information of record access the second file includes:
The geographical location information that described mobile terminal is current is calculated, for instance calculate, by GPS or WIFI etc., the geographical location information that described mobile terminal is current by positioner;
The geographical location information calculated is recorded as the geographical location information accessing the second file.
That is, under static state, only when first time accesses file, just opening locating device calculates geographical location information, when non-first accesses, only need to by the mode of abovementioned steps 103, the position of record access the second file is the first geographical location information, thus, save system resource greatly.
Situation 2, if the current state of described mobile terminal is the second state, such as high-speed motion state, then according to described current state, it is thus achieved that and the step of the geographical location information of record access the second file includes:
Obtaining the travel information that described mobile terminal is current, the trip information includes starting point, terminal and stroke ID;
Described travel information is recorded as the geographical location information accessing the second file.
For situation 2, there is again the implementation that following two is possible:
Mode one: by the automatic start of record of mobile terminal and terminal.Specifically, it is changed to after high-speed motion state such as goes up train by resting state at mobile terminal, it is start position information by mobile terminal by the location records at resting state place residing before high-speed motion, in high speed movement, only record stroke ID, such as it is recorded as " during the journey " and no longer positions operation, so, the resource consumption that the positioner frequent operations such as GPS cause can be avoided, when mobile terminal is changed to resting state by high-speed motion, mobile terminal it is final position by the location records of resting state residing after high-speed motion.Based on this, the above-mentioned step that described travel information is recorded as the geographical location information accessing the second file includes:
Detect when described mobile terminal produces the first variable condition, produce a new stroke ID, the geographical location information corresponding to the original state of described first variable condition is recorded as starting point geographical location information;Wherein, described first variable condition is for be become the second state from the first state, for instance become high-speed motion state from static;
In the second state time-continuing process, stroke ID is recorded as the terminal geographical location information accessing the second file;
Detect when described mobile terminal produces the second variable condition, the geographical location information corresponding to the end-state of described second variable condition is recorded as terminal geographical location information;Wherein, described second variable condition is for be become the first state from the second state, and does not have the first state to become the second state within a predetermined period of time.
It is to say, in the mode of employing for the moment, only carry out position calculation operation in starting point and terminal by positioner, in other periods, especially in high speed motions, will not opening locating device, thus, saved system resource greatly.
If additionally, the process that stops again in the middle of in this mode in high speed motions, for instance owing to motor vehicles or train have the process of stopping repeatedly and startup before reaching home, so the terminal of stroke has a process substituted.Process is as follows: if again having individual stroke to start process in the short period after a stop, then explanation is that previous stroke is continuing, and stroke ID is constant;Ensuing next terminal can substitute the terminal of last record simultaneously.When this process is recycled to stopping always and does not have start-up course in a long time, this terminal is as the last terminal of current stroke.
Mode two: by the mode start of record of user's hand-kept and terminal.Specifically, in high speed movement, only record stroke ID, for instance be recorded as " during the journey " and no longer position operation, when mobile terminal is changed to resting state by high-speed motion, user input final terminal location.Based on this, the step that described travel information is recorded as the geographical location information accessing the second file includes:
In the second state time-continuing process, using stroke ID as being recorded as the geographical location information accessing the second file;
Detect when described mobile terminal produces the second variable condition, send geographical position record information;
Receive starting point geographical location information and the terminal geographical location information of user's input;
Received starting point geographical location information and terminal geographical location information are recorded as the geographical location information accessing the second file.
It is to say, when the mode two of employing, in high speed motions, will not opening locating device, and after high-speed motion terminates, user manually enter beginning and end position.Owing to position calculation need not be carried out by frequent opening locating device, thus very big save system resource.
Situation 3, if the current state of described mobile terminal is the third state, such as low-speed motion state, then according to described current state, it is thus achieved that and the step of the geographical location information of record access the second file includes:
Current accessed the second file time with on once access the interval of the first file less than or equal to first threshold time, then the position of record access the second file is the first geographical location information;
Current accessed the second file time with on once access the first file interval greater than first threshold time, calculate, by positioner, the geographical location information that described mobile terminal is current, the geographical location information calculated is recorded as the geographical location information accessing the second file.
That is, lower than kinestate, if the time of current accessed file is only small with the interval of last visit file, such as less than or equal to first threshold, low-speed motion then can record the geographical location information that the geographical location information of last visit file is recorded as current accessed file, because should be unable to change a lot in a short period of time.If the time of current accessed file is relatively larger with the interval of last visit file, as more than first threshold, then needed to recalculate geographical location information.So, frequently use positioner at short notice carry out position calculation owing to avoiding, thus be greatly saved system resource.
It should be noted that after calculating, by positioner, the geographical location information that described mobile terminal is current, also include: close positioner, to economize on resources, it is to avoid due to the resource consumption that the operation of positioner brings.
It should be noted that, the described geographical location information recorded when accessing file can be saved in an information table, described information table includes accessed file and the corresponding relation of geographic location information when accessing, or, the described geographical location information recorded when accessing file is saved in the attribute of accessed file.
It should be noted that described access file includes one of following operation or combination in any: read operation, write operation, deletion, amendment operation.
Visible, the method that the application embodiment of the present invention provides, when described mobile terminal is accessing the first file to accessing between the second file, when the state of mobile terminal did not occur to change, be the first geographical location information by the position of record access the second file, it is to avoid positioner frequently calculate operation, save system resource, thus geographical location information when accessing file can be recorded effectively, turn avoid resource consumption.
Below in conjunction with instantiation, the present invention is being elaborated.
In a possible embodiment, for the method realizing the present invention, safeguarding the round-robin queue of a state change when realizing, each element of this queue is a state sometime, and particular content is referring to table 1, and it is that a state change is lined up.
Table 1
The state that queue heads is pointed to is current state, and the state that rear of queue points to is state the earliest in queue.Laststate and current state it is appreciated that from this queue.So when every next state changes, all can reflect in table.During the change of every next state, the file operation number of times of new state is 0.
" state " in table 1 can be defined as following several: static, accelerates slowly, accelerates soon, slow down soon, slows down slowly, high-speed motion, low-speed motion etc..Wherein, fast accelerate and slow down the soon startup corresponding to motor vehicles and train and stopping, slow accelerate and slow down the slowly startup corresponding to walking and bicycle and stopping, high-speed motion moves at the higher speeds corresponding to motor vehicles and train, and low-speed motion moves at lower speeds corresponding to walking and bicycle.
Under several states such as acceleration static, slow, slow deceleration, low-speed motion, " position " information is the current positioner such as GPS/WIFI geography information perceived;Under several states such as fast acceleration, fast deceleration, high-speed motion, " position " information is " the stroke ID " that be mentioned below.
Utilize the change queue of this state can process the three kinds of situations being mentioned above:
1) corresponding first state mentioned above of " static " state in state change queue, is divided into again two kinds of situations to process:
File operation number of times is 0, then open GPS or WIFI and calculate current location;
File operation number of times is more than 0, and namely non-first time operation, then need not calculate current location, only need to adopt " position " information that current state is corresponding.
If it should be noted that from A to B ground, be in resting state, and carried out file operation respectively, then from A to B ground, centre necessarily passes a nonstatic state, and therefore B ground and A ground belong to different state ID in state queue.Behind B ground, reentering resting state, produce a new state ID, file operation number of times corresponding for this ID is 0 time.
B carry out first time file operation time, file number of times adds 1, utilizes GPS/WIFI to calculate geographical position record simultaneously;When proceeding alternative document operation, due to file number of times more than 1, so only need to using the geographical position attribute as file of " position " in table.
2) " slow acceleration, slow deceleration, low-speed motion " corresponding third state mentioned above in state change queue.Under this state, often carry out a file operation, it is possible to compare with " the last file operation time " of record in table 1, if greater than certain time interval, then open GPS or WIFI and calculate current location, and update corresponding " position " information in queue;If less than certain time interval, then only need to adopt " position " information that current state is corresponding.
3) " fast acceleration, fast deceleration, high-speed motion " corresponding second state mentioned above in state change queue, in " position " hurdle, that record is " the stroke ID " that hereinafter mention, can illustrate how to record the beginning and end of this stroke hereinafter simultaneously, and how to associate with the file operation carried out in stroke.
In order to the file operation of the carrying out in high-speed motion way can record the beginning and end of this stroke, the present embodiment can safeguard travel schedule as shown in table 2 and stroke file operation table as shown in table 3, specific as follows:
Table 2
Stroke ID Starting point Terminal
Table 3
Stroke ID File 1 Operating time
Stroke ID File 2 Operating time
Stroke ID …… ……
For high-speed motion state, there is following two schemes:
Scheme one:
Utilize the State Transferring queue in above-mentioned table 1, if State Transferring sometime experienced by a following process: static > accelerate slowly accelerate soon high-speed motion, then it is judged as the starting point of LAP, produce a new stroke ID, and by this process position the earliest, namely " static " state in said process is corresponding " position ", as start of a run, recorded 2 kinds of table.
If experienced by such as next process: high-speed motion > slow down soon slow down slowly static, then it is judged as the terminal of LAP.Ibid, corresponding for " static " state of this process " position " be recorded in table 2 as endpoint information.
After the trip starts, before terminating, " position " information in state change queue all will be recorded as the trip ID, show that stroke is underway with this.Therefore, the queue in a stroke is likely to as described in Table 4:
Table 4
Owing to motor vehicles or train have the process of stopping repeatedly and startup before reaching home, so the terminal of stroke has a process substituted.Process is as follows: if again having individual stroke to start process in the short period after a stop, then explanation is that previous stroke is continuing, and stroke ID is constant;Ensuing next terminal can substitute the terminal of last record simultaneously.When this process is recycled to stopping always and does not have start-up course in a long time, this terminal is as the last terminal of current stroke.
This process can be so briefly described: when stroke starts, distribute an ID for the trip;After the trip terminates, the beginning and end of this stroke will be updated in table 2;The All Files operation carried out in stroke, will recorded file path in table 3.
After stroke terminates, in this stroke, the file of operation, namely has the file of same stroke ID in table 3, and its geographical attribute all will be updated to following data:
During the journey, starting point is: " * * ", and terminal is: " * * ".
Scheme two:
In stroke, the file operation that program autolog line journey ID is corresponding, that is the content of table 3.After stroke terminates, user can revise start of a run and the terminal of table 2 by hand, and final solution is automatically by beginning and end information updating to file attribute.
Application above-described embodiment, it is to avoid positioner frequently calculate operation, save system resource, thus geographical location information when accessing file can be recorded effectively, turn avoid resource consumption.
The embodiment of the present invention additionally provides the device of a kind of recording geographical position, is applied to mobile terminal, and referring to Fig. 2, described device includes:
Storage unit 201, for when described mobile terminal accessing the first file, preserving the current state of described mobile terminal and the first geographical location information;Described device also includes:
Judging unit 202, for when described mobile mobile access the second file, it is judged that described mobile terminal is accessing the first file to accessing between the second file, and whether the state of described mobile terminal change occurred;
First record unit 203, is accessing the first file to accessing between the second file for described mobile terminal, and when change did not occur the state of described mobile terminal, the position of record access the second file is the first geographical location information;Wherein, described first file and the second file are identical file or different files.
Device described in Fig. 2 can also include:
State acquiring unit (not shown), is used at described mobile terminal accessing the first file to accessing between the second file, when the state of described mobile terminal changes, obtains the current state of described mobile terminal;
Second record unit (not shown), for according to described current state, it is thus achieved that and the geographical location information of record access the second file.
If the current state of described mobile terminal is the first state, described second record unit may include that
Computation subunit, for calculating, by positioner, the geographical location information that described mobile terminal is current,
First record subelement, for being recorded as the geographical location information accessing the second file by the geographical location information calculated.
If the current state of described mobile terminal is the second state, described second record unit may include that
Stroke acquiring unit, for obtaining the travel information that described mobile terminal is current,
Second record subelement, for being recorded as the geographical location information accessing the second file by described travel information.
Described travel information includes starting point, terminal and stroke ID;Described second record subelement can also include:
First processes subelement, is used for detecting when described mobile terminal produces the first variable condition, produces a new stroke ID, the geographical location information corresponding to the original state of described first variable condition is recorded as starting point geographical location information;Wherein, described first variable condition is for be become the second state from the first state;
Second processes subelement, for, in the second state time-continuing process, stroke ID being recorded as the terminal geographical location information accessing the second file;
3rd processes subelement, is used for detecting when described mobile terminal produces the second variable condition, the geographical location information corresponding to the end-state of described second variable condition is recorded as terminal geographical location information;Wherein, described second variable condition is for be become the first state from the second state, and does not have the first state to become the second state within a predetermined period of time.
Described travel information includes starting point, terminal and stroke ID;Described second record subelement can also include:
Fourth process subelement, in the second state time-continuing process, using stroke ID as being recorded as the geographical location information accessing the second file;
5th processes subelement, is used for detecting when described mobile terminal produces the second variable condition, sends geographical position record information;Receive starting point geographical location information and the terminal geographical location information of user's input;Received starting point geographical location information and terminal geographical location information are recorded as the geographical location information accessing the second file.
If the current state of described mobile terminal is the third state, described second record unit may include that
3rd record subelement, for the time of current accessed the second file with on once access the interval of the first file less than or equal to first threshold time, then the position of record access the second file is the first geographical location information;
4th record subelement, for the time of current accessed the second file with on once access the first file interval greater than first threshold time, calculate, by positioner, the geographical location information that described mobile terminal is current, the geographical location information calculated is recorded as the geographical location information accessing the second file.
Device described in Fig. 2 can also include:
Closing unit (not shown), for, after calculating, by positioner, the geographical location information that described mobile terminal is current, closing positioner.
Wherein, the described geographical location information recorded when accessing file is saved in an information table, described information table includes accessed file and the corresponding relation of geographic location information when accessing, or, the described geographical location information recorded when accessing file is saved in the attribute of accessed file.
The device that the application embodiment of the present invention provides, when described mobile terminal is accessing the first file to accessing between the second file, when the state of mobile terminal did not occur to change, it is the first geographical location information by the position of record access the second file, the positioner avoided frequently calculate operation, save system resource, thus geographical location information when accessing file can be recorded effectively, turn avoid resource consumption.
The embodiment of the present invention additionally provides a kind of mobile terminal, referring to Fig. 3, including:
Memory element 301, for when described mobile terminal accessing the first file, preserving the current state of described mobile terminal and the first geographical location information;Described mobile terminal also includes:
Processing unit 302, for when described mobile mobile access the second file, it is judged that described mobile terminal is accessing the first file to accessing between the second file, and whether the state of described mobile terminal change occurred;If described mobile terminal is accessing the first file to accessing between the second file, there is not change in the state of described mobile terminal, then the position of record access the second file is the first geographical location information;Wherein, described first file and the second file are identical file or different files.
Described processing unit 302, is additionally operable at described mobile terminal accessing the first file to accessing between the second file, when the state of described mobile terminal changes, obtains the current state of described mobile terminal;According to described current state, it is thus achieved that and the geographical location information of record access the second file.
The mobile terminal that the application embodiment of the present invention provides, when described mobile terminal is accessing the first file to accessing between the second file, when the state of mobile terminal did not occur to change, it is the first geographical location information by the position of record access the second file, the positioner avoided frequently calculate operation, save system resource, thus geographical location information when accessing file can be recorded effectively, turn avoid resource consumption.
For device and mobile terminal embodiment, owing to it is substantially similar to embodiment of the method, so what describe is fairly simple, relevant part illustrates referring to the part of embodiment of the method.
It should be noted that, in this article, the relational terms of such as first and second or the like is used merely to separate an entity or operation with another entity or operating space, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " includes ", " comprising " or its any other variant are intended to comprising of nonexcludability, so that include the process of a series of key element, method, article or equipment not only include those key elements, but also include other key elements being not expressly set out, or also include the key element intrinsic for this process, method, article or equipment.When there is no more restriction, statement " including ... " key element limited, it is not excluded that there is also other identical element in including the process of described key element, method, article or equipment.
One of ordinary skill in the art will appreciate that all or part of step realizing in said method embodiment can be by the hardware that program carrys out instruction relevant and completes, described program can be stored in computer read/write memory medium, the storage medium obtained designated herein, as: ROM/RAM, magnetic disc, CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.All make within the spirit and principles in the present invention any amendment, equivalent replacement, improvement etc., be all contained in protection scope of the present invention.

Claims (21)

1. a method for recording geographical position, is applied to mobile terminal, it is characterised in that
When described mobile terminal accessing the first file, preserve the current state of described mobile terminal and the first geographical location information;
Described method also includes:
When described mobile terminal accessing the second file,
Judging that described mobile terminal is accessing the first file to accessing between the second file, whether the state of described mobile terminal there is change;
If there is not change, then the position of record access the second file is the first geographical location information;Wherein, described first file and the second file are identical file or different files;
Wherein, the mode obtaining described mobile terminal current state includes: by the detection of acceleration sensor in described mobile terminal, it is thus achieved that the state of described mobile terminal;Or, by the detection of the pace of change of base station cell, it is thus achieved that the state of described mobile terminal.
2. method according to claim 1, it is characterised in that described mobile terminal is accessing the first file to accessing between the second file, if the state of described mobile terminal changes, described method also includes:
Obtain the current state of described mobile terminal;
According to described current state, it is thus achieved that and the geographical location information of record access the second file.
3. method according to claim 2, it is characterised in that
First state representation resting state, if the current state of described mobile terminal is the first state,
According to described current state, it is thus achieved that and the step of the geographical location information of record access the second file includes:
The geographical location information that described mobile terminal is current is calculated by positioner,
The geographical location information calculated is recorded as the geographical location information accessing the second file.
4. method according to claim 2, it is characterised in that
The current speed of mobile terminal described in second state representation be more than or equal to default rate-valve value and persistent period higher than the very first time length preset, if the current state of described mobile terminal is the second state,
According to described current state, it is thus achieved that and the step of the geographical location information of record access the second file includes:
Obtain the travel information that described mobile terminal is current,
Described travel information is recorded as the geographical location information accessing the second file.
5. method according to claim 4, it is characterised in that
Described travel information includes starting point, terminal and stroke ID;
The step that described travel information is recorded as the geographical location information accessing the second file includes:
Detect when described mobile terminal produces the first variable condition, produce a new stroke ID, the geographical location information corresponding to the original state of described first variable condition is recorded as starting point geographical location information;Wherein, described first variable condition is for be become the second state from the first state;
In the second state time-continuing process, stroke ID is recorded as the terminal geographical location information accessing the second file;
Detect when described mobile terminal produces the second variable condition, the geographical location information corresponding to the end-state of described second variable condition is recorded as terminal geographical location information;Wherein, described second variable condition is for be become the first state from the second state, and does not have the first state to become the second state within a predetermined period of time;
Wherein, described first state representation resting state.
6. method according to claim 4, it is characterised in that
Described travel information includes starting point, terminal and stroke ID;
The step that described travel information is recorded as the geographical location information accessing the second file includes:
In the second state time-continuing process, using stroke ID as being recorded as the geographical location information accessing the second file;
Detect when described mobile terminal produces the second variable condition, send geographical position record information;
Receive starting point geographical location information and the terminal geographical location information of user's input;
Received starting point geographical location information and terminal geographical location information are recorded as the geographical location information accessing the second file;
Wherein, described second variable condition is for be become the first state from the second state, and does not have the first state to become the second state within a predetermined period of time;Wherein, described first state representation resting state.
7. method according to claim 2, it is characterised in that
The third state represent the current speed of described mobile terminal lower than default rate-valve value and persistent period higher than the second time span preset, if the current state of described mobile terminal is the third state,
According to described current state, it is thus achieved that and the step of the geographical location information of record access the second file includes:
Current accessed the second file time with on once access the interval of the first file less than or equal to first threshold time, then the position of record access the second file is the first geographical location information;
Current accessed the second file time with on once access the first file interval greater than first threshold time, calculate, by positioner, the geographical location information that described mobile terminal is current, the geographical location information calculated is recorded as the geographical location information accessing the second file.
8. the method according to claim 3 or 7, it is characterised in that after calculating, by positioner, the geographical location information that described mobile terminal is current, described method also includes: close positioner.
9. method according to claim 1, it is characterised in that
The geographical location information recorded when accessing file is saved in an information table, and described information table includes accessed file and the corresponding relation of geographic location information when accessing, or,
The geographical location information recorded when accessing file is saved in the attribute of accessed file.
10. method according to claim 1, it is characterised in that access file and include one of following operation or combination in any: read operation, write operation, deletion, amendment operation.
11. a device for recording geographical position, it is applied to mobile terminal, it is characterised in that described device includes:
Storage unit, for when described mobile terminal accessing the first file, preserving the current state of described mobile terminal and the first geographical location information;Described device also includes:
Judging unit, for when described mobile mobile access the second file, it is judged that described mobile terminal is accessing the first file to accessing between the second file, and whether the state of described mobile terminal change occurred;
First record unit, is accessing the first file to accessing between the second file for described mobile terminal, and when change did not occur the state of described mobile terminal, the position of record access the second file is the first geographical location information;Wherein, described first file and the second file are identical file or different files;
Wherein, the mode obtaining described mobile terminal current state includes: by the detection of acceleration sensor in described mobile terminal, it is thus achieved that the state of described mobile terminal;Or, by the detection of the pace of change of base station cell, it is thus achieved that the state of described mobile terminal.
12. device according to claim 11, it is characterised in that described device also includes:
State acquiring unit, is used at described mobile terminal accessing the first file to accessing between the second file, when the state of described mobile terminal changes, obtains the current state of described mobile terminal;
Second record unit, for according to described current state, it is thus achieved that and the geographical location information of record access the second file.
13. device according to claim 12, it is characterised in that the first state representation resting state, if the current state of described mobile terminal is the first state, described second record unit includes:
Computation subunit, for calculating, by positioner, the geographical location information that described mobile terminal is current,
First record subelement, for being recorded as the geographical location information accessing the second file by the geographical location information calculated.
14. device according to claim 12, it is characterized in that, the current speed of mobile terminal described in second state representation be more than or equal to default rate-valve value and persistent period higher than the very first time length preset, if the current state of described mobile terminal is the second state, described second record unit includes:
Stroke acquiring unit, for obtaining the travel information that described mobile terminal is current,
Second record subelement, for being recorded as the geographical location information accessing the second file by described travel information.
15. device according to claim 14, it is characterised in that
Described travel information includes starting point, terminal and stroke ID;Described second record subelement includes:
First processes subelement, is used for detecting when described mobile terminal produces the first variable condition, produces a new stroke ID, the geographical location information corresponding to the original state of described first variable condition is recorded as starting point geographical location information;Wherein, described first variable condition is for be become the second state from the first state;
Second processes subelement, for, in the second state time-continuing process, stroke ID being recorded as the terminal geographical location information accessing the second file;
3rd processes subelement, is used for detecting when described mobile terminal produces the second variable condition, the geographical location information corresponding to the end-state of described second variable condition is recorded as terminal geographical location information;Wherein, described second variable condition is for be become the first state from the second state, and does not have the first state to become the second state within a predetermined period of time;
Wherein, described first state representation resting state.
16. device according to claim 14, it is characterised in that
Described travel information includes starting point, terminal and stroke ID;Described second record subelement includes:
Fourth process subelement, in the second state time-continuing process, using stroke ID as being recorded as the geographical location information accessing the second file;
5th processes subelement, is used for detecting when described mobile terminal produces the second variable condition, sends geographical position record information;Receive starting point geographical location information and the terminal geographical location information of user's input;Received starting point geographical location information and terminal geographical location information are recorded as the geographical location information accessing the second file;
Wherein, described second variable condition is for be become the first state from the second state, and does not have the first state to become the second state within a predetermined period of time;Wherein, described first state representation resting state.
17. device according to claim 12, it is characterised in that
The third state represent the current speed of described mobile terminal lower than default rate-valve value and persistent period higher than the second time span preset, if the current state of described mobile terminal is the third state, described second record unit includes:
3rd record subelement, for the time of current accessed the second file with on once access the interval of the first file less than or equal to first threshold time, then the position of record access the second file is the first geographical location information;
4th record subelement, for the time of current accessed the second file with on once access the first file interval greater than first threshold time, calculate, by positioner, the geographical location information that described mobile terminal is current, the geographical location information calculated is recorded as the geographical location information accessing the second file.
18. the device according to claim 13 or 17, it is characterised in that described device also includes:
Closing unit, for, after calculating, by positioner, the geographical location information that described mobile terminal is current, closing positioner.
19. device according to claim 11, it is characterised in that
The geographical location information recorded when accessing file is saved in an information table, and described information table includes accessed file and the corresponding relation of geographic location information when accessing, or,
The geographical location information recorded when accessing file is saved in the attribute of accessed file.
20. a mobile terminal, it is characterised in that including:
Memory element, for when described mobile terminal accessing the first file, preserving the current state of described mobile terminal and the first geographical location information;Described mobile terminal also includes:
Processing unit, for when described mobile mobile access the second file, it is judged that described mobile terminal is accessing the first file to accessing between the second file, and whether the state of described mobile terminal change occurred;If described mobile terminal is accessing the first file to accessing between the second file, there is not change in the state of described mobile terminal, then the position of record access the second file is the first geographical location information;Wherein, described first file and the second file are identical file or different files;
Wherein, the mode obtaining described mobile terminal current state includes: by the detection of acceleration sensor in described mobile terminal, it is thus achieved that the state of described mobile terminal;Or, by the detection of the pace of change of base station cell, it is thus achieved that the state of described mobile terminal.
21. mobile terminal according to claim 20, it is characterised in that
Described processing unit, is additionally operable at described mobile terminal accessing the first file to accessing between the second file, when the state of described mobile terminal changes, obtains the current state of described mobile terminal;According to described current state, it is thus achieved that and the geographical location information of record access the second file.
CN201110294750.0A 2011-09-30 2011-09-30 A kind of method of recording geographical position, device and mobile terminal Active CN103034634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110294750.0A CN103034634B (en) 2011-09-30 2011-09-30 A kind of method of recording geographical position, device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110294750.0A CN103034634B (en) 2011-09-30 2011-09-30 A kind of method of recording geographical position, device and mobile terminal

Publications (2)

Publication Number Publication Date
CN103034634A CN103034634A (en) 2013-04-10
CN103034634B true CN103034634B (en) 2016-07-06

Family

ID=48021537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110294750.0A Active CN103034634B (en) 2011-09-30 2011-09-30 A kind of method of recording geographical position, device and mobile terminal

Country Status (1)

Country Link
CN (1) CN103034634B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018013970A (en) * 2016-07-21 2018-01-25 レノボ・シンガポール・プライベート・リミテッド Wearable computer
CN106484860A (en) * 2016-10-10 2017-03-08 青岛海信移动通信技术股份有限公司 The processing method of digital picture, device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0308054D0 (en) * 2003-04-08 2003-05-14 Koninkl Philips Electronics Nv A method of position stamping a photo or video clip taken with a digital camera
JP5348466B2 (en) * 2008-04-28 2013-11-20 富士通株式会社 Portable terminal device, moving route recording method, and program
US20090280838A1 (en) * 2008-05-09 2009-11-12 Ajay Malik Device and Method for Adding Location Data to Images
CN101799549B (en) * 2010-01-26 2013-03-20 华为终端有限公司 Method and mobile terminal for recording geographical position information

Also Published As

Publication number Publication date
CN103034634A (en) 2013-04-10

Similar Documents

Publication Publication Date Title
CN110347499B (en) Method for generating and deploying remote sensing image tiles in real time
US7940172B2 (en) Combining time and GPS locations to trigger message alerts
CN103808326A (en) Navigation method and navigation system
CN112100196B (en) Real-time traffic information processing method and system and electronic equipment
CN102890697B (en) Based on the object search method of map localized area
CN102410838A (en) Navigation method for navigation terminal and navigation terminal
US7961080B2 (en) System and method for automotive image capture and retrieval
CN104598712B (en) Anchor point screening technique and its system
CN104142152A (en) Map mark processing method and apparatus, and navigation terminal
CN104590112A (en) Method and system for judging vehicle turning safety degree
CN101493334A (en) Navigation system and method thereof for searching peripheral interested points
CN103034634B (en) A kind of method of recording geographical position, device and mobile terminal
CN103108390A (en) Method and device capable of forecasting geographic position of mobile terminal
CN109213898A (en) The video retrieval method and device of video monitoring system
CN103460678A (en) Portable device, application launch method, and program
CN102968472A (en) Method and system of data caching for GIS (geographic information system)
CN104317955A (en) File scanning method and device for storage space of mobile terminal
US10902655B1 (en) Editing cached map titles
CN104951510A (en) Multi-region weather information processing method and device and intelligent terminal
CN104991961A (en) Visual item placement memory device and memory method
CN112097785B (en) Vehicle-mounted intelligent device data processing method and device and electronic device
CN102081920A (en) Method and device for controlling picture display
CN111161533B (en) Traffic accident processing method and device and electronic equipment
CN108052411B (en) Method and device for repairing one-way linked list interruption
CN110019210A (en) Method for writing data and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant