CN103150235B - Method and the mobile terminal of data in a kind of automatic preservation volatile memory - Google Patents

Method and the mobile terminal of data in a kind of automatic preservation volatile memory Download PDF

Info

Publication number
CN103150235B
CN103150235B CN201310106973.9A CN201310106973A CN103150235B CN 103150235 B CN103150235 B CN 103150235B CN 201310106973 A CN201310106973 A CN 201310106973A CN 103150235 B CN103150235 B CN 103150235B
Authority
CN
China
Prior art keywords
mobile terminal
battery
temperature
operating temperature
power management
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
CN201310106973.9A
Other languages
Chinese (zh)
Other versions
CN103150235A (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.)
Taian Taishan Technology Co.,Ltd.
Original Assignee
TCL Communication Ningbo 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 TCL Communication Ningbo Ltd filed Critical TCL Communication Ningbo Ltd
Priority to CN201310106973.9A priority Critical patent/CN103150235B/en
Publication of CN103150235A publication Critical patent/CN103150235A/en
Application granted granted Critical
Publication of CN103150235B publication Critical patent/CN103150235B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses method and the mobile terminal of data in a kind of automatic preservation volatile memory. Described method comprises step: A, periodically detect successively the current operating temperature of battery of mobile terminal and power management chip, and whether the battery of mobile terminal current operating temperature that detects of judgement or the current operating temperature of power management chip exceed predetermined temperature range; B, in the time detecting that the current operating temperature of battery of mobile terminal or power management chip exceeds predetermined temperature range, control produce interrupt signal; C, according to produced interrupt signal, control the data in volatile memory are saved in non-volatile storage. Even if adopt the present invention can make mobile terminal cause mobile terminal to crash because the long serviceability temperature of user is too high, can not cause not yet canned data loss of user yet, can not cause user's loss, bring convenience to user.

Description

