CN110147291A - Terminal and its log management-control method, computer readable storage medium - Google Patents

Terminal and its log management-control method, computer readable storage medium Download PDF

Info

Publication number
CN110147291A
CN110147291A CN201910253404.4A CN201910253404A CN110147291A CN 110147291 A CN110147291 A CN 110147291A CN 201910253404 A CN201910253404 A CN 201910253404A CN 110147291 A CN110147291 A CN 110147291A
Authority
CN
China
Prior art keywords
log
terminal
system starting
starting
control method
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.)
Pending
Application number
CN201910253404.4A
Other languages
Chinese (zh)
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910253404.4A priority Critical patent/CN110147291A/en
Publication of CN110147291A publication Critical patent/CN110147291A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis

Abstract

The invention discloses a kind of terminal and its log management-control methods, computer readable storage medium, and system starting log is just generated in the system starting process of terminal;After the permanent memory starting of terminal, system starting log is written in permanent memory;Then when receiving system starting log call instruction, the system starting log stored in permanent memory can be called according to system starting log call instruction.Namely log management-control method provided by the invention can generate in real time system starting log in terminal system start-up course, and can store it in the permanent memory of terminal;The invention also discloses a kind of terminals, computer readable storage medium, analysis can be directly called from permanent memory, it relatively at present can only be in such a way that hardware connection be analyzed from the code run in serial ports guiding system start-up course, it is more convenient, it is more efficient, more conducively promote the accuracy rate of accident analysis efficiency and positioning problems.

Description

