The content of the invention
The present invention solves the technical problem of a kind of mobile device and its sleep management method is provided, number can be passed through
According to connection opening timing device and the dormancy time of data connection closed Timer Controlling mobile device, mobile device is effectively reduced
Power consumption, lift the experience of user.
In order to solve the above technical problems, one aspect of the present invention is:A kind of dormancy of mobile device is provided
Management method, method include:Whether detection mobile device needs to enter resting state;If mobile device needs to enter dormancy shape
State, then mobile device disconnects the connection of network data link and enters resting state, while log-on data connection closed timer
Start timing;Whether then to judge the timing of data connection closed timer;If the timing of data connection closed timer is then,
Mobile device stops resting state, and the connection of opening network data link simultaneously receives the network information, while log-on data connection is opened
Open timer and start timing;Or mobile device is in resting state, if mobile device is called out by phone, quarter-bell or user key-press
Wake up, then mobile device stops resting state, and the connection of opening network data link simultaneously receives the network information, while log-on data connects
Connect opening timing device and start timing;Whether then to judge the timing of data connection opening timing device;If it is determined that data connection is opened
Then, then whether detection currently has data transfer for timer timing;If currently there is data transfer, restarting data connection
Opening timing device starts timing, and keeps the connection of current network data link;If currently without data transfer, mobile device
It is back to the connection for disconnecting network data link, the step of log-on data connection closed timer starts timing.
Wherein, whether detection mobile device needs to include into resting state step:Whether detection mobile device enters line number
According to transmission;If the duration that detection mobile device does not carry out data transmission exceedes preset value, judge that mobile device needs
To enter resting state;If the duration that detection mobile device does not carry out data transmission is no more than preset value or detection moves
Dynamic equipment carries out data transmission, then judges that mobile device need not enter resting state.
Wherein, mobile device connects unlatching with data according to the information content control data connection closed timer of the network information
The timing duration of timer, when the information content of the network information is bigger, then the timing duration of data connection opening timing device is longer, number
It is shorter according to the timing duration of connection closed timer;When the information content of the network information is smaller, then data connect opening timing device
Timing duration is shorter, and the timing duration of data connection closed timer is longer.
Wherein, mobile device is connected according to user using the session control data connection closed timer and data of mobile device
The timing duration of opening timing device is connect, when within peak period stage of the user using mobile device, then data connect opening timing
The timing duration of device is longer, and the timing duration of data connection closed timer is shorter;When the ebb that mobile device is used in user
In stage phase, then the timing duration of data connection opening timing device is shorter, and the timing duration of data connection closed timer is longer.
In order to solve the above technical problems, another technical solution used in the present invention is:A kind of mobile device is provided, it is mobile
Equipment includes detection module, sleep management module, timer module and judge module, and detection module connects with sleep management module
Connect, sleep management module is connected with timer module, and timer module is connected with judge module, and timer module connects including data
Connect Off Timer and opening timing device is connected with data, wherein:Whether detection module is used to detect mobile device and need to enter to stop
Dormancy state;When detection module detection mobile device needs to enter resting state, sleep management module disconnects network data link
Connection so that mobile device enters resting state, while timer module log-on data connection closed timer starts timing;
Judge module is used for whether then judging the timing of data connection closed timer;Judge the timing of data connection closed in judge module
Device timing is to constantly, then mobile device stops resting state, the connection and reception of sleep management module opening network data link
The network information, while timer module log-on data connection opening timing device starts timing;Or mobile device is in resting state
When, if mobile device is waken up by phone, quarter-bell or user key-press, mobile device stops resting state, sleep management module
The connection of opening network data link simultaneously receives the network information, while timer module log-on data connection opening timing device starts
Timing;Judge module is additionally operable to whether then to judge the timing of data connection opening timing device;Judge that data connect in judge module
The timing of opening timing device is to constantly, then whether detection module detection current mobile device has data transfer;If detection module is examined
Surveying current mobile device has data transfer, then timer module restarting data connection opening timing device starts timing, dormancy
Management module keeps the connection of current network data link;If detection module detection current mobile device no data transmission,
The step of mobile device is back to the connection for disconnecting network data link, and log-on data connection closed timer starts timing.
Wherein, detection module is used to detect whether mobile device carries out data transmission;If detection module detection movement is set
The standby duration not carried out data transmission exceedes preset value, then judges that mobile device needs to enter resting state;If inspection
Survey the duration that module detection mobile device does not carry out data transmission and enter line number no more than preset value or detection mobile device
According to transmission, then judge that mobile device need not enter resting state.
Wherein, timer module connects out according to the information content control data connection closed timer of the network information with data
The timing duration of timer is opened, when the information content of the network information is bigger, then the timing duration of data connection opening timing device is longer,
The timing duration of data connection closed timer is shorter;When the information content of the network information is smaller, then data connect opening timing device
Timing duration it is shorter, the timing duration of data connection closed timer is longer.
Wherein, timer module uses the session control data connection closed timer and data of mobile device according to user
The timing duration of opening timing device is connected, when within peak period stage of the user using mobile device, then data connection is opened fixed
When device timing duration it is longer, the timing duration of data connection closed timer is shorter;When low using mobile device in user
In stage peak phase, then the timing duration of data connection opening timing device is shorter, and the timing duration of data connection closed timer is got over
It is long.
The beneficial effects of the invention are as follows:The situation of prior art is different from, the present invention is by detecting whether mobile device needs
To enter resting state;If it is, mobile device disconnects the connection of network data link and enters resting state, while start number
Start timing according to connection closed timer;Then whether then the timing of data connection closed timer is judged;If it is, movement is set
Standby to stop resting state, the connection of opening network data link simultaneously receives the network information, while log-on data connection opening timing
Device starts timing;Whether then finally judge the timing of data connection opening timing device;If it is, whether detection currently has data
Transmission;If it is, restarting data connection opening timing device starts timing, and keep the company of current network data link
Connect;If it is not, then mobile device is back to the connection for disconnecting network data link, log-on data connection closed timer starts to count
When the step of.The present invention can be moved in the case where user is without using mobile device by data connection closed Timer Controlling
The turn-off time of the data link of equipment, enable the mobile device long period in a dormant state, so as to reduce movement
The power consumption of equipment, extend stand-by time;And the company of the data link of opening timing device control mobile device is also connected by data
The time is connect, allows mobile device to concentrate the associative operation carried out data transmission in the timing time of data connection opening timing device,
To ensure the normal use of mobile device.
Embodiment
The present invention is described in detail with embodiment below in conjunction with the accompanying drawings.
As shown in figure 1, Fig. 1 is the schematic flow sheet of the first embodiment of the sleep management method of mobile device of the present invention.
This method comprises the following steps:
Step S101:Whether detection mobile device needs to enter resting state.
Wherein, as shown in Fig. 2 step S101 also includes following sub-step:
Step S1011:Whether detection mobile device carries out data transmission;
Step S1012:If the duration that detection mobile device does not carry out data transmission exceedes preset value, judge
Mobile device needs to enter resting state;
Step S1013:If the duration that detection mobile device does not carry out data transmission is no more than preset value or inspection
Survey mobile device to carry out data transmission, then judge that mobile device need not enter resting state.
In step S1013, preset value is the value of user's setting, is specifically needed depending on actual conditions.
Certainly, in other embodiments, if detection mobile device does not carry out data transmission, judge that mobile device needs
To enter resting state;If detection mobile device carries out data transmission, judge that mobile device need not enter resting state.
Step S102:If mobile device needs to enter resting state, mobile device disconnects the company of network data link
Connect and enter resting state, while log-on data connection closed timer starts timing.
In step s 102, when mobile device enters resting state, company of the mobile device except disconnecting network data link
Outside connecing, the power supply of mobile device also enters output low power consumpting state, so that only simple application work in mobile device,
Such as quarter-bell.
Step S103:Whether then to judge the timing of data connection closed timer.
Step S104:If the timing of data connection closed timer is then, mobile device stops resting state, opens net
The connection of network data link simultaneously receives the network information, while log-on data connection opening timing device starts timing.
In step S104, mobile device is in resting state, if mobile device is called out by phone, quarter-bell or user key-press
Wake up, then mobile device stops resting state, and the connection of opening network data link simultaneously receives the network information, while log-on data connects
Connect opening timing device and start timing.
Step S105:Whether then to judge the timing of data connection opening timing device.
Step S106:If it is determined that the timing of data connection opening timing device is then, then whether detection currently has data transfer.
If currently there is data transfer, step S107 is performed:Restarting data connection opening timing device starts timing,
And keep the connection of current network data link.
If currently without data transfer, return to step S102, i.e.,:Mobile device, which is back to, disconnects network data link
Connection, the step of log-on data connection closed timer starts timing.
In the present embodiment, mobile device preferably according to the information content control data connection closed timer of the network information and
Data connect the timing duration of opening timing device;When the information content of the network information is bigger, then data connect the meter of opening timing device
Shi Shichang is longer, and the timing duration of data connection closed timer is shorter;When the information content of the network information is smaller, then data connect
The timing duration of opening timing device is shorter, and the timing duration of data connection closed timer is longer.For example, mobile device is being carried out
During data transfer, the information content of the network information increases within the same time suddenly, as largely received microblogging, micro- in interval time
Letter, mail, Fetion, the information etc. of chat, then must control data connection opening timing device in order to lift the experience of user
Timing duration is longer and the timing duration of control data connection closed timer is shorter.Similarly, in the information content of the network information
More hour, control data connection opening timing device timing duration is shorter and the timing duration of control data connection closed timer
It is longer.
Certainly, in other embodiments, mobile device can also use the session control data of mobile device according to user
Connection closed timer connects the timing duration of opening timing device with data;When the peak period stage that mobile device is used in user
Interior, then the timing duration of data connection opening timing device is longer, and the timing duration of data connection closed timer is shorter;When with
Family is using in the low peak period stage of mobile device, then the timing duration of data connection opening timing device is shorter, data connection closed
The timing duration of timer is longer.For example, the 07 of peak period stage, especially working peak period:00 to 09:00 stage, noon
11 after before meals:00 to 14:30 stages, the 17 of next peak period:00 to 20:00 stage, and 22 before sleeping:30 to 02:00
Stage, user often sends out microblogging, wechat, mail, Fetion, chat in this stage and reads news etc..In order to allow user
While can effectively being carried out data transmission by mobile device and also reduce the power consumption of mobile device, in the peak period stage
Interior, the timing duration of control data connection opening timing device is longer, so that the time that mobile device carries out data transmission is more, together
When also control data connection closed timer timing duration it is shorter so that mobile device can have the shorter time to enter dormancy shape
State.In addition, in the low peak period stage, user is less using the time of mobile device, then control data connects within the low peak period stage
The timing duration of opening timing device is shorter and the timing duration of control data connection closed timer is longer, so that mobile device has
More times enter resting state.
Certainly, in other embodiments, the duration control data that mobile device can also be set according to User Defined connects
The timing duration that Off Timer connects opening timing device with data is connect, it is fixed that data connection closed timer connects unlatching with data
When device timing duration can be periodicity duration that user is set, and specific cycle duration needs and set according to user.
As shown in figure 3, Fig. 3 is the schematic flow sheet of the second embodiment of the sleep management method of mobile device of the present invention.
This method comprises the following steps:
Step S201:Start.
Step S202:Whether detection mobile device carries out data transmission.
If detect that mobile device carries out data transmission or mobile device, or mobile device is used in user
The duration not carried out data transmission is no more than the preset value of user's setting, then performs step S203:Mobile device is not required to
To enter resting state.
If the duration that detection mobile device does not carry out data transmission exceedes preset value or mobile device does not enter
Row data transfer, then perform step S204:Mobile device needs to enter resting state.
Mobile device is needed after entering resting state, performs step S205:Mobile device disconnects the company of network data link
Connect and enter resting state, while log-on data connection closed timer starts timing.
After execution of step S205, step S206 is performed:Whether then to judge the timing of data connection closed timer.
If the timing of data connection closed timer performs step S207 without then:Judge mobile device whether by
Phone, quarter-bell or user key-press wake up.
If mobile device is not waken up by phone, quarter-bell or user key-press, step S208 is performed:Mobile device continues
Keep resting state.
If the timing of data connection closed timer is then or mobile device is waken up by phone, quarter-bell or user key-press,
Then perform step S209:Mobile device stops resting state, and the connection of opening network data link simultaneously receives the network information, simultaneously
Log-on data connection opening timing device starts timing.
After execution of step S209, step S210 is performed:Whether then to judge the timing of data connection opening timing device.
If data connection opening timing device timing performs step S211 without then:Mobile device continues to keep work
Make state.
If the timing of data connection opening timing device is then, step S212 is performed:Whether detection currently has data transfer.
If detection is currently without data transfer, return to step S205.
If detection is current data transfer, step S213 is performed:Restarting data connection opening timing device starts
Timing, and keep the connection of current network data link.
As shown in figure 4, Fig. 4 is the structural representation of the first embodiment of mobile device.Mobile device 10 includes detection mould
Block 11, sleep management module 12, timer module 13 and judge module 14.Detection module 11 is connected with sleep management module 12,
Sleep management module 12 is connected with timer module 13, and timer module 13 is connected with judge module 14.Wherein, timer module
13 connect opening timing device 132 with data including data connection closed timer 131.
Detection module 11 is used to detect whether mobile device 10 needs to enter resting state.Wherein detection module 11 mainly leads to
Cross whether detection mobile device 10 carries out data transmission, it is preferable if detection module 11 detects mobile device 10 and do not carried out
The duration of data transfer exceedes preset value, then detection module 11 judges that mobile device 10 needs to enter resting state;If
The duration that the detection mobile device 10 of detection module 11 does not carry out data transmission is no more than preset value or detection mobile device
10 carry out data transmission, then detection module 11 judges that mobile device 10 need not enter resting state.
In addition, in other embodiments, if detection module 11 detects mobile device 10 and do not carried out data transmission, examine
Survey module 11 and judge that mobile device 10 needs to enter resting state;If detection module 11 detects mobile device 10 and carries out data biography
Defeated, then detection module 11 judges that mobile device 10 need not enter resting state.
Sleep management module 12 is used to disconnect the connection of network data link and the connection of opening network data link, and stops
Dormancy management module 12 is additionally operable to receive the network information.When detection module 11 detects mobile device 10 and needs to enter resting state,
Sleep management module 12 disconnects the connection of network data link, so that mobile device 10 enters resting state.In judge module 14
The timing of data connection closed timer 131 is judged to constantly, and the connection of the opening network data link of sleep management module 12 simultaneously connects
The network information is received, so that mobile device 10 stops resting state.In addition, mobile device 10 in resting state, is set if moved
Standby 10 are waken up by phone, quarter-bell or user key-press, and the connection of the opening network data link of sleep management module 12 simultaneously receives network
Information, so that mobile device 10 stops resting state.
Timer module 13 connects opening timing device 132 with log-on data for log-on data connection closed timer 131
Timing.When mobile device 10 enters resting state, the log-on data connection closed timer 131 of timer module 13 starts to count
When;Stop resting state in mobile device 10, the log-on data of timer module 13 connection opening timing device 132 starts timing.
Judge module 14 is used to judge that data connection closed timer 131 connects the timing of opening timing device 132 with data
Whether then.
In addition, judging the timing of data connection opening timing device 132 to constantly in judge module 14, then detection module 11 detects
Whether current mobile device 10 has data transfer;It is fixed if detection module 11, which detects current mobile device 10, data transfer
When device module 13 restart data connection opening timing device 132 and start timing, sleep management module 12 keeps current network number
According to the connection of link;If detection module 11 detects the transmission of the no data of current mobile device 10, mobile device 10 is back to disconnected
Open the connection of network data link, the step of log-on data connection closed timer 131 starts timing.
In the present embodiment, timer module 13 is preferably according to the timing of the information content control data connection closed of the network information
Device 131 connects the timing duration of opening timing device 132 with data;When the information content of the network information is bigger, then data connection is opened
The timing duration of timer 132 is longer, and the timing duration of data connection closed timer 131 is shorter;When the information of the network information
Measure smaller, then the timing duration of data connection opening timing device 132 is shorter, the timing duration of data connection closed timer 131
It is longer.
Certainly, in other embodiments, timer module 13 can also be controlled according to user using the stage of mobile device 10
Data connection closed timer 131 processed connects the timing duration of opening timing device 132 with data;When using mobile device in user
In 10 peak period stage, then the timing duration of data connection opening timing device 132 is longer, data connection closed timer 131
Timing duration it is shorter;When within low peak period stage of the user using mobile device 10, then data connect opening timing device 132
Timing duration is shorter, and the timing duration of data connection closed timer 131 is longer.
Certainly, in other embodiments, the duration that timer module 13 can also be set according to User Defined controls number
The timing duration of opening timing device 132, the He of data connection closed timer 131 are connected with data according to connection closed timer 131
The timing duration of data connection opening timing device 132 can be the periodicity duration that user is set, and specific cycle duration according to
User needs and set.
In summary, the present invention is by detecting whether mobile device needs to enter resting state;If it is, mobile device breaks
Open the connection of network data link and enter resting state, while log-on data connection closed timer starts timing;Then sentence
Then whether disconnected data connection closed timer timing;If it is, mobile device stops resting state, opening network data link
Connection and receive the network information, while log-on data connection opening timing device start timing;Finally judge that data connection is opened
Then whether timer timing;If it is, whether detection currently has data transfer;If it is, restarting data connection
Opening timing device starts timing, and keeps the connection of current network data link;If it is not, then mobile device is back to disconnection net
The connection of network data link, the step of log-on data connection closed timer starts timing.The present invention can user without using
By the turn-off time of the data link of data connection closed Timer Controlling mobile device in the case of mobile device, make movement
Equipment can the long period in a dormant state, so as to reduce the power consumption of mobile device, extend stand-by time;And also pass through
The Connection Time of the data link of data connection opening timing device control mobile device, in the timing of data connection opening timing device
Mobile device is allowed to concentrate the associative operation carried out data transmission in time, to ensure the normal use of mobile device.
Embodiments of the present invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this
The equivalent structure or equivalent flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other correlations
Technical field, it is included within the scope of the present invention.