CN109151144B - Hardware management method, device, system, computer equipment and storage medium - Google Patents

Hardware management method, device, system, computer equipment and storage medium Download PDF

Info

Publication number
CN109151144B
CN109151144B CN201810923708.2A CN201810923708A CN109151144B CN 109151144 B CN109151144 B CN 109151144B CN 201810923708 A CN201810923708 A CN 201810923708A CN 109151144 B CN109151144 B CN 109151144B
Authority
CN
China
Prior art keywords
hardware module
module
state
hardware
power consumption
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
CN201810923708.2A
Other languages
Chinese (zh)
Other versions
CN109151144A (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.)
Shenzhen Guanghetong Wireless Communication Software Co ltd
Original Assignee
Shenzhen Guanghetong Wireless Communication Software 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 Shenzhen Guanghetong Wireless Communication Software Co ltd filed Critical Shenzhen Guanghetong Wireless Communication Software Co ltd
Priority to CN201810923708.2A priority Critical patent/CN109151144B/en
Publication of CN109151144A publication Critical patent/CN109151144A/en
Application granted granted Critical
Publication of CN109151144B publication Critical patent/CN109151144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Power Sources (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a hardware management method, a hardware management device, a hardware management system, computer equipment and a storage medium. Acquiring state setting information of each hardware module in the system; setting the state of the current target hardware module as a standby state and setting the states of other hardware modules except the current target hardware module as an awakening state according to the state setting information; acquiring system power consumption corresponding to a current target hardware module; and determining a fault hardware module according to the system power consumption corresponding to the current target hardware module. The fault hardware module is determined by acquiring the corresponding system power consumption when the hardware module is in standby, the condition that the fault hardware module is found by detecting the system log is avoided, and the speed of positioning the fault hardware module is improved.

Description

Hardware management method, device, system, computer equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a system, a computer device, and a storage medium for hardware management.
Background
With the continuous development of communication technology, the variety and the number of peripheral hardware modules of communication products are increasing, and the need of controlling the start or sleep of a plurality of hardware modules to debug the peripheral hardware modules is very necessary and urgent.
At present, a high-pass 8909 platform is often adopted to debug each peripheral hardware module, a set of standard processing flow and management strategy are usually required to be executed, specifically, power consumption of all peripheral hardware modules is detected, a plurality of system logs are obtained, and problems are found by checking the system logs.
However, with the increase of peripheral hardware modules, the conventional method often cannot quickly locate the product problem and debug the product problem.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a hardware management method, apparatus, system, computer device and storage medium for solving the problem of being unable to quickly locate a product.
In a first aspect, a method of hardware management, the method comprising:
acquiring state setting information of each hardware module in the system;
setting the state of the current target hardware module as a standby state and setting the states of other hardware modules except the current target hardware module as an awakening state according to the state setting information;
acquiring system power consumption corresponding to the current target hardware module;
and determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
According to the hardware management method, the state of the current target hardware module is set to be a standby state according to the acquired state setting information of each hardware module in the system, the states of other hardware modules except the current target hardware module are set to be an awakening state, the system power consumption corresponding to the current target hardware module is acquired, and the fault hardware module is determined according to the system power consumption. The fault hardware module is determined by acquiring the corresponding system power consumption when the hardware module is in standby, the condition that the fault hardware module is found by detecting the system log is avoided, and the speed of positioning the fault hardware module is improved.
In one embodiment, the step of determining a failed hardware module according to the system power consumption corresponding to the current target hardware module includes:
if the system power consumption corresponding to the current target hardware module is less than or equal to the preset power consumption, determining that the current target hardware module is the fault hardware module;
and if the system power consumption corresponding to the current target hardware module is larger than the preset power consumption, reselecting the target hardware module, and returning to the step of acquiring the state setting information of each hardware module in the system.
In one embodiment, the step of obtaining the status setting information of each hardware module in the system includes:
acquiring real-time interrupt numbers corresponding to each hardware module in the system;
and acquiring the hardware state information of each hardware module according to the real-time interrupt number corresponding to each hardware module.
In one embodiment, the step of obtaining the state setting information of each hardware module in the system further includes:
acquiring a state setting instruction of each hardware module in the system, and acquiring state setting information of each hardware module according to the state setting instruction;
the state setting instruction is used for determining the active state of each hardware module in the system, wherein the active state comprises a wakeup state and a standby state.
In one embodiment, the step of obtaining the state setting instruction of each hardware module in the system includes:
and acquiring a state setting instruction of each hardware module in the system through an interactive interface of the application management software.
In one embodiment, before the step of obtaining the status setting information of each hardware module in the system, the method further includes the following steps:
acquiring interrupt awakening source configuration information of each hardware module in the system;
and determining the target hardware module according to the interrupt awakening source configuration information.
In one embodiment, before the step of obtaining the status setting information of each hardware module in the system, the method further includes:
and determining the target hardware module according to the corresponding relation among the hardware modules, the historical target hardware module and the power consumption corresponding to the historical target hardware module.
In one embodiment, the system comprises a power supply module and a clock module; the method further comprises the steps of:
and setting the state of the power supply module and the state of the clock module as an awakening state.
In a second aspect, a hardware management apparatus, the apparatus comprising:
the first acquisition module is used for acquiring the state setting information of each hardware module in the system;
the setting module is used for setting the state of the current target hardware module into a standby state and setting the states of other hardware modules except the current target hardware module into an awakening state according to the state setting information;
the second acquisition module is used for acquiring the system power consumption corresponding to the current target hardware module;
and the first determining module is used for determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
In a third aspect, a hardware management system is characterized in that a driving bottom layer of the system includes a hibernation management device and a hardware management device, and the hibernation management device and the hardware management device are both connected to each hardware module; wherein the hardware management apparatus includes:
the first acquisition module is used for acquiring the state setting information of each hardware module in the system;
the setting module is used for setting the state of the current target hardware module into a standby state and setting the states of other hardware modules except the current target hardware module into an awakening state according to the state setting information;
the second acquisition module is used for acquiring the system power consumption corresponding to the current target hardware module;
and the first determining module is used for determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
In a fourth aspect, a computer device comprises a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring state setting information of each hardware module in the system;
setting the state of the current target hardware module as a standby state and setting the states of other hardware modules except the current target hardware module as an awakening state according to the state setting information;
acquiring system power consumption corresponding to the current target hardware module;
and determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
In a fifth aspect, a computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring state setting information of each hardware module in the system;
setting the state of the current target hardware module as a standby state and setting the states of other hardware modules except the current target hardware module as an awakening state according to the state setting information;
acquiring system power consumption corresponding to the current target hardware module;
and determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
According to the hardware management method, the hardware management device, the hardware management system, the computer equipment and the storage medium, the state of a current target hardware module is set to be a standby state according to the acquired state setting information of each hardware module in the system, the states of other hardware modules except the current target hardware module are set to be an awakening state, the system power consumption corresponding to the current target hardware module is acquired, and a fault hardware module is determined according to the system power consumption. The fault hardware module is determined by acquiring the corresponding system power consumption when the hardware module is in standby, the condition that the fault hardware module is found by detecting the system log is avoided, and the speed of positioning the fault hardware module is improved.
Drawings
FIG. 1 is a block diagram illustrating the flow of peripheral hardware module detection in one embodiment;
FIG. 2 is a block diagram illustrating a process for detecting peripheral hardware modules in the prior art;
FIG. 3 is a flow diagram of a method for hardware management, provided by an embodiment;
FIG. 4 is a flow diagram of a method for hardware management, provided by one embodiment;
FIG. 5 is a flow diagram of a method for hardware management, provided by one embodiment;
FIG. 6 is a flow diagram of a method for hardware management, provided by one embodiment;
FIG. 7 is a block diagram of a hardware management apparatus according to an embodiment;
FIG. 8 is a block diagram of a hardware management device according to an embodiment;
FIG. 9 is a block diagram of a hardware management apparatus according to an embodiment;
fig. 10 is an internal structural view of a computer terminal according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
With the continuous development of communication technology, the variety and the number of peripheral hardware modules of communication products are continuously increased, and in the process of positioning a fault hardware module, a high-pass 8909 platform is often adopted to detect each peripheral hardware module.
Fig. 2 is a flow architecture diagram of peripheral hardware module detection in the prior art, and as shown in fig. 2, in an android system, all peripheral hardware modules need to be woken up at the same time to detect the peripheral hardware modules. The architecture may include a driver bottom layer and a hardware module layer, where the driver bottom layer and the hardware module layer may include a Kernel optional mode (Kernel optional mode) and a plurality of hardware modules. Alternatively, the plurality of hardware modules may include a camera, a sensor, a touch screen, a USB interface, an LCD, a CPU, and the like. The kernel optional mode can be used for controlling each hardware module to be standby and awakened, optionally, two sleep mechanisms of early suspend management (earlysuspend) and automatic sleep (autosleep) are provided in the kernel optional mode, but the management specifications of the two sleep mechanisms of earlysuspend and autosleep by the system are relatively fixed and are not intuitive. With the development of electronic technology, the bottom hardware module is further increased rapidly. When the power consumption problem of a product needs to be positioned, debugging is carried out step by step according to the specification of high-pass suggestion, and fault information is searched by obtaining a system log, so that a fault hardware module is determined. The conventional method usually needs to execute a set of standard processing flow and management strategy, acquire a plurality of system logs by receiving a large number of commands input by a user, and determine a fault hardware module by checking the system logs. However, with the increase of peripheral hardware modules, the conventional method often cannot quickly locate the product problem and debug the product problem. The application aims to solve the problem that a failed hardware module cannot be determined quickly.
As shown in fig. 1, the flow architecture for detecting peripheral hardware modules in the embodiment of the present application may include a driver bottom layer and a hardware module layer, where the driver bottom layer and the hardware module layer may include a Kernel optional mode (Kernel optional mode), a plurality of hardware modules, and a hardware management apparatus. Alternatively, the plurality of hardware modules may include a camera, a sensor, a touch screen, a USB interface, an LCD, a CPU, and the like. The kernel optional mode may be used to control each hardware module to perform standby and wake-up, and optionally, there are two sleep mechanisms, namely early suspend management (earlysuspend) and auto sleep (autosleep) in the kernel optional mode. By using the hardware management device, one hardware module can be independently standby, other hardware modules are awakened, and the awakening and standby states of the hardware modules are intuitively set. Specifically, the state setting information of each hardware module in the hardware system may be acquired by the first acquiring module (Filter Manager), the state of the current target hardware module is set to be in a standby state by the setting module (Fibo _ Suspend _ Manager), and the states of other hardware modules except the current target hardware module are set to be in an awake state. Further, the architecture of the present Application may further include an Application software Layer (Application level), an Application framework Layer (Application framework), a jni (java Native interface) and Libray Layer, a Hardware Abstraction Layer (HAL), and the like.
It should be noted that the hardware management method provided in the embodiment of the present application may be applied to the system architecture shown in fig. 1, and the execution subject of the method may be a terminal, and the terminal may be implemented as part or all of the terminal by software, hardware, or a combination of software and hardware. The terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The execution subject of the following method embodiments is described by taking a terminal as an example.
Fig. 3 is a flowchart of a hardware management method according to an embodiment, and as shown in fig. 3, the method includes the following steps:
s101, acquiring state setting information of each hardware module in the system.
In this embodiment, the hardware module may be an external hardware module, or may be a hardware module of the system itself; alternatively, the plurality of hardware modules may include a power supply module, a clock module, a camera, a sensor, a touch screen, a USB interface, an LCD, a CPU, and the like. The state setting information may be used to represent that the hardware module is in a standby state, or that the hardware module is in an awake state, where the state of the hardware module that needs to be detected may be set to the standby state.
Specifically, in the process of acquiring the status setting information of each hardware module in the system, the terminal may automatically acquire the status setting information according to history information of the hardware module and the like, or may acquire the status setting information by receiving a setting instruction input by a user. Taking the example of obtaining the state setting information by receiving the setting instruction input by the user, when the terminal device receives the setting instruction input by the user, the content of the setting instruction includes that the camera is in a standby state, and the clock, the power supply, the sensor and the like are in an awakening state, then the terminal device obtains the state setting information of the hardware module in the system as follows: the camera is in a standby state, and the clock, the power supply, the sensor and the like are in a wake-up state.
And S102, setting the state of the current target hardware module as a standby state and setting the states of other hardware modules except the current target hardware module as an awakening state according to the state setting information.
In this embodiment, the standby state refers to a state in which the hardware module does not perform any substantial work, and the awake state refers to a state in which the hardware module works. The target hardware module is a hardware module which a user needs to confirm whether a power consumption problem exists, and can be a normal hardware module or a hardware module which has a power consumption problem, and the hardware module which needs to be detected at this time is determined to be the current target hardware module according to the requirements of the user.
On the basis of the above S101, according to the acquired state setting information of each hardware in the system, the state of the current target hardware module is set to be the standby mode, and the states of the hardware modules other than the current target hardware module are set to be the wake-up state. Taking a current target hardware module as a camera as an example, when the hardware modules in the system are the camera, a power supply, a clock and a sensor, setting the state of the camera as a standby state and setting the states of the power supply, the clock and the sensor as an awakening state according to the acquired state setting information of each hardware in the system.
S103, obtaining system power consumption corresponding to the current target hardware module.
In this embodiment, the system power consumption corresponding to the current target hardware module may be power consumption of the system when the current target hardware module is in a standby state and other hardware modules in the system are in an awake state. Specifically, when the system power consumption corresponding to the current target hardware module is obtained, the system power consumption may be obtained by obtaining a reading of a power meter connected to the terminal, or by obtaining a reading of a voltmeter and an ammeter connected to the terminal, and obtaining the system power consumption through calculation, which is not limited in the embodiment of the present application.
Taking the current target hardware module as a camera as an example, setting the state of the camera as a standby state and the states of other hardware modules as an awake state through the steps of S101 and S102, and obtaining the system power consumption corresponding to the camera by reading the reading of a power meter connected with the terminal.
And S104, determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
In this embodiment, on the basis of the above S103, after the system power consumption corresponding to the target hardware module is obtained, since the system power consumption is the system power consumption when the target hardware module is in the standby state and other hardware modules are in the wake-up state, the failed hardware module may be determined according to the system power consumption corresponding to the current target hardware module. Optionally, when the power consumption of the system is abnormal, it indicates that there is a power consumption problem in other hardware modules except the current target hardware module, and at this time, it is necessary to continue to perform detection and debugging on other hardware modules except the current hardware module. And when the system power consumption is normal, indicating that the current target hardware module is a fault hardware module.
According to the hardware management method, the state of the current target hardware module is set to be a standby state according to the acquired state setting information of each hardware module in the system, the states of other hardware modules except the current target hardware module are set to be an awakening state, the system power consumption corresponding to the current target hardware module is acquired, and the fault hardware module is determined according to the system power consumption. The fault hardware module is determined by acquiring the corresponding system power consumption when the hardware module is in standby, the condition that the fault hardware module is found by detecting the system log is avoided, and the speed of positioning the fault hardware module is improved.
Optionally, when the system includes a power module and a clock module, in order to ensure normal operation in the detection and debugging process, the state of the power module and the state of the clock module of the system may be set to be an awake state. When the power module is in the wake-up state, the power supply can normally supply power, and when the clock module is in the wake-up state, the clock module can provide clock service.
Fig. 4 is a flowchart of a hardware management method according to an embodiment, where the embodiment relates to a possible implementation manner in which S104 determines a faulty hardware module by detecting system power consumption corresponding to a target hardware module, as shown in fig. 4, the step S104 may further include:
s201, if the system power consumption corresponding to the current target hardware module is smaller than the preset power consumption, determining that the current target hardware module is a fault hardware module.
In this embodiment, the preset power consumption may be the maximum system power consumption when the system normally works, may be a system power consumption value obtained by a user through experience, or may be a system power consumption value obtained through calculation, which is not limited in this embodiment of the present application.
Because the current target hardware module is in a standby state and the other hardware modules are in an awakening state, when the corresponding system power consumption is less than the preset power consumption, the power consumption of the other hardware modules is indicated to be normal power consumption, and further, the current target hardware module is judged to be a fault hardware module.
S202, if the system power consumption corresponding to the current target hardware module is larger than or equal to the preset power consumption, reselecting the target hardware module, and returning to the step of acquiring the state setting information of each hardware module in the system.
In this embodiment, since the current target hardware module is in a standby state and the other hardware modules are in an awake state, when the corresponding system power consumption is greater than or equal to the preset power consumption, it indicates that the power consumption of the current target hardware module is normal power consumption, and the power consumption of one or more of the other hardware modules except the current target hardware module is abnormal power consumption. And reselecting the target hardware module, returning to the step S101, and acquiring the state setting information of each hardware module in the system.
According to the hardware management method, when the system power consumption corresponding to the current target hardware module is smaller than or equal to the preset power consumption, the current target hardware module is determined to be a fault hardware module, when the system power consumption corresponding to the current target hardware module is larger than the preset power consumption, the target hardware module is reselected, and the step of obtaining the state setting information of each hardware module in the system is returned. The fault hardware module is determined through the system power consumption corresponding to the current target hardware module, the condition that the fault hardware module is found through detecting the system log is avoided, and the speed of positioning the fault hardware module is improved.
Fig. 5 is a flowchart of a hardware management method according to an embodiment, where the embodiment relates to a possible implementation manner of obtaining, by S101, state setting information of each hardware module in a system, and as shown in fig. 5, the step S101 may include the following steps:
s301, acquiring real-time interrupt numbers corresponding to each hardware module in the system.
In this embodiment, the interrupt number may be an identifier of the corresponding hardware module, and specifically, when the system obtains an event with a high priority, the currently active hardware module is interrupted, and an identifier assigned to the hardware module is a real-time interrupt number.
S302, hardware state information of each hardware module is obtained according to the real-time interrupt numbers corresponding to the hardware modules.
In this embodiment, the system may determine the hardware state information of the hardware module corresponding to the real-time interrupt number according to a segment of message corresponding to the real-time interrupt number, where the segment of message includes the hardware state information of the hardware module corresponding to the real-time interrupt number.
The hardware management method obtains the real-time interrupt numbers corresponding to the hardware modules in the system, and obtains the hardware state information of the hardware modules according to the real-time interrupt numbers. The corresponding hardware state information is obtained by obtaining the real-time interrupt numbers corresponding to the hardware modules in the system, so that the condition that the hardware state information is obtained by reading a large amount of system logs is avoided, and the system debugging efficiency is improved.
Optionally, the step S101 may further include the following steps:
and acquiring a state setting instruction of each hardware module in the system, and acquiring state setting information of each hardware module according to the state setting instruction. The state setting instruction is used for determining the active state of each hardware module in the system, and the active state comprises a wakeup state and a standby state. Optionally, the user may input a state setting instruction of each hardware module through an interactive interface of the terminal, and the terminal may obtain the state setting information of each hardware module according to the state setting instruction input by the user. For example, a dialog box may be displayed on the interactive interface of the terminal, and the user may enter a function command within the dialog box to set the state of each hardware module. The function commands may be a prepare function, a suspend function, and a resume function. For example,
the initialization is performed by the code "prefix _ prefix", and a specific function pointer is passed to the prefix pointer of the system before the function is enabled.
And setting the state of the target hardware module as a standby state in the suspend function through a code 'suspend ═ fibo _ suspend _ suspend', wherein a specific function pointer is transferred to the suspend pointer of the system.
The state of other hardware modules except the target hardware module is set in the resume function as an awake state through a code "resume ═ fibo _ suspend _ resume", and a specific function pointer is transferred to the resume pointer of the system.
Further, the state setting instruction of each hardware module in the system is obtained through the interactive interface of the application management software. Specifically, an application management software (APP) may be installed in the 8909 platform application layer, and a user may set a state setting instruction of each hardware module in the system through an interactive interface of the APP management software. For example, the interactive interface of the application management software may display a hardware list including all hardware modules in the system, and a user may set the state of a hardware module in the hardware list to a standby state or an awake state by triggering a display area corresponding to the hardware module.
For another example, the interactive interface of the application management software may display the state setting keys corresponding to the hardware modules, and may obtain the state setting instruction by triggering the state setting keys of the corresponding hardware modules. For example, in the application management software, the state setting instruction obtained by turning on the state setting key corresponding to the camera and turning off the state setting keys corresponding to the power supply, the clock, the sensor and the like is the instruction of turning on the camera and turning off the power supply, the clock and the sensor.
The state of each hardware module is set in the above mode, so that the configuration of the awakening state and the standby state of each hardware module is more visual, simple and convenient, and the control operation is convenient.
On the basis of the above embodiments, the target hardware module may be determined by the computer device according to an instruction input by an operator, or the computer device may automatically determine the target hardware module, and a process of determining the target hardware module according to the instruction input by the operator is described in detail with reference to fig. 6.
Fig. 6 is a flowchart of a hardware management method according to an embodiment, and as shown in fig. 6, before the step S101, the method further includes the following steps:
s401, obtaining the interrupt awakening source configuration information of each hardware module in the system.
In this embodiment, the interrupt wakeup source may be configured to indicate an activity state of each hardware in the system, and may determine the activity state of each hardware according to the configuration information. For example, the interrupt wake source configuration information includes: the camera is in a standby state, and the power supply and the clock are in an awakening state. Optionally, the user may obtain the interrupt wakeup source configuration information of each hardware module in the system through the interactive interface of the application management software. Optionally, a dialog box may be displayed on the interactive interface of the terminal, and the user may input a function command in the dialog box to set the interrupt wake-up source configuration information of each hardware module.
S402, determining a target hardware module according to the interrupt awakening source configuration information.
In this embodiment, on the basis of S401 and S402, since the active state of the target hardware module is the standby state, and the interrupt wakeup source configuration information is used to indicate the active state of each hardware in the system, the hardware module in the standby state in the interrupt wakeup source configuration information may be determined as the target hardware module.
In other embodiments, the target hardware module may also be determined automatically by the computer device. Optionally, the target hardware module is determined according to the correspondence between the hardware modules and the historical target hardware module and the power consumption corresponding to the historical target hardware module.
In this embodiment, since there is a correspondence between the hardware modules, the target hardware module may be determined by the correspondence between the modules, the historical target hardware module, and power consumption corresponding to the historical target hardware module. For example, when the historical target hardware module is a camera, it is detected that the power consumption of the corresponding system is larger, and according to the corresponding relationship between the camera and the sensor, when the power consumption of the system corresponding to the camera is larger, the probability of the power consumption problem of the sensor is the largest, and the target hardware module is determined to be the sensor.
According to the hardware management method, the target hardware module is determined according to the corresponding relation among the hardware modules and the historical target hardware module and the power consumption corresponding to the historical target hardware module. Therefore, the target hardware module can be automatically determined through the terminal, and the speed of positioning the fault hardware module is further improved.
Fig. 7 is a schematic structural diagram of a hardware management apparatus according to an embodiment, and as shown in fig. 7, the hardware management apparatus includes: the device comprises a first obtaining module 10, a setting module 20, a second obtaining module 30 and a determining module 40, wherein:
the first obtaining module 10 is configured to obtain status setting information of each hardware module in the system;
the setting module 20 is configured to set the state of the current target hardware module to a standby state and set the states of other hardware modules except the current target hardware module to an awake state according to the state setting information;
the second obtaining module 30 is configured to obtain system power consumption corresponding to the current target hardware module;
the first determining module 40 is configured to determine a failed hardware module according to the system power consumption corresponding to the current target hardware module.
In an embodiment, the first determining module 40 is specifically configured to determine that the current target hardware module is the failed hardware module when the system power consumption corresponding to the current target hardware module is less than or equal to a preset power consumption; and if the system power consumption corresponding to the current target hardware module is larger than the preset power consumption, reselecting the target hardware module, and returning to the step of acquiring the state setting information of each hardware module in the system.
In one embodiment, when the system includes a power module and a clock module, the state of the power module and the state of the clock module are set to be a wake-up state.
The hardware management apparatus provided in the embodiment of the present application may implement the method embodiment, and its implementation principle and technical effect are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of a hardware management apparatus according to an embodiment, and based on the foregoing embodiment, as shown in fig. 8, the first obtaining module 10 includes a first obtaining unit 101 and a second obtaining unit 102, where:
the first obtaining unit 101 is configured to obtain a real-time interrupt number corresponding to each hardware module in the system;
the second obtaining unit 102 is configured to obtain hardware state information of each hardware module according to the real-time interrupt number corresponding to each hardware module.
In an embodiment, the first obtaining module 10 is specifically configured to obtain a state setting instruction of each hardware module in the system, and obtain state setting information of each hardware module according to the state setting instruction; the state setting instruction is used for determining the active state of each hardware module in the system, wherein the active state comprises a wakeup state and a standby state.
In an embodiment, the first obtaining module 10 is specifically configured to obtain, through an interactive interface of application management software, a state setting instruction of each hardware module in the system.
The hardware management apparatus provided in the embodiment of the present application may implement the method embodiment, and its implementation principle and technical effect are similar, which are not described herein again.
Fig. 9 is a schematic structural diagram of a hardware management apparatus according to an embodiment, and based on the embodiment in fig. 7 or fig. 8, as shown in fig. 9, the hardware management apparatus further includes a second determining module 50, where the second determining module is configured to determine whether the hardware management apparatus is configured to perform the following operations
The second determining module 50 is configured to obtain configuration information of an interrupt wakeup source of each hardware module in the system; and determining the target hardware module according to the interrupt awakening source configuration information.
In one embodiment, the second determining module 50 is further configured to determine the target hardware module according to the correspondence between the hardware modules, the historical target hardware module, and the power consumption corresponding to the historical target hardware module.
It should be noted that fig. 9 is shown based on fig. 8, but fig. 9 may also be shown based on the configuration of fig. 7, and this is merely an example.
The hardware management apparatus provided in the embodiment of the present application may implement the method embodiment, and its implementation principle and technical effect are similar, which are not described herein again.
For a specific limitation of the hardware management apparatus, reference may be made to the above limitation of the hardware management method, which is not described herein again. The modules in the hardware management device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a hardware management system is provided, wherein a driving bottom layer of the system comprises a dormancy management device and a hardware management device, and the dormancy management device and the hardware management device are both connected to each hardware module; the hardware management apparatus may execute the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again. Optionally, there are two sleep mechanisms, namely early suspend management (earlysuspend) and automatic sleep (autosleep), in the kernel-selectable mode, where the sleep management apparatus may include the two sleep mechanisms, namely early suspend management (earlysuspend) and automatic sleep (autosleep), and can control switching of the two sleep mechanisms to implement management of each hardware module. The hardware management device can be used for intuitively setting the awakening and standby states of the hardware modules, and can run simultaneously with the dormancy management device without mutual interference. Specifically, the specific architecture of the hardware management system can be referred to in fig. 3, and the specific description can be referred to in the above description, which is not repeated herein.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for supplementary lighting for photographing. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a terminal comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring state setting information of each hardware module in the system;
setting the state of the current target hardware module as a standby state and setting the states of other hardware modules except the current target hardware module as an awakening state according to the state setting information;
acquiring system power consumption corresponding to the current target hardware module;
and determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
In one embodiment, the processor, when executing the computer program, further performs the steps of: if the system power consumption corresponding to the current target hardware module is less than or equal to the preset power consumption, determining that the current target hardware module is the fault hardware module; and if the system power consumption corresponding to the current target hardware module is larger than the preset power consumption, reselecting the target hardware module, and returning to the step of acquiring the state setting information of each hardware module in the system.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring real-time interrupt numbers corresponding to each hardware module in the system; and acquiring the hardware state information of each hardware module according to the real-time interrupt number corresponding to each hardware module.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a state setting instruction of each hardware module in the system, and acquiring state setting information of each hardware module according to the state setting instruction; the state setting instruction is used for determining the active state of each hardware module in the system, wherein the active state comprises a wakeup state and a standby state.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and acquiring a state setting instruction of each hardware module in the system through an interactive interface of the application management software.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring interrupt awakening source configuration information of each hardware module in the system; and determining the target hardware module according to the interrupt awakening source configuration information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and determining the target hardware module according to the corresponding relation among the hardware modules, the historical target hardware module and the power consumption corresponding to the historical target hardware module.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and setting the state of the power supply module and the state of the clock module as an awakening state.
The implementation principle and technical effect of the terminal provided in this embodiment are similar to those of the above method embodiments, and are not described herein again.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring state setting information of each hardware module in the system;
setting the state of the current target hardware module as a standby state and setting the states of other hardware modules except the current target hardware module as an awakening state according to the state setting information;
acquiring system power consumption corresponding to the current target hardware module;
and determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
In one embodiment, the computer program when executed by the processor implements the steps of: if the system power consumption corresponding to the current target hardware module is less than or equal to the preset power consumption, determining that the current target hardware module is the fault hardware module; and if the system power consumption corresponding to the current target hardware module is larger than the preset power consumption, reselecting the target hardware module, and returning to the step of acquiring the state setting information of each hardware module in the system.
In one embodiment, the computer program when executed by the processor implements the steps of: acquiring real-time interrupt numbers corresponding to each hardware module in the system; and acquiring the hardware state information of each hardware module according to the real-time interrupt number corresponding to each hardware module.
In one embodiment, the computer program when executed by the processor implements the steps of: acquiring a state setting instruction of each hardware module in the system, and acquiring state setting information of each hardware module according to the state setting instruction; the state setting instruction is used for determining the active state of each hardware module in the system, wherein the active state comprises a wakeup state and a standby state.
In one embodiment, the computer program when executed by the processor implements the steps of: and acquiring a state setting instruction of each hardware module in the system through an interactive interface of the application management software.
In one embodiment, the computer program when executed by the processor implements the steps of: acquiring interrupt awakening source configuration information of each hardware module in the system; and determining the target hardware module according to the interrupt awakening source configuration information.
In one embodiment, the computer program when executed by the processor implements the steps of: and determining the target hardware module according to the corresponding relation among the hardware modules, the historical target hardware module and the power consumption corresponding to the historical target hardware module.
In one embodiment, the computer program when executed by the processor implements the steps of: and setting the state of the power supply module and the state of the clock module as an awakening state.
The implementation principle and technical effect of the computer-readable storage medium provided by this embodiment are similar to those of the above-described method embodiment, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A method of hardware management, the method comprising:
acquiring state setting information of each hardware module in the system;
setting the state of the current target hardware module as a standby state and setting the states of other hardware modules except the current target hardware module as an awakening state according to the state setting information; the target hardware module is determined according to the corresponding relation among the hardware modules and the historical target hardware module and the power consumption corresponding to the historical target hardware module;
acquiring system power consumption corresponding to the current target hardware module;
and determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
2. The method according to claim 1, wherein the step of determining the failed hardware module according to the system power consumption corresponding to the current target hardware module comprises:
if the system power consumption corresponding to the current target hardware module is less than or equal to the preset power consumption, determining that the current target hardware module is the fault hardware module;
and if the system power consumption corresponding to the current target hardware module is larger than the preset power consumption, reselecting the target hardware module, and returning to the step of acquiring the state setting information of each hardware module in the system.
3. The method according to claim 1 or 2, wherein the step of obtaining the status setting information of each hardware module in the system comprises:
acquiring real-time interrupt numbers corresponding to each hardware module in the system;
and acquiring the hardware state information of each hardware module according to the real-time interrupt number corresponding to each hardware module.
4. The method according to claim 1 or 2, wherein the step of obtaining the status setting information of each hardware module in the system further comprises:
acquiring a state setting instruction of each hardware module in the system, and acquiring state setting information of each hardware module according to the state setting instruction;
the state setting instruction is used for determining the active state of each hardware module in the system, wherein the active state comprises a wakeup state and a standby state.
5. The method of claim 4, wherein the step of obtaining the status setting instructions of the hardware modules in the system comprises:
and acquiring a state setting instruction of each hardware module in the system through an interactive interface of the application management software.
6. The method according to claim 1 or 2, wherein before the step of obtaining the status setting information of each hardware module in the system, the method further comprises the steps of:
acquiring interrupt awakening source configuration information of each hardware module in the system;
and determining the target hardware module according to the interrupt awakening source configuration information.
7. The method of claim 1 or 2, wherein the system comprises a power module and a clock module; the method further comprises the steps of:
and setting the state of the power supply module and the state of the clock module as an awakening state.
8. A hardware management apparatus, the apparatus comprising:
the first acquisition module is used for acquiring the state setting information of each hardware module in the system;
the setting module is used for setting the state of the current target hardware module into a standby state and setting the states of other hardware modules except the current target hardware module into an awakening state according to the state setting information; the target hardware module is determined according to the corresponding relation among the hardware modules and the historical target hardware module and the power consumption corresponding to the historical target hardware module;
the second acquisition module is used for acquiring the system power consumption corresponding to the current target hardware module;
and the first determining module is used for determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
9. The apparatus according to claim 8, wherein the first determining module is specifically configured to determine that the current target hardware module is the failed hardware module if system power consumption corresponding to the current target hardware module is less than or equal to preset power consumption; and if the system power consumption corresponding to the current target hardware module is larger than the preset power consumption, reselecting the target hardware module, and returning to the step of acquiring the state setting information of each hardware module in the system.
10. A hardware management system is characterized in that a driving bottom layer of the system comprises a dormancy management device and a hardware management device, wherein the dormancy management device and the hardware management device are both connected to each hardware module; wherein the hardware management apparatus includes:
the first acquisition module is used for acquiring the state setting information of each hardware module in the system;
the setting module is used for setting the state of the current target hardware module into a standby state and setting the states of other hardware modules except the current target hardware module into an awakening state according to the state setting information; the target hardware module is determined according to the corresponding relation among the hardware modules and the historical target hardware module and the power consumption corresponding to the historical target hardware module;
the second acquisition module is used for acquiring the system power consumption corresponding to the current target hardware module;
and the first determining module is used for determining a fault hardware module according to the system power consumption corresponding to the current target hardware module.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method according to any of claims 1-7.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201810923708.2A 2018-08-14 2018-08-14 Hardware management method, device, system, computer equipment and storage medium Active CN109151144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810923708.2A CN109151144B (en) 2018-08-14 2018-08-14 Hardware management method, device, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810923708.2A CN109151144B (en) 2018-08-14 2018-08-14 Hardware management method, device, system, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109151144A CN109151144A (en) 2019-01-04
CN109151144B true CN109151144B (en) 2020-12-29

Family

ID=64792937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810923708.2A Active CN109151144B (en) 2018-08-14 2018-08-14 Hardware management method, device, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109151144B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110187994A (en) * 2019-05-28 2019-08-30 北京星网锐捷网络技术有限公司 A kind of failure separation method, equipment and fault isolation system
CN111308180A (en) * 2020-03-17 2020-06-19 浙江正泰仪器仪表有限责任公司 Metering instrument power consumption abnormity detection method and metering instrument

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101126773A (en) * 2007-07-23 2008-02-20 北京航空航天大学 Electronic type transformer high voltage side redundant backup circuit and failure detection method
CN102841674A (en) * 2012-07-25 2012-12-26 中国科学院上海微系统与信息技术研究所 Embedded system based on novel memory and hibernation and awakening method for process of embedded system
CN105093062A (en) * 2015-07-31 2015-11-25 上海理工大学 Comprehensive fault positioning method of transmission line
CN105842554A (en) * 2016-01-29 2016-08-10 维沃移动通信有限公司 Hardware failure detection method and detection system for intelligent terminal and intelligent terminal
CN105988918A (en) * 2015-02-26 2016-10-05 阿里巴巴集团控股有限公司 GPU fault prediction method and device
CN106502858A (en) * 2016-10-09 2017-03-15 深圳市金立通信设备有限公司 A kind of multiple subsystem power consumption determines method and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8930736B2 (en) * 2012-03-01 2015-01-06 Microsoft Corporation Inferred electrical power consumption of computing devices

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101126773A (en) * 2007-07-23 2008-02-20 北京航空航天大学 Electronic type transformer high voltage side redundant backup circuit and failure detection method
CN102841674A (en) * 2012-07-25 2012-12-26 中国科学院上海微系统与信息技术研究所 Embedded system based on novel memory and hibernation and awakening method for process of embedded system
CN105988918A (en) * 2015-02-26 2016-10-05 阿里巴巴集团控股有限公司 GPU fault prediction method and device
CN105093062A (en) * 2015-07-31 2015-11-25 上海理工大学 Comprehensive fault positioning method of transmission line
CN105842554A (en) * 2016-01-29 2016-08-10 维沃移动通信有限公司 Hardware failure detection method and detection system for intelligent terminal and intelligent terminal
CN106502858A (en) * 2016-10-09 2017-03-15 深圳市金立通信设备有限公司 A kind of multiple subsystem power consumption determines method and terminal

Also Published As

Publication number Publication date
CN109151144A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN101354677B (en) Method for detecting and restoring application program running state and restoring device thereof
CN107430424B (en) Techniques for improved hybrid sleep power management
CN113703799B (en) Computing device and BIOS updating method and medium thereof
CN112437914B (en) System recovery method and device
CN103064799A (en) Electronic system and method and apparatus for saving data thereof
CN109151144B (en) Hardware management method, device, system, computer equipment and storage medium
US11216053B2 (en) Systems, apparatus, and methods for transitioning between multiple operating states
US8151124B2 (en) Apparatus and method for forcibly shutting down system
EP2972826A1 (en) Multi-core binary translation task processing
CN106603526B (en) WiFi/hotspot starting method and device
CN106598323B (en) Method and device for eliminating touch screen fault and mobile terminal
US7802119B2 (en) Method and system for saving power of central processing unit
CN100458708C (en) Interruption control system and method
JP2001005661A (en) Computer system and method for controlling performance of cpu in the system
WO2024113563A1 (en) Correctable error processing method and apparatus, device, and readable storage medium
WO2013048536A1 (en) Apparatus and method for managing register information in a processing system
CN111176958A (en) Information monitoring method, system and storage medium
CN116700465A (en) USB wake-up method, device, circuit, notebook computer, equipment and medium
CN103970253B (en) Power-saving operation method and electronic device
US20070168740A1 (en) Method and apparatus for dumping a process memory space
CN111897581B (en) Screen-off awakening method and device, storage medium and all-in-one machine equipment
US20130318310A1 (en) Processor processing method and processor system
CN111796939B (en) Processing method and device and electronic equipment
CN106933558B (en) Power supply control method and device
CN117406845B (en) Reset method, reset device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant