CN111459755A - Log file output control method and device based on EMMC life value - Google Patents
Log file output control method and device based on EMMC life value Download PDFInfo
- Publication number
- CN111459755A CN111459755A CN202010229215.6A CN202010229215A CN111459755A CN 111459755 A CN111459755 A CN 111459755A CN 202010229215 A CN202010229215 A CN 202010229215A CN 111459755 A CN111459755 A CN 111459755A
- Authority
- CN
- China
- Prior art keywords
- log file
- starting
- value
- outputting
- level
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3034—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses a log file output control method and device based on an EMMC life value, which comprises the steps of obtaining starting-up running time X; judging whether the starting-up running time X is in a control interval Y; if the starting-up running time X is not in the control interval Y and is smaller than the minimum value of the control interval Y, outputting a factory-level log file; if the starting-up operation time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up operation time X; and if the starting-up running time X is not in the control interval Y and is greater than the maximum value of the control interval Y, not outputting the log file. According to the method and the device, the problem that the service life of the EMMC is too fast due to the fact that a large amount of redundant log information is written into the memory is solved by correspondingly adopting log output schemes with different control levels in different stages of system use.
Description
Technical Field
The application relates to the technical field of computers, in particular to a log file output control method and device based on an EMMC life value.
Background
The service life of an EMMC (embedded Multi Media card) memory can be represented by the erasing times, when the erasing times limit is reached, the error rate of file writing is greatly improved, and the increase of the error rate of a software system easily causes system abnormity. The EMMC module is usually fixed on a circuit board in a welding mode and cannot be disassembled and replaced, so that how to control the erasing frequency plays a critical role in prolonging the service life of the EMMC.
In software systems such as mobile phones and televisions, log files for monitoring the system are often written into a user during the use process for positioning subsequent problems of product delivery, so that the problems can be quickly positioned through the log files under the condition that the system has errors. Because a software system has more problems in the initial stage of coming into the market and correspondingly needs more comprehensive log file positioning, the log file output method set by the product when leaving the factory generally relates to more log file types and more log file quantities, however, when the system comes into the market for a certain time, the system tends to be stable, and at the moment, the service life of the EMMC is unnecessarily prolonged by frequently writing excessive logs and erasing and writing storage areas.
Disclosure of Invention
The application provides a log file output control method based on an EMMC life value, which aims to solve the problems in the prior art.
In a first aspect, the present application provides a log file output control method based on an EMMC lifetime value, including:
acquiring the starting-up running time X;
judging whether the starting-up running time X is in a control interval Y; the control interval Y is a set of operation time lengths M1-M2, and M2 is greater than M1;
if the starting-up running time X is not in the control interval Y and is smaller than the minimum value of the control interval Y, outputting a factory-level log file;
if the starting-up operation time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up operation time X;
and if the starting-up running time X is not in the control interval Y and is greater than the maximum value of the control interval Y, not outputting the log file.
In some embodiments, the step of outputting the log file of the level corresponding to the boot runtime X includes:
reading a life value N corresponding to the starting operation time X in a predefined chip life value table, wherein the value range of the life value N is (N)min,Nmax);
The value interval of the service life value N is (N)min,Nmax) Dividing into i cell intervals Q; wherein the ith cell interval QiHas a range of (N)1,Ni+1) I is an integer greater than 0, N1=Nmin;
When the life value N is located in the small region Q1Outputting a log file of a factory level;
when the life value N is located in the small region QiThe output ratio is located between cells Qi-1One level lower log file.
In some embodiments, the step of obtaining the boot runtime X includes:
and acquiring the starting-up running time X once every preset time interval.
In some embodiments, the method further comprises:
respectively acquiring the operation time Xa and Xb of the previous time and the current time of starting the computer and the corresponding life value Na and Nb;
judging whether Na and Nb are positioned in the same inter-cell Q;
if the Na and the Nb are positioned in the same cell Q, outputting a log file with the same level as the previous time;
and if the Na and the Nb are positioned in different cell Q, acquiring the number P of the cells between the cells Q where the Na and the Nb are positioned, and outputting a log file with P +1 levels lower than the previous output level.
In some embodiments, the step of outputting the log file of the level corresponding to the boot runtime X includes:
determining a log file of a level corresponding to the starting-up running time X;
detecting whether the system is upgraded by OTA;
and if the system is upgraded by OTA, outputting a log file with a level higher than the level corresponding to the starting up running time X.
In a second aspect, the present application further provides a log file output control device based on an EMMC lifetime value, including:
the monitoring unit is used for acquiring the starting-up running time X;
the log output unit is used for judging whether the starting-up running time X is positioned in a control interval Y; the control interval Y is a set of operation time lengths M1-M2, and M2 is greater than M1;
if the starting-up running time X is not in the control interval Y and is smaller than the minimum value of the control interval Y, outputting a factory-level log file;
if the starting-up operation time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up operation time X;
and if the starting-up running time X is not in the control interval Y and is greater than the maximum value of the control interval Y, not outputting the log file.
In some embodiments, the log output unit includes:
a reading subunit, configured to read a lifetime value N corresponding to the startup operation time X in a predefined chip lifetime value table, where a value range of the lifetime value N is (N)min,Nmax);
A dividing subunit, which is used for dividing the value interval of the service life value N into (N)min,Nmax) Dividing into i cell intervals Q; wherein the ith cell interval QiHas a range of (N)i-1,Ni) I is an integer greater than 1, N1=Nmin;
An output subunit for outputting the service life value N when it is in the cell interval Q1Outputting a log file of a factory level; when the life value N is located in the small region QiThe output ratio is located between cells Qi-1One level lower log file.
In some embodiments, the apparatus further comprises:
and the timing unit is used for acquiring the starting-up running time X once every preset time interval.
In some embodiments, the monitoring unit is further configured to obtain previous and current boot operation times Xa and Xb, and corresponding life values Na and Nb, respectively;
the log output unit is further configured to determine whether Na and Nb are located in the same inter-cell Q;
if the Na and the Nb are positioned in the same cell Q, outputting a log file with the same level as the previous time;
and if the Na and the Nb are positioned in different cell Q, acquiring the number P of the cells between the cells Q where the Na and the Nb are positioned, and outputting a log file with P +1 levels lower than the previous output level.
In some embodiments, the apparatus further comprises:
the OTA detection unit is used for detecting whether the system is upgraded by OTA;
and if the system is upgraded by OTA, outputting a log file with a level higher than the level corresponding to the starting up running time X.
According to the log file output control method based on the EMMC life value, the problem that the EMMC life loss is too fast due to the fact that redundant log information is written into a large amount of memories is solved by correspondingly adopting log output schemes of different control levels at different stages of system use.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is an application scenario diagram of the method provided in the present application;
FIG. 2 is a flowchart of a log file output control method based on EMMC lifetime value according to the present application;
FIG. 3 is an exploded flowchart of one embodiment of step S230 of the method of FIG. 2;
FIG. 4 is an exploded flow diagram of another embodiment of step S100 of the method of FIG. 2;
FIG. 5 is a flowchart illustrating a log file output control method based on EMMC lifetime values according to another embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating a log file output control method based on EMMC lifetime values according to another embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of a log file output control device based on an EMMC life value according to the present application;
FIG. 8 is a diagram showing a configuration of a log output unit in the apparatus shown in FIG. 7 in one embodiment;
fig. 9 is a schematic structural diagram of another embodiment of a log file output control device based on an EMMC lifetime value according to the present application;
fig. 10 is a schematic structural diagram of another embodiment of a log file output control device based on an EMMC lifetime value according to the present application.
Detailed Description
Because the log file is used for monitoring the system, the problem can be quickly positioned through the log file under the condition that the system has errors, but the system of the general consumer electronic products such as televisions, mobile phones and the like has more problems at the beginning of the market, and the log file positioning is more needed, and after the system is on the market for a period of time (for example, two years), the system is relatively stable, the use frequency of the log file is reduced, and at the moment, if the log file is written frequently, the service life of an EMMC memory is wasted. Therefore, in the application, a control method for controlling the log level according to the service life value of the memory is added to a program for outputting the system log, so that the control of all the system logs and the application logs is realized.
Referring to fig. 1, in an application scenario diagram of the method provided by the present application, a CPU100 and an EMMC200 are two functional modules respectively disposed in an intelligent device, and when the method is used, a monitor in the CPU100 reads a lifetime value of the EMMC200, and feeds the lifetime value back to a log output unit, and the log output unit performs a judgment according to the lifetime value and correspondingly outputs write data to the EMMC 200.
Example one
Referring to fig. 2, a flowchart of a log file output control method based on an EMMC lifetime value according to the present application is shown.
As can be seen from fig. 2, the log file output control method based on the EMMC lifetime value provided in the embodiment of the present application includes:
s100: acquiring the starting-up running time X; in this embodiment, the boot running time X is the total boot running time of the system recording device, this step can be generally completed by using a module having a monitoring function, and the usage of the device can be known and the loss of the lifetime of the EMMC can be obtained through the boot running time X.
S200: judging whether the starting-up running time X is in a control interval Y; the control interval Y is a set of operation time lengths M1-M2, and M2 is greater than M1; in the present embodiment, the control interval Y is set as a time range set, and the two endpoints M1 and M2 of the range set have the following meanings: for example, M1 may be set to one year, M2 to 5 years; namely when the starting-up running time X is obtained, if the value of X is not more than one year, the system can be considered to be in an unstable state when the electronic product is just delivered soon after the delivery time is short; correspondingly, if the value of X is more than 5 years, the system is considered to be basically stable after 5 years of operation; that is, according to the obtained boot operation time X, whether the system is in a stable state can be generally obtained, and then different log file outputs are correspondingly set according to different system states.
S210: if the starting-up running time X is not in the control interval Y and is smaller than the minimum value of the control interval Y, outputting a factory-level log file; at this time, since the system is in a state immediately before factory shipment, which indicates that the system is weak in stability, it is necessary to define a log file of a higher level, and in this embodiment, the log file of the factory shipment level is a log file of the highest definition level, and the highest level means: the types, the number and the sizes of the log files are the most; that is, when the product is shipped within a certain time range (ranging from shipping time 0 to M1), the log file output defined at the highest level is needed to solve the problem caused by low system stability.
S220: if the starting-up running time X is not in the control interval Y and is larger than the maximum value of the control interval Y, no log file is output; at this time, as the system leaves the factory for a long time, the stability of the system can be considered to be high, and the log file is basically not required to be output for analysis, so that only a small part (or the lowest level) of the log file can be output, and even the log file is stopped to be output; that is, after a certain period of time (M2) has elapsed after the product is shipped from the factory, the consumption of the service life of the EMMC memory by writing the log file can be reduced by reducing the output of the log file or stopping the output of the log file.
S230: if the starting-up operation time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up operation time X; in this embodiment, another function of the set control interval Y is that in this time range, the control interval can be set to a plurality of different log file output levels according to actual requirements, that is, a specific log file is output correspondingly in different time periods, so that the number of times of erasing and writing is not increased too much, and the problem existing in the system can be reflected really.
For the log file output levels in this embodiment, corresponding quantity setting and degree setting may be performed according to actual conditions, where the quantity setting refers to setting several levels, such as two levels, three levels, four levels, and the like; the level setting means that different levels are distinguished according to the number, type, importance degree, etc. of output log files, and the log file of the factory level, as described above, should be regarded as the output level with the highest level and the highest degree.
In some embodiments, the definition of each output level can be as shown in the following table, and the number of levels and the type of log file can be designed into other possible types, which is not limited herein.
Rank of | Quantity setting | Level setting |
Debug | A plurality of | Outputting debug information to a debugging application |
Info | Multiple purpose | Outputting prompt information in application running process |
Warning | In | Outputting potentially erroneous information |
Error | Chinese character shao (a Chinese character of 'shao') | Outputting error information without affecting system continuous operation |
Fatal | Is rarely used | Outputting system serious error event information |
OFF | Is free of | Is free of |
In the above table, the log files are divided into six different levels, and the levels are sequentially decreased from top to bottom, and the log files of the factory level can be usually set at debug level or info level, so that a higher feedback effect can be obtained; while the last two levels, the far level and the OFF level, output little or no log files, may generally be set to log output levels after M2 for boot runtime X.
Specifically, as can be seen from fig. 3, the sub-steps of step S230 when executing log output control at different levels are:
s231: reading a life value N corresponding to the starting operation time X in a predefined chip life value table, wherein the value range of the life value N is (N)min,Nmax) (ii) a In this embodiment, step S231 is substantially a process of "rounding" the boot running time X, and specifically, since the boot running time is collected in real time, and is not necessarily a whole ten and a whole hundred of numbers no matter the collection unit is hour, day, week, month, etc., a relationship between the boot running time X and the chip life value is established by establishing a chip life value table, so that the boot running time obtained in real time can be converted into a specific numerical value or a grade identifier capable of indicating the chip life; for example, in one possible embodiment described below, the chip life value table may be established as:
life value | Loss of life condition |
0x00 | Without loss |
0x01 | 0% to 10 |
0x02 | |
10%-20% loss | |
0x03 | 20% -30 |
0x04 | |
30% -40% loss | |
0x05 | 40% -50% loss |
0x06 | 50% -60% loss |
0x07 | 60% -70% loss |
0x08 | 70% -80% loss |
0x09 | 80% -90% loss |
0x0A | 90% -100 |
0x0B | |
100% loss |
Wherein the life value of "0 x 04" indicates that the life loss is between 30% and 40%, and the loss can be calculated by the boot-up operation time and the expected total life of the product. It should be noted that the above is only an example of the chip life value table, the value code of the life value may be other combined identifiers such as numbers and letters, and the loss data range identified by each life value code may also be the rootAnd (5) formulating according to actual requirements. In addition, the value range (N)min,Nmax) According to a particular setting, e.g. N in the above examplemin=0x00,Nmax=0x0B。
S232: the value interval of the service life value N is (N)min,Nmax) Dividing into i cell intervals Q; wherein the ith cell interval QiHas a range of (N)i,Ni+1) I is an integer greater than 0, N1=Nmin;
For example, when i is 5, the value is in the interval (N)min,Nmax) Will be divided into five adjacent inter-cell Q1(N1,N2)、Q2(N2,N3)、Q3(N3,N4)、Q4(N4,N5)、Q5(N5,N6) The five cell intervals can respectively correspond to different levels (debug, info, warning, error, fatal) of the aforementioned settings, and are used for completing the judgment processes of the five levels.
S233: when the life value N is located in the small region Q1Outputting a log file of a factory level; when the life value N is at the leftmost cell interval Q1However, even though the system is in a state of being just shipped from the factory and is shifted to a normal use state, problems still occur, and therefore, in order to ensure effective positioning problems, a higher log file output level, such as the above-mentioned debug level or info level, still needs to be adopted.
S234: when the life value N is located in the small region QiThe output ratio is located between cells Qi-1A log file one level lower in time; when the log file is set between the cells, the log file is set to be in a descending level, in the adjacent cells, the level of the log file output between the cells arranged close to the right side is lower than that of the log file output between the cells arranged close to the left side, and therefore after the cells arranged on the leftmost side are set to be in a factory-leaving level, the log output level is sequentially reduced between the cells towards the right side.
Therefore, after the startup operation time is actually obtained, the corresponding log output level can be correspondingly obtained according to the condition that the obtained service life value N is positioned between the cells. For the same system, in terms of time, as long as the change between cells occurs in the using process of the system, the new log file output rule can be changed, and therefore the lowest service life loss can be kept in each using stage.
As can be seen from fig. 4, in some embodiments, the method of the present application further includes:
s110: acquiring startup running time X every preset time interval;
in order to enable the system to adjust the control output of the log file in time, the method in the foregoing implementation may be executed multiple times to detect the system state in real time, for example, the step of obtaining the boot running time X may be executed every other day, or may be adjusted according to the type and the use frequency of the system, for example, the mobile phone may be used almost every day, and may be executed every day, while some devices that are not commonly used may be set to perform the obtaining process once a week or half a month.
According to the technical scheme, the log file output control method based on the EMMC life value comprises the steps of obtaining starting-up running time X; judging whether the starting-up running time X is in a control interval Y; if the starting-up running time X is not in the control interval Y and is smaller than the minimum value of the control interval Y, outputting a factory-level log file; if the starting-up operation time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up operation time X; and if the starting-up running time X is not in the control interval Y and is greater than the maximum value of the control interval Y, not outputting the log file. According to the method and the device, the problem that the service life of the EMMC is too fast due to the fact that a large amount of redundant log information is written into the memory is solved by correspondingly adopting log output schemes with different control levels in different stages of system use.
Example two
Referring to fig. 5, a flowchart of a log file output control method based on an EMMC lifetime value according to another embodiment of the present application is shown; the difference between this embodiment and the first embodiment is that the method further includes:
s101: respectively acquiring the operation time Xa and Xb of the previous time and the current time of starting the computer; as can be seen from the foregoing description, since the preset interval duration can be set to ensure that the life state of the system is monitored in real time, when the current output control method is executed, the current result can be referred to by using the previous execution result, and therefore, in this embodiment, the latest two boot operation times can be obtained at the same time to quickly obtain the current control result.
S321': reading the life values Na and Nb corresponding to the starting-up operation times Xa and Xb in a predefined chip life value table;
s235: judging whether Na and Nb are positioned in the same inter-cell Q; because the previous process is finished, the Na value and the situation between the cells at the previous time are easy to obtain, and at the moment, the log output control result corresponding to the Nb value can be quickly obtained only by judging the relationship between the Nb value and the Na value at the current time.
S236: if Na and Nb are positioned in the same cell Q, the system does not change greatly within the preset interval duration, the output level of the log file is not required to be modified, and the log file with the same level as the previous log file is output;
s237: if Na and Nb are located in different cells Q, the state of the system is changed, and the change may cause the Na and Nb to be located in adjacent or nonadjacent cells, at this time, the number P of the cells between the Na and Nb cells Q needs to be obtained first, and the difference between the Na and Nb cells Q is determined to be several levels; and outputting the log files with P +1 levels lower than the previous output level according to the P value.
According to the technical scheme, the scheme provided by the embodiment can deduce the current control result according to the historical data and the relation between the current data and the historical data, and is more convenient and quicker.
EXAMPLE III
Referring to fig. 6, a flowchart of a log file output control method based on an EMMC lifetime value according to another embodiment of the present application is shown; the difference between the present embodiment and the first and second embodiments is that step S230 specifically includes:
s2301: determining a log file of a level corresponding to the starting-up running time X; the specific process of this step may refer to the steps before outputting each level of log file in the above first and second embodiments, and will not be described herein again.
S2302: detecting whether the system is upgraded by OTA; the OTA (Over-the-Air technology) refers to a standard software upgrading mode provided by an Android system, can upgrade the system without loss, and mainly adopts the steps of automatically downloading an OTA upgrading packet and automatically upgrading through a network (including WIFI and 3G), is not limited, and also supports the upgrading from downloading the OTA upgrading packet to an SD card. After the OTA upgrade is deployed, a general manufacturer may have various feedbacks for a certain period of time, and if there is a new version, a new problem may be caused. It should be noted that, if the system is not upgraded by OTA, the log file determined in S2301 is output.
S2303: if the system is upgraded by OTA, outputting a log file with a level higher than the level corresponding to the starting-up running time X; it should be noted that the detection of the OTA upgrade in step S2302 and the level up output log file in step S2303 are performed within a set time range, that is, if the time duration is greater than the set time range (or the time range for the OTA upgrade to last) in the next detection after a preset time interval, the time duration is considered not to be within the range affected by the OTA upgrade, and therefore, the above "level up" operation is not required.
According to the technical scheme, the method and the device can be suitable for OTA upgrading and other special conditions, and effective execution of a certain function is guaranteed by adopting a necessary upgrading means.
Example four
Fig. 7 is a schematic structural diagram of a log file output control device based on an EMMC lifetime value according to the present application;
as can be seen from fig. 7, the present application also provides an apparatus fully corresponding to the above method, including:
the monitoring unit 10 is used for acquiring the starting-up running time X;
the log output unit 20 is configured to determine whether the boot operation time X is within a control interval Y; the control interval Y is a set of operation time lengths M1-M2, and M2 is greater than M1;
if the starting-up running time X is not in the control interval Y and is smaller than the minimum value of the control interval Y, outputting a factory-level log file;
if the starting-up operation time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up operation time X;
and if the starting-up running time X is not in the control interval Y and is greater than the maximum value of the control interval Y, not outputting the log file.
As can be seen from fig. 8, in some embodiments, the log output unit 20 includes:
a reading subunit 21, configured to read a lifetime value N corresponding to the boot operation time X from a predefined chip lifetime value table, where a value interval of the lifetime value N is (N)min,Nmax);
A dividing unit 22 for dividing the life value N into a value interval of (N)min,Nmax) Dividing into i cell intervals Q; wherein the ith cell interval QiHas a range of (N)i-1,Ni) I is an integer greater than 1, N1=Nmin;
An output subunit 23, configured to output the lifetime value N when the lifetime value N is within the cell interval Q1Outputting a log file of a factory level; when the life value N is located in the small region QiThe output ratio is located between cells Qi-1One level lower log file.
As can be seen in fig. 9, in some embodiments, the apparatus further comprises:
the timing unit 30 is configured to obtain a boot operation time X every preset time interval.
In some embodiments, the monitoring unit 10 is further configured to obtain previous and current boot operation times Xa and Xb, and corresponding life values Na and Nb;
the log output unit 20 is further configured to determine whether Na and Nb are located in the same inter-cell Q;
if the Na and the Nb are positioned in the same cell Q, outputting a log file with the same level as the previous time;
and if the Na and the Nb are positioned in different cell Q, acquiring the number P of the cells between the cells Q where the Na and the Nb are positioned, and outputting a log file with P +1 levels lower than the previous output level.
As can be seen in fig. 10, in some embodiments, the apparatus further comprises:
an OTA detection unit 40, configured to detect whether the system is subjected to OTA upgrade;
and if the system is upgraded by OTA, outputting a log file with a level higher than the level corresponding to the starting up running time X.
The device provided by the present application completely corresponds to the methods in the foregoing embodiments, and for each description of the device, reference is made to the description in the foregoing methods, which is not described herein again.
Those skilled in the art will recognize that in one or more of the examples described above, the functions described herein may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-mentioned embodiments, objects, technical solutions and advantages of the present application are further described in detail, it should be understood that the above-mentioned embodiments are only examples of the present application, and are not intended to limit the scope of the present application, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present application should be included in the scope of the present application.
Claims (10)
1. A log file output control method based on an EMMC life value is characterized by comprising the following steps:
acquiring the starting-up running time X;
judging whether the starting-up running time X is in a control interval Y; the control interval Y is a set of operation time lengths M1-M2, and M2 is greater than M1;
if the starting-up running time X is not in the control interval Y and is smaller than the minimum value of the control interval Y, outputting a factory-level log file;
if the starting-up operation time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up operation time X;
and if the starting-up running time X is not in the control interval Y and is greater than the maximum value of the control interval Y, not outputting the log file.
2. The EMMC lifetime value-based log file output control method as claimed in claim 1, wherein said step of outputting the log file of the level corresponding to said boot-up runtime X comprises:
reading a life value N corresponding to the starting operation time X in a predefined chip life value table, wherein the value range of the life value N is (N)min,Nmax);
The value interval of the service life value N is (N)min,Nmax) Dividing into i cell intervals Q; wherein the ith cell interval QiHas a range of (N)1,Ni+1) I is an integer greater than 0, N1=Nmin;
When the life value N is located in the small region Q1Outputting a log file of a factory level;
when the life value N is located in the small region QiThe output ratio is located between cells Qi-1One level lower log file.
3. The EMMC life value-based log file output control method as claimed in claim 2, wherein the step of obtaining the boot-up running time X comprises:
and acquiring the starting-up running time X once every preset time interval.
4. The EMMC lifetime value-based log file output control method as recited in claim 3, further comprising:
respectively acquiring the operation time Xa and Xb of the previous time and the current time of starting the computer and the corresponding life value Na and Nb;
judging whether Na and Nb are positioned in the same inter-cell Q;
if the Na and the Nb are positioned in the same cell Q, outputting a log file with the same level as the previous time;
and if the Na and the Nb are positioned in different cell Q, acquiring the number P of the cells between the cells Q where the Na and the Nb are positioned, and outputting a log file with P +1 levels lower than the previous output level.
5. The EMMC lifetime value-based log file output control method according to any one of claims 1 to 4, wherein the step of outputting the log file of the level corresponding to the boot-up runtime X comprises:
determining a log file of a level corresponding to the starting-up running time X;
detecting whether the system is upgraded by OTA;
and if the system is upgraded by OTA, outputting a log file with a level higher than the level corresponding to the starting up running time X.
6. An EMMC lifetime value-based log file output control apparatus, comprising:
the monitoring unit is used for acquiring the starting-up running time X;
the log output unit is used for judging whether the starting-up running time X is positioned in a control interval Y; the control interval Y is a set of operation time lengths M1-M2, and M2 is greater than M1;
if the starting-up running time X is not in the control interval Y and is smaller than the minimum value of the control interval Y, outputting a factory-level log file;
if the starting-up operation time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up operation time X;
and if the starting-up running time X is not in the control interval Y and is greater than the maximum value of the control interval Y, not outputting the log file.
7. The EMMC lifetime value-based log file output control apparatus as claimed in claim 6, wherein said log output unit comprises:
a reading subunit, configured to read a lifetime value N corresponding to the startup operation time X in a predefined chip lifetime value table, where a value range of the lifetime value N is (N)min,Nmax);
A dividing subunit, which is used for dividing the value interval of the service life value N into (N)min,Nmax) Dividing into i cell intervals Q; wherein the ith cell interval QiHas a range of (N)i-1,Ni) I is an integer greater than 1, N1=Nmin;
An output subunit for outputting the service life value N when it is in the cell interval Q1Outputting a log file of a factory level; when the life value N is located in the small region QiThe output ratio is located between cells Qi-1One level lower log file.
8. The EMMC lifetime value-based log file output control apparatus of claim 7, wherein said apparatus further comprises:
and the timing unit is used for acquiring the starting-up running time X once every preset time interval.
9. The EMMC lifetime value-based log file output control apparatus as claimed in claim 8,
the monitoring unit is further used for respectively acquiring the previous starting operation time Xa and Xb and the corresponding service life values Na and Nb;
the log output unit is further configured to determine whether Na and Nb are located in the same inter-cell Q;
if the Na and the Nb are positioned in the same cell Q, outputting a log file with the same level as the previous time;
and if the Na and the Nb are positioned in different cell Q, acquiring the number P of the cells between the cells Q where the Na and the Nb are positioned, and outputting a log file with P +1 levels lower than the previous output level.
10. The apparatus according to any one of claims 6 to 9, wherein the apparatus further comprises:
the OTA detection unit is used for detecting whether the system is upgraded by OTA;
and if the system is upgraded by OTA, outputting a log file with a level higher than the level corresponding to the starting up running time X.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010229215.6A CN111459755B (en) | 2020-03-27 | 2020-03-27 | Log file output control method and device based on EMMC life value |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010229215.6A CN111459755B (en) | 2020-03-27 | 2020-03-27 | Log file output control method and device based on EMMC life value |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111459755A true CN111459755A (en) | 2020-07-28 |
CN111459755B CN111459755B (en) | 2023-05-05 |
Family
ID=71684991
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010229215.6A Active CN111459755B (en) | 2020-03-27 | 2020-03-27 | Log file output control method and device based on EMMC life value |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111459755B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112100043A (en) * | 2020-08-28 | 2020-12-18 | 珠海格力电器股份有限公司 | Method and device for adjusting log level of equipment, storage medium and electronic device |
CN113448818A (en) * | 2021-07-01 | 2021-09-28 | 山东浪潮通软信息科技有限公司 | Log tracking method, device and medium based on probability |
CN116405726A (en) * | 2023-06-05 | 2023-07-07 | 深圳市华曦达科技股份有限公司 | Data storage control method, system and readable storage medium based on EMMC abrasion degree |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08147195A (en) * | 1994-11-16 | 1996-06-07 | Oki Electric Ind Co Ltd | Fault detecting/recording device |
US5898863A (en) * | 1997-06-03 | 1999-04-27 | Emc Corporation | Method and apparatus for determining I/O size distribution of an input/output system and its use for load simulation |
US20020026589A1 (en) * | 2000-08-08 | 2002-02-28 | Mikio Fukasawa | Computer monitoring system |
JP2004072403A (en) * | 2002-08-06 | 2004-03-04 | Mitsubishi Electric Corp | Streaming viewing operation analyzer and advertisement inserting position determination device based on the analysis result |
US20090077557A1 (en) * | 2007-09-19 | 2009-03-19 | Naoko Ichikawa | Method and computer for supporting construction of backup configuration |
JP2009110156A (en) * | 2007-10-29 | 2009-05-21 | Sharp Corp | Log output device and log output program |
CN101464908A (en) * | 2009-01-14 | 2009-06-24 | 北京北方微电子基地设备工艺研究中心有限责任公司 | Log recording method and device |
US9026765B1 (en) * | 2012-09-11 | 2015-05-05 | Emc Corporation | Performing write operations in a multi-tiered storage environment |
US20150133076A1 (en) * | 2012-11-11 | 2015-05-14 | Michael Brough | Mobile device application monitoring software |
US20150281015A1 (en) * | 2014-03-26 | 2015-10-01 | International Business Machines Corporation | Predicting hardware failures in a server |
CN105260452A (en) * | 2015-10-12 | 2016-01-20 | 成都视达科信息技术有限公司 | System and method for collecting, searching, and analyzing offline log |
US9369355B1 (en) * | 2013-03-15 | 2016-06-14 | Google Inc. | Consumption time estimation for online media items with jittered event log schedules |
CN106200518A (en) * | 2015-04-29 | 2016-12-07 | 中国科学院电工研究所 | A kind of frequency self-adaption method of electric-vehicle remote monitoring system |
CN106775885A (en) * | 2016-12-26 | 2017-05-31 | 中国建设银行股份有限公司 | A kind of daily record output control method and system and bank management system |
CN108897663A (en) * | 2018-06-19 | 2018-11-27 | 新华三技术有限公司 | log output control method and device |
CN109446023A (en) * | 2018-10-12 | 2019-03-08 | 上海东土远景工业科技有限公司 | A kind of determination method, apparatus, equipment and the storage medium of data collection cycle |
-
2020
- 2020-03-27 CN CN202010229215.6A patent/CN111459755B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08147195A (en) * | 1994-11-16 | 1996-06-07 | Oki Electric Ind Co Ltd | Fault detecting/recording device |
US5898863A (en) * | 1997-06-03 | 1999-04-27 | Emc Corporation | Method and apparatus for determining I/O size distribution of an input/output system and its use for load simulation |
US20020026589A1 (en) * | 2000-08-08 | 2002-02-28 | Mikio Fukasawa | Computer monitoring system |
JP2004072403A (en) * | 2002-08-06 | 2004-03-04 | Mitsubishi Electric Corp | Streaming viewing operation analyzer and advertisement inserting position determination device based on the analysis result |
US20090077557A1 (en) * | 2007-09-19 | 2009-03-19 | Naoko Ichikawa | Method and computer for supporting construction of backup configuration |
JP2009110156A (en) * | 2007-10-29 | 2009-05-21 | Sharp Corp | Log output device and log output program |
CN101464908A (en) * | 2009-01-14 | 2009-06-24 | 北京北方微电子基地设备工艺研究中心有限责任公司 | Log recording method and device |
US9026765B1 (en) * | 2012-09-11 | 2015-05-05 | Emc Corporation | Performing write operations in a multi-tiered storage environment |
US20150133076A1 (en) * | 2012-11-11 | 2015-05-14 | Michael Brough | Mobile device application monitoring software |
US9369355B1 (en) * | 2013-03-15 | 2016-06-14 | Google Inc. | Consumption time estimation for online media items with jittered event log schedules |
US20150281015A1 (en) * | 2014-03-26 | 2015-10-01 | International Business Machines Corporation | Predicting hardware failures in a server |
CN106200518A (en) * | 2015-04-29 | 2016-12-07 | 中国科学院电工研究所 | A kind of frequency self-adaption method of electric-vehicle remote monitoring system |
CN105260452A (en) * | 2015-10-12 | 2016-01-20 | 成都视达科信息技术有限公司 | System and method for collecting, searching, and analyzing offline log |
CN106775885A (en) * | 2016-12-26 | 2017-05-31 | 中国建设银行股份有限公司 | A kind of daily record output control method and system and bank management system |
CN108897663A (en) * | 2018-06-19 | 2018-11-27 | 新华三技术有限公司 | log output control method and device |
CN109446023A (en) * | 2018-10-12 | 2019-03-08 | 上海东土远景工业科技有限公司 | A kind of determination method, apparatus, equipment and the storage medium of data collection cycle |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112100043A (en) * | 2020-08-28 | 2020-12-18 | 珠海格力电器股份有限公司 | Method and device for adjusting log level of equipment, storage medium and electronic device |
CN113448818A (en) * | 2021-07-01 | 2021-09-28 | 山东浪潮通软信息科技有限公司 | Log tracking method, device and medium based on probability |
CN116405726A (en) * | 2023-06-05 | 2023-07-07 | 深圳市华曦达科技股份有限公司 | Data storage control method, system and readable storage medium based on EMMC abrasion degree |
CN116405726B (en) * | 2023-06-05 | 2023-10-20 | 深圳市华曦达科技股份有限公司 | Data storage control method, system and readable storage medium based on EMMC abrasion degree |
Also Published As
Publication number | Publication date |
---|---|
CN111459755B (en) | 2023-05-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111459755A (en) | Log file output control method and device based on EMMC life value | |
US11977744B2 (en) | Memory anomaly processing method and system, electronic device, and storage medium | |
US8402204B2 (en) | Methods for measuring usable lifespan and replacing an in-system programming code of a memory device, and data storage system using the same | |
US8549277B2 (en) | Server system including diplexer | |
CN102890657A (en) | Method for reducing data read-write errors of EEPROM (electrically erasable programmable read-only memory) | |
CN114003538B (en) | Identification method of intelligent network card and intelligent network card | |
US8234526B2 (en) | Computer system and monitoring device | |
EP3262508A1 (en) | Patrol scrub periods based on power status | |
CN103378986A (en) | System event log recording system and method | |
TWI596612B (en) | Memory management method, memory control circuit unit, and memory storage apparatus | |
CN107220056A (en) | A kind of method of automatic load server BIOS parameters | |
CN103914358A (en) | Flash memory rereading method and device | |
WO2020192669A1 (en) | Gas meter intelligent controller and firmware upgrade start-up method therefor | |
CN111836347A (en) | Electric quantity display method, device and equipment and readable storage medium | |
CN105700656B (en) | Standby abnormal power consumption detection system and method | |
CN116072202A (en) | Storage device management method, system and storage medium | |
WO2019227769A1 (en) | Method and apparatus for controlling storage device, and electronic device | |
CN109388217B (en) | Method, device and system for determining duration of unpowered hard disk | |
CN110442387B (en) | Parameter self-adaption method and device of vehicle-mounted system and vehicle | |
CN112162880A (en) | Method and device for acquiring module correction coefficient applied to LED screen | |
US9081659B2 (en) | Controlling method for connector, connector and memory storage device | |
CN114327288B (en) | Method and device for predicting use time of SSD (solid State disk) residual user, computer equipment and storage medium | |
CN116361094B (en) | Method and device for automatically recording service time of burn-in board and electronic equipment | |
CN101105974A (en) | Non-volatile memory device and control method thereof | |
CN106873901B (en) | Memory management method, memory control circuit unit and memory storage device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |