CN108197023B - Mobile terminal restart positioning method, mobile terminal and computer readable storage medium - Google Patents

Mobile terminal restart positioning method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN108197023B
CN108197023B CN201711467910.0A CN201711467910A CN108197023B CN 108197023 B CN108197023 B CN 108197023B CN 201711467910 A CN201711467910 A CN 201711467910A CN 108197023 B CN108197023 B CN 108197023B
Authority
CN
China
Prior art keywords
mobile terminal
power
log
restart
key information
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
CN201711467910.0A
Other languages
Chinese (zh)
Other versions
CN108197023A (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.)
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 CN201711467910.0A priority Critical patent/CN108197023B/en
Publication of CN108197023A publication Critical patent/CN108197023A/en
Application granted granted Critical
Publication of CN108197023B publication Critical patent/CN108197023B/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/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • 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 mobile terminal restart positioning method, a mobile terminal and a computer readable storage medium, wherein the method comprises the following steps: when the situation that the power-on operation of a position corresponding to a preset key information point in a Kernel layer Modem power-on management module of the mobile terminal is in an abnormal state is monitored, reading an abnormal identifier corresponding to the power-on operation; matching the abnormal identifier with a pre-stored log identifier; if the abnormal identifier is successfully matched with the log identifier, searching log information associated with the log identifier according to the log identifier, and acquiring process information of a process corresponding to the power-on operation; and generating a restart log according to the process information and the log information so as to locate the restart reason of the mobile terminal according to the restart log. The invention improves the efficiency of positioning the restart reason of the mobile terminal and reduces the labor cost.

