CN106326049B - A kind of Fault Locating Method and terminal - Google Patents

A kind of Fault Locating Method and terminal Download PDF

Info

Publication number
CN106326049B
CN106326049B CN201610674422.6A CN201610674422A CN106326049B CN 106326049 B CN106326049 B CN 106326049B CN 201610674422 A CN201610674422 A CN 201610674422A CN 106326049 B CN106326049 B CN 106326049B
Authority
CN
China
Prior art keywords
hardware device
mark
preset threshold
interruption frequency
terminal
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.)
Expired - Fee Related
Application number
CN201610674422.6A
Other languages
Chinese (zh)
Other versions
CN106326049A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610674422.6A priority Critical patent/CN106326049B/en
Publication of CN106326049A publication Critical patent/CN106326049A/en
Application granted granted Critical
Publication of CN106326049B publication Critical patent/CN106326049B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2247Verification or detection of system hardware configuration

Abstract

The embodiment of the invention discloses a kind of Fault Locating Method and terminals, wherein the Fault Locating Method can count the interruption frequency of hardware device;Detect whether the interruption frequency is greater than preset threshold;If more than preset threshold, then default storage region is written to by the mark of the hardware device is corresponding with the interruption frequency, so that the content in the default storage region can be read directly in maintenance personal, quickly and easily navigate to the hardware device of failure.

Description

A kind of Fault Locating Method and terminal
Technical field
The present invention relates to electronic technology field more particularly to a kind of Fault Locating Method and terminals.
Background technique
Currently, with the development of electronic technology, the terminals such as smart phone, tablet computer and portable device are to hardware mould The configuration requirement of block is higher and higher, however, frequently resulting in power consumption when these hardware modules break down increased dramatically, occupies eventually The process resource at end seriously affects the use of user.
In order to determine the hardware module for causing power consumption of terminal increased dramatically, it is often necessary to which maintenance personal opens terminal by hand The working condition of each hardware module is detected, fault location process is cumbersome.
Summary of the invention
The embodiment of the invention discloses a kind of Fault Locating Method and terminals, can simplify fault location process.
The embodiment of the invention discloses a kind of Fault Locating Methods, comprising:
Count the interruption frequency of hardware device;
Detect whether the interruption frequency is greater than preset threshold;
If more than preset threshold, then default storage is written to by the mark of the hardware device is corresponding with the interruption frequency Region.
Optionally, the method also includes:
If the interruption frequency be not more than the preset threshold, detect hardware device described in Clock Tree clock whether It is in the open state;
If it is in the open state, whether in operating status the hardware device is detected;
If being not in operating status, by the mark of the hardware device with clock is extremely corresponding is written to default memory block Domain.
Optionally, the method also includes:
Whether if the interruption frequency is not more than the preset threshold, detecting in restarting information includes the hardware device Mark;
If the mark comprising the hardware device, by the write-in corresponding with the restarting information of the mark of the hardware device To default storage region.
Optionally, the method also includes:
Close the hardware device.
Optionally, the method also includes:
Prompting message is exported, the prompting message is for prompting the hardware device abnormal, so that user chooses whether to close Close the hardware device.
Correspondingly, the embodiment of the invention also discloses a kind of terminals, comprising:
Statistical module, for counting the interruption frequency of hardware device;
Detection module, for detecting whether the interruption frequency is greater than preset threshold;
Writing module, for the detection module detect the interruption frequency be greater than preset threshold when, will it is described firmly The mark of part equipment is corresponding with the interruption frequency to be written to default storage region.
Optionally, the detection module is also used to detect clock when the interruption frequency is no more than the preset threshold Whether the clock of hardware device described in tree is in the open state;If it is in the open state, then whether the hardware device is detected It is in operating status;It is by the write module that the mark of the hardware device and clock is abnormal if being not in operating status Correspondence is written to default storage region.
Optionally, the detection module is also used to when the interruption frequency is no more than the preset threshold, and detection is restarted In information whether include the hardware device mark;It, will by the write module if the mark comprising the hardware device The mark of the hardware device is corresponding with the restarting information to be written to default storage region.
Optionally, the terminal further include:
Closedown module, for closing the hardware device.
Optionally, the terminal further include:
Output module, for exporting prompting message, the prompting message is for prompting the hardware device abnormal, to use Family chooses whether to close the hardware device.
As it can be seen that interruption frequency of the embodiment of the present invention by statistics hardware device, it is default whether detection interruption frequency is greater than Threshold value when if more than preset threshold, can be written to default storage region for the mark of hardware device is corresponding with interruption frequency, make The content in the default storage region can be read directly in maintenance personal, quickly and easily navigate to the hardware device of failure.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ability For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is a kind of flow diagram of Fault Locating Method disclosed by the embodiments of the present invention;
Fig. 2 is the flow diagram of another Fault Locating Method disclosed by the embodiments of the present invention;
Fig. 3 is the flow diagram of another Fault Locating Method disclosed by the embodiments of the present invention;
Fig. 4 is the flow diagram of another Fault Locating Method disclosed by the embodiments of the present invention;
Fig. 5 is a kind of structural schematic diagram of terminal disclosed by the embodiments of the present invention;
Fig. 6 is the structural schematic diagram of another terminal disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that the described embodiment is only a part of the embodiment of the present invention, instead of all the embodiments.Based on this Embodiment in invention, every other reality obtained by those of ordinary skill in the art without making creative efforts Example is applied, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a kind of Fault Locating Method and terminals, can simplify fault location process.
Referring to Fig. 1, Fig. 1 is a kind of flow diagram of Fault Locating Method disclosed by the embodiments of the present invention.Such as Fig. 1 institute Show, the Fault Locating Method the following steps are included:
The interruption frequency of S101, terminal statistics hardware device;
In the embodiment of the present invention, terminal can be the terminal devices such as mobile phone, tablet computer, laptop, net book, firmly Part equipment can be any hardware device or hardware module in terminal, and the embodiment of the present invention is without limitation.For example, terminal is When mobile phone, the hardware device in mobile phone may include radio circuit, memory, input unit, display unit, gravity sensor, The modules such as voicefrequency circuit, processor and power supply, the mobile phone may include more or fewer components, or the certain portions of combination Part or different component layouts;Mobile phone counts the interruption frequency of hardware device, Ke Yiwei, and mobile phone counts display unit triggering The interruption frequency of interruption, or mobile phone counts the interruption frequency of gravity sensor, and the embodiment of the present invention is without limitation.Its In, memory can be used for storing software program and module, execute the various function application of terminal, may include program storage area and Data storage area wherein, program storage area can application program needed for storage program area, at least one function, for example sound broadcasts Put program, image playing program etc.;Data storage area, which can be stored, uses created data (such as audio number according to terminal According to, phone directory etc.) etc..In the embodiment of the present invention, memory can be using eMMC (Embedded Multi Media Card) point Area, eMMC subregion are a kind of embedded non-volatile memory systems, are made of flash memory and flash controller two, the one of eMMC A clear superiority is to be integrated with a flash controller in a package, manages flash memory using unified flash interface, improves at data Manage rate.
In the embodiment of the present invention, the interruption frequency that step S101 terminal counts hardware device can be with are as follows: in kernel-driven layer Interrupt interface is added, starts background service thread to count the interruption frequency of hardware device.
S102, terminal detect whether the interruption frequency is greater than preset threshold;If more than preset threshold, then follow the steps S103 thens follow the steps S101 if being not more than preset threshold;
In the embodiment of the present invention, when the interruption frequency of hardware device is greater than the preset threshold, illustrate that the hardware device is different Often.The preset threshold can be terminal for the different frequency value of each hardware device corresponding storage in advance, be also possible to be directed to The same frequency value of all hardware equipment, if then this is pre- for the different frequency value of each hardware device corresponding storage in advance If threshold value is variable, whether disconnected frequency is greater than before preset threshold terminal in the detection, also needs to be obtained according to the mark of hardware device Take the corresponding preset threshold of the hardware device;If then the preset threshold is solid for the frequency values of all hardware equipment storage Definite value, terminal can directly detect whether the interruption frequency is greater than preset threshold.
In the embodiment of the present invention, when the interruption frequency of hardware device is not more than the preset threshold, illustrate the hardware device Normally, step S101 can be continued to execute, the hardware device is monitored.
S103, terminal are written to default storage region for the mark of the hardware device is corresponding with interruption frequency.The present invention is real It applies in example, when the interruption frequency of hardware device is greater than the preset threshold, illustrates that there are failures for the hardware device.
In the embodiment of the present invention, which is the region of memory defined in advance, such as EMMC (Embedded Multi Media Card) subregion, which is the embedded storages of terminals such as mobile phone, tablet computer and portable device Device;After-sales staff can read the content of the default storage region by data line interface or other modes, be known according to mark It does not have the hardware device there are failure.
The embodiment of the present invention can create interface in the kernel of terminal, start the corresponding process execution step of the interface S101 to S103, the process can be in backstage automatic cycling operatings, can also be by user's manual setting, for example, working as terminal power When consuming the abnormal phenomenon such as too fast, fever, fault location described in the embodiment of the present invention can be started as maintenance personal or user Method positions out of order hardware device.
As it can be seen that interruption frequency of the embodiment of the present invention by statistics hardware device, it is default whether detection interruption frequency is greater than Threshold value when if more than preset threshold, can be written to default storage region for the mark of hardware device is corresponding with interruption frequency, make The content in the default storage region can be read directly in maintenance personal, quickly and easily navigate to the hardware device of failure.
Referring to Fig. 2, Fig. 2 is the flow diagram of another Fault Locating Method disclosed by the embodiments of the present invention, Fig. 2 institute It may comprise steps of in the Fault Locating Method shown:
The interruption frequency of S201, terminal statistics hardware device;
S202, terminal detect whether the interruption frequency is greater than preset threshold, if more than preset threshold, then follow the steps S203 thens follow the steps S204 if being not more than preset threshold;
In the embodiment of the present invention, step S201 and S202 is identical as step S101 to S102 shown in FIG. 1, here no longer in detail It states.
S203, terminal are written to default storage region for the mark of the hardware device is corresponding with interruption frequency;
Whether the clock of the hardware device is in the open state in S204, terminal detection Clock Tree;If it is in the open state, S205 is thened follow the steps, it is no to then follow the steps S201;
Whether S205, terminal detect the hardware device in operating status;If being not in operating status, then follow the steps S206 thens follow the steps S201 if in operating status;
S206, terminal by the mark of the hardware device with clock is extremely corresponding is written to default storage region.
In the embodiment of the present invention, whether the clock of the hardware device is in opening state in step S204 terminal detection Clock Tree State can be with are as follows: adding clock interface in kernel-driven layer, starting background service thread monitor clock interface, when to not discharging always The hardware device (i.e. the clock of hardware device is in the open state, but the hardware device is not in operating status) of clock is determined as different Normal hardware device, can by step S206, by the mark of the hardware device with clock is extremely corresponding is written to default storage Region (such as EMMC subregion).
When hardware device interruption frequency be not more than preset threshold, that is, when interrupting normal, can continue to check that the hardware is set Standby clock illustrates that hardware device clock is abnormal if clock is not in operation in the open state in hardware device, That is the clock of the hardware device is always on to close, and terminal is caused to cannot be introduced into low-power consumption mode.Therefore, the present invention is implemented Example can more accurately determine the hardware device of failure, improve fault location process.
Referring to Fig. 3, Fig. 3 is the flow diagram of another Fault Locating Method disclosed by the embodiments of the present invention, Fig. 3 institute It may comprise steps of in the Fault Locating Method shown:
The interruption frequency of S301, terminal statistics hardware device;
S302, terminal detect whether the interruption frequency is greater than preset threshold, if more than preset threshold, then follow the steps S303 thens follow the steps S304 if being not more than preset threshold;
S303, terminal are written to default storage region for the mark of the hardware device is corresponding with interruption frequency;
S304, terminal detection restarting information in whether include the hardware device mark;If the mark comprising the hardware device Know, then follow the steps S305, if not including the mark of the hardware device, thens follow the steps S301;
S305, terminal are written to default storage region for the mark of hardware device is corresponding with restarting information.
When the interruption frequency of hardware device is not more than preset threshold, that is, when interrupting normal, it can continue to check and cause to restart Restarting information in whether comprising the mark of the hardware device illustrate that the hardware device draws if the mark comprising the hardware device It rises and restarts, i.e., the hardware device may cause constantly restarting for terminal.Therefore, the embodiment of the present invention can more accurately determine event The hardware device of barrier further improves fault location process.
Referring to Fig. 4, Fig. 4 is the flow diagram of another Fault Locating Method disclosed by the embodiments of the present invention, Fig. 4 institute It may comprise steps of in the Fault Locating Method shown:
The interruption frequency of S401, terminal statistics hardware device;
S402, terminal detect whether the interruption frequency is greater than preset threshold, if more than preset threshold, then follow the steps S403 thens follow the steps S404 if being not more than preset threshold;
In the embodiment of the present invention, step S401 and S402 is identical as step S101 to S102 shown in FIG. 1, here no longer in detail It states.
S403, terminal are written to default storage region for the mark of the hardware device is corresponding with interruption frequency;
Whether the clock of the hardware device is in the open state in S404, terminal detection Clock Tree;If it is in the open state, S405 is thened follow the steps, it is no to then follow the steps S401;
Whether S405, terminal detect the hardware device in operating status;If being not in operating status, then follow the steps S406 thens follow the steps S407 if in operating status;
S406, terminal by the mark of the hardware device with clock is extremely corresponding is written to default storage region.
S407, terminal detection restarting information in whether include the hardware device mark;If the mark comprising the hardware device Know, then follow the steps S408, if not including the mark of the hardware device, thens follow the steps S401;
S408, terminal are written to default storage region for the mark of hardware device is corresponding with restarting information.
When hardware device interruption frequency be not more than preset threshold, that is, when interrupting normal, can continue to check that the hardware is set Standby clock illustrates that hardware device clock is abnormal if clock is not in operation in the open state in hardware device, That is the clock of the hardware device is always on to close, and terminal is caused to cannot be introduced into low-power consumption mode;If hardware device when Whether clock is normal, i.e., clock is closed or clock opens hardware device operation, then detect in restarting information comprising the hardware device Mark, if the mark comprising the hardware device, illustrate the hardware device cause terminal constantly restart.Therefore, the present invention is real The hardware device of failure can be more accurately determined by applying example, further improve fault location process.
It should be noted that shown in Fig. 1 to Fig. 4 in Fault Locating Method, by the mark and interruption frequency of hardware device, Perhaps after default storage region is written in the mark of hardware device and clock exception or the mark and restarting information of hardware device, The hardware device can be closed, the abnormal waste terminal power of the hardware device is avoided or influences the work of other hardware devices. For example, navigating to gravity sensor exception when mobile phone is by any Fault Locating Method shown in Fig. 1 to Fig. 4, then can close The power supply of the gravity sensor, avoids the gravity sensor extremely and causes that the excessively high electric quantity consumption of mobile telephone power consumption is too fast, mobile phone is continuous The phenomenon that restarting.
Further, in Fault Locating Method shown in Fig. 1 to Fig. 4, following steps are can also be performed in terminal: output prompt Message, the prompting message are chosen whether to close the hardware device by user for prompting the hardware device abnormal;It receives and uses Family is directed to the operational order of prompting message input;Execute the corresponding operation of the operational order.If the operational order is "Yes", The step of executing closing hardware device in above embodiment, if the operational order is "No", due to presetting storage region Include the exception information of the hardware device, therefore, has no longer been directed to the hardware when executing Fault Locating Method in the next period and sets It is standby to execute aforesaid operations.The embodiment can improve the operating experience of user while improving fault location.
Step in Fault Locating Method embodiment shown in Fig. 1 to Fig. 4 of the embodiment of the present invention can be according to actual needs It is sequentially adjusted, combined, and deleted.For example, terminal can execute Fault Locating Method shown in FIG. 1, individually detects hardware and set Standby interruption situation determines whether hardware device is abnormal;The clock status that hardware device can also individually be detected determines hardware device Whether abnormal, the situation of restarting that can also individually detect hardware device determines whether hardware device is abnormal, and abnormal hardware is set Standby mark is written to default storage region with corresponding detection content.Optionally, terminal can detecte the interruption of hardware device Situation and clock status determine whether hardware device is abnormal, and the mark of abnormal hardware device is write with corresponding detection content Enter to default storage region.Optionally, terminal, which can detecte the interruption situation of hardware device and restart situation, determines that hardware is set It is standby whether abnormal, the mark of abnormal hardware device is written to default storage region with corresponding detection content.Optionally, eventually End, which can detecte the clock status of hardware device and restart situation, determines whether hardware device is abnormal, by abnormal hardware device Mark be written to default storage region with corresponding detection content.
Referring to Fig. 5, Fig. 5 is a kind of structural schematic diagram of terminal disclosed by the embodiments of the present invention, as shown in figure 5, the end End may include with lower module:
Statistical module 501, for counting the interruption frequency of hardware device;
Detection module 502, for detecting whether the interruption frequency is greater than preset threshold;
Writing module 503 will be described for when the detection module detects that the interruption frequency is greater than preset threshold The mark of hardware device is corresponding with the interruption frequency to be written to default storage region.
In the embodiment of the present invention, when the interruption frequency of hardware device is greater than the preset threshold, illustrate that the hardware device is different Often.The preset threshold can be the different frequency value for hardware device each in terminal corresponding storage in advance, be also possible to needle To the same frequency value of all hardware equipment, if then should for the different frequency value of each hardware device corresponding storage in advance Preset threshold is variable, and whether disconnected frequency is greater than before preset threshold detection module 502 in the detection, is also needed according to hardware device Mark obtain the corresponding preset threshold of the hardware device;If then should for the same frequency value of all hardware equipment storage Preset threshold is fixed value, and detection module 502 can directly detect whether the interruption frequency is greater than preset threshold.
In the embodiment of the present invention, when hardware device interruption frequency be not more than the preset threshold, illustrating the hardware device just Often, detection module 502 can trigger the interruption frequency that statistical module 501 counts the hardware device again, monitor the hardware device.
As it can be seen that statistical module can count the interruption frequency of hardware device in the embodiment of the present invention, detected in detection module Out the interruption frequency be greater than preset threshold when, by writing module by the mark of the hardware device it is corresponding with interruption frequency be written to it is pre- If storage region, so that the content in the default storage region can be read directly in maintenance personal, event is quickly and easily navigated to The hardware device of barrier.
As an alternative embodiment, detection module 502 is also used to the inspection when interruption frequency is no more than preset threshold Whether the clock for surveying hardware device in Clock Tree is in the open state;If it is in the open state, then detect whether hardware device is located In operating status;If being not in operating status, the mark of hardware device is corresponded into write-in with clock extremely by writing module 503 To default storage region.The embodiment can more accurately determine the hardware device of failure, improve fault location process.
As another optional embodiment, detection module 502 is also used to when interruption frequency is no more than preset threshold, Detect restarting information in whether include hardware device mark;It, will by writing module 503 if the mark comprising the hardware device The mark of the hardware device is corresponding with restarting information to be written to default storage region.The embodiment can more accurately determine event The hardware device of barrier improves fault location process.
As another optional embodiment, detection module 502 is also used to when hardware device is in operating status, inspection Survey restarting information in whether include the hardware device mark;It, will by writing module 503 if the mark comprising the hardware device The mark of the hardware device is corresponding with restarting information to be written to default storage region.The embodiment can more accurately determine event The hardware device of barrier improves fault location process.
As an alternative embodiment, being based on above-mentioned four kinds of embodiments, which can also include closedown module 504, in the mark and interruption frequency of hardware device, perhaps the mark of hardware device and clock to be abnormal or hardware device Mark and after default storage region is written in restarting information, close the hardware device.For example, when mobile phone is by above-mentioned four kinds implementations Any fault location mode of mode navigates to gravity sensor exception, then can close the power supply of the gravity sensor, avoid The gravity sensor leads to the phenomenon that excessively high electric quantity consumption of mobile telephone power consumption is too fast, mobile phone is constantly restarted extremely.
As another optional embodiment, which can also include output module 505, disappear for exporting prompt Breath, the prompting message is for prompting the hardware device abnormal, so that user chooses whether to close the hardware device.If user selects The hardware device is not closed, due to presetting the exception information that storage region has included the hardware device, then in next cycle detection Module 502 no longer detects interruption, clock or restarting information of the hardware module etc..The embodiment can determine improving failure While position, improve the operating experience of user.
Referring to Fig. 6, Fig. 6 is the structural schematic diagram of another terminal disclosed by the embodiments of the present invention, as shown in fig. 6, should Terminal may include at least one processor 501, such as CPU, user interface 502, memory 503, at least one communication bus 504.Wherein, communication bus 504 is for realizing the communication connection between these components.Memory 503 can be high-speed RAM storage Device is also possible to non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.Storage Device 503 optionally can also be that at least one is located remotely from the storage device of aforementioned processor 501.Wherein, processor 501 can be with Terminal described in conjunction with Figure 5 stores batch processing code in memory 503, and processor 501 calls to be stored in memory 503 Program code, for performing the following operations:
Count the interruption frequency of hardware device;
Detect whether the interruption frequency is greater than preset threshold;
If more than preset threshold, then default memory block is written to by the mark of the hardware device is corresponding with the interruption frequency Domain.
In the embodiment of the present invention, when the interruption frequency of hardware device is greater than the preset threshold, illustrate that the hardware device is different Often.The preset threshold can be the different frequency value for hardware device each in terminal corresponding storage in advance, be also possible to needle To the same frequency value of all hardware equipment, if then should for the different frequency value of each hardware device corresponding storage in advance Preset threshold is variable, and whether disconnected frequency is greater than before preset threshold detection module 502 in the detection, is also needed according to hardware device Mark obtain the corresponding preset threshold of the hardware device;If then should for the same frequency value of all hardware equipment storage Preset threshold is fixed value, and processor 501 can directly detect whether the interruption frequency is greater than preset threshold.
In the embodiment of the present invention, when hardware device interruption frequency be not more than the preset threshold, illustrating the hardware device just Often, processor 501 can count the interruption frequency of the hardware device again, monitor the hardware device.
As it can be seen that processor 501 can count the interruption frequency of hardware device, in detecting this in the embodiment of the present invention When disconnected frequency is greater than preset threshold, default storage region is written to by the mark of the hardware device is corresponding with interruption frequency, so that The content in the default storage region can be read directly in maintenance personal, quickly and easily navigates to the hardware device of failure.
As an alternative embodiment, processor 501 calls the program code in memory 503, can also be performed Following steps:
If interruption frequency is not more than preset threshold, whether the clock for detecting hardware device in Clock Tree is in opening state State;
If it is in the open state, then whether in operating status hardware device is detected;
If being not in operating status, by the mark of hardware device with clock is extremely corresponding is written to default storage region.
The embodiment can more accurately determine the hardware device of failure, improve fault location process.
As another optional embodiment, processor 501 calls the program code in memory 503, can also hold Row following steps:
If interruption frequency be not more than preset threshold, detect restarting information in whether include hardware device mark;
If the mark comprising the hardware device, default deposit is written to by the mark of the hardware device is corresponding with restarting information Storage area domain.
The embodiment can more accurately determine the hardware device of failure, improve fault location process.
As another optional embodiment, processor 501 calls the program code in memory 503, can also hold Row following steps:
When hardware device is in operating status, detect restarting information in whether include the hardware device mark;
If the mark comprising the hardware device,
Default storage region is written to by the mark of the hardware device is corresponding with restarting information.
The embodiment can more accurately determine the hardware device of failure, improve fault location process.
As an alternative embodiment, in the mark and interruption frequency of hardware device or the mark of hardware device After default storage region is written with the mark and restarting information of clock exception or hardware device, processor 501 calls memory Program code in 503, can also be performed following steps:
Close the hardware device.
For example, working as any fault location mode of the mobile phone Jing Guo above-mentioned four kinds of embodiments, it is different to navigate to gravity sensor Often, then the power supply that can close the gravity sensor, avoiding the gravity sensor extremely leads to the excessively high electric quantity consumption of mobile telephone power consumption The phenomenon that too fast, mobile phone is constantly restarted.
As another optional embodiment, processor 501 calls the program code in memory 503, can also hold Row following steps:
Prompting message is exported, which is somebody's turn to do for prompting the hardware device abnormal so that user chooses whether to close Hardware device.
If the hardware device is not closed in user's selection, due to presetting the abnormal letter that storage region has included the hardware device Breath, then no longer detect interruption, clock or the restarting information etc. of the hardware module in the next period;If user selects to close this firmly Part equipment, then processor 501 can close the hardware device.The embodiment can improve while improving fault location The operating experience of user.
Specifically, the present invention, which can be implemented, in the terminal introduced in the present embodiment combines the fault location introduced in Fig. 1 to Fig. 4 Process some or all of in embodiment of the method.
Unit or sub-unit in the terminal of that embodiment of the invention or equipment can merge according to actual needs, divide and It deletes.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage Medium may include: flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), disk or CD etc..
A kind of Fault Locating Method disclosed by the embodiments of the present invention and terminal are described in detail above, answered herein With a specific example illustrates the principle and implementation of the invention, the explanation of above example is only intended to help to manage Solve method and its core concept of the invention;At the same time, for those skilled in the art, according to the thought of the present invention, There will be changes in specific embodiment and application range, in conclusion the content of the present specification should not be construed as to this hair Bright limitation.

