Method, device, equipment and storage medium for diagnosing startup hardware fault
1. A method for diagnosing a boot hardware fault is characterized by comprising the following steps:
defining a fault manual, wherein each beep sound recorded by the fault manual represents different hardware fault types;
starting up and diagnosing the hardware state, and controlling a buzzer to emit corresponding beep sound when certain hardware fails;
collecting the rule of the beep sound;
and diagnosing the current hardware type with the fault according to the corresponding relation between the fault manual and the collected rule of the beep sound.
2. A method as claimed in claim 1, wherein said controlling a buzzer to emit a corresponding beep sound when a hardware fault occurs comprises:
when some hardware has a fault, transmitting a corresponding hardware fault code to the CPLD through the CPU; different hardware fault codes correspond to different rule of beep sound;
and controlling a buzzer to emit beep sound corresponding to the hardware fault code by using the CPLD.
3. The method for diagnosing a boot hardware failure according to claim 2, wherein the rule of the beep sound includes the length and the number of times of the beep sound.
4. A method as claimed in claim 3, wherein the fault manual is provided by a randomizer.
5. The method for diagnosing boot hardware failure according to claim 4, further comprising:
and displaying the hardware fault code and the collected rule of the beep sound in a text, voice or picture mode.
6. A diagnostic apparatus for boot hardware failure, comprising:
the manual definition module is used for defining a fault manual, and each beep sound recorded by the fault manual represents different hardware fault types;
the sound control module is used for starting up and diagnosing the hardware state, and controlling the buzzer to emit corresponding beep sound when certain hardware fails;
the rule acquisition module is used for acquiring the rule of the beep sound;
and the problem positioning module is used for diagnosing the current hardware type with the fault according to the corresponding relation between the fault manual and the collected rule of the beep sound.
7. The startup hardware fault diagnosis device according to claim 6, wherein the sound control module is specifically configured to transmit a corresponding hardware fault code to the CPLD through the CPU when a certain hardware fails; different hardware fault codes correspond to different rule of beep sound; and controlling a buzzer to emit beep sound corresponding to the hardware fault code by using the CPLD.
8. The apparatus for diagnosing boot hardware failure according to claim 7, further comprising:
and the display module is used for displaying the hardware fault codes and the collected rules of the beep sound in a text, voice or picture mode.
9. A diagnostic apparatus for boot hardware failure, comprising a processor and a memory, wherein the processor implements the diagnostic method for boot hardware failure according to any one of claims 1 to 5 when executing a computer program stored in the memory.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for diagnosing boot hardware failure according to any one of claims 1 to 5.
Background
At present, when a boot cannot be continuously guided due to a hardware problem in a Power On Self Test (POST) stage after a machine is powered On, a PC controls a specific Input/Output port (GPIO) pin to send an error code to a Complex Programmable Logic Device (CPLD) through a Central Processing Unit (CPU), and the CPLD sends a beep sound according to the sent error code to remind a user that a hardware fault occurs in the machine, so that a Basic Input/Output System (BIOS) is guided to stop.
The existing Beep sound realizes the function of prompting a user of hardware failure. However, the Beep sound only prompts a user that hardware diagnosis has a problem in the process of starting the computer, the function diagnosis is single, and the existing Beep mechanism has no function of distinguishing various hardware function problems.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, a device and a storage medium for diagnosing a startup hardware fault, which can quickly determine which type of hardware has a problem, help a user to quickly and accurately locate the hardware problem, and save the time for searching the problem. The specific scheme is as follows:
a diagnosis method for boot hardware faults comprises the following steps:
defining a fault manual, wherein each beep sound recorded by the fault manual represents different hardware fault types;
starting up and diagnosing the hardware state, and controlling a buzzer to emit corresponding beep sound when certain hardware fails;
collecting the rule of the beep sound;
and diagnosing the current hardware type with the fault according to the corresponding relation between the fault manual and the collected rule of the beep sound.
Preferably, in the method for diagnosing a failure of hardware for power on according to an embodiment of the present invention, the controlling a buzzer to emit a corresponding beep sound when a failure occurs in a certain hardware includes:
when some hardware has a fault, transmitting a corresponding hardware fault code to the CPLD through the CPU; different hardware fault codes correspond to different rule of beep sound;
and controlling a buzzer to emit beep sound corresponding to the hardware fault code by using the CPLD.
Preferably, in the method for diagnosing a power-on hardware fault according to the embodiment of the present invention, the rule of the beep sound includes the length and the number of times of the beep sound.
Preferably, in the method for diagnosing a boot hardware fault provided in the embodiment of the present invention, the fault manual is provided by a randomizer.
Preferably, in the method for diagnosing a boot hardware fault according to an embodiment of the present invention, the method further includes:
and displaying the hardware fault code and the collected rule of the beep sound in a text, voice or picture mode.
The embodiment of the invention also provides a device for diagnosing the startup hardware fault, which comprises:
the manual definition module is used for defining a fault manual, and each beep sound recorded by the fault manual represents different hardware fault types;
the sound control module is used for starting up and diagnosing the hardware state, and controlling the buzzer to emit corresponding beep sound when certain hardware fails;
the rule acquisition module is used for acquiring the rule of the beep sound;
and the problem positioning module is used for diagnosing the current hardware type with the fault according to the corresponding relation between the fault manual and the collected rule of the beep sound.
Preferably, in the diagnosis device for the hardware fault at startup provided in the embodiment of the present invention, the sound control module is specifically configured to transmit a corresponding hardware fault code to the CPLD through the CPU when a certain hardware has a fault; different hardware fault codes correspond to different rule of beep sound; and controlling a buzzer to emit beep sound corresponding to the hardware fault code by using the CPLD.
Preferably, in the diagnosis apparatus for a boot hardware fault provided in the embodiment of the present invention, the diagnosis apparatus further includes:
and the display module is used for displaying the hardware fault codes and the collected rules of the beep sound in a text, voice or picture mode.
The embodiment of the invention also provides a diagnosis device for the startup hardware fault, which comprises a processor and a memory, wherein the processor realizes the diagnosis method for the startup hardware fault provided by the embodiment of the invention when executing the computer program stored in the memory.
The embodiment of the present invention further provides a computer-readable storage medium, configured to store a computer program, where the computer program, when executed by a processor, implements the method for diagnosing a boot hardware fault according to the embodiment of the present invention.
According to the technical scheme, the method for diagnosing the startup hardware fault comprises the following steps: defining a fault manual, wherein each beep sound recorded by the fault manual represents different hardware fault types; starting up and diagnosing the hardware state, and controlling a buzzer to emit corresponding beep sound when certain hardware fails; collecting the rule of the emitted beep sound; and diagnosing the type of the hardware with the current fault according to the corresponding relation between the fault manual and the rule of the collected beep sound.
According to the diagnosis method provided by the invention, firstly, a fault manual is defined, each beep sound represents different hardware fault types, then, the principle of a PC buzzer beep is utilized, the buzzer is controlled to emit different beep sounds through software, and finally, according to the rules of the fault manual and the beep sounds, the specific type of hardware is judged to have problems, so that a user is helped to quickly and accurately position the hardware problem, the problem searching time is saved, and the method can be applied to desktop computer products, the software function of company products is improved, and the market competitiveness of the company products is improved. In addition, the invention also provides a corresponding device, equipment and a computer readable storage medium aiming at the diagnosis method of the startup hardware fault, so that the method has higher practicability, and the device, the equipment and the computer readable storage medium have corresponding advantages.
Drawings
In order to more clearly illustrate the embodiments of the present invention or technical solutions in related arts, the drawings used in the description of the embodiments or related arts will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for diagnosing a boot hardware fault according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a device for diagnosing a boot hardware fault according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a method for diagnosing startup hardware faults, which comprises the following steps as shown in figure 1:
s101, defining a fault manual, wherein each beep sound recorded by the fault manual represents different hardware fault types;
specifically, the fault manual is a kind of instruction document provided to the user by the randomizer.
S102, starting up to diagnose the hardware state, and controlling a buzzer to emit corresponding beep sound when certain hardware fails;
the control of the buzzer to emit different beeps is realized by software by using the principle of the beep of the PC buzzer. The beep sound is controlled to be turned off by software when all hardware fails, and the beep sound is controlled to be turned on by software when any hardware fails, and the beep sound has different rules for different failures.
S103, collecting the rule of the emitted beep sound;
and S104, diagnosing the current hardware type with the fault according to the corresponding relation between the fault manual and the rule of the collected beep sound.
In the method for diagnosing the startup hardware fault provided by the embodiment of the invention, a fault manual is defined firstly, each beep represents different hardware fault types, then the hardware state is diagnosed when the startup is started, the beep principle of a PC buzzer is utilized, the buzzer is controlled by software to emit different beep sounds, and finally according to the rules of the fault manual and the beep sounds, the specific hardware problem can be quickly judged, so that a user can be helped to quickly and accurately locate the hardware problem, the problem searching time is saved, the method can be applied to desktop computer products, the software function of company products is improved, and the market competitiveness of the company products is improved.
Further, in a specific implementation, in the method for diagnosing a hardware startup fault provided in the embodiment of the present invention, the step S102 of controlling the buzzer to emit a corresponding beep sound when a certain hardware is faulty may include: firstly, when a certain hardware has a fault, a corresponding hardware fault code is transmitted to the CPLD through the CPU; different hardware fault codes correspond to different rule of beep sound; and then, the CPLD is utilized to control the buzzer to emit beep sound corresponding to the hardware fault code. And hardware problems can be quickly and accurately positioned according to different hardware fault codes corresponding to different beep sounds.
In a specific implementation, in the method for diagnosing a boot hardware fault according to the embodiment of the present invention, the rule of beep sound may include the length and the number of times of beep sound. That is, beep sounds of different lengths and times can be matched with different hardware fault types. The software can control the buzzer to emit beep sounds with different lengths and times. According to the rule of the collected beep sound, the length and the frequency of the beep sound can be distinguished, and then according to the corresponding relation between the fault manual and the distinguished length and frequency of the beep sound, the type of the hardware which breaks down at present can be diagnosed to judge which type of hardware has problems, so that the problem source can be found quickly.
Further, in specific implementation, in the method for diagnosing a boot hardware fault according to an embodiment of the present invention, the method may further include: and displaying the hardware fault code and the rule of the acquired beep sound in a text, voice or picture mode. Preferably, the fault diagnosis result and the fault code can be corresponded, the relative APP is developed and matched, beep sound is monitored through the APP, the fault code and the phenomenon of the machine are described and displayed in a text, voice or picture mode, and the fault diagnosis method and the fault diagnosis system are more clear and convenient for a user to check.
Based on the same inventive concept, the embodiment of the present invention further provides a device for diagnosing a startup hardware fault, and because the principle of the device for solving the problem is similar to the foregoing method for diagnosing a startup hardware fault, the implementation of the device can refer to the implementation of the method for diagnosing a startup hardware fault, and repeated details are omitted.
In specific implementation, the apparatus for diagnosing a boot hardware fault according to an embodiment of the present invention, as shown in fig. 2, may specifically include:
the manual definition module 11 is used for defining a fault manual, and each beep sound recorded by the fault manual represents different hardware fault types;
the sound control module 12 is used for diagnosing the hardware state when the computer is started, and controlling the buzzer to emit corresponding beep sound when certain hardware fails;
a rule collecting module 13, configured to collect rules of the beep sound emitted;
and the problem positioning module 14 is used for diagnosing the type of the hardware which is currently in fault according to the corresponding relation between the fault manual and the rule of the collected beep sound.
In the diagnosis device for the startup hardware fault provided by the embodiment of the invention, the specific type of hardware is rapidly judged to have a problem through the interaction of the four modules, so that a user is helped to rapidly and accurately position the hardware problem, the problem searching time is saved, and the device can be applied to desktop products, the software function of company products is improved, and the market competitiveness of the company products is improved.
Further, in the specific implementation, in the diagnosis device for the startup hardware fault provided in the embodiment of the present invention, the sound control module 12 may be specifically configured to transmit a corresponding hardware fault code to the CPLD through the CPU when a certain hardware fails; different hardware fault codes correspond to different rule of beep sound; and controlling the buzzer to emit beep sound corresponding to the hardware fault code by using the CPLD.
Further, in a specific implementation, in the diagnosis apparatus for a boot hardware fault provided in an embodiment of the present invention, the diagnosis apparatus may further include: and the display module is used for displaying the hardware fault codes and the collected rules of beep sound in a text, voice or picture mode.
For more specific working processes of the modules, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Correspondingly, the embodiment of the invention also discloses a diagnosis device for the startup hardware fault, which comprises a processor and a memory; the method for diagnosing the startup hardware fault disclosed by the embodiment is realized when the processor executes the computer program stored in the memory.
For more specific processes of the above method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Further, the present invention also discloses a computer readable storage medium for storing a computer program; when being executed by a processor, the computer program realizes the diagnosis method of the boot hardware fault disclosed in the foregoing.
For more specific processes of the above method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device, the equipment and the storage medium disclosed by the embodiment correspond to the method disclosed by the embodiment, so that the description is relatively simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
To sum up, a method for diagnosing a boot hardware fault according to an embodiment of the present invention includes: defining a fault manual, wherein each beep sound recorded by the fault manual represents different hardware fault types; starting up and diagnosing the hardware state, and controlling a buzzer to emit corresponding beep sound when certain hardware fails; collecting the rule of the emitted beep sound; and diagnosing the type of the hardware with the current fault according to the corresponding relation between the fault manual and the rule of the collected beep sound. According to the diagnosis method, firstly, a fault manual is defined, each beep sound represents different hardware fault types, then the buzzer is controlled to emit different beep sounds through software according to the principle of the PC buzzer beep, and finally, according to the rules of the fault manual and the beep sounds, the specific type of hardware is judged to be in a problem, so that a user is helped to quickly and accurately position the hardware problem, the problem searching time is saved, the method can be applied to desktop computer products, the software function of company products is improved, and the market competitiveness of the company products is improved. In addition, the invention also provides a corresponding device, equipment and a computer readable storage medium aiming at the diagnosis method of the startup hardware fault, so that the method has higher practicability, and the device, the equipment and the computer readable storage medium have corresponding advantages.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, the apparatus, the device and the storage medium for diagnosing the startup hardware fault provided by the present invention are described in detail above, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:自动化测试的调度系统