Terminal and its log management-control method, computer readable storage medium
Technical field
The present invention relates to field of terminal technology, more specifically to a kind of terminal and its log management-control method, computer Readable storage medium storing program for executing.
Background technique
With the development of intelligent terminal (such as various smart phones, IPAD etc.) technology, intelligent terminal is in people's lives The more and more important role with performer in work.Therefore it ought can be generated corresponding at present in the operational process of terminal starting Log recording, for carrying out fault locating analysis when subsequent terminal failure, so that the failure solution for terminal provides reliably Foundation.
But it only just will start diary record system after terminal completes starting on current intelligent terminal and generate accordingly Log recording.Log can't be then generated in intelligent terminal start-up course, this results in intelligent terminal to start mistake in system It loses or starts there are when failure, if to analyze the failure, serial ports can only be picked out by hard wires and is again started up System is analyzed the export such as operation code in system starting process by serial ports, this processing mode there are low efficiency, And some problems are difficult reproduction below and problem are caused to be difficult to position in system restarting procedure, be difficult to standard so as to cause failure It determines position and solves the problems, such as.
Summary of the invention
The technical problem to be solved in the present invention is that: when current intelligent terminal breaks down during the system startup process, therefore Barrier analysis efficiency is low, problem is difficult to be accurately positioned.For the technical problem, a kind of terminal and its log management-control method, meter are provided Calculation machine readable storage medium storing program for executing.
In order to solve the above technical problems, the present invention provides a kind of log management-control method of terminal, the log pipe of the terminal Prosecutor method includes:
In the system starting process of the terminal, system starting log is generated;
After the permanent memory starting of the terminal, the system starting log is written in the permanent memory;
When receiving system starting log call instruction, according to the system starting log call instruction to described permanent The system starting log stored in memory is called.
Optionally, in the system starting process of the terminal, generating system starting log includes:
In the bootstrap loader bootloader stage of system starting, compilation time and log content, institute are obtained State log content include operation when generate error message, status information, Debugging message, execute temporal information at least one Kind;
The target random access memory area in compilation time and log content write-in random access memory that will acquire.
Optionally, after the permanent memory starting of the terminal, system starting log write-in described is permanently deposited Include: in reservoir
At the end of the bootstrap loader bootloader stage, it will be stored in target random access memory area Compilation time and log content the first object permanent storage area in the permanent memory is written.
Optionally, the write-in of the compilation time and log content that store in target random access memory area is described permanent First object permanent storage area in memory includes:
It obtains system current in the first object permanent storage area and starts total log head information, the system starting Total log head information includes the total degree N having been turned on before system;
The sub- log for being subordinated to the system and starting total log head information is generated in the first object permanent storage area Head information, number of starts number in the sub- log head information including the compilation time and this starting is N+1, by institute It states log content to store in the first object permanent storage area with the sub- log head information association, and by the system The total degree N started in total log head information is updated to N+1.
Optionally, the system starts the overall length of each system starting log recorded before total log head information further includes L is spent, further includes the length i of its corresponding log content in the sub- log head information, the terminal log management-control method also wraps It includes:
The system is started into the total length L in total log head information and is updated to L+i.
Optionally, it includes system starting log identification code in total log head information that the system, which starts,;
The current total log head information of system starting includes: in the acquisition first object permanent storage area
It will include that the information of the system starting log identification code is identified as in the first object permanent storage area System starts total log head information.
Optionally, the terminal log management-control method further include:
After the system start completion of the terminal, system running log is generated;
The system running log is written to the second target permanent storage area in the permanent memory.
Optionally, the system starting log call instruction includes that system starting log checks instruction, described according to System starting log call instruction is called the system starting log stored in the permanent memory
When receiving the system starting log and checking instruction, the system starting log that will be stored in the permanent memory Content shown on the display screen of the terminal.
The present invention also provides a kind of terminal, the terminal includes processor, memory and communication bus;
The communication bus is for realizing the connection communication between processor and memory;
The processor is for executing one or more program stored in memory, to realize described in any one as above Terminal log management-control method the step of.
The present invention also provides a kind of computer readable storage medium, the computer-readable recording medium storage has one Or multiple programs, one or more of programs can be executed by one or more processor, to realize as above any one The step of described terminal log management-control method.
Beneficial effect
The present invention provides a kind of terminal and its log management-control method, computer readable storage medium, eventually for current intelligence When end is broken down during the system startup process, accident analysis low efficiency, problem are difficult to the problem of being accurately positioned, and the present invention provides Terminal log management-control method, in the system starting process of terminal just generate system starting log;In permanently storing for terminal After device starting, system starting log is written in permanent memory;Then when receiving system starting log call instruction, i.e., The system starting log stored in permanent memory can be called according to system starting log call instruction.Namely the present invention The log management-control method of offer can generate in real time system starting log in terminal system start-up course, and can be by it in terminal It carries out storing in permanent memory and can directly be called analysis from permanent memory when needed, relatively at present Can only be more convenient in such a way that hardware connection is analyzed from the code run in serial ports guiding system start-up course, effect Rate is higher, more conducively the accuracy rate of promotion accident analysis efficiency and positioning problems, and then promotes satisfaction of users.
Detailed description of the invention
Present invention will be further explained below with reference to the attached drawings and examples, in attached drawing:
The hardware structural diagram of Fig. 1 each embodiment one optional mobile terminal to realize the present invention.
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the terminal log management-control method basic flow chart that first embodiment of the invention provides;
Fig. 4 is the log management-control method flow chart after the system that first embodiment of the invention provides has started;
Fig. 5 is the terminal log management-control method basic flow chart that second embodiment of the invention provides;
Fig. 6 is the terminal structure schematic diagram that third embodiment of the invention provides.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, plate Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer etc. move The fixed terminals such as dynamic terminal, and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special Except element for moving purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware structural diagram of its mobile terminal of each embodiment to realize the present invention, the shifting Dynamic terminal 100 may include: RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, the components such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not constitute the restriction to mobile terminal, and mobile terminal may include components more more or fewer than diagram, Perhaps certain components or different component layouts are combined.
It is specifically introduced below with reference to all parts of the Fig. 1 to mobile terminal:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating Frequency unit 101 can also be communicated with network and other equipment by wireless communication.Any communication can be used in above-mentioned wireless communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, and it is not belonging to must be configured into for mobile terminal, it completely can be according to need It to omit within the scope of not changing the essence of the invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is received or The audio data that person stores in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 can also provide executed to mobile terminal 100 the relevant audio output of specific function (for example, call signal receive sound, Message sink sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 106.It can be with through treated the picture frame of graphics processor 1041 It is stored in memory 109 (or other storage mediums) or is sent via radio frequency unit 101 or WiFi module 102.Wheat Gram wind 1042 can be in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 It receives sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data It is defeated that the format that can be sent to mobile communication base station via radio frequency unit 101 can be converted in the case where telephone calling model Out.Microphone 1042 can be implemented various types of noises and eliminate (or inhibition) algorithm to eliminate (or inhibition) and receive and sending out The noise generated during sending audio signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify the application of mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can Including display panel 1061, liquid crystal display (Liquid Crystal Display, LCD), organic light-emitting diodes can be used Forms such as (Organic Light-Emitting Diode, OLED) are managed to configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal Family setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071 Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. It is one or more, specifically herein without limitation.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel 1061 be the function that outputs and inputs of realizing mobile terminal as two independent components, but in certain embodiments, it can The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example, External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving from external device (ED) input (for example, Data information, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage Data in device 109 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place Managing device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Embodiment to facilitate the understanding of the present invention, the communications network system that mobile terminal of the invention is based below into Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system architecture diagram provided in an embodiment of the present invention, the communication network system System be universal mobile communications technology LTE system, the LTE system include successively communication connection UE (User Equipment, User equipment) 201, E-UTRAN (Evolved UMTS Terrestrial Radio Access Network, evolved UMTS Land radio access web) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP industry Business 204.
Specifically, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein eNodeB2021 can pass through backhaul (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203, eNodeB2021 The access of UE201 to EPC203 can be provided.
EPC203 may include MME (Mobility Management Entity, mobility management entity) 2031, HSS (Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving GateWay, Gateway) 2034, PGW (PDN GateWay, grouped data network gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 is between processing UE201 and EPC203 The control node of signaling, provides carrying and connection management.HSS2032 is for providing some registers to manage such as homing position The function of register (not shown) etc, and preserve the dedicated letters of users such as some related service features, data rates Breath.All customer data can be sent by SGW2034, PGW2035 can provide UE 201 IP address distribution with And other functions, PCRF2036 are the strategy and charging control policy decision point of business data flow and IP bearing resource, it is plan Available strategy and charging control decision are slightly selected and provided with charge execution function unit (not shown).
IP operation 204 may include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia Subsystem) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art should know the present invention is not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And the following new network system etc., herein without limitation.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the method for the present invention is proposed.
First embodiment
When breaking down during the system startup process for current intelligent terminal, it can only be exported by hardware connection from serial ports The code run in system starting process is analyzed and there are problems that accident analysis low efficiency, is difficult to the problem of being accurately positioned, A kind of terminal log management-control method is present embodiments provided, system starting log is just generated in the system starting process of terminal; After the permanent memory starting of terminal, system starting log is written in permanent memory;Then system starting is being received When log call instruction, can according to system starting log call instruction to the system starting log stored in permanent memory into Row calls.Namely log management-control method provided in this embodiment can generate in real time in terminal system start-up course and storage system Starting log, to can directly be called analysis from permanent memory when needed, it is more convenient to obtain, more efficient, Also it is more conducive to promote the accuracy rate of accident analysis efficiency and positioning problems.In order to make it easy to understand, to terminal below the present embodiment Log management-control method illustrated, it is shown in Figure 3, comprising:
S301: in the system starting process of terminal, system starting log is generated.
In the present embodiment, terminal can be various intelligent terminals, such as can be the terminal of operation Android system, can also It is the various intelligent terminals for running the systems such as Saipan system, IOS.The system starting of terminal can be terminal system initial start-up, It can also be system reboot is dynamic or system debug starts etc..In the present embodiment, system is generated in system starting process start day When will, system starting log can be generated using current log generating system, new log generating mode can also be used and generate System starting log.
In some examples of the present embodiment, in the system starting process of terminal, generate system starting log include but It is not limited to:
In the bootstrap loader bootloader stage of system starting, compilation time and log content, the log are obtained Content may include but be not limited to the error message generated when operation, status information, Debugging message, execute in temporal information at least It is a kind of;
The target random access memory in compilation time and log content write-in random access memory ram that will acquire Area.
However, it is to be understood that being not limited to generate in the bootstrap loader bootloader stage in the present embodiment System starting log can also also generate system starting log in other stages during the system startup process, specifically can be according to demand The period of flexible choice generation system starting log.
S302: after the permanent memory starting of terminal, system starting log is written in permanent memory.
In some examples of the present embodiment, after the permanent memory starting of terminal, forever by the write-in of system starting log When in long memory, system starting log can be written in permanent memory immediately after permanent memory starting, it can also Etc. systems starting after by system starting log be written permanent memory in, or permanent memory starting after, system Any time before starting finishes, system starting log was written in permanent memory.
For example, in a kind of example, it can be at the end of the bootstrap loader bootloader stage, by target arbitrary access The first object permanent storage area in compilation time and log content write-in permanent memory stored in memory block.This first Target permanent storage area can be preset, and can also divide setting in real time when needed, and the first object permanently stores The size in region can be set to fixed size, and size can also be adjusted dynamically according to demand.In addition, the first mesh in the present embodiment Marking permanent storage area can be continuous storage region in permanent memory, can also be made of multiple discrete regions.
S303: when receiving system starting log call instruction, according to system starting log call instruction to permanently depositing The system starting log stored in reservoir is called.
It can according to demand flexibly to the method for calling of the system starting log stored in permanent memory in the present embodiment Using, such as in a kind of example, it can be by cooperating corresponding interface to lead the system starting log stored in permanent memory Out, in other examples, system starting log call instruction includes that system starting log checks instruction, is opened according to the system Dynamic log call instruction, which is called the system starting log stored in permanent memory, may include but be not limited to: receiving and is It is when system starting log checks instruction, the content of the system starting log stored in permanent memory is enterprising in the display screen of terminal Row display.
Shown in Figure 4 in the present embodiment after terminal system start completion, the terminal log management-control method is also Can include:
S401: after the system start completion of terminal, system running log is generated.
S402: the second target permanent storage area in permanent memory is written into system running log.
It should be understood that the first object permanent storage area and the second target permanent storage area in the present embodiment can Think mutually independent two storage regions.But in some instances, first object permanent storage area and the second target are permanent Storage region can partly overlap or completely overlapped according to demand.
In a kind of example of the present embodiment, the compilation time and log content that will be stored in target random access memory area Write-in permanent memory in first object permanent storage area include:
It obtains system current in first object permanent storage area and starts total log head information, system starts total log head Information includes the total degree N having been turned on before system;
The sub- log head information that the system that is subordinated to starts total log head information, son are generated in first object permanent storage area Number of starts number including compilation time and this starting in log head information is N+1, by log content in first object It is stored in permanent storage area with sub- log head information association, and system is started into the total degree N in total log head information and is updated For N+1.
In another example of the present embodiment, system, which starts total log head information, may also include each system recorded before The total length L of starting log further includes the length i of its corresponding log content, terminal log control side in sub- log head information Method further include:
System is started into the total length L in total log head information and is updated to L+i.
In addition, system starts also settable system in total log head information and starts day in some examples of the present embodiment Will identification code;In this example, obtaining the total log head information of system starting current in first object permanent storage area can wrap It includes:
By include in first object permanent storage area system starting log identification code information be identified as system starting Total log head information;And then each system starting log recorded before total log head information further obtains can be started from system Total length L and total degree N.In this some example, when not inquiring system from first object permanent storage area Then show to be this time just subsystem starting when starting log identification code.
As it can be seen that log management-control method provided in this embodiment can be generated in real time and be stored in terminal system start-up course is System starting log, to can directly be called analysis from permanent memory when needed, it is more convenient to obtain, and efficiency is more Height is also more conducive to promote the accuracy rate of accident analysis efficiency and positioning problems.
Second embodiment
In order to make it easy to understand, below the present embodiment on that basi of the above embodiments, specifically being done using example in conjunction with one kind It further illustrates.
In the present embodiment, system starting log log is generated in the system starting process of terminal, and the log is exported It into the first object permanent storage area of permanent memory, is then called, manages according to demand, convenient in the boot stage It goes wrong, carries out positioning problems analysis, and system starting log log will not lose, more conducively convenient for solving the problems, such as occasionally now, And it can store repeatedly.
Shown in Figure 5, the log management-control method in the present embodiment includes:
S501: plan that first object permanent storage area is done in one piece of region in the permanent memory of terminal.
S502: in the bootloader stage of terminal system starting, one section of ram region is distributed, by the bootloader stage The system starting log of generation is stored in RAM.
S503: at the end of the bootloader stage of terminal system, system starting log write-in permanent memory First object permanent storage area.
In a kind of example of the present embodiment, the log totality format that settable system generates log is as follows:
Wherein specific log content format is then as follows:
| n-th starting: log content: specific tail portion terminating symbol ($) |
Based on above-mentioned setting, a kind of log control process of system starting of the present embodiment is as follows:
When each activation system of terminal, it can arrive first and find system in the first object permanent storage area of permanent memory and open Dynamic log identification code will include that the information of system starting log identification code is identified as system and starts total log head information;In turn Total log head information can be started from system and further obtain the total length L of each system starting log currently recorded and total time Number N.Then back system starts total degree N every time and adds 1, and updates total number of starts N of total head description.
It, can be in the bootloader that terminal system starts, when obtaining the compiling of bootloader in this application scene Between and record, update single head description compilation time, and during the system startup process generate system starting log.
System starting log is written in a block RAM tissue, such as:
System starting log log is stored according to binary form into first object permanent storage area, and write-in is Starting log log format of uniting is as follows:
| n-th starting: log content: specific tail portion terminating symbol ($) |
N:first line start$
N:second line$
At the end of bootloader, the length of single system starting log log is accumulated, and the description of single head is written In, the length for total length being revised as original record adds the length of single log, and updates total in total head description information Length.
When need to use, a kind of transfer process of Android system terminal can be realized by following process: need to extract When log, order can be passed through in android system: dd if=/dev/block/ after terminal system starting through order By-name/bootlog of=/sdcard/log.
As it can be seen that the log management-control method provided through this embodiment at least has following advantages:
Some tests for restarting record log repeatedly can be more easily done, are conducive in the equipment debugging stage, or take starting Log, and hardware serial ports is not needed, software can be checked at any time, while can store multiple log, be more convenient even now problem Log crawl.
3rd embodiment
The embodiment of the present invention provides a kind of terminal, refers to Fig. 6 on the basis of first embodiment, which includes place Manage device 601, memory 602 and communication bus 603;Wherein communication bus 603 for realizing processor 601 and memory 602 it Between connection communication;Processor 601 is for executing one or more program stored in memory 602, to realize as above-mentioned The step of terminal log management-control method in embodiment, including but not limited to following procedure:
Processor 601 generates system starting log in the system starting process of terminal.The system starting of terminal can be Terminal system initial start-up can also be system reboot is dynamic or system debug starts etc..In the present embodiment, system started When generating system starting log in journey, system starting log can be generated using current log generating system, can also be used new Log generating mode generate system starting log.In some examples of the present embodiment, in the system starting process of terminal, Generation system starting log includes but is not limited to:
The bootstrap loader bootloader stage that processor 601 starts in system obtains in compilation time and log Hold, which may include but be not limited to the error message generated when operation, status information, Debugging message, executes time letter At least one of breath;The target in compilation time and log content write-in random access memory ram that will acquire is deposited at random Take memory block.However, it is to be understood that being not limited to generate in the bootstrap loader bootloader stage in the present embodiment System starting log can also also generate system starting log in other stages during the system startup process, specifically can be according to demand The period of flexible choice generation system starting log.
System starting log is written in permanent memory after the permanent memory starting of terminal for processor 601.At this In some examples of embodiment, after the permanent memory starting of terminal, when system starting log is written in permanent memory, Can permanent memory starting after i.e. immediately by system starting log be written permanent memory in, can also etc. systems started System starting log is written in permanent memory after finishing, or after permanent memory starting, before system starting finishes Any time, system starting log was written in permanent memory.
For example, processor 601 can be at the end of the bootstrap loader bootloader stage, by mesh in a kind of example The first object in compilation time and log content write-in permanent memory stored in mark random access memory area permanently stores Region.The first object permanent storage area can be preset, and can also divide setting, and first mesh in real time when needed The size of mark permanent storage area can be set to fixed size, and size can also be adjusted dynamically according to demand.In addition, this implementation First object permanent storage area can be continuous storage region in permanent memory in example, can also be by multiple discrete areas Domain composition.
Processor 601 is when receiving system starting log call instruction, according to system starting log call instruction to forever The system starting log stored in long memory is called.In the present embodiment is started to the system stored in permanent memory day The method of calling of will can be used flexibly according to demand, such as in a kind of example, can be by cooperating corresponding interface will be permanent The system starting log export stored in memory, in other examples, system starting log call instruction includes that system opens Instruction is checked in dynamic log, according to the system starting log call instruction to the system starting log stored in permanent memory into Row is called and be may include but be not limited to: when the system starting log of receiving checks instruction, the system stored in permanent memory being opened The content of dynamic log is shown on the display screen of terminal.In addition, in the present embodiment after terminal system start completion, System running log is also produced, the second target permanent storage area in permanent memory is written into system running log.
First object permanent storage area and the second target permanent storage area in the present embodiment can be mutually indepedent Two storage regions.But in some instances, first object permanent storage area and the second target permanent storage area can be with It partly overlaps or completely overlapped according to demand.In a kind of example of the present embodiment, it will be stored in target random access memory area Compilation time and log content write-in permanent memory in first object permanent storage area include: obtain first object forever Current system starts total log head information in long storage region, and system, which starts before total log head information includes system, to be had been turned on Total degree N;The sub- log head information that the system that is subordinated to starts total log head information is generated in first object permanent storage area, Number of starts number including compilation time and this starting in sub- log head information is N+1, by log content in the first mesh It marks in permanent storage area and is stored with sub- log head information association, and system is started into the total degree N in total log head information more It is newly N+1.
In another example of the present embodiment, system, which starts total log head information, may also include each system recorded before The total length L of starting log further includes the length i of its corresponding log content, terminal log control side in sub- log head information Method further include: system is started into the total length L in total log head information and is updated to L+i.
In addition, system starts also settable system in total log head information and starts day in some examples of the present embodiment Will identification code;In this example, processor 601 obtains the total log head of system starting current in first object permanent storage area Information can include: will include that the information of system starting log identification code is identified as system and opens in first object permanent storage area Move total log head information;And then each system starting day recorded before total log head information further obtains can be started from system The total length L and total degree N of will.In this some example, it is when not inquired from first object permanent storage area Then show to be this time just subsystem starting when starting log identification code of uniting.Log management-control method provided in this embodiment can be in terminal Simultaneously storage system starting log is generated in system starting process in real time, to can carry out directly from permanent memory when needed Analysis is called, it is more convenient to obtain, and it is more efficient, it is also more conducive to promote the accuracy rate of accident analysis efficiency and positioning problems.
The embodiment of the present invention on the basis of the above embodiments, provides a kind of computer readable storage medium, the computer Readable storage medium storing program for executing is stored with one or more program, which can be held by one or more processor Row, to realize such as the step of terminal log management-control method in above-described embodiment.The description for specifically referring to above-described embodiment, This is repeated no more.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of log management-control method of terminal, which is characterized in that the log management-control method of the terminal includes:
In the system starting process of the terminal, system starting log is generated;
After the permanent memory starting of the terminal, the system starting log is written in the permanent memory;
When receiving system starting log call instruction, permanently stored according to the system starting log call instruction to described The system starting log stored in device is called.
2. the log management-control method of terminal as described in claim 1, which is characterized in that in the system starting process of the terminal In, generating system starting log includes:
In the bootstrap loader bootloader stage of system starting, compilation time and log content, the day are obtained Will content includes at least one of the error message generated when operation, status information, Debugging message, execution temporal information;
The target random access memory area in compilation time and log content write-in random access memory that will acquire.
3. the log management-control method of terminal as claimed in claim 2, which is characterized in that opened in the permanent memory of the terminal After dynamic, will include: in the system starting log write-in permanent memory
At the end of the bootstrap loader bootloader stage, the volume that will be stored in target random access memory area It translates the time and first object permanent storage area in the permanent memory is written in log content.
4. the log management-control method of terminal as claimed in claim 3, which is characterized in that by target random access memory area The first object permanent storage area that the compilation time and log content of middle storage are written in the permanent memory includes:
It obtains system current in the first object permanent storage area and starts total log head information, the system starts total day Will head information includes the total degree N having been turned on before system;
The sub- log head letter for being subordinated to the system and starting total log head information is generated in the first object permanent storage area It ceases, number of starts number including the compilation time and this starting in the sub- log head information is N+1, by the day Will content stores in the first object permanent storage area with the sub- log head information association, and the system is started Total degree N in total log head information is updated to N+1.
5. the log management-control method of terminal as claimed in claim 4, which is characterized in that the system starts total log head information Further include the total length L of each system starting log recorded before, further includes its corresponding day in the sub- log head information The length i of will content, the terminal log management-control method further include:
The system is started into the total length L in total log head information and is updated to L+i.
6. the log management-control method of terminal as claimed in claim 4, which is characterized in that the system starts total log head information In include system starting log identification code;
The current total log head information of system starting includes: in the acquisition first object permanent storage area
It will include that the information of the system starting log identification code is identified as system in the first object permanent storage area Start total log head information.
7. such as the log management-control method of the described in any item terminals of claim 3-6, which is characterized in that the terminal log control Method further include:
After the system start completion of the terminal, system running log is generated;
The system running log is written to the second target permanent storage area in the permanent memory.
8. the log management-control method of terminal as claimed in any one of claims 1 to 6, which is characterized in that the system starting log Call instruction includes that system starting log checks instruction, described permanently to be deposited according to the system starting log call instruction to described The system starting log stored in reservoir, which is called, includes:
It, will be in the system starting log that stored in the permanent memory when receiving the system starting log and checking instruction Appearance is shown on the display screen of the terminal.
9. a kind of terminal, which is characterized in that the terminal includes processor, memory and communication bus;
The communication bus is for realizing the connection communication between processor and memory;
The processor is for executing one or more program stored in memory, to realize as appointed in claim 1 to 8 The step of log management-control method of terminal described in one.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage have one or Multiple programs, one or more of programs can be executed by one or more processor, to realize such as claim 1 to 8 Any one of described in terminal log management-control method the step of.
CN201910253404.4A 2019-03-29 2019-03-29 Terminal and its log management-control method, computer readable storage medium Pending CN110147291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910253404.4A CN110147291A (en) 2019-03-29 2019-03-29 Terminal and its log management-control method, computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910253404.4A CN110147291A (en) 2019-03-29 2019-03-29 Terminal and its log management-control method, computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110147291A true CN110147291A (en) 2019-08-20

Family

ID=67589566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910253404.4A Pending CN110147291A (en) 2019-03-29 2019-03-29 Terminal and its log management-control method, computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110147291A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764773A (en) * 2019-09-03 2020-02-07 北京字节跳动网络技术有限公司 APP generation method, device, medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070001622A (en) * 2005-06-29 2007-01-04 주식회사 팬택 Method for storing error code by using random access memory and mobile communication terminal therefor
CN106250125A (en) * 2016-07-26 2016-12-21 深圳天珑无线科技有限公司 Obtain the method and device of daily record
CN107451003A (en) * 2017-06-30 2017-12-08 郑州云海信息技术有限公司 The method of testing and device of a kind of storage system
CN109002547A (en) * 2018-07-30 2018-12-14 努比亚技术有限公司 Journal file storage method, mobile terminal and computer readable storage medium
CN109522147A (en) * 2018-11-15 2019-03-26 Oppo广东移动通信有限公司 A kind of method, apparatus, storage medium and the terminal of record booting exception information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070001622A (en) * 2005-06-29 2007-01-04 주식회사 팬택 Method for storing error code by using random access memory and mobile communication terminal therefor
CN106250125A (en) * 2016-07-26 2016-12-21 深圳天珑无线科技有限公司 Obtain the method and device of daily record
CN107451003A (en) * 2017-06-30 2017-12-08 郑州云海信息技术有限公司 The method of testing and device of a kind of storage system
CN109002547A (en) * 2018-07-30 2018-12-14 努比亚技术有限公司 Journal file storage method, mobile terminal and computer readable storage medium
CN109522147A (en) * 2018-11-15 2019-03-26 Oppo广东移动通信有限公司 A kind of method, apparatus, storage medium and the terminal of record booting exception information

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764773A (en) * 2019-09-03 2020-02-07 北京字节跳动网络技术有限公司 APP generation method, device, medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN109814941A (en) A kind of application starting method, terminal and computer readable storage medium
CN109040441A (en) Using display methods of attending to anything else, mobile terminal and computer readable storage medium
CN109933253A (en) Method for controlling application starting, terminal and computer readable storage medium
CN109766119A (en) Restore subregion upgrade method, terminal and computer readable storage medium
CN110096375A (en) A kind of Application sharing data method, device and computer readable storage medium
CN108900779A (en) Initial automatic exposure convergence method, mobile terminal and computer readable storage medium
CN108601004A (en) NFC uses bootstrap technique, mobile terminal and computer readable storage medium
CN108241808A (en) identification code display control method, terminal and computer readable storage medium
CN110020386A (en) Application page sharing method, mobile terminal and computer readable storage medium
CN109918101A (en) Terminal and its application component management method, computer readable storage medium
CN110167004A (en) A kind of network registering method, mobile terminal and computer readable storage medium
CN110147291A (en) Terminal and its log management-control method, computer readable storage medium
CN109660521A (en) A kind of gamespace regulation method, terminal and computer readable storage medium
CN109656649A (en) A kind of desktop application control method, terminal and computer readable storage medium
CN109684020A (en) A kind of method for switching theme, equipment and computer readable storage medium
CN109582565A (en) Prevent the method, terminal and computer storage medium of application crashes
CN108762848A (en) The quick loading method of Activity data, intelligent terminal and computer readable storage medium
CN108833687A (en) Terminal prot open method, terminal and computer readable storage medium
CN108650404A (en) Port start-up circuit, device and mobile terminal
CN110069291A (en) A kind of display control method, mobile terminal and computer readable storage medium
CN110262707A (en) A kind of application program operation method for recording, device and computer readable storage medium
CN109739569A (en) Method for starting up mobile terminal, mobile terminal and computer readable storage medium
CN109408184A (en) A kind of icon processing method, mobile terminal and computer storage medium
CN109831283A (en) A kind of method for sending information, terminal and computer readable storage medium
CN109739676A (en) A kind of operational monitoring method, mobile terminal and computer readable storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190820