Description

Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method for restarting and positioning a mobile terminal, and a computer-readable storage medium.
Background
With the rapid development of terminal technology, mobile terminals such as mobile phones and tablet computers have become essential tools for people to work and live. The phenomenon that the mobile terminal automatically restarts can occur during the process of using the mobile terminal by a user, and the reason for automatically restarting the mobile terminal can be the reason which exists before the mobile terminal is listed on the market and is only not discovered by a developer. At this time, the user needs to return the mobile terminal to the factory, and a lot of testing work is performed by a tester to determine the reason for restarting the mobile terminal. At present, in the field of testing, a method for performing restart pressure testing on a mobile terminal operating system still adopts a manual testing method, and manually restarts a mobile phone and then performs pressure testing. However, this testing method is too labor-consuming and time-consuming, especially for a mobile terminal with a low BUG recurrence rate, for example, the mobile terminal may only have one or several BUGs after being restarted 1000 times, and the time and labor investment is too large and the output is small, and obviously, this method for analyzing the cause of the restart operation of the mobile terminal is very inefficient.
Disclosure of Invention
The invention mainly aims to provide a mobile terminal restart positioning method, a mobile terminal and a computer readable storage medium, aiming at solving the problem that the reason why the restart operation of the mobile terminal cannot be quickly positioned in the prior art.
In order to achieve the above object, the present invention provides a method for restarting and positioning a mobile terminal, wherein the method for restarting and positioning the mobile terminal comprises:
when the situation that the power-on operation of a position corresponding to a preset key information point in a mobile terminal Kernel layer Modem power-on management module is in an abnormal state is monitored, reading an abnormal identifier corresponding to the power-on operation;
matching the abnormal identifier with a pre-stored log identifier;
if the abnormal identification is successfully matched with the log identification, searching log information associated with the log identification according to the log identification, and acquiring process information of a process corresponding to the power-on operation;
and generating a restart log according to the process information and the log information so as to locate the restart reason of the mobile terminal according to the restart log.
Optionally, when it is monitored that the power-on operation at the position corresponding to the preset key information point in the mobile terminal Kernel layer power-on management module is in an abnormal state, the step of reading the abnormal identifier corresponding to the power-on operation includes:
when a monitoring instruction for monitoring a key information point preset in a Kernel layer Modem power-on management module of the mobile terminal is detected, reading a state value of the key information point according to the monitoring instruction;
determining whether the power-on operation of the corresponding position of the key information point is in an abnormal state or not according to the state value;
and if the power-on operation is in an abnormal state, reading an abnormal identifier corresponding to the power-on operation.
Optionally, the step of reading the state value of the key information point according to the monitoring instruction includes:
reading a preset number of first state values of the key information points according to the monitoring instruction and a first reading frequency;
if the power-on operation is determined to be in a normal state according to the first state values of the preset number, reading a second state value of the preset number of the key information points according to a second reading frequency;
and if the power-on operation is determined to be in a normal state according to the preset number of second state values, reading a third state value of the key information point according to a third reading frequency, wherein the second reading frequency is greater than the first reading frequency and less than the third reading frequency.
Optionally, after the step of reading the preset number of first state values of the key information points according to the monitoring instruction and the first reading frequency, the method further includes:
if the power-on operation is determined to be in an abnormal state according to one first state value, detecting whether the mobile terminal is subjected to restarting operation;
and if the mobile terminal is not subjected to restarting operation, reading the state value of the key information point according to a fourth reading frequency.
Optionally, before the step of generating a restart log according to the process information and the log information to locate the restart reason of the mobile terminal according to the restart log, the method further includes:
judging whether the power-on operation of the corresponding position of the key information point is monitored again in a first preset time after the process information is acquired to be in an abnormal state;
and if the power-on operation of the corresponding position of the key information point is monitored to be in an abnormal state again in the first preset time, storing the process information.
Optionally, after the step of generating a restart log according to the process information and the log information to locate the restart reason of the mobile terminal according to the restart log, the method further includes:
storing the restart log, and determining the restart log stored in a second preset time;
and performing redundancy removing operation on the log information stored in the second preset time so as to save storage space.
Optionally, before the step of reading an abnormal identifier corresponding to a power-on operation after it is monitored that the power-on operation at a position corresponding to a preset key information point in the mobile terminal Kernel layer power-on management module is in an abnormal state, the method further includes:
determining an identification node, a loading node, an operation node, an instruction allocation node, a cross-process data communication node, an unloading node, a memory resource application and release node and a disk read-write operation node of a call flow of a Modem power-on management module in the Kernel layer;
and setting key information points in the identification node, the loading node, the running node, the instruction allocation node, the cross-process data communication node, the unloading node, the memory resource application and release node and the disk read-write operation node.
Optionally, before the step of reading an abnormal identifier corresponding to a power-on operation after it is monitored that the power-on operation at a position corresponding to a preset key information point in the mobile terminal Kernel layer power-on management module is in an abnormal state, the method further includes:
and determining a thread corresponding to the monitoring instruction for monitoring whether the power-on operation at the position corresponding to the key information point is in an abnormal state, and deploying the thread in a Kthreded process and a Kernel process of the Kernel layer.
In addition, in order to achieve the above object, the present invention further provides a mobile terminal, where the mobile terminal includes a memory, a processor, and a mobile terminal reboot positioning program stored in the memory and executable on the processor, and the mobile terminal reboot positioning program, when executed by the processor, implements the steps of the mobile terminal reboot positioning method as described above.
Furthermore, to achieve the above object, the present invention further provides a computer readable storage medium, having a mobile terminal restart location program stored thereon, which when executed by a processor implements the steps of the mobile terminal restart location method as described above.
When the situation that the power-on operation of a position corresponding to a preset key information point in a mobile terminal Kernel layer Modem power-on management module is in an abnormal state is monitored, reading an abnormal identifier corresponding to the power-on operation; matching the abnormal identifier with a pre-stored log identifier; if the abnormal identification is successfully matched with the log identification, searching log information associated with the log identification according to the log identification, and acquiring process information of a process corresponding to the power-on operation; and generating a restart log according to the process information and the log information so as to locate the restart reason of the mobile terminal according to the restart log. The method and the device have the advantages that the restart log corresponding to the restart operation of the mobile terminal is obtained in advance before the restart operation of the mobile terminal does not occur, so that corresponding workers can quickly determine the reason causing the restart of the mobile terminal according to the restart log after the restart operation of the mobile terminal occurs, the efficiency of locating the restart reason of the mobile terminal is improved, and the labor cost is reduced.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a terminal for implementing various embodiments of the present invention;
fig. 2 is a diagram of a communication network system architecture according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a restart positioning method for a mobile terminal according to a first embodiment of the present invention;
FIG. 4 is a flowchart illustrating step S10 according to the embodiment of the present invention;
fig. 5 is a flowchart illustrating a restart location method of a mobile terminal according to a third embodiment of the present invention;
fig. 6 is a flowchart illustrating a restart location method of a mobile terminal according to a fourth embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, Wi-Fi module 102, audio output unit 103, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal 100 depicted in fig. 1 is not intended to be limiting of the mobile terminal 100, and that the mobile terminal 100 may include more or less components than those shown, or some components may be combined, or a different arrangement of components.
The various components of the mobile terminal 100 are described in detail below with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution), etc.
Wi-Fi belongs to a short-distance wireless transmission technology, and the mobile terminal 100 can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the Wi-Fi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the Wi-Fi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal 100, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the Wi-Fi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal 100, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal 100 and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby monitoring the mobile terminal 100 as a whole. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
Furthermore, in the mobile terminal shown in fig. 1, the processor 110 is configured to call the mobile terminal restart positioning program stored in the memory 109, and perform the following operations:
when the situation that the power-on operation of a position corresponding to a preset key information point in a power-on management module of the mobile terminal 100Kernel layer is in an abnormal state is monitored, reading an abnormal identifier corresponding to the power-on operation;
matching the abnormal identifier with a pre-stored log identifier;
if the abnormal identification is successfully matched with the log identification, searching log information associated with the log identification according to the log identification, and acquiring process information of a process corresponding to the power-on operation;
and generating a restart log according to the process information and the log information so as to locate a restart reason of the mobile terminal 100 according to the restart log.
Further, when it is monitored that the power-on operation at the position corresponding to the preset key information point in the power-on management module of the mobile terminal 100Kernel layer Modem is in an abnormal state, the step of reading the abnormal identifier corresponding to the power-on operation includes:
when a monitoring instruction for monitoring a key information point preset in a power-on management module of the mobile terminal 100Kernel layer Modem is detected, reading a state value of the key information point according to the monitoring instruction;
determining whether the power-on operation of the corresponding position of the key information point is in an abnormal state or not according to the state value;
and if the power-on operation is in an abnormal state, reading an abnormal identifier corresponding to the power-on operation.
Further, the step of reading the state value of the key information point according to the monitoring instruction includes:
reading a preset number of first state values of the key information points according to the monitoring instruction and a first reading frequency;
if the power-on operation is determined to be in a normal state according to the first state values of the preset number, reading a second state value of the preset number of the key information points according to a second reading frequency;
and if the power-on operation is determined to be in a normal state according to the preset number of second state values, reading a third state value of the key information point according to a third reading frequency, wherein the second reading frequency is greater than the first reading frequency and less than the third reading frequency.
Further, after the step of reading the preset number of first state values of the key information points according to the monitoring instruction and the first reading frequency, the processor 110 is further configured to call the mobile terminal 100 stored in the memory 109 to restart the location program, so as to implement the following steps:
if the power-on operation is determined to be in an abnormal state according to one first state value, detecting whether the mobile terminal 100 is subjected to a restart operation;
and if the mobile terminal 100 does not perform the restart operation, reading the state value of the key information point according to a fourth reading frequency.
Further, before the step of generating a restart log according to the process information and the log information to locate the restart reason of the mobile terminal 100 according to the restart log, the processor 110 is further configured to call a restart location program of the mobile terminal 100 stored in the memory 109 to implement the following steps:
judging whether the power-on operation of the corresponding position of the key information point is monitored again in a first preset time after the process information is acquired to be in an abnormal state;
and if the power-on operation of the corresponding position of the key information point is monitored to be in an abnormal state again in the first preset time, storing the process information.
Further, after the step of generating a restart log according to the process information and the log information to locate the restart reason of the mobile terminal 100 according to the restart log, the processor 110 is further configured to call a restart location program of the mobile terminal 100 stored in the memory 109 to implement the following steps:
storing the restart log, and determining the restart log stored in a second preset time;
and performing redundancy removing operation on the log information stored in the second preset time so as to save storage space.
Further, before the step of reading the abnormal identifier corresponding to the power-on operation after it is monitored that the power-on operation at the position corresponding to the preset key information point in the power-on management module of the Kernel layer Modem of the mobile terminal 100 is in an abnormal state, the processor 110 is further configured to call the mobile terminal 100 stored in the memory 109 to restart the positioning program, so as to implement the following steps:
determining an identification node, a loading node, an operation node, an instruction allocation node, a cross-process data communication node, an unloading node, a memory resource application and release node and a disk read-write operation node of a call flow of a Modem power-on management module in the Kernel layer;
and setting key information points in the identification node, the loading node, the running node, the instruction allocation node, the cross-process data communication node, the unloading node, the memory resource application and release node and the disk read-write operation node.
Further, before the step of reading the abnormal identifier corresponding to the power-on operation after it is monitored that the power-on operation at the position corresponding to the preset key information point in the power-on management module of the Kernel layer Modem of the mobile terminal 100 is in an abnormal state, the processor 110 is further configured to call the mobile terminal 100 stored in the memory 109 to restart the positioning program, so as to implement the following steps:
and determining a thread corresponding to the monitoring instruction for monitoring whether the power-on operation at the position corresponding to the key information point is in an abnormal state, and deploying the thread in a Kthreded process and a Kernel process of the Kernel layer.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the mobile terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above terminal hardware structure and communication network system, the present invention provides various embodiments of the mobile terminal restart positioning method.
The invention provides a mobile terminal restart positioning method.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for restarting a mobile terminal according to a first embodiment of the present invention.
In the present embodiment, an embodiment of a method for restarting a location by a mobile terminal is provided, and it should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here.
In this embodiment, the method for restarting and positioning a mobile terminal includes:
step S10, when it is monitored that the power-on operation at the position corresponding to the preset key information point in the mobile terminal Kernel layer power-on management module is in an abnormal state, reading an abnormal identifier corresponding to the power-on operation.
The method mainly aims at scenes needing to use the power-on operation in a mobile terminal Kernel layer Modem power-on management module, in the Modem power-on management module, the mobile terminal classifies the scenes using the power-on operation according to the attribute of the power-on operation, and classification rules can be set according to specific requirements, for example, the scenes using the power-on operation are classified according to the power-on state corresponding to the power-on operation. The power-on state includes, but is not limited to, an active state, a standby state, a light sleep state, a deep sleep state, a low power consumption state, and the like. The transition from one power-on state to another has corresponding call flow and/or sequential logic. Therefore, after the scenes using the power-on operation are classified, the mobile terminal determines a calling process and/or sequential logic corresponding to the state transition, and standardizes the calling process and/or sequential logic, namely, key information points are set in main functional nodes of the calling process and/or sequential logic, so as to obtain the calling process corresponding to standardization of the power-on management module of the Modem and the internal basic functional sequential logic thereof. The Kernel layer is a system Kernel layer of the mobile terminal, and is mainly used for performing related work such as initialization process management, memory management, Display loading, Camera Driver and Binder Driver, and creating Kernel daemon processes such as Kernel work thread kworkder, soft interrupt thread ksofirqd and soft interrupt thread thermal.
When the mobile terminal monitors that the power-on operation of a position corresponding to a preset key information point in a Kernel layer Modem power-on management module of the mobile terminal is in an abnormal state, the mobile terminal reads an abnormal identifier corresponding to the power-on operation. The key information points are information points which are preset in a calling process corresponding to the Modem power-on management module and basic function sequential logic inside the Modem power-on management module and are used for monitoring whether the calling process and the sequential logic are in abnormal states. When the power-on operation of the key information points corresponding to the call flow and/or the sequential logic is monitored to be in an abnormal state, the corresponding call flow and/or the sequential logic is confirmed to be in the abnormal state. The abnormal mark corresponding to the power-on operation is a preset mark used for indicating that the power-on operation is in an abnormal state. It should be noted that the abnormal identifiers of the power-on operation corresponding to different key information points are different. The setting rule of the abnormal power-on operation identifier can be set according to specific requirements, and only the power-on operation corresponding to different key information points can be identified. In this embodiment, the power-up operation in the abnormal state may be represented as Powerup Error.
Further, referring to fig. 4, step S10 includes:
step S11, after detecting a monitoring instruction for monitoring a key information point preset in the mobile terminal Kernel layer Modem power-on management module, reading a state value of the key information point according to the monitoring instruction.
And step S12, determining whether the power-on operation of the corresponding position of the key information point is in an abnormal state according to the state value.
In step S13, if the power-on operation is in an abnormal state, the abnormal flag corresponding to the power-on operation is read.
When the mobile terminal detects a monitoring instruction for monitoring a preset key information point in a Kernel layer Modem power-on management module of the mobile terminal, reading a state value of the preset key information point according to the monitoring instruction, and determining whether the power-on operation of a position corresponding to the preset key information point is in an abnormal state or not according to the state value. And if the power-on operation of the corresponding position of the key information point is determined to be in an abnormal state according to the state value, the mobile terminal reads an abnormal identifier corresponding to the power-on operation. If the power-on operation of the corresponding position of the key information point is determined to be in a normal state according to the state value, the fact that the corresponding abnormal identifier does not exist in the power-on operation is indicated, and the abnormal identifier corresponding to the power-on operation cannot be read by the mobile terminal.
Wherein, the state value and the abnormal state have corresponding relation. In this embodiment, the corresponding relationship between the state value and the abnormal state may be limited according to specific needs, and is not limited herein. If the state value corresponding to a certain key information point is set to be 0, determining that the power-on operation of the corresponding position of the key information point is in a normal state; and when the state value corresponding to a certain key information point is 1, determining that the power-on operation of the position corresponding to the key information point is in an abnormal state. In this embodiment, the power-on operation being in the abnormal state may be understood as a power-on operation abnormality.
And step S20, matching the abnormal identifier with the pre-stored log identifier.
Step S30, if the abnormal mark is successfully matched with the log mark, the log information associated with the log mark is searched according to the log mark, and the process information of the process corresponding to the power-on operation is obtained.
After the abnormal identifier corresponding to the power-on operation is obtained, the mobile terminal triggers a matching instruction for matching the obtained abnormal identifier with the log identifier stored in the database storing the restart operation reasons. And after the matching instruction is triggered, the mobile terminal matches the abnormal identifier with the log identifier according to the matching instruction. If the abnormal identifier is successfully matched with the log identifier, the mobile terminal searches the log information associated with the log identifier in a database storing the restart operation reason according to the log identifier and acquires the process information of the process corresponding to the power-on operation. Note that the log identifier is an identifier corresponding to log information that causes the restart operation of the mobile terminal. The log information includes, but is not limited to, a node name of the power-on operation abnormality occurring in the Modem power-on management module and a position of the power-on operation abnormality occurring in the Modem power-on management module. The process information includes, but is not limited to, when the power-on operation is in an abnormal state, a name of a corresponding process, that is, a name of a process involved in the power-on operation, a name of an associated thread, an ID (identification) and a thread ID of a process involved in the power-on operation or an associated process, and a functional node of the Modem power-on management module corresponding to the key information point.
In this embodiment, when the abnormal identifier is consistent with the pre-stored log identifier, it is determined that the abnormal identifier is successfully matched with the pre-stored log identifier; and if the abnormal identifier is inconsistent with the pre-stored log identifier, confirming that the abnormal identifier is failed to be matched with the pre-stored log identifier. If the abnormal identifier is a, finding the log identifier which is the identifier a in the database, confirming that the abnormal identifier is successfully matched with the pre-stored log identifier, and otherwise, confirming that the abnormal identifier is unsuccessfully matched with the pre-stored log identifier. In other embodiments, it may be set that when the abnormal identifier is associated with the pre-stored log identifier, it is determined that the abnormal identifier is successfully matched with the pre-stored log identifier, and otherwise, it is determined that the abnormal identifier is unsuccessfully matched with the pre-stored log identifier. If the log identifier associated with the abnormal identifier a1 is set as a2, if the abnormal identifier of the power-on operation corresponding to a certain key information point is a1 and the log identifier identified as a2 is found in the database, it is determined that the matching between the abnormal identifier and the pre-stored log identifier is successful, otherwise, it is determined that the matching between the abnormal identifier and the pre-stored log identifier is failed.
And step S40, generating a restart log according to the process information and the log information, so as to locate the restart reason of the mobile terminal according to the restart log.
After the process information and the log information are acquired, the mobile terminal generates a restart log according to the process information and the log information and outputs the restart log to a specified position, so that corresponding workers can quickly acquire the restart log after the restart operation of the mobile terminal occurs, and the restart reason causing the restart operation of the mobile terminal is quickly determined according to the restart log.
Further, in the process of generating the restart log according to the process information and the log information, the mobile terminal generates the restart log according to a specific format, so that a corresponding worker can quickly analyze the reason of the restart operation of the mobile terminal according to the restart log.
Further, the method for restarting and positioning the mobile terminal further comprises the following steps:
step a, determining whether the electrifying operation at the position corresponding to the monitoring key information point is in a thread corresponding to the monitoring instruction in an abnormal state, and deploying the thread in a Kthreded process and a Kernel process of a Kernel layer.
Further, when the mobile terminal deploys the Kernel layer process, determining a monitoring instruction corresponding thread for monitoring whether the power-on operation at a position corresponding to a preset key point of the Kernel layer Modem power-on management module is in an abnormal state, and deploying the thread corresponding to the monitoring instruction in the kthread process and the Kernel process of the Kernel layer, so that whether the power-on operation in the Kernel layer Modem power-on management module is in the abnormal state can be monitored in the whole process. It should be noted that the thread corresponding to the monitoring instruction is independently run in the mobile terminal.
In the embodiment, when the situation that the power-on operation of a position corresponding to a preset key information point in a mobile terminal Kernel layer Modem power-on management module is in an abnormal state is monitored, an abnormal identifier corresponding to the power-on operation is read; matching the abnormal identifier with a pre-stored log identifier; if the abnormal identifier is successfully matched with the log identifier, searching log information associated with the log identifier according to the log identifier, and acquiring process information of a process corresponding to the power-on operation; and generating a restart log according to the process information and the log information so as to locate the restart reason of the mobile terminal according to the restart log. The method and the device have the advantages that the restart log corresponding to the restart operation of the mobile terminal is obtained in advance before the restart operation of the mobile terminal does not occur, so that corresponding workers can quickly determine the reason causing the restart of the mobile terminal according to the restart log after the restart operation of the mobile terminal occurs, the efficiency of locating the restart reason of the mobile terminal is improved, and the labor cost is reduced.
Further, a second embodiment of the method for restarting the positioning of the mobile terminal is provided based on the first embodiment. The difference between the second embodiment of the mobile terminal restart location method and the first embodiment of the mobile terminal restart location method is that the step of reading the state value of the key information point according to the monitoring instruction comprises:
and b, reading a preset number of first state values of the key information points according to the monitoring instruction and the first reading frequency.
And c, if the power-on operation is determined to be in a normal state according to the first state values of the preset number, reading the second state values of the preset number of the key information points according to the second reading frequency.
And d, if the power-on operation is determined to be in the normal state according to the preset number of second state values, reading a third state value of the key information point according to a third reading frequency, wherein the second reading frequency is greater than the first reading frequency and less than the third reading frequency.
The process of the mobile terminal reading the state value of the key information point according to the monitoring instruction is as follows: the mobile terminal reads the first state values of the preset number of the key information points according to the monitoring instruction and the first reading frequency, and judges whether the read first state values of the preset number can determine that the power-on operation is in a normal state or not. If the read first state values of the preset number can determine that the power-on operation is in the normal state, reading second state values of the preset number of the key information points according to a second reading frequency, and judging whether the read second state values of the preset number can determine that the power-on operation is in the normal state or not. If the read second state values of the preset number can determine that the power-on operation is in the normal state, reading third state values of the preset number of the key information points according to a third reading frequency, and determining whether the power-on operation at the corresponding positions of the key information points is in the abnormal state according to the third state values.
The second reading frequency is greater than the first reading frequency and less than the third reading frequency. The first reading frequency, the second reading frequency, the third reading frequency and the preset number can be set according to specific needs, for example, the first reading frequency can be set to be read every 1 second, the second reading frequency can be set to be read every 3 seconds, the third reading frequency can be set to be read every 5 seconds, and the preset number can be set to be 5. Namely, after the mobile terminal continuously reads the state values at 1 second intervals for 5 times according to the monitoring instruction, the state values corresponding to the key information points are continuously read for 5 times every 3 seconds, if the 5 state values read for 3 seconds indicate that the power-on operation is in the normal state, the state values corresponding to the key information points are continuously read for 5 times every 5 seconds, and whether the power-on operation at the corresponding positions of the key information points is in the abnormal state is determined according to the 5 state values continuously read for 5 seconds.
It should be noted that, in other embodiments, the reading frequency for setting the status value of the read key information point may be increased, for example, if 5 status values read continuously every 5 seconds indicate that the power-on operation is in the normal state, the status value corresponding to the key information point is read continuously every 5 seconds. This is not limited in the present embodiment.
Further, the method for restarting and positioning the mobile terminal further comprises the following steps:
and e, if the power-on operation is determined to be in an abnormal state according to a first state value, detecting whether the mobile terminal is subjected to restarting operation.
And f, if the mobile terminal is not restarted, reading the state value of the key information point according to a fourth reading frequency.
Further, if the power-on operation is determined to be in an abnormal state according to one first state value in the process of reading the preset number of first state values of the key information points according to the monitoring instruction and the first reading frequency, the mobile terminal detects whether the power-on operation is restarted or not. And if the mobile terminal is not subjected to the restarting operation, the mobile terminal reads the state value of the key information point according to the fourth reading frequency. Further, if the mobile terminal is restarted, it is indicated that the mobile terminal is initialized, and the mobile terminal detects whether a monitoring instruction for monitoring a state value of a preset key information point in a Kernel layer Modem power-on management module of the mobile terminal is detected. The fourth reading frequency can be set according to specific needs, and if the fourth reading frequency is set to be equal to the first reading frequency, the fourth reading frequency and the first reading frequency are set to be read once every 1 second; or set to be unequal to the first reading frequency, such as setting the fourth reading frequency to be read every 0.8 seconds, or every 2 seconds.
For ease of understanding, the process is illustrated: when the mobile terminal continuously reads the state value of the key information point for 5 times at intervals of 1 second according to the monitoring instruction, if the power-on operation of the corresponding position is determined to be in an abnormal state according to the state value of the key information point read at the 3 rd second and the mobile terminal is not restarted, the mobile terminal reads the state value of the key information point once at intervals of 0.8 (at this time, the fourth reading frequency is set to be 0.8 second reading time).
It can be understood that, if it is determined that the power-on operation is in the abnormal state according to one of the second state value and the third state value, the mobile terminal detects whether the restart operation occurs.
In the embodiment, by setting the reading frequency of the key information point, when the power-on operation at the corresponding position of the key information point of the power-on management module of the Modem is in the normal state, the reading frequency of the key information point state value is increased, so that the number of times of reading the key information point state value is reduced when the power-on operation is in the normal state.
Further, a third embodiment of the method for restarting the positioning of the mobile terminal is provided based on the first embodiment. The third embodiment of the mobile terminal restart location method differs from the first and/or second embodiment of the mobile terminal restart location method in that, referring to fig. 5, the mobile terminal restart location method further includes:
step S50, storing the restart log, and determining the restart log stored in the second preset time.
In step S60, a redundancy removing operation is performed on the log information stored in the second preset time to save the storage space.
And after the restart log is generated, the mobile terminal stores the restart log, determines the restart log stored in the second preset time, and executes redundancy removing operation on the restart log stored in the second preset time so as to save the storage space of the mobile terminal. Specifically, in the process of executing redundancy removing operation, only one restart log belonging to the same type of restart operation is stored, other restart logs corresponding to the stored type of restart operation are deleted, the number of the restart logs belonging to the same type of restart operation and whether the power-on operation is converted from the abnormal state to the normal state are correspondingly recorded, and the conversion time of the power-on operation from the abnormal state to the normal state is recorded. The second preset time can be set according to specific needs, for example, the second preset time can be set to 45 minutes, 60 minutes, or 100 minutes, etc. It should be noted that, in the process of performing classified storage on the restart log, the restart log may be classified and stored according to the reason of the restart, or may be classified according to the location of the restart, which is not limited herein.
For example, the abnormal power-on operation occurs in 60 minutes from 10 o 'clock to 11 o' clock, and a total of 1000 restart logs are stored in the mobile terminal. At this time, the mobile terminal classifies restart logs of restart operations belonging to the same category into one category before the power-on operation is changed from the abnormal state to the normal state. If 520 restart logs correspond to the A1 restart operations, 360 restart logs correspond to the B1 restart operations, and 120 restart logs correspond to the C1 restart operations, only one restart log corresponding to the A1 restart operations is stored, the restart logs corresponding to the rest 519 restart operations of the A1 are deleted, and the number of the restart logs corresponding to the A1 restart operations is recorded as 520; storing a restart log corresponding to the B1 type restart operation, deleting the rest 359 restart logs corresponding to the B1 type restart operation, and recording the number of the restart logs corresponding to the B1 type restart operation as 360; storing a restart log corresponding to the C1 type restart operation, deleting the rest 119 restart logs corresponding to the C1 type restart operation, and recording the number of the restart logs corresponding to the C1 type restart operation as 120.
It should be noted that the solution of the redundancy elimination operation may also be applicable to process information and log information, and when the redundancy elimination operation is performed on the process information and the log information, the specific operation process is consistent with the redundancy elimination operation process performed on the restart log, which is not described herein again.
In the embodiment, redundancy removal operation is performed on the restart log stored in the second preset time, so that the storage space of the mobile terminal is saved.
Further, the method for restarting and positioning the mobile terminal further comprises the following steps:
and g, judging whether the power-on operation of the corresponding position of the key information point is monitored again in the first preset time after the process information is acquired to be in an abnormal state.
And h, if the power-on operation of the corresponding position of the key information point is monitored to be in an abnormal state again in the first preset time, storing the process information.
Further, after the mobile terminal acquires the process information, the mobile terminal determines whether the power-on operation of the corresponding position of the key information point is monitored again in an abnormal state within a first preset time after the process information is acquired. If the power-on operation of the corresponding position of the key information point is monitored to be in an abnormal state again within the first preset time, the mobile terminal stores the process information so as to generate a restart log according to the process information. Further, if the power-on operation of the corresponding position of the key information point is not monitored to be in an abnormal state again within the first preset time, the mobile terminal deletes the acquired process information. The first preset time can be set according to specific needs, for example, the first preset time can be set to 3 minutes, 5 minutes, or 8 minutes.
Further, in the process of storing the process information, the mobile terminal determines the acquisition time of acquiring the process information, stores the process information from front to back according to the acquisition time, and arranges the last acquired process information in the front.
In this embodiment, whether to store the process information is determined by determining whether to monitor that the power-on operation is in an abnormal state again within the first preset time, so as to control the amount of the stored process information, and thus save the storage space of the mobile terminal.
Further, a fourth embodiment of the method for restarting the positioning of the mobile terminal is provided based on the first embodiment. The fourth embodiment of the mobile terminal restart location method differs from the first and/or second embodiment of the mobile terminal restart location method in that, referring to fig. 6, the mobile terminal restart location method further includes:
step S70, determining an identification node, a loading node, an operation node, an instruction allocation node, a cross-process data communication node, an unloading node, a memory resource application and release node and a disk read-write operation node of the Modem power-on management module calling process in the Kernel layer.
And step S80, setting key information points in the identification node, the loading node, the operation node, the instruction allocation node, the cross-process data communication node, the unloading node, the memory resource application and release node and the disk read-write operation node.
The method and the device can accurately and quickly locate the reason for the restarting operation of the Modem power-on management module in the Kernel layer of the mobile terminal. The method comprises the steps that a mobile terminal determines an identification node, a loading node, an operation node, an instruction allocation node, a cross-process data communication node, an unloading node, a memory resource application and release node and a disk read-write operation node of a call flow of a Modem power-on management module in a Kernel layer of the mobile terminal, and sets key information points in the identification node, the loading node, the operation node, the instruction allocation node, the cross-process data communication node, the unloading node, the memory resource application and release node and the disk read-write operation node so as to monitor whether the power-on operation of the corresponding node is in an abnormal state or not through the key information points. It can be understood that the identification node, the loading node, the running node, the instruction allocation node, the cross-process data communication node, the unloading node, the memory resource application and release node, and the disk read-write operation node are important nodes in the call flow of the power-on management module of the Modem. The frequency control node is a power-on frequency control node.
Further, in order to quickly locate a restart reason of the mobile terminal when a restart operation occurs, the mobile terminal determines a sequential logic of each function in the Modem power-on management module, and sets a key information point in each function node corresponding to the sequential logic. For example, the sequential logic of a certain function in the power-on management module of the Modem is as follows: a → B → C → D, then set key information points at node A, node B, node C and node D, respectively.
It can be understood that, because the key information points are set in the call flow and the timing logic of the service corresponding to the different modules of the mobile terminal, after it is determined that the restart operation occurs in the mobile terminal, the type of the restart operation can be determined according to the key information points, that is, it is determined that the restart operation is caused by an abnormality occurring in the Java framework layer, the Native framework layer, or the Modem power-on management module in the Kernel layer.
In the embodiment, the key information points are set on the identification node, the loading node, the running node, the instruction allocation node, the cross-process data communication node, the unloading node, the memory resource application and release node and the disk read-write operation node of the call flow of the Modem power-on management module, and whether the corresponding power-on operation is in an abnormal state is judged by monitoring each key information point in the Modem power-on management module, so as to locate the restart reason of the restart operation of the important node in the call flow of the Modem power-on management module of the mobile terminal.
In addition, the embodiment of the invention also provides a computer readable storage medium.
The computer readable storage medium has a mobile terminal restart positioning program stored thereon, and the mobile terminal restart positioning program when executed by a processor implements the following steps:
when the situation that the power-on operation of a position corresponding to a preset key information point in a mobile terminal Kernel layer Modem power-on management module is in an abnormal state is monitored, reading an abnormal identifier corresponding to the power-on operation;
matching the abnormal identifier with a pre-stored log identifier;
if the abnormal identification is successfully matched with the log identification, searching log information associated with the log identification according to the log identification, and acquiring process information of a process corresponding to the power-on operation;
and generating a restart log according to the process information and the log information so as to locate the restart reason of the mobile terminal according to the restart log.
Further, when it is monitored that the power-on operation at the position corresponding to the preset key information point in the mobile terminal Kernel layer power-on management module is in an abnormal state, the step of reading the abnormal identifier corresponding to the power-on operation includes:
when a monitoring instruction for monitoring a key information point preset in a Kernel layer Modem power-on management module of the mobile terminal is detected, reading a state value of the key information point according to the monitoring instruction;
determining whether the power-on operation of the corresponding position of the key information point is in an abnormal state or not according to the state value;
and if the power-on operation is in an abnormal state, reading an abnormal identifier corresponding to the power-on operation.
Further, the step of reading the state value of the key information point according to the monitoring instruction includes:
reading a preset number of first state values of the key information points according to the monitoring instruction and a first reading frequency;
if the power-on operation is determined to be in a normal state according to the first state values of the preset number, reading a second state value of the preset number of the key information points according to a second reading frequency;
and if the power-on operation is determined to be in a normal state according to the preset number of second state values, reading a third state value of the key information point according to a third reading frequency, wherein the second reading frequency is greater than the first reading frequency and less than the third reading frequency.
Further, after the step of reading the preset number of first state values of the key information points according to the monitoring instruction and the first reading frequency, the mobile terminal restart positioning program, when executed by the processor, implements the following steps:
if the power-on operation is determined to be in an abnormal state according to one first state value, detecting whether the mobile terminal is subjected to restarting operation;
and if the mobile terminal is not subjected to restarting operation, reading the state value of the key information point according to a fourth reading frequency.
Further, before the step of generating a restart log according to the process information and the log information to locate the restart reason of the mobile terminal according to the restart log, the mobile terminal restart location program implements, when executed by a processor, the steps of:
judging whether the power-on operation of the corresponding position of the key information point is monitored again in a first preset time after the process information is acquired to be in an abnormal state;
and if the power-on operation of the corresponding position of the key information point is monitored to be in an abnormal state again in the first preset time, storing the process information.
Further, after the step of generating a restart log according to the process information and the log information to locate the restart reason of the mobile terminal according to the restart log, the mobile terminal restart location program when executed by the processor implements the steps of:
storing the restart log, and determining the restart log stored in a second preset time;
and performing redundancy removing operation on the log information stored in the second preset time so as to save storage space.
Further, before the step of reading the abnormal identifier corresponding to the power-on operation after the power-on operation of the position corresponding to the preset key information point in the mobile terminal Kernel layer power-on management module is monitored to be in an abnormal state, the following steps are implemented when the mobile terminal restart positioning program is executed by the processor:
determining an identification node, a loading node, an operation node, an instruction allocation node, a cross-process data communication node, an unloading node, a memory resource application and release node and a disk read-write operation node of a call flow of a Modem power-on management module in the Kernel layer;
and setting key information points in the identification node, the loading node, the running node, the instruction allocation node, the cross-process data communication node, the unloading node, the memory resource application and release node and the disk read-write operation node.
Further, before the step of reading the abnormal identifier corresponding to the power-on operation after the power-on operation of the position corresponding to the preset key information point in the mobile terminal Kernel layer power-on management module is monitored to be in an abnormal state, the following steps are implemented when the mobile terminal restart positioning program is executed by the processor:
and determining a thread corresponding to the monitoring instruction for monitoring whether the power-on operation at the position corresponding to the key information point is in an abnormal state, and deploying the thread in a Kthreded process and a Kernel process of the Kernel layer.
The specific implementation manner of the computer-readable storage medium of the present invention is substantially the same as that of the above-mentioned embodiments of the method for restarting and positioning a mobile terminal, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A mobile terminal restart positioning method is characterized by comprising the following steps:
when the situation that the power-on operation of a preset key information point corresponding position in a power-on management module of a Modem of a Kernel layer Modem of a mobile terminal is in an abnormal state is monitored, reading an abnormal identifier corresponding to the power-on operation, wherein the key information point is an information point which is preset in a calling process corresponding to the power-on management module of the Modem and corresponding internal basic function sequential logic and is used for monitoring whether the calling process and the internal basic function sequential logic are in the abnormal state or not;
matching the abnormal identifier with a pre-stored log identifier;
if the abnormal identification is successfully matched with the log identification, searching log information associated with the log identification according to the log identification, and acquiring process information of a process corresponding to the power-on operation;
generating a restart log according to the process information and the log information so as to locate a restart reason of the mobile terminal according to the restart log;
the method comprises the following steps of when the situation that the power-on operation of a position corresponding to a preset key information point in a mobile terminal Kernel layer Modem power-on management module is in an abnormal state is monitored, reading an abnormal identifier corresponding to the power-on operation, wherein the step comprises the following steps:
when a monitoring instruction for monitoring a key information point preset in a Kernel layer Modem power-on management module of the mobile terminal is detected, reading a state value of the key information point according to the monitoring instruction;
determining whether the power-on operation of the corresponding position of the key information point is in an abnormal state or not according to the state value;
and if the power-on operation is in an abnormal state, reading an abnormal identifier corresponding to the power-on operation.
2. The method as claimed in claim 1, wherein the step of reading the status value of the key information point according to the monitoring instruction comprises:
reading a preset number of first state values of the key information points according to the monitoring instruction and a first reading frequency;
if the power-on operation is determined to be in a normal state according to the first state values of the preset number, reading a second state value of the preset number of the key information points according to a second reading frequency;
and if the power-on operation is determined to be in a normal state according to the preset number of second state values, reading a third state value of the key information point according to a third reading frequency, wherein the second reading frequency is greater than the first reading frequency and less than the third reading frequency.
3. The method as claimed in claim 2, wherein after the step of reading the preset number of first state values of the key information points according to the monitoring instruction and the first reading frequency, the method further comprises:
if the power-on operation is determined to be in an abnormal state according to one first state value, detecting whether the mobile terminal is subjected to restarting operation;
and if the mobile terminal is not subjected to restarting operation, reading the state value of the key information point according to a fourth reading frequency.
4. The method as claimed in claim 1, wherein before the step of generating a restart log according to the process information and the log information to locate the restart reason of the mobile terminal according to the restart log, the method further comprises:
judging whether the power-on operation of the corresponding position of the key information point is monitored again in a first preset time after the process information is acquired to be in an abnormal state;
and if the power-on operation of the corresponding position of the key information point is monitored to be in an abnormal state again in the first preset time, storing the process information.
5. The method as claimed in claim 1, wherein after the step of generating a restart log according to the process information and the log information to locate the restart reason of the mobile terminal according to the restart log, the method further comprises:
storing the restart log, and determining the restart log stored in a second preset time;
and performing redundancy removing operation on the log information stored in the second preset time so as to save storage space.
6. The method for restarting and positioning a mobile terminal according to any one of claims 1 to 5, wherein before the step of reading an abnormal identifier corresponding to a power-on operation after monitoring that the power-on operation at a position corresponding to a preset key information point in a Kernel layer Modem power-on management module of the mobile terminal is in an abnormal state, the method further comprises:
determining an identification node, a loading node, an operation node, an instruction allocation node, a cross-process data communication node, an unloading node, a memory resource application and release node and a disk read-write operation node of a call flow of a Modem power-on management module in the Kernel layer;
and setting key information points in the identification node, the loading node, the running node, the instruction allocation node, the cross-process data communication node, the unloading node, the memory resource application and release node and the disk read-write operation node.
7. The method for restarting and positioning a mobile terminal according to any one of claims 1 to 5, wherein before the step of reading an abnormal identifier corresponding to a power-on operation after monitoring that the power-on operation at a position corresponding to a preset key information point in a Kernel layer Modem power-on management module of the mobile terminal is in an abnormal state, the method further comprises:
and determining a thread corresponding to the monitoring instruction for monitoring whether the power-on operation at the position corresponding to the key information point is in an abnormal state, and deploying the thread in a Kthreded process and a Kernel process of the Kernel layer.
8. A mobile terminal, characterized in that the mobile terminal comprises a memory, a processor and a mobile terminal reboot positioning program stored on the memory and executable on the processor, the mobile terminal reboot positioning program, when executed by the processor, implementing the steps of the mobile terminal reboot positioning method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a mobile terminal relocation program that, when executed by a processor, implements the steps of the mobile terminal relocation method according to any one of claims 1 to 7.
CN201711467910.0A 2017-12-28 2017-12-28 Mobile terminal restart positioning method, mobile terminal and computer readable storage medium Active CN108197023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711467910.0A CN108197023B (en) 2017-12-28 2017-12-28 Mobile terminal restart positioning method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711467910.0A CN108197023B (en) 2017-12-28 2017-12-28 Mobile terminal restart positioning method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108197023A CN108197023A (en) 2018-06-22
CN108197023B true CN108197023B (en) 2021-11-16

