CN111459755B - 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 PDF

Info

Publication number
CN111459755B
CN111459755B CN202010229215.6A CN202010229215A CN111459755B CN 111459755 B CN111459755 B CN 111459755B CN 202010229215 A CN202010229215 A CN 202010229215A CN 111459755 B CN111459755 B CN 111459755B
Authority
CN
China
Prior art keywords
level
running time
log file
starting
value
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
CN202010229215.6A
Other languages
Chinese (zh)
Other versions
CN111459755A (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.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology Co 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 Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN202010229215.6A priority Critical patent/CN111459755B/en
Publication of CN111459755A publication Critical patent/CN111459755A/en
Application granted granted Critical
Publication of CN111459755B publication Critical patent/CN111459755B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3034Monitoring 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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, comprising the steps of obtaining starting-up running time X; judging whether the starting-up running time X is positioned in a control interval Y or not; 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 log file of a factory level; if the starting-up running time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up running time X; and 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, not outputting a log file. According to the log output method and device, log output schemes with different control levels are correspondingly adopted at different phases of system use, so that the problem that the service life of the EMMC is too fast due to the fact that a memory writes excessive log information in a large amount is avoided.

Description

Log file output control method and device based on EMMC life value
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a log file output control method and device based on an EMMC lifetime value.
Background
The service life of the EMMC (Embedded Multi Media Card) memory can be expressed by the erasing times, and after the limit of the erasing times is reached, the error rate of file writing can be greatly improved, and the system abnormality is easily caused by the increase of the error rate of a software system. The EMMC module is usually fixed on the circuit board by soldering, and cannot be replaced by disassembling, so how to control the erasing times plays a critical role in prolonging the service life of the EMMC.
In software systems such as mobile phones and televisions, in order to locate the follow-up problems of products when leaving factories, log files for monitoring the system are always written in the use process of users, so that the problems can be quickly located through the log files under the condition of system errors. Because the software system has more problems at the early stage of marketing and correspondingly needs more comprehensive log file positioning, the log file output method which is set by the product when the product leaves the factory usually has more types and numbers of log files, however, the system tends to be stable after being marketed for a certain time, and at the moment, too many logs and erasure memory areas are written frequently, so that the service life of the EMMC is prolonged unnecessarily.
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 starting-up running time X;
judging whether the starting-up running time X is positioned in a control interval Y or not; the control interval Y is a set of operation time periods M1 to M2, and M2 is more 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 log file of a factory level;
if the starting-up running time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up running time X;
and 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, not outputting a log file.
In some embodiments, the step of outputting a log file of a level corresponding to the boot runtime X includes:
reading a life value N corresponding to the starting-up running time X from a predefined chip life value table, wherein the value interval of the life value N is (N) min ,N max );
The life value N is set to be (N) min ,N max ) Dividing the cells into i cells Q; wherein the ith inter-cell Q i The interval range of (2) is (N) 1 ,N i+1 ) I is an integer greater than 0, N 1 =N min
When the life value N is located between cells Q 1 Outputting a log file of a factory level when the factory level is in the factory;
when the life value N is located between cells Q i When the output is located between cells Q i-1 One level lower than the log file.
In some embodiments, the step of obtaining the boot runtime X includes:
and acquiring the startup running time X once every preset time.
In some embodiments, the method further comprises:
acquiring the previous and current starting-up running time Xa, xb and corresponding service life values Na, nb respectively;
judging whether Na and Nb are positioned in the same cell Q or not;
if Na and Nb are positioned in the same cell Q, outputting log files with the same level as the previous log files;
if Na and Nb are located in different cells Q, the number P of the cells between the cells Q where Na and Nb are located is obtained, and log files with the level P+1 lower than the previous output level are output.
In some embodiments, the step of outputting a log file of a 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 subjected to OTA upgrading, outputting a log file of which the level is one level higher than the corresponding level of 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 or not; the control interval Y is a set of operation time periods M1 to M2, and M2 is more 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 log file of a factory level;
if the starting-up running time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up running time X;
and 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, not outputting a log file.
In some embodiments, the log output unit includes:
a reading subunit, configured to read a lifetime value N corresponding to the start-up running time X in a predefined chip lifetime value table, where a lifetime value N takes a value interval of (N min ,N max );
A dividing subunit for dividing the lifetime value N into a value interval (N) min ,N max ) Dividing the cells into i cells Q; wherein the ith inter-cell Q i The interval range of (2) is (N) i-1 ,N i ) I is an integer greater than 1, N 1 =N min
An output subunit for outputting the service life value N when the service life value N is located between the cells Q 1 Outputting a log file of a factory level when the factory level is in the factory; when the life value N is located between cells Q i When the output is located between cells Q i-1 One level lower than the log file.
In some embodiments, the apparatus further comprises:
the timing unit is used for acquiring the startup running time X once every preset time.
In some embodiments, the monitoring unit is further configured to obtain previous and current startup running times Xa and Xb and corresponding lifetime values Na and Nb, respectively;
the log output unit is further used for judging whether Na and Nb are located in the same cell Q or not;
if Na and Nb are positioned in the same cell Q, outputting log files with the same level as the previous log files;
if Na and Nb are located in different cells Q, the number P of the cells between the cells Q where Na and Nb are located is obtained, and log files with the level P+1 lower than the previous output level are output.
In some embodiments, the apparatus further comprises:
the OTA detection unit is used for detecting whether the system is subjected to OTA upgrading;
and if the system is subjected to OTA upgrading, outputting a log file of which the level is one level higher than the corresponding level of the starting-up running time X.
According to the log file output control method based on the EMMC life value, the log output schemes of different control levels are adopted correspondingly at different stages of system use, so that the problem of too fast life loss of the EMMC caused by writing excessive log information into a memory in a large amount is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is an application scenario diagram of the method provided herein;
FIG. 2 is a flow chart of a log file output control method based on EMMC lifetime values;
FIG. 3 is an exploded flow chart of step S230 of the method of FIG. 2 under one embodiment;
FIG. 4 is an exploded flow chart of another embodiment of step S100 in the method of FIG. 2;
FIG. 5 is a flow chart of a log file output control method based on EMMC lifetime values according to another embodiment of the present application;
FIG. 6 is a flow chart of a log file output control method based on EMMC lifetime values according to another embodiment of the present application;
fig. 7 is a schematic structural diagram of a log file output control device based on EMMC lifetime value in the present application;
FIG. 8 is a diagram showing the constitution of the 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 EMMC lifetime value according to the present application;
fig. 10 is a schematic structural diagram of a log file output control device based on an EMMC lifetime value according to another embodiment of the present application.
Detailed Description
Because the log file is used for monitoring the system, so that the problem of quick positioning is realized through the log file under the condition of system errors, and the problems of the system of consumer electronic products such as common televisions or mobile phones are more at the beginning of marketing, the log file positioning is also more needed, and when the system is marketed for a period of time (for example, two years), the system is more stable, the use frequency of the log file is reduced, and the service life of the EMMC memory is further consumed if the log file is written frequently. Therefore, in the application, a control method for controlling the log level according to the memory life value is added into the program for outputting the system log, so that control over all the system and application logs is realized.
Referring to fig. 1, in order to provide an application scenario diagram of the method provided in the present application, a CPU100 and an EMMC200 are two functional modules provided in an intelligent device, respectively, and when in use, a monitor in the CPU100 reads a lifetime value of the EMMC200, and feeds back the lifetime value to a log output unit, and the log output unit determines according to the lifetime value, and correspondingly outputs writing data to the EMMC200.
Example 1
Referring to fig. 2, a flowchart of a log file output control method based on an EMMC lifetime value is provided.
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 starting-up running time X; in this embodiment, the boot operation time X is the total time of the boot operation of the system recording device, and this step can be generally completed by using a module similar to the module with a monitoring function, and through the boot operation time X, the device usage situation can be known, and the life loss situation of the EMMC can also be obtained.
S200: judging whether the starting-up running time X is positioned in a control interval Y or not; the control interval Y is a set of operation time periods M1 to M2, and M2 is more than M1; in this embodiment, the set control interval Y is a time range set, and the meaning of the two endpoints M1, M2 of the range set is that: for example, M1 may be one year and M2 may be 5 years; when the starting-up running time X is obtained, if the value of X is not full of one year, the electronic product can be considered to be in an unstable state just after leaving the factory; correspondingly, if the value of X is greater than 5 years, the system can be considered to be basically stable after 5 years of operation; that is, according to the obtained boot running time X, whether the system is in a stable state can be generally obtained, and further, 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 log file of a factory level; at this time, since the system is in a state just before leaving the factory, it is described that the system stability is weak, and therefore, it is necessary to define a log file of a higher level, in this embodiment, the log file of the factory level is the log file of the highest definition level, and the meaning of the highest level is: the types, the number and the sizes of the log files are the most; that is, in a certain time range (in the range of 0 to M1) after the product leaves the factory, the log file output defined by the highest level is required to solve the problem caused by the 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, not outputting a log file; at this time, since the system leaves the factory longer, it can be considered that the stability of the system is higher, and it is basically unnecessary to output the log file for analysis, so only a small part (or the lowest level) of the log file can be output, even the log file is stopped to be output; that is, when a period of time (M2) has elapsed after shipment of the product, the consumption of the EMMC memory for the lifetime of writing the log file can be reduced by reducing the log file output or stopping the log file output.
S230: if the starting-up running time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up running time X; in this embodiment, another function of the control interval Y is that in this time range, the control interval may be set to a plurality of different log file output levels according to actual requirements, that is, specific log files are correspondingly output in different time periods, so that the number of erasing times is not excessively increased, and the problems existing in the system can be practically reflected.
For the log file output level described in the present embodiment, the corresponding number setting and degree setting may be generally performed according to the actual implementation, where the number setting refers to setting several levels, such as two levels, three levels, four levels, and so on; the level setting means that different levels are distinguished according to the number, kind, importance level, etc. of the output log files, and the log file of the factory level as described above should be regarded as the highest-level output level.
In some embodiments, the definition of the various output levels may be as shown in the following table, and other possible types may be devised for the number of levels and types of log files, without limitation.
Level of Quantity setting Degree setting
Debug Many of them Outputting debug information for a debug application
Info Multiple ones Outputting prompt information in application running process
Warning In (a) Outputting potentially erroneous information
Error Less quantity Outputting error information which does not affect the continued operation of the system
Fatal Very few Outputting system serious error event information
OFF Without any means for Without any means for
In the table, the log files are divided into six different levels, and one level is sequentially reduced from top to bottom, and the log files of the factory level in the table can be generally arranged in a debug level or an info level, so that a higher feedback effect can be obtained; the last two levels, the fatal level and the OFF level, output little or no log files, typically can be set to log output levels where the boot runtime X is after M2.
Specifically, as can be seen from fig. 3, the sub-steps in step S230 when executing the log output control of different levels are:
s231: reading a life value N corresponding to the starting-up running time X from a predefined chip life value table, wherein the value interval of the life value N is (N) min ,N max ) The method comprises the steps of carrying out a first treatment on the surface of the In this embodiment, step S231 is essentially a process of "rounding" the start-up operation time X, specifically, since the start-up operation time is collected in real time, no matter the unit of collection is hours, days, weeks, months, etc., it is not necessarily a number of ten hundred, so the relationship between the start-up operation time X and the chip life value is established by establishing the chip life value table, and the start-up operation time obtained in real time can be converted into a value capable of representing the chipSpecific numerical or grade identification of lifetime; for example, in one possible embodiment described below, the chip life value table may be built as:
life value Life loss condition
0x00 Unconstrained and unconstrained
0x01 0% -10% loss
0x02
10% -20% loss
0x03 20% -30% loss
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% loss
0x0B
100% loss
Wherein, the life value of 0x04 indicates that the life loss is between 30% and 40%, and the loss can be calculated by the running time of the machine and the expected total life of the product. It should be noted that the foregoing is only an example of the chip lifetime value table, the lifetime value number may be identified by other combinations such as numbers and letters, and the loss data range identified by each lifetime value number may be formulated according to actual requirements. The value interval (N min ,N max ) According to the specific arrangement, e.g. N in the above example min =0x00,N max =0x0B。
S232: the life value N is set to be (N) min ,N max ) Dividing the cells into i cells Q; wherein the ith inter-cell Q i The interval range of (2) is (N) i ,N i+1 ) I is an integer greater than 0, N 1 =N min
For example, when i=5, the value interval (N min ,N max ) Will be divided into five adjacent inter-cells Q 1 (N 1 ,N 2 )、Q 2 (N 2 ,N 3 )、Q 3 (N 3 ,N 4 )、Q 4 (N 4 ,N 5 )、Q 5 (N 5 ,N 6 ) These five cells may correspond to different levels (debug, info, warning, error, fatal) of the foregoing settings, respectively, for completing the determination process of these five levels.
S233: when the life value N is located between cells Q 1 Outputting a log file of a factory level when the factory level is in the factory; when the life value N is at the leftmost cell Q 1 In this case, the system is shifted to the normal use state immediately after leaving the factory, but there is still a possibility that a problem occurs, so that a higher log file output level, such as the debug level or the info level described above, is still required to ensure an effective positioning problem.
S234: when the life value N is located between cells Q i When the output is located between cells Q i-1 Log files one level lower than the time; when the cells are set, the descending level is adopted, and the log file level output by one cell set on the right side is lower than that of the cell set on the left side in the adjacent cells, so that one log output level is sequentially reduced among the cells on the right side after the leftmost cell is set to be the delivery level.
Therefore, after the startup running time is actually obtained, the corresponding log output level can be correspondingly obtained according to the situation that the obtained service life value N is located between cells. For the same system, as long as the change between cells occurs in the use process, the new log file output rule can be changed, so that the minimum life loss can be kept in each use stage.
As can be seen from fig. 4, in some embodiments, the method of the present application further comprises:
s110: acquiring a startup running time X at each 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 acquiring the boot running time X may be executed once every other day, or may be adjusted correspondingly according to the type and the use frequency of the system, for example, the mobile phone is used almost every day, may be executed every day, and some unusual devices may be set to perform the acquisition process once a week or half a month.
As can be seen from the above technical solutions, the present application provides a log file output control method based on EMMC lifetime values, including obtaining boot running time X; judging whether the starting-up running time X is positioned in a control interval Y or not; 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 log file of a factory level; if the starting-up running time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up running time X; and 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, not outputting a log file. According to the log output method and device, log output schemes with different control levels are correspondingly adopted at different phases of system use, so that the problem that the service life of the EMMC is too fast due to the fact that a memory writes excessive log information in a large amount is avoided.
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 present embodiment is different from the first embodiment in that the method further includes:
s101: respectively acquiring the previous starting-up running time Xa and the current starting-up running time Xb; as can be seen from the foregoing description, since the interval preset duration can be set to ensure the lifetime state of the real-time monitoring system, when the current output control method is executed, the previous execution result can be used to provide a reference for the current result, so in this embodiment, the latest two start-up running times can be obtained simultaneously to quickly obtain the current control result.
S321': reading life values Na and Nb corresponding to the starting-up running times Xa and Xb in a predefined chip life value table;
s235: judging whether Na and Nb are positioned in the same cell Q or not; since the previous process is finished, the previous Na value and the situation of being located between cells are easy to obtain, and the log output control result corresponding to the Nb value can be obtained rapidly only by judging the relation between the current Nb value and the Na value.
S236: if Na and Nb are positioned in the same cell Q, the system is not changed greatly within the preset interval time, the output level of the log file is not required to be modified, and the log file with the same level as the previous time is output;
s237: if Na and Nb are located in different cells Q, it indicates that the system state is changed, and the change may cause that the Na and Nb are located in adjacent or non-adjacent cells Q, at this time, the number P of cells Q between the cells Q where Na and Nb are located needs to be obtained first, and the difference between the two cells Q is determined to be several levels; and outputting the log files with the level P+1 lower than the previous output level according to the P value.
According to the technical scheme, the control result of the current time can be deduced according to the historical data and the relation between the current data and the historical data, and the scheme is more convenient and rapid.
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 the log files of each level are output in the first embodiment and the second embodiment, which are not described herein.
S2302: detecting whether the system is upgraded by OTA; OTA (Over-the-Air technology) refers to a standard software upgrading mode provided by an Android system, and can upgrade the system without loss, and the main means is to automatically download an OTA upgrading packet and upgrade through a network (comprising WIFI and 3G), so that the OTA upgrading packet is not limited, and the OTA upgrading packet is supported to be downloaded to an SD card for upgrade. After the OTA upgrade is deployed, a general manufacturer has various feedback on the time length in a period of time, and if the OTA upgrade is in a version, new problems are brought, so that in order to facilitate debugging, some log files need to be added to provide necessary functions. Note that if the system is not performing OTA upgrade, the log file determined in S2301 is output.
S2303: if the system is subjected to OTA upgrading, outputting a log file of which the level is one 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 upgrade output log file in step S2303 are performed within a set time range, that is, if the duration is longer than the set time range (or the time range in which the OTA upgrade continues) in the next detection after the interval of the preset duration, it is considered that the detection is not within the range affected by the OTA upgrade, and thus the operation of "upgrade" described above is not required.
According to the technical scheme, the method and the device can be suitable for special cases such as OTA upgrading, and effective execution of certain functions is guaranteed by adopting a necessary upgrading means.
Example IV
Referring to fig. 7, a schematic structural diagram of a log file output control device based on EMMC lifetime value is shown;
as can be seen from fig. 7, the present application further provides an apparatus corresponding to the above method, which includes:
a monitoring unit 10, configured to obtain a startup running time X;
the log output unit 20 is configured to determine whether the startup running time X is located in a control interval Y; the control interval Y is a set of operation time periods M1 to M2, and M2 is more 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 log file of a factory level;
if the starting-up running time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up running time X;
and 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, not outputting a log file.
As can be seen from fig. 8, in some embodiments, the log output unit 20 includes:
a reading subunit 21 for reading a lifetime value N corresponding to the start-up running time X in a predefined chip lifetime value table, wherein a lifetime value N takes a value interval of (N min ,N max );
A dividing subunit 22 for dividing the lifetime value N into a value interval (N) min ,N max ) Dividing the cells into i cells Q; wherein the ith inter-cell Q i The interval range of (2) is (N) i-1 ,N i ) I is an integer greater than 1, N 1 =N min
An output subunit 23 for when the lifetime value N is located between the cells Q 1 Outputting a log file of a factory level when the factory level is in the factory; when the life value N is located between cells Q i When the output is located between cells Q i-1 One level lower than the log file.
As can be seen from fig. 9, in some embodiments, the apparatus further comprises:
the timing unit 30 is configured to obtain a startup operation time X every predetermined time interval.
In some embodiments, the monitoring unit 10 is further configured to obtain previous and current startup running times Xa and Xb and corresponding lifetime values Na and Nb, respectively;
the log output unit 20 is further configured to determine whether Na and Nb are located in the same cell Q;
if Na and Nb are positioned in the same cell Q, outputting log files with the same level as the previous log files;
if Na and Nb are located in different cells Q, the number P of the cells between the cells Q where Na and Nb are located is obtained, and log files with the level P+1 lower than the previous output level are output.
As can be seen from fig. 10, in some embodiments, the apparatus further comprises:
an OTA detecting unit 40 for detecting whether the system is subjected to OTA upgrade;
and if the system is subjected to OTA upgrading, outputting a log file of which the level is one level higher than the corresponding level of the starting-up running time X.
The apparatus provided in the present application corresponds to the method in the foregoing embodiments, and the descriptions of the apparatus refer to the descriptions in the foregoing methods, which are not repeated herein.
Those of skill in the art will appreciate 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, these 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 foregoing embodiments have been provided for the purpose of illustrating the technical solution and advantageous effects of the present application in further detail, and it should be understood that the foregoing embodiments are merely illustrative of the present application and are not intended to limit the scope of the present application, and any modifications, equivalents, improvements, etc. made on the basis of the technical solution of the present application should be included in the scope of the present application.