Claims (10)

1. a kind of Fault Locating Method characterized by comprising
Count the interruption frequency of hardware device;
Detect whether the interruption frequency is greater than preset threshold;
If more than preset threshold, then default memory block is written to by the mark of the hardware device is corresponding with the interruption frequency Domain;
Wherein, the method also includes:
If the interruption frequency is not more than the preset threshold, whether the clock for detecting hardware device described in Clock Tree is in Open state;
If it is in the open state, whether in operating status the hardware device is detected;
If being not in operating status, by the mark of the hardware device with clock is extremely corresponding is written to default storage region.
2. the method according to claim 1, wherein the method also includes:
If the interruption frequency be not more than the preset threshold, detect restarting information in whether include the hardware device mark Know;
If the mark comprising the hardware device, by the mark of the hardware device it is corresponding with the restarting information be written to it is pre- If storage region.
3. according to claim 1 to 2 described in any item methods, which is characterized in that the method also includes:
The hardware device is closed after being written to default storage region.
4. according to claim 1 to 2 described in any item methods, which is characterized in that the method also includes:
Prompting message is exported, the prompting message is for prompting the hardware device abnormal, so that user chooses whether to close institute State hardware device.
5. a kind of terminal characterized by comprising
Statistical module, for counting the interruption frequency of hardware device;
Detection module, for detecting whether the interruption frequency is greater than preset threshold;
Writing module, for when the detection module detects that the interruption frequency is greater than preset threshold, the hardware to be set Standby mark is corresponding with the interruption frequency to be written to default storage region;
Wherein, the detection module is also used to detect institute in Clock Tree when the interruption frequency is no more than the preset threshold Whether the clock for stating hardware device is in the open state;If it is in the open state, then detect whether the hardware device is in fortune Row state;If being not in operating status, by the write module by the mark of the hardware device with clock is extremely corresponding writes Enter to default storage region.
6. terminal according to claim 5, which is characterized in that the detection module is also used to little in the interruption frequency When the preset threshold, detect restarting information in whether include the hardware device mark;If including the hardware device Mark, then be written to default memory block for the mark of the hardware device is corresponding with the restarting information by the write module Domain.
7. according to the described in any item terminals of claim 5 to 6, which is characterized in that the terminal further include:
Closedown module, for closing the hardware device after the write module is written to default storage region.
8. according to the described in any item terminals of claim 5 to 6, which is characterized in that the terminal further include:
Output module, for exporting prompting message, the prompting message is for prompting the hardware device abnormal, so that user selects It selects and whether closes the hardware device.
9. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program is for instructing relevant hardware, to complete method described in Claims 1-4 any one.
10. a kind of terminal, which is characterized in that the terminal includes: processor, user interface, memory and at least one communication Bus;Wherein, communication bus is for realizing the communication connection between processor, user interface and memory;
Wherein, batch processing code is stored in memory, processor calls the program code stored in memory with perform claim It is required that method described in 1 to 4 any one.
CN201610674422.6A 2016-08-16 2016-08-16 A kind of Fault Locating Method and terminal Expired - Fee Related CN106326049B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610674422.6A CN106326049B (en) 2016-08-16 2016-08-16 A kind of Fault Locating Method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610674422.6A CN106326049B (en) 2016-08-16 2016-08-16 A kind of Fault Locating Method and terminal