Family

ID=62586231

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711467910.0A Active CN108197023B (en) 2017-12-28 2017-12-28 Mobile terminal restart positioning method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108197023B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199766A (en) * 2014-08-25 2014-12-10 广东欧珀移动通信有限公司 Abnormal running monitoring method and device
CN105930247A (en) * 2016-04-14 2016-09-07 北京小米移动软件有限公司 Method, device and mobile terminal for processing problem of system restart
CN106789306A (en) * 2016-12-30 2017-05-31 深圳市风云实业有限公司 Restoration methods and system are collected in communication equipment software fault detect
CN106888125A (en) * 2017-03-30 2017-06-23 努比亚技术有限公司 A kind of method for processing abnormal shutdown daily record, mobile terminal and server
CN107133143A (en) * 2017-04-25 2017-09-05 努比亚技术有限公司 Restart daily record merging method, method for uploading, system and readable storage medium storing program for executing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4544246B2 (en) * 2006-12-28 2010-09-15 ソニー株式会社 Control device and method, program, and recording medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199766A (en) * 2014-08-25 2014-12-10 广东欧珀移动通信有限公司 Abnormal running monitoring method and device
CN105930247A (en) * 2016-04-14 2016-09-07 北京小米移动软件有限公司 Method, device and mobile terminal for processing problem of system restart
CN106789306A (en) * 2016-12-30 2017-05-31 深圳市风云实业有限公司 Restoration methods and system are collected in communication equipment software fault detect
CN106888125A (en) * 2017-03-30 2017-06-23 努比亚技术有限公司 A kind of method for processing abnormal shutdown daily record, mobile terminal and server
CN107133143A (en) * 2017-04-25 2017-09-05 努比亚技术有限公司 Restart daily record merging method, method for uploading, system and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN108197023A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
CN108040159B (en) Restart positioning method based on hardware drive, mobile terminal and readable storage medium
CN107276789B (en) Log uploading method and device and computer readable storage medium
CN107357704B (en) Application program detection method, terminal and computer readable storage medium
CN108012031B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
CN108196968B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
CN108121613B (en) Memory page-based restart positioning method, mobile terminal and readable storage medium
CN108052430B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
CN107704133B (en) Screen freezing monitoring and solving method, mobile terminal and computer readable storage medium
CN107704132B (en) Method for detecting frozen screen of terminal, terminal and computer readable storage medium
CN109002547B (en) Log file storage method, mobile terminal and computer readable storage medium
CN108052437B (en) Restart positioning method, mobile terminal and computer readable storage medium
CN108255631B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
CN108089937B (en) Direct memory allocation-based restart positioning method, mobile terminal and storage medium
CN107908492B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN107766222B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN107908491B (en) Card screen detection and solution method, mobile terminal and computer readable storage medium
CN107346392B (en) Terminal system change identification method and device and readable storage medium
CN108228423B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
CN108076200B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
CN107748633B (en) Solution for terminal screen freezing, terminal and computer readable storage medium
CN108268335B (en) Restart positioning method based on system service, mobile terminal and storage medium
CN107872367B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN107832191B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN108629863B (en) Method for automatically signing in application program, mobile terminal and readable storage medium
US9928134B2 (en) Method and apparatus for repairing dynamic link library file

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