Method and the mobile terminal of data in a kind of automatic preservation volatile memory
Technical field
The present invention relates to communication technical field, in particular method and the mobile terminal of data in a kind of automatic preservation volatile memory.
Background technology
People are in the time using the mobile terminals such as mobile phone, use because of long-time, can make the excess Temperature of mobile phone, and the too high as easy as rolling off a log mobile phone that causes of mobile phone temp crashes, now can only just can make mobile phone recover normal by pulling up the methods such as battery, and other contents that using such as the note of not yet having edited before will be lost, littlely bring and the trouble such as update to user, greatly will bring heavy losses to user because not protecting stored loss. This situation is especially aobvious outstanding in the time that mobile phone makes mobile phone temp raise for a long time
If in addition when user uses mobile terminal at severe cold areas, can cause equally mobile terminal to crash because temperature is too low, and then make troubles to user.
Therefore, prior art has yet to be improved and developed.
Summary of the invention
The technical problem to be solved in the present invention is, for the above-mentioned defect of prior art, method and the mobile terminal of data in a kind of automatic preservation volatile memory are provided, even if make mobile terminal cause mobile terminal to crash because the long serviceability temperature of user is too high, can not cause not yet canned data loss of user yet, can not cause user's loss, bring convenience to user.
The technical scheme that technical solution problem of the present invention adopts is as follows:
A method for data in automatic preservation volatile memory, wherein, comprises step:
A, periodically detect successively the current operating temperature of battery of mobile terminal and power management chip, and whether the battery of mobile terminal current operating temperature that detects of judgement or the current operating temperature of power management chip exceed predetermined temperature range;
B, in the time detecting that the current operating temperature of battery of mobile terminal or power management chip exceeds predetermined temperature range, control produce interrupt signal;
C, according to produced interrupt signal, control the data in volatile memory are saved in nonvolatile memory.
The method of data in described automatic preservation volatile memory, wherein, also comprises before described steps A;
Set in advance the predetermined temperature range of battery and the predetermined temperature range of power management chip.
In described automatic preservation volatile memory, the method for data, is characterized in that, wherein, described steps A specifically comprises:
A01, periodically detect the current operating temperature of battery of mobile terminal;
Whether the current operating temperature of the battery of mobile terminal that A02, judgement detect exceeds the predetermined temperature range of battery, proceeds to step B in the time exceeding, and proceeds to steps A 03 in the time not exceeding;
The current operating temperature of A03, detection power management chip, and judge that whether the current operating temperature of the power management chip detecting exceeds the predetermined temperature range of power management chip, proceeds to step B in the time exceeding.
The method of data in described automatic preservation volatile memory wherein, also comprises step after described step C:
After D, described data storage success, control mobile terminal display screen and show corresponding information.
The method of data in described automatic preservation volatile memory, wherein, described steps A also comprises:
A11, be provided with two sense cycle T1 and T2, and T1 < T2;
A12, with cycle T 1, battery of mobile terminal is carried out to periodic temperature detection;
A13, judge whether twice operating temperature does not all exceed the temperature range of its normal work before and after battery of mobile terminal, enters steps A 14 when all not exceeding, and once exceeds and enters step B if any;
A14, judge whether the absolute value of twice operating temperature difference exceeds predefined temperature threshold values before and after battery of mobile terminal; Proceed to steps A 15 if do not exceed, return to steps A 12 if exceed;
A15, judge whether the difference of carrying out the system time of temperature detection before and after battery of mobile terminal for twice exceeds predefined time threshold values, proceeds to steps A 16 if exceed, and returns to steps A 12 if do not exceed;
A16, sense cycle are set to T2.
The method of data in described automatic preservation volatile memory, wherein, described steps A also comprises:
A21, be provided with two sense cycle T1 and T2, and T1 < T2;
A22, with cycle T 1, power management chip is carried out to periodic temperature detection;
A23, judge whether twice operating temperature does not all exceed the temperature range of its normal work before and after power management chip, enters steps A 24 when all not exceeding, and once exceeds and enters step B if any;
A24, judge whether the absolute value of twice operating temperature difference exceeds predefined temperature threshold values before and after power management chip; Proceed to steps A 25 if do not exceed, return to steps A 22 if exceed;
A25, judge whether the difference of carrying out the system time of temperature detection before and after power management chip for twice exceeds predefined time threshold values, proceeds to steps A 26 if exceed, and returns to steps A 22 if do not exceed;
A26, sense cycle are set to T2.
A mobile terminal that adopts the method for data in described automatic preservation volatile memory, wherein, comprising:
Temperature detecting module, for periodically detecting successively the current operating temperature of battery of mobile terminal and power management chip;
Interrupt signal generation module, for judging whether the battery of mobile terminal current operating temperature that detects or the current operating temperature of power management chip exceed predetermined temperature range, in the time detecting that the current operating temperature of battery of mobile terminal or power management chip exceeds predetermined temperature range, control and generate interrupt signal;
Cache module, for reading the data of mobile terminal volatile memory, and by described data write non-volatile memory.
Described mobile terminal, wherein, described temperature detecting module comprises:
The first temperature detecting unit, for periodically detecting battery of mobile terminal current operating temperature;
The second temperature detecting unit, for periodically detecting power management chip current operating temperature.
Described mobile terminal, wherein, described interrupt signal generation module comprises:
The first interrupt signal generation unit, for judging whether the battery of mobile terminal current operating temperature detecting exceeds predetermined temperature range, in the time detecting that the current operating temperature of battery of mobile terminal exceeds predetermined temperature range, control and generate the first interrupt signal;
The second interrupt signal generation unit, for judging whether the current operating temperature of the power management chip detecting exceeds predetermined temperature range, in the time detecting that the current operating temperature of power management chip exceeds predetermined temperature range, control and generate the second interrupt signal.
Described mobile terminal, wherein, described mobile terminal also comprises;
Notification module, for when described nonvolatile memory is by after described data storage success, controls mobile terminal display screen and shows corresponding information.
Method and the mobile terminal of data in a kind of automatic preservation volatile memory provided by the present invention, whether the current operating temperature that makes the power management chip of mobile terminal can detect periodically successively battery of mobile terminal and power management chip by described method exceeds predetermined temperature range, and in the time exceeding normal range of operation, produce interrupt signal, the data in volatile memory are saved in nonvolatile memory. Adopt the method for data in automatic preservation volatile memory of the present invention and mobile terminal that user is occurred when abnormal in the long-time temperature that uses mobile terminal or mobile terminal, the data of not preserving can be preserved automatically, thereby the loss of having avoided data, provides users with the convenient.
Brief description of the drawings
Fig. 1 is the flow chart of steps of the preferred embodiment of the method for data in a kind of automatic preservation volatile memory provided by the invention.
Fig. 2 is preferred embodiment flow chart of steps of battery of mobile terminal being carried out to periodicity temperature detection provided by the present invention.
Fig. 3 is preferred embodiment flow chart of steps of mobile terminal power management chip being carried out to periodicity temperature detection provided by the present invention.
Fig. 4 is the preferred embodiment structural representation of the mobile terminal of the method for data in the automatic preservation volatile memory described in employing provided by the invention.
Fig. 5 is the functional block diagram of the preferred embodiment of temperature detecting module provided by the invention.
Fig. 6 is the functional block diagram of the preferred embodiment of interrupt signal generation module provided by the invention.
Detailed description of the invention
For making object of the present invention, technical scheme and advantage clearer, clear and definite, developing simultaneously referring to accompanying drawing, the present invention is described in more detail for embodiment. Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Below in conjunction with Fig. 1, the method for data in a kind of automatic preservation volatile memory provided by the present invention is elaborated, wherein, Fig. 1 is the flow chart of steps of the preferred embodiment of the method for data in a kind of automatic preservation volatile memory provided by the invention.
First enter step 101, set in advance predetermined temperature range and the predetermined temperature range of power management chip of battery;
Before mobile terminal dispatches from the factory, set voluntarily battery and the predetermined temperature range of power management chip by the manufacturer of mobile terminal. The referential factor of its setting generally has two: one is to set according to the performance of the battery of the mobile terminal of its production and power management chip: another is the environment temperature etc. that this mobile terminal is sold to ground.
In this preferred embodiment, the predetermined temperature range of battery is set to-20 to 60 degrees Celsius, and temperature range predetermined power management chip is also set to-20 to 60 degrees Celsius.
Step 102, the sense cycle of the power management chip of mobile terminal is set;
The sense cycle of power management chip can be set by the timer of mobile terminal, described timer can be arranged on the central processing unit of mobile terminal or be arranged on power management chip, manufacturer can arrange sense cycle in the time that mobile terminal dispatches from the factory, be more preferably, mobile terminal provides the interface that arranges of sense cycle, user is arranged interface sense cycle is set by this, if think, testing result is more accurate, can the shorter sense cycle (as 5 seconds) of setup times, save the power consumption of mobile terminal if want, longer sense cycle (as 30 seconds) can be set.
Step 103, battery of mobile terminal is carried out to periodic temperature detection;
In this preferred embodiment, sense cycle is set to 5 seconds in advance, will carry out temperature detection to the battery of mobile terminal every 5 seconds.
Whether the current operating temperature of the battery of mobile terminal that step 104, judgement detect exceeds the predetermined temperature range of battery;
In this preferred embodiment, whether the current operating temperature that the power management chip of mobile terminal detects battery exceeds the predetermined temperature range of battery ,-20 to 60 degrees Celsius; If the current operating temperature of battery is lower than-20 degrees Celsius or higher than 60 degrees Celsius, described battery of mobile terminal is in temperature anomaly state, now mobile terminal easily crashes, if now user's Edit Document or the document edited are not yet preserved, in the situation that mobile terminal crashes, easily cause the loss of data;
So in the time that the current operating temperature of battery exceeds the predetermined temperature range of battery, enter step 107;
In the time that the current operating temperature of battery does not exceed the predetermined temperature range of battery, enter step 105.
Step 105, power management chip is carried out to temperature detection;
Whether the current operating temperature of the power management chip that step 106, judgement detect exceeds the predetermined temperature range of power management chip;
In actual testing process, the power management chip of mobile terminal carries out the detection of succession to described battery of mobile terminal and described power management chip, first detect the current operating temperature of battery of mobile terminal and whether exceed its predetermined temperature range, only have when it and do not exceed in the situation of the predetermined temperature range of battery, whether the current operating temperature that just can detect power management chip is in its predetermined temperature range, and power management chip detects the current operating temperature of power management chip whether between-20 to 60 degrees Celsius.
,, if exceed between-20 to 60 degrees Celsius, enter step 107;
If do not exceed between-20 to 60 degrees Celsius, return to step 103.
Step 107, mobile terminal control produce interrupt signal;
When detecting that the current operating temperature of battery of mobile terminal can produce interrupt signal while exceeding its predetermined temperature range, and in the time detecting that power management chip current operating temperature exceeds its predetermined temperature range, also can produce interrupt signal, that is to say, no matter battery current operating temperature exceeds predetermined temperature range or power management chip current operating temperature exceeds its predetermined temperature range, described power management chip all can produce interrupt signal, thereby further guarantee in the time that temperature anomaly appears in mobile terminal, can not cause the loss of storage data.
Step 108, according to produced interrupt signal, control the data in volatile memory are saved in nonvolatile memory.
In this preferred embodiment, the central processing unit of mobile terminal receives described interrupt signal, and can judge the state of mobile terminal in temperature anomaly according to described interrupt signal, the situation of its temperature anomaly may be that the current operating temperature of battery exceeds between-20 to 60 degrees Celsius or the current operating temperature of power management chip exceeds between-20 to 60 degrees Celsius, easily there is situation about crashing in mobile terminal now, for make user not yet canned data be unlikely to lose, described central processing unit is saved to the data that are stored in volatile memory in nonvolatile memory, even if mobile terminal is crashed in temperature anomaly state because of it, because central processing unit before crashing is saved to nonvolatile memory by data, data can not be lost, can not cause user's loss.
Wherein, volatile memory refers to, after mobile terminal power-off and after restarting, data are by the memory disappearing, as RAM(RandomAccessMemory, random access memory) or DRAM(DynamicRandomAccessMemory, dynamic random access memory) and SRAM(StaticRandomAccessMemory, static RAM).
And nonvolatile memory refers to after mobile terminal power-off restarting, the memory that data still can be preserved, as FLASH(FlashEEPROMMemory, flash memory).
Finally enter step 109, described nonvolatile memory by after described data storage success, control mobile terminal display screen display reminding information;
When nonvolatile memory is by after data storage success, the display screen of central processing unit control mobile terminal shows information that can call user's attention, by described information, make user recognize that mobile terminal is in temperature anomaly state, and it is likely power-off deadlock at any time, the ensuing content of operation of reminding user is likely lost, user can take certain measure according to this prompting, use or do not use mobile terminal as reduced, make degradation measure at its temperature, the inconvenience of avoiding power-off to crash bringing to user;
Wherein, described information can be set by manufacturer in the time dispatching from the factory, also can be by user according to the setting of the speech habits of oneself or use habit personalization, in this preferred embodiment, described information is: " current mobile terminal, in temperature anomaly state, may crash at any time ".
By the preferred embodiment of the method for data in above-mentioned automatic preservation volatile memory, make when mobile terminal is during in temperature anomaly state, mobile terminal can be saved to the data that are stored in volatile memory in nonvolatile memory, even if making mobile terminal power-off crashes, data can not be lost, can not cause user's loss, and mobile terminal display screen meeting display reminding information, the state of prompting user temperature anomaly, make user can obtain this state, and then can take certain measure, avoid the mobile terminal inconvenience bringing to user of crashing as far as possible.
Certainly, mobile terminal manufacturer also can be not limited to the detection order of above-mentioned preferred embodiment, for example, can first detect the current operating temperature of power management chip, the current operating temperature of battery is detected afterwards again; Also can detect the current operating temperature of battery and power management chip, manufacturer can be according to technical conditions and different purposes of design simultaneously, choose different detection order and detection mode.
Because described power management chip periodically carries out temperature detection to battery of mobile terminal and power management chip, mobile terminal extra power consumption is increased, more easily cause mobile terminal not have electricity, bring inconvenience, the present invention is for solving in temperature detection process, expend the technical problem of power consumption, propose can pass through in advance the technical scheme in two temperature detection cycles of set timer.
Because mobile terminal is the rapid drawdown that can not rise sharply in normal environment for use, if now mobile terminal is carried out to temperature detection frequently, one there is no need, and two cause the waste of mobile terminal power consumption. Therefore this preferred embodiment is according to this characteristic of mobile terminal, by mobile terminal, this temperature detecting and the front temperature once detecting compare, if difference is between the two in uniform temperature threshold values, can think that mobile terminal current operating temperature is more steady, if this steady maintenance a period of time, can reduce battery to mobile terminal and power management chip and carry out the frequency of temperature detection. Arrange like this, the power consumption can reduce mobile terminal and carry out temperature detection time, can guarantee again the accuracy of detection to mobile terminal temperature anomaly situation.
Concrete steps are as follows:
S1, be provided with two sense cycle T1 and T2, and T1 < T2;
S2, with cycle T 1, battery of mobile terminal is carried out to periodic temperature detection;
S3, judge whether twice operating temperature does not all exceed the temperature range of its normal work before and after battery of mobile terminal, enters step S4 when all not exceeding, once exceed if any to control and produce interrupt signal;
S4, judge whether the absolute value of twice operating temperature difference exceeds predefined temperature threshold values before and after battery of mobile terminal; Proceed to step S5 if do not exceed, return to step S2 if exceed;
S5, judge whether the difference of carrying out the system time of temperature detection before and after battery of mobile terminal for twice exceeds predefined time threshold values, proceeds to step S6 if exceed, and returns to step S2 if do not exceed;
S6, sense cycle are set to T2.
Below in conjunction with Fig. 2, the testing process of this preferred embodiment is elaborated, wherein, Fig. 2 is preferred embodiment flow chart of steps of battery of mobile terminal being carried out to periodicity temperature detection provided by the present invention.
First the set timer that enters step 201, mobile terminal has two sense cycle T1 and T2;
Be set to variable timer of time by timer, this timer can be set to two gears of T1 and T2, and T1 < T2, and wherein, T1 is the sense cycle of mobile terminal acquiescence;
In this preferred embodiment, T1 is set as 5 seconds, and T2 is set as 60 seconds.
The current operating temperature C1 of step 202, detection battery of mobile terminal, and obtain current system time D 1, and judge whether current operating temperature C1 exceeds the temperature range of the normal work of battery, enters step 203 if do not exceed, and enters step 204 if exceed;
Represent the current operating temperature of battery of mobile terminal with C1, the system time while representing to obtain battery current operating temperature with D1; And can carry out temperature detection to battery by the power management chip of mobile terminal, and then obtain current operating temperature and current system time;
Step 203, in the time that described timer exceedes described sense cycle T1, again detect the current operating temperature C2 of battery of mobile terminal, and obtain current system time D 2; And judge whether current operating temperature C2 exceeds the temperature range of the normal work of battery, enters step 205 if do not exceed, and enters step 204 if exceed;
Step 204, control power management chip produce interrupt signal;
The central processing unit that is mobile terminal is saved to the data in volatile memory in nonvolatile memory according to described interrupt signal, thereby even if reach mobile phone automatic shutdown, the object that also can not make the information data of not yet preserving lose.
Step 205, judge whether the absolute value of C1 and C2 difference exceeds predefined temperature threshold values;
In the time exceeding described temperature threshold values, enter step 206; In the time not exceeding described temperature threshold values, enter step 207;
Whether the absolute value that judges C1 and C2 difference is less than 2, if be less than 2, the variations in temperature that can regard as battery of mobile terminal is little, enters step 207 and further judges;
If be greater than 2, the variations in temperature that can assert battery of mobile terminal is large, in temperature unsure state, be not suitable for improving the detection frequency to battery of mobile terminal, otherwise can cause when mobile terminal is during in temperature anomaly state, because timer does not have overtimely battery not to be carried out to temperature detection, and then make mobile terminal automatic shutdown in the time that user is offhand, make not store into the generation of the event of data loss in nonvolatile memory, so it is large to work as battery of mobile terminal variations in temperature, carry out step 206, preserve current system time, carry out step 208 afterwards, also with the cycle of originally giving tacit consent to, battery is periodically detected, then carry out step 209, preserve current operating temperature, and taking the current temperature of preserved and system time as benchmark, judge the whether within the specific limits variation of current operating temperature that the next cycle obtains, return to step 203.
Step 206, preservation current system time D 1=D2;
Step 207, judge whether the difference of D2 and D1 exceeds predefined time threshold values;
The power management chip that will extend mobile terminal carries out the cycle of temperature detection to battery, need to meet two conditions, one is to meet step 205, be that variations in temperature is steady within the specific limits, another will be satisfied condition step 207, be this variations in temperature state stably, continue the regular hour;
In this preferred embodiment, the power management chip of mobile terminal need to judge that whether the difference of D2 and D1 has exceeded 60 seconds, is set to 60 seconds by described time threshold values;
If exceeded 60 seconds, the battery temperature that mobile terminal is described changes steadily, and plateau has continued the regular hour, now can extend the cycle of battery being carried out to temperature detection, thereby save the power consumption of power management chip, enter step 210, the sense cycle of acquiescence is extended, and with the cycle T 2 after extending, battery of mobile terminal is periodically detected, in the present embodiment by cycle stretch-out to 60 second, thereby save mobile terminal battery carried out the energy consumption of temperature detection.
If do not exceed 60 seconds, although illustrate that battery temperature changes steadily, but lasting time of this plateau is shorter, this plateau is fly-by-night, if now extend the temperature detection cycle of battery, cannot guarantee the accuracy of detection to mobile terminal temperature anomaly situation, so for the not yet security consideration of save data of mobile terminal, also should further detect the variation of battery temperature, also with the sense cycle T1 originally giving tacit consent to, battery of mobile terminal is carried out to temperature detection, namely step 208; Can the object now with sense cycle T1, battery being detected be to detect battery temperature to change state stably and continue the regular hour, so, enter step 209, preserve the current operating temperature of battery, and no longer preserve current system time, and judge whether current operating temperature and this current operating temperature of being preserved that the next cycle is obtained also change within the specific limits with the temperature of being preserved for benchmark.
For example, the temperature while detecting battery is for the first time 10 degrees Celsius, and system time is 13.05;
Temperature while detecting battery is for the second time 11 degrees Celsius, and system time is 13.10, and wherein, sense cycle is 5 seconds;
Known, the absolute value of twice variations in temperature difference is in 2, and variations in temperature is stably, but the difference of system time is 0.05 second, does not exceed 60 seconds, so can not extend sense cycle;
So, retain the temperature this time detecting, 11 degrees Celsius, but do not retain this system time, also carry out the judgement of next cycle taking 13.05 system time as benchmark; Until the absolute value that before and after detecting, twice battery temperature changes difference is in 2, and exceed 60 seconds compared with the time 13.05, can extend sense cycle, the sense cycle of 5 seconds is extended to 60 seconds, thereby save the energy consumption of mobile terminal.
Step 208, with sense cycle T1, battery of mobile terminal is carried out to temperature detection; Enter afterwards step 209;
Step 209, preservation current operating temperature C1=C2; Return to afterwards step 203;
Step 210, sense cycle is changed to T2 by T1;
After step 210, mobile terminal will carry out temperature detection to battery taking T2 as sense cycle, because of the T2 time longer with respect to T1, so can save certain energy consumption, for mobile terminal has been saved electric weight, when with T2, battery being carried out to periodicity while detecting, if detected when battery current operating temperature exceeds normal range of operation, mobile terminal is in producing interrupt signal, can provide a prompting interface to user, user can select to continue to trust longer cycle T 2 according to described prompting interface battery is carried out to temperature detection, also selection T1 that can be careful carries out temperature detection, certainly mobile terminal also can change to T1 by T2 automatically.
In like manner, mobile terminal also can arrange two sense cycle to power management chip, and its concrete detection mode is;
S21, be provided with two sense cycle T1 and T2, and T1 < T2;
S22, with cycle T 1, power management chip is carried out to periodic temperature detection;
S23, judge whether twice operating temperature does not all exceed the temperature range of its normal work before and after power management chip, enters step S24 when all not exceeding, once exceed if any and control power management chip and produce control signal;
S24, judge whether the absolute value of twice operating temperature difference exceeds predefined temperature threshold values before and after power management chip; Proceed to step S25 if do not exceed, return to step S22 if exceed;
S25, judge whether the difference of carrying out the system time of temperature detection before and after power management chip for twice exceeds predefined time threshold values, proceeds to step S26 if exceed, and returns to step S22 if do not exceed;
S26, sense cycle are set to T2.
The concrete mode of power management chip being carried out to temperature detection below in conjunction with Fig. 3 is elaborated, and Fig. 3 is preferred embodiment flow chart of steps of mobile terminal power management chip being carried out to periodicity temperature detection provided by the present invention.
First the set timer that enters step 301, mobile terminal has two sense cycle T1 and T2;
The current operating temperature E1 of step 302, detection power management chip, and obtain current system time F1; And judge whether current operating temperature E1 exceeds the temperature range of the normal work of battery, enters step 303 if do not exceed, and enters step 304 if exceed;
Step 303, in the time that described timer exceedes described sense cycle T1, again detect the current operating temperature E2 of power management chip, and obtain current system time F2; And judge whether current operating temperature E2 exceeds the temperature range of the normal work of battery, enters step 305 if do not exceed, and enters step 304 if exceed;
Step 304, control power management chip produce interrupt signal;
Step 305, judge whether the absolute value of E1 and E2 difference exceeds predefined temperature threshold values; In the time exceeding described temperature threshold values, enter step 306; In the time not exceeding described temperature threshold values, enter step 307;
Step 306, preservation current system time F1=F2;
Step 307, judge whether the difference of F2 and F1 exceeds predefined time threshold values;
If exceeded, enter step 310, if do not exceeded, enter step 308;
Step 308, with sense cycle T1, battery of mobile terminal is carried out to temperature detection;
Step 309, preservation current operating temperature E1=E1; And return to step 303;
Step 310, sense cycle is changed to T2 by T1;
After step 310, mobile terminal will carry out temperature detection to power management chip taking T2 as sense cycle, because of the T2 time longer with respect to T1, so can save certain energy consumption, for mobile terminal has been saved electric weight, when with T2, power management chip being carried out to periodicity while detecting, if detected when the current operating temperature of power management chip exceeds normal range of operation, mobile terminal is in producing interrupt signal, can provide a prompting interface to user, user can select to continue to trust longer cycle T 2 according to described prompting interface power management chip is carried out to temperature detection, also selection T1 that can be careful carries out temperature detection, certainly mobile terminal also can change to T1 by T2 automatically.
Power management chip is carried out to temperature detection, judge whether to extend the sense cycle to power management chip, the preferred embodiment that it realizes principle and concrete mode and please refer to Fig. 2, does not repeat them here.
Known by the preferred embodiment described in Fig. 2 and Fig. 3, the timer of mobile terminal can arrange two sense cycle, the battery of mobile terminal and the variations in temperature of power management chip be (absolute value of variations in temperature difference remains on 2 with interior) steadily, and after plateau certain time (temperature smooth change kept 60 seconds), can extend the cycle of battery and power management chip being carried out to temperature detection, in ensureing battery and power management chip carried out to temperature detecting precision, the power consumption of saving mobile terminal.
Below in conjunction with Fig. 4, the structure that adopts the mobile terminal of the method for data in described automatic preservation volatile memory is elaborated, wherein, Fig. 4 is the preferred embodiment structural representation of the mobile terminal of the method for data in the automatic preservation volatile memory described in employing provided by the invention.
As shown in Figure 4, described mobile terminal comprises:
The power management chip 401 being connected with battery 403 and central processing unit 402 is provided with on described power management chip 401:
Temperature detecting module, for periodically detecting successively the current operating temperature of battery of mobile terminal and power management chip;
Interrupt signal generation module, for judging whether the battery of mobile terminal current operating temperature that detects or the current operating temperature of power management chip exceed predetermined temperature range, in the time detecting that the current operating temperature of battery of mobile terminal or power management chip exceeds predetermined temperature range, control and generate interrupt signal;
The central processing unit 402 being connected with described power management chip 401 is provided with on described central processing unit 402:
Cache module, for reading the data of mobile terminal volatile memory, and by described data write non-volatile memory.
The volatile memory 405 and the nonvolatile memory 406 that are connected with described central processing unit 402 respectively;
Wherein, volatile memory 405 refers to, after mobile terminal power-off and after restarting, data are by the memory disappearing, as RAM(RandomAccessMemory.
And nonvolatile memory 406 refers to after mobile terminal power-off restarting, the memory that data still can be preserved, as FLASH(FlashEEPROMMemory, flash memory).
Below in conjunction with Fig. 5, temperature detecting module is described further, wherein, Fig. 5 is the functional block diagram of the preferred embodiment of temperature detecting module provided by the invention;
As shown in Figure 5, described temperature detecting module comprises:
The first temperature detecting unit 501, for periodically detecting battery of mobile terminal current operating temperature;
The second temperature detecting unit 502, for periodically detecting power management chip current operating temperature.
Further, in conjunction with Fig. 6, described interrupt signal generation module is described in further detail, wherein, Fig. 6 is the functional block diagram of the preferred embodiment of interrupt signal generation module provided by the invention.
As shown in Figure 6, described interrupt signal generation module comprises:
The first interrupt signal generation unit 601, for judging whether the battery of mobile terminal current operating temperature detecting exceeds predetermined temperature range, in the time detecting that the current operating temperature of battery of mobile terminal exceeds predetermined temperature range, control and generate the first interrupt signal;
The second interrupt signal generation unit 602, whether exceed predetermined temperature range for the current operating temperature that judges the power management chip detecting, in the time detecting that the current operating temperature of power management chip exceeds predetermined temperature range, control and generate the second interrupt signal.
Again further, on described power management chip 401, notification module is also installed, for when described nonvolatile memory is by after described data storage success, controls mobile terminal display screen and show corresponding information;
Wherein, described information is: " current mobile terminal, in temperature anomaly state, may crash at any time "; By the shown information of display screen 404, make user can understand the state of mobile terminal in temperature anomaly, can take certain measure, the inconvenience of avoiding mobile terminal to crash bringing to user.
In sum, by method and the mobile terminal of data in a kind of automatic preservation volatile memory provided by the present invention, described mobile terminal can periodically be detected the temperature of battery and power management chip, in the time detecting the current operating temperature of battery or power management chip and exceed predetermined temperature range, produce interrupt signal, central processing unit is written to the data that are stored in volatile memory in nonvolatile memory, even if now mobile terminal crashes because of temperature anomaly, the information that user not yet preserves or editing also can not be lost, can not cause user's loss, thereby facilitate user, and the display screen of mobile terminal also can display reminding information, user can obtain the situation under temperature anomaly state of mobile terminal according to information, further facilitate user.
Should be understood that, application of the present invention is not limited to above-mentioned giving an example, and for those of ordinary skills, can be improved according to the above description or convert, and all these improvement and conversion all should belong to the protection domain of claims of the present invention.

Claims (8)

1. a method of automatically preserving data in volatile memory, is characterized in that, comprises step:
A, periodically detect successively the current operating temperature of battery of mobile terminal and power management chip, and whether the battery of mobile terminal current operating temperature that detects of judgement or the current operating temperature of power management chip exceed predetermined temperature range;
B, in the time detecting that the current operating temperature of battery of mobile terminal or power management chip exceeds predetermined temperature range, control produce interrupt signal;
C, according to produced interrupt signal, control the data in volatile memory are saved in nonvolatile memory;
In the time detecting battery of mobile terminal current operating temperature, described steps A also comprises:
A11, be provided with two sense cycle T1 and T2, and T1 < T2;
A12, with cycle T 1, battery of mobile terminal is carried out to periodic temperature detection;
A13, judge whether twice operating temperature does not all exceed the temperature range of its normal work before and after battery of mobile terminal, enters steps A 14 when all not exceeding, and once exceeds and enters step B if any;
A14, judge whether the absolute value of twice operating temperature difference exceeds predefined temperature threshold values before and after battery of mobile terminal; Proceed to steps A 15 if do not exceed, return to steps A 12 if exceed;
A15, judge whether the difference of carrying out the system time of temperature detection before and after battery of mobile terminal for twice exceeds predefined time threshold values, proceeds to steps A 16 if exceed, and returns to steps A 12 if do not exceed;
A16, sense cycle are set to T2;
In the time detecting the current operating temperature of mobile terminal power management chip, described steps A also comprises:
A21, be provided with two sense cycle T1 and T2, and T1 < T2;
A22, with cycle T 1, power management chip is carried out to periodic temperature detection;
A23, judge whether twice operating temperature does not all exceed the temperature range of its normal work before and after power management chip, enters steps A 24 when all not exceeding, and once exceeds and enters step B if any;
A24, judge whether the absolute value of twice operating temperature difference exceeds predefined temperature threshold values before and after power management chip; Proceed to steps A 25 if do not exceed, return to steps A 22 if exceed;
A25, judge whether the difference of carrying out the system time of temperature detection before and after power management chip for twice exceeds predefined time threshold values, proceeds to steps A 26 if exceed, and returns to steps A 22 if do not exceed;
A26, sense cycle are set to T2.
2. the method for data in automatic preservation volatile memory according to claim 1, is characterized in that, before described steps A, also comprises;
Set in advance the predetermined temperature range of battery and the predetermined temperature range of power management chip.
3. the method for data in automatic preservation volatile memory according to claim 1, is characterized in that, described steps A specifically comprises:
A01, periodically detect the current operating temperature of battery of mobile terminal;
Whether the current operating temperature of the battery of mobile terminal that A02, judgement detect exceeds the predetermined temperature range of battery, proceeds to step B in the time exceeding, and proceeds to steps A 03 in the time not exceeding;
The current operating temperature of A03, detection power management chip, and judge that whether the current operating temperature of the power management chip detecting exceeds the predetermined temperature range of power management chip, proceeds to step B in the time exceeding.
4. the method for data in automatic preservation volatile memory according to claim 1, is characterized in that, also comprises step after described step C:
After D, described data storage success, control mobile terminal display screen and show corresponding information.
5. a mobile terminal that adopts the method for data in automatic preservation volatile memory claimed in claim 1, is characterized in that, comprising:
Temperature detecting module, for periodically detecting successively the current operating temperature of battery of mobile terminal and power management chip;
Interrupt signal generation module, for judging whether the battery of mobile terminal current operating temperature that detects or the current operating temperature of power management chip exceed predetermined temperature range, in the time detecting that the current operating temperature of battery of mobile terminal or power management chip exceeds predetermined temperature range, control and generate interrupt signal;
Cache module, for reading the data of mobile terminal volatile memory, and by described data write non-volatile memory;
Described interrupt signal generation module also comprises:
Sense cycle setting unit, for being provided with two sense cycle T1 and T2, and T1 < T2;
Whether the twice battery temperature judging unit in front and back, all do not exceed the temperature range of its normal work for twice operating temperature before and after judging battery of mobile terminal;
Whether the twice chip temperature judging unit in front and back, all do not exceed the temperature range of its normal work for twice operating temperature before and after judging power management chip;
Whether battery temperature difference judging unit, exceed predefined temperature threshold values for the absolute value that judges the twice operating temperature difference in battery of mobile terminal front and back;
Whether battery core temperature gap judging unit, exceed predefined temperature threshold values for the absolute value that judges the twice operating temperature difference in power management chip front and back;
Very first time threshold values judging unit, whether the difference of carrying out the system time of temperature detection for judging before and after battery of mobile terminal for twice exceeds predefined time threshold values;
The second time threshold values judging unit, whether the difference of carrying out the system time of temperature detection for judging before and after power management chip for twice exceeds predefined time threshold values;
Battery detecting cycle setting unit, is set to T2 for the sense cycle of battery of mobile terminal current operating temperature;
Chip detection cycle setting unit, is set to T2 for the sense cycle of power management chip current operating temperature.
6. mobile terminal according to claim 5, is characterized in that, described temperature detecting module comprises:
The first temperature detecting unit, for periodically detecting battery of mobile terminal current operating temperature;
The second temperature detecting unit, for periodically detecting power management chip current operating temperature.
7. mobile terminal according to claim 5, is characterized in that, described interrupt signal generation module comprises:
The first interrupt signal generation unit, for judging whether the battery of mobile terminal current operating temperature detecting exceeds predetermined temperature range, in the time detecting that the current operating temperature of battery of mobile terminal exceeds predetermined temperature range, control and generate the first interrupt signal;
The second interrupt signal generation unit, for judging whether the current operating temperature of the power management chip detecting exceeds predetermined temperature range, in the time detecting that the current operating temperature of power management chip exceeds predetermined temperature range, control and generate the second interrupt signal.
8. mobile terminal according to claim 5, is characterized in that, described mobile terminal also comprises;
Notification module, for when described nonvolatile memory is by after described data storage success, controls mobile terminal display screen and shows corresponding information.
CN201310106973.9A 2013-03-29 2013-03-29 Method and the mobile terminal of data in a kind of automatic preservation volatile memory Active CN103150235B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310106973.9A CN103150235B (en) 2013-03-29 2013-03-29 Method and the mobile terminal of data in a kind of automatic preservation volatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310106973.9A CN103150235B (en) 2013-03-29 2013-03-29 Method and the mobile terminal of data in a kind of automatic preservation volatile memory

Publications (2)

Publication Number Publication Date
CN103150235A CN103150235A (en) 2013-06-12
CN103150235B true CN103150235B (en) 2016-05-11

Family

ID=48548332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310106973.9A Active CN103150235B (en) 2013-03-29 2013-03-29 Method and the mobile terminal of data in a kind of automatic preservation volatile memory

Country Status (1)

Country Link
CN (1) CN103150235B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245651B (en) * 2015-10-20 2018-04-03 广东欧珀移动通信有限公司 A kind of mobile phone temp control device, temprature control method and mobile phone
CN105279041B (en) * 2015-11-11 2018-06-22 广东欧珀移动通信有限公司 A kind of method and device restarted automatically after terminal crash
CN105391833B (en) * 2015-11-25 2018-09-07 惠州Tcl移动通信有限公司 A kind of internal storage data loss test system and method based on mobile terminal
CN105657181B (en) * 2016-02-24 2020-07-17 珠海大横琴科技发展有限公司 Data backup method and device
US11016545B2 (en) * 2017-03-29 2021-05-25 Western Digital Technologies, Inc. Thermal throttling for memory devices
CN107478994B (en) * 2017-07-21 2020-01-14 Oppo广东移动通信有限公司 Terminal equipment and battery safety monitoring method and monitoring system thereof
CN107480031A (en) * 2017-08-28 2017-12-15 郑州云海信息技术有限公司 The method of testing and device of BBU temperature are monitored under a kind of MCS systems in real time
CN109450491B (en) * 2018-12-04 2021-03-16 四川长虹电器股份有限公司 Cable modem system capable of monitoring temperature and implementation method thereof
US11226671B2 (en) 2019-02-27 2022-01-18 Micron Technology, Inc. Power translator component
CN110457147A (en) * 2019-08-19 2019-11-15 山东超越数控电子股份有限公司 A kind of realization method and system of system overheat protection mechanism
CN111524252B (en) * 2020-04-27 2021-12-21 力高(山东)新能源技术有限公司 Processing method for preventing BMS system data storage abnormity
CN113125966A (en) * 2021-03-29 2021-07-16 深圳市优必选科技股份有限公司 Battery monitoring data storage method, battery management system and battery monitoring device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004325110A (en) * 2003-04-22 2004-11-18 Nec Lamilion Energy Ltd Method and apparatus for detecting failure of temperature sensor
CN101431228A (en) * 2008-12-18 2009-05-13 深圳华为通信技术有限公司 Thermal protection control method and system
CN102915264A (en) * 2012-10-25 2013-02-06 北京小米科技有限责任公司 Data protection method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2451352A (en) * 2007-07-26 2009-01-28 Qrg Ltd Proximity sensor with an automatic switch-off function

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004325110A (en) * 2003-04-22 2004-11-18 Nec Lamilion Energy Ltd Method and apparatus for detecting failure of temperature sensor
CN101431228A (en) * 2008-12-18 2009-05-13 深圳华为通信技术有限公司 Thermal protection control method and system
CN102915264A (en) * 2012-10-25 2013-02-06 北京小米科技有限责任公司 Data protection method and device

Also Published As

Publication number Publication date
CN103150235A (en) 2013-06-12

Similar Documents

Publication Publication Date Title
CN103150235B (en) Method and the mobile terminal of data in a kind of automatic preservation volatile memory
US9970966B2 (en) Method, device and computer storage medium for detecting power consumption of an application
US11914441B2 (en) Systems and methods for power outage protection of storage device
CN103200318B (en) The power-saving method of mobile terminal and mobile terminal
US20090171601A1 (en) Battery detection device and method thereof
CN107948798B (en) Charging box, wireless device and wireless earphone
US20230228820A1 (en) Battery capacity display method and device, electronic equipment and storage medium
CN110572868B (en) Method and device for reducing power consumption of electronic device
CN109217409B (en) Charging method and device and electronic equipment
CN105528171A (en) Method and system for quickly starting application of intelligent terminal, and intelligent terminal
CN105468370A (en) Method and system for quickly removing message in notification bar of mobile terminal and mobile terminal
CN105739686A (en) Control method and device of mobile terminal
CN106303096B (en) Electronic equipment and method for adjusting power management strategy thereof
CN112378331B (en) Electronic device, battery deformation detection method, and readable storage medium
US20130219209A1 (en) Electronic device with an overclocking mode and method
CN105721671A (en) Portable terminal sleeping method of mis-awakening and portable terminal
CN104869617A (en) Terminal control method
CN116494896A (en) Vehicle dormancy wakeup control method, electronic equipment and vehicle
US20160147630A1 (en) Method and system of detecting abnormal power consumption
CN109933419B (en) Control method and device
CN108646909B (en) Information processing method, device, mobile terminal and computer readable storage medium
CN103853981A (en) Method and device for finding out background networking and power consumption rogue software
CN111836347A (en) Electric quantity display method, device and equipment and readable storage medium
US20140019790A1 (en) Monitoring a battery in an electronic device
CN107222612A (en) The background application method for closing and device of a kind of mobile terminal

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211013

Address after: 271000 high end talent entrepreneurship base in the middle of Nantianmen street, high tech Zone, Tai'an City, Shandong Province

Patentee after: Taian Zhongquan Information Technology Co.,Ltd.

Address before: 6 / F, No.5, Lane 999, Yangfan Road, high tech Zone, Ningbo, Zhejiang 315100

Patentee before: TCL COMMUNICATION (NINGBO) Co.,Ltd.

Effective date of registration: 20211013

Address after: 271000 China Taishan high-end talent entrepreneurship base in the middle of Nantianmen street, development zone, Tai'an City, Shandong Province

Patentee after: Taian Taishan Technology Co.,Ltd.

Address before: 271000 high end talent entrepreneurship base in the middle of Nantianmen street, high tech Zone, Tai'an City, Shandong Province

Patentee before: Taian Zhongquan Information Technology Co.,Ltd.