Publications (2)

Publication Number Publication Date
CN106326049A CN106326049A (en) 2017-01-11
CN106326049B true CN106326049B (en) 2019-07-19

Family

ID=57740030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610674422.6A Expired - Fee Related CN106326049B (en) 2016-08-16 2016-08-16 A kind of Fault Locating Method and terminal

Country Status (1)

Country Link
CN (1) CN106326049B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447333B (en) * 2020-03-09 2021-07-02 深圳震有科技股份有限公司 TDM bus fault detection method, device, equipment and readable storage medium
CN111447106B (en) * 2020-03-18 2022-05-03 深圳市普威技术有限公司 Fault detection method, device, storage medium and communication equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1490982A (en) * 2003-08-18 2004-04-21 北京港湾网络有限公司 Network fault analysing and monitoring method and apparatus
CN1770112A (en) * 2005-01-14 2006-05-10 威盛电子股份有限公司 Debug supporting unit using multi-asynchronous timepiece on chip hardware
CN1862506A (en) * 2005-09-09 2006-11-15 华为技术有限公司 Apparatus and method for real-time indicating running state of computer system
CN101770424A (en) * 2010-01-05 2010-07-07 天津七一二通信广播有限公司 Data acquisition and emulation system suitable for underlying protocol stack of digital communication terminal
CN104102572A (en) * 2013-04-01 2014-10-15 中兴通讯股份有限公司 Method and device for detecting and processing system faults
CN104486100A (en) * 2014-11-28 2015-04-01 华为技术有限公司 Device and method for treating faults

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080288828A1 (en) * 2006-12-09 2008-11-20 Baker Marcus A structures for interrupt management in a processing environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1490982A (en) * 2003-08-18 2004-04-21 北京港湾网络有限公司 Network fault analysing and monitoring method and apparatus
CN1770112A (en) * 2005-01-14 2006-05-10 威盛电子股份有限公司 Debug supporting unit using multi-asynchronous timepiece on chip hardware
CN1862506A (en) * 2005-09-09 2006-11-15 华为技术有限公司 Apparatus and method for real-time indicating running state of computer system
CN101770424A (en) * 2010-01-05 2010-07-07 天津七一二通信广播有限公司 Data acquisition and emulation system suitable for underlying protocol stack of digital communication terminal
CN104102572A (en) * 2013-04-01 2014-10-15 中兴通讯股份有限公司 Method and device for detecting and processing system faults
CN104486100A (en) * 2014-11-28 2015-04-01 华为技术有限公司 Device and method for treating faults