Claims (8)

1. A log file output control method based on EMMC lifetime value, the method comprising:
acquiring starting-up running time X;
judging whether the starting-up running time X is positioned in a control interval Y or not; the control interval Y is a set of operation time periods M1 to M2, and M2 is more 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 log file of a factory level;
if the starting-up running time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up running time X; the method specifically comprises the following steps: reading a life value N corresponding to the starting-up running time X from a predefined chip life value table, wherein the value interval of the life value N is (N) min ,N max ) The method comprises the steps of carrying out a first treatment on the surface of the The life value N is set to be (N) min ,N max ) Dividing the cells into i cells Q; wherein the ith inter-cell Q i The interval range of (2) is (N) 1 ,N i+1 ) I is the whole number greater than 0Number N 1 =N min The method comprises the steps of carrying out a first treatment on the surface of the When the life value N is located between cells Q 1 Outputting a log file of a factory level when the factory level is in the factory; when the life value N is located between cells Q i When the output is located between cells Q i-1 Log files one level lower than the time;
and 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, not outputting a log file.
2. The method for log file output control based on EMMC lifetime value of claim 1, wherein said step of obtaining the boot runtime X comprises:
and acquiring the startup running time X once every preset time.
3. The method for log file output control based on EMMC lifetime value of claim 2, further comprising:
acquiring the previous and current starting-up running time Xa, xb and corresponding service life values Na, nb respectively;
judging whether Na and Nb are positioned in the same cell Q or not;
if Na and Nb are positioned in the same cell Q, outputting log files with the same level as the previous log files;
if Na and Nb are located in different cells Q, the number P of the cells between the cells Q where Na and Nb are located is obtained, and log files with the level P+1 lower than the previous output level are output.
4. A log file output control method based on EMMC lifetime value according to any one of claims 1 to 3, wherein said step of outputting log files of a level corresponding to said boot-up run time 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 subjected to OTA upgrading, outputting a log file of which the level is one level higher than the corresponding level of the starting-up running time X.
5. A log file output control device based on an EMMC lifetime value, the device 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 or not; the control interval Y is a set of operation time periods M1 to M2, and M2 is more 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 log file of a factory level;
if the starting-up running time X is positioned in the control interval Y, outputting a log file of a level corresponding to the starting-up running time X; the log output unit specifically includes: a reading subunit, configured to read a lifetime value N corresponding to the start-up running time X in a predefined chip lifetime value table, where a lifetime value N takes a value interval of (N min ,N max ) The method comprises the steps of carrying out a first treatment on the surface of the A dividing subunit for dividing the lifetime value N into a value interval (N) min ,N max ) Dividing the cells into i cells Q; wherein the ith inter-cell Q i The interval range of (2) is (N) i-1 ,N i ) I is an integer greater than 1, N 1 =N min The method comprises the steps of carrying out a first treatment on the surface of the An output subunit for outputting the service life value N when the service life value N is located between the cells Q 1 Outputting a log file of a factory level when the factory level is in the factory; when the life value N is located between cells Q i When the output is located between cells Q i-1 Log files one level lower than the time;
and 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, not outputting a log file.
6. The EMMC lifetime value-based log file output control device of claim 5, wherein said device further comprises:
the timing unit is used for acquiring the startup running time X once every preset time.
7. The log file output control apparatus based on the EMMC lifetime value of claim 6,
the monitoring unit is further used for respectively acquiring the previous and current starting-up running time Xa, xb and the corresponding service life value Na, nb;
the log output unit is further used for judging whether Na and Nb are located in the same cell Q or not;
if Na and Nb are positioned in the same cell Q, outputting log files with the same level as the previous log files;
if Na and Nb are located in different cells Q, the number P of the cells between the cells Q where Na and Nb are located is obtained, and log files with the level P+1 lower than the previous output level are output.
8. A log file output control apparatus based on an EMMC lifetime value according to any one of claims 5 to 7, wherein said apparatus further comprises:
the OTA detection unit is used for detecting whether the system is subjected to OTA upgrading;
and if the system is subjected to OTA upgrading, outputting a log file of which the level is one level higher than the corresponding level of the starting-up running time X.
CN202010229215.6A 2020-03-27 2020-03-27 Log file output control method and device based on EMMC life value Active CN111459755B (en)

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 CN111459755A (en) 2020-07-28
CN111459755B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
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
CN113448818B (en) * 2021-07-01 2023-01-24 山东浪潮通软信息科技有限公司 Log tracking method, device and medium based on probability
CN116405726B (en) * 2023-06-05 2023-10-20 深圳市华曦达科技股份有限公司 Data storage control method, system and readable storage medium based on EMMC abrasion degree

Family Cites Families (16)

* Cited by examiner, † Cited by third party
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
JP2002358216A (en) * 2000-08-08 2002-12-13 System Support:Kk 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
JP5156310B2 (en) * 2007-09-19 2013-03-06 株式会社日立製作所 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
US9450833B2 (en) * 2014-03-26 2016-09-20 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
CN106775885B (en) * 2016-12-26 2020-09-29 中国建设银行股份有限公司 Log output control method and system and bank management system
CN108897663B (en) * 2018-06-19 2022-08-26 新华三技术有限公司 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

Also Published As

Publication number Publication date
CN111459755A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN111459755B (en) Log file output control method and device based on EMMC life value
CN104700886B (en) Memory circuit with power supply status sensor
US7969809B2 (en) Power consumption-oriented management of a storage system
CN103514958B (en) A kind of EMMC chip life detecting method
CN111143104A (en) Memory exception processing method and system, electronic device and storage medium
EP2310936A1 (en) Storage system and method for managing a plurality of storage devices
CN114138098B (en) Power consumption adjusting method and device, storage device and readable storage medium
CN101162259A (en) Function testing device and method for small electric quantity extra battery
CN110555073A (en) data processing method and device, electronic equipment and storage medium
CN104219747B (en) Method, device and terminal for adjusting wake-up time according to electric quantity information
CN104063181A (en) SSD (solid state disk) management method and system as well as server
CN108255735A (en) Associated environment test method, electronic device and computer readable storage medium
CN107220056A (en) A kind of method of automatic load server BIOS parameters
CN111124786B (en) Batch detection method, batch detection device, and computer-readable storage medium
CN103914358A (en) Flash memory rereading method and device
AU2017210226A1 (en) Use of volatile memory as non-volatile memory
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
TW201721653A (en) Memory management method, memory control circuit unit, and memory storage apparatus
CN105700656B (en) Standby abnormal power consumption detection system and method
CN108767344B (en) Method and device for optimizing power supply of intelligent sound equipment battery
WO2019227769A1 (en) Method and apparatus for controlling storage device, and electronic device
CN104350476B (en) A kind of version detection period control method and device
CN109388217B (en) Method, device and system for determining duration of unpowered hard disk
WO2019127081A1 (en) Power consumption stabilization method and apparatus for intelligent terminal, and electronic 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