Also Published As

Publication number Publication date
CN106326049A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
CN103842968B (en) A kind of moving method of internal storage data, computing machine and device
CN106528216A (en) Method for starting application and terminal
CN108132735B (en) Terminal and application control method
CN103092700A (en) Internal memory cleaning method and cleaning device and terminal device
CN102455950A (en) Firmware recovery system and method of base board management controller
CN103827834A (en) Migration method of in-memory data, computer and device
CN102446104A (en) Method for starting up computer system
CN103744727A (en) Service starting method, device and intelligent equipment
JP2009110156A (en) Log output device and log output program
CN104765466A (en) Key control method and device for mobile terminal
CN106598783A (en) Intelligent terminal display control method and device and intelligent terminal
US11860718B2 (en) Register reading method and apparatus, device, and medium
CN106326049B (en) A kind of Fault Locating Method and terminal
CN109597653A (en) Method, BIOS and the BMC of BIOS and BMC command interaction
CN106708616A (en) Process control method and process control device
CN106326065B (en) Terminal use duration management method and device
CN105304140B (en) The test method and device of the memory performance of electronic equipment
CN105446848B (en) The test method and device of the data processing performance of electronic equipment
CN105227748A (en) Prompting message display packing and device
CN103246591B (en) The method and apparatus of signal transacting
CN106021024A (en) Method for reminding response stopping of user terminal, and user terminal
EP4354293A1 (en) Detection method and apparatus, and electronic device
CN107766218A (en) system optimization method, device, storage medium and terminal device
CN109933479B (en) Fault simulation and emulation method and related equipment
WO2020223862A1 (en) Mounting processing method and apparatus, electronic device, and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190719

CF01 Termination of patent right due to non-payment of annual fee