CN113282441B - Hardware running state data acquisition method and hardware detection equipment - Google Patents

Hardware running state data acquisition method and hardware detection equipment Download PDF

Info

Publication number
CN113282441B
CN113282441B CN202110810654.0A CN202110810654A CN113282441B CN 113282441 B CN113282441 B CN 113282441B CN 202110810654 A CN202110810654 A CN 202110810654A CN 113282441 B CN113282441 B CN 113282441B
Authority
CN
China
Prior art keywords
equipment
detected
connection
hardware
interface
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
CN202110810654.0A
Other languages
Chinese (zh)
Other versions
CN113282441A (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.)
Beijing Jiaotong University
Original Assignee
Beijing Jiaotong University
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 Beijing Jiaotong University filed Critical Beijing Jiaotong University
Priority to CN202110810654.0A priority Critical patent/CN113282441B/en
Publication of CN113282441A publication Critical patent/CN113282441A/en
Application granted granted Critical
Publication of CN113282441B publication Critical patent/CN113282441B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • 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/2273Test methods

Abstract

The invention provides a hardware running state data acquisition method and hardware detection equipment, wherein the method comprises the following steps: detecting a connection event, and determining a connection interface connected with the equipment to be detected according to the connection event; if the connection interface is a universal interface, setting a characteristic value representing the connection attribute as a preset value by using a preset identification code segment, and when the characteristic value representing the connection attribute is the preset value, indicating that the connection attribute is the slave equipment; establishing communication connection with the equipment to be detected through an equipment driver corresponding to the connection interface in the equipment to be detected, or logging in a server system of the equipment to be detected and establishing communication connection with the equipment to be detected; and acquiring hardware running state data of the equipment to be detected. By implementing the method and the device, after the communication connection is established with the equipment to be detected, deeper data and information of the equipment to be detected can be acquired, so that a foundation is laid for accurately identifying hardware faults.

Description

Hardware running state data acquisition method and hardware detection equipment
Technical Field
The invention relates to the technical field of equipment detection, in particular to a hardware running state data acquisition method and hardware detection equipment.
Background
The embedded device based on ARM or X86 can bear a multi-task operating system and high-real-time system software due to the characteristics of small system kernel, strong specificity, simple system and the like, and is widely applied to the fields of network communication, automotive electronics, industrial control and the like. When the embedded devices fail, it is difficult to accurately locate whether the embedded devices fail in the hardware level or in the software level, and the hardware and software need to be checked one by one. When a problem of hardware is detected, a conventional instrument, such as a multimeter, an oscilloscope and the like, is usually used for measuring electronic data, and whether the hardware has a problem is judged through the electronic data, but the electronic data measured through the conventional instrument is surface layer data of a circuit board, a relatively complex problem existing in the hardware cannot be determined through the surface layer data, and some deeper data and information related to the hardware cannot be acquired through the conventional instrument and a conventional instruction, so that the data capable of accurately identifying a hardware fault is difficult to acquire through the conventional instrument.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defect that it is difficult to obtain data capable of accurately identifying hardware faults through conventional instruments, thereby providing a hardware operation state data obtaining method and hardware detection equipment.
The invention provides a method for acquiring hardware running state data, which is applied to hardware detection equipment and comprises the following steps: detecting a connection event, and determining a connection interface connected with the equipment to be detected according to the connection event; if the connection interface is a universal interface, setting a characteristic value representing the connection attribute as a preset value by using a preset identification code segment, and when the characteristic value representing the connection attribute is the preset value, indicating that the connection attribute is the slave equipment; establishing communication connection with the equipment to be detected through an equipment driver corresponding to the connection interface in the equipment to be detected, or logging in a server system of the equipment to be detected and establishing communication connection with the equipment to be detected; and acquiring hardware running state data of the equipment to be detected.
Optionally, the method for acquiring hardware operating state data further includes establishing communication connection with the device to be detected through a device driver corresponding to the connection interface if the connection interface is a custom interface.
Optionally, in the method for acquiring hardware operating state data provided by the present invention, acquiring hardware operating state data of a device to be detected includes: sending a data acquisition instruction to equipment to be detected; and receiving hardware running state data sent by the equipment to be detected.
Optionally, in the method for acquiring hardware operating state data provided by the present invention, acquiring hardware operating state data of a device to be detected includes: and accessing hardware resources of the equipment to be detected through the connection interface to obtain hardware running state data.
A second aspect of the present invention provides a hardware detection apparatus, including: the connection interface is used for being connected with equipment to be detected; the connection event detection module is used for detecting a connection event and determining a connection interface connected with the equipment to be detected according to the connection event; the first communication connection establishing module is used for setting a characteristic value representing the connection attribute to be a preset value by using a preset identification code segment if the connection interface is a universal interface, and representing the connection attribute to be slave equipment when the characteristic value representing the connection attribute is the preset value, and establishing communication connection with the equipment to be detected through an equipment driver corresponding to the connection interface in the equipment to be detected, or logging in a server system of the equipment to be detected and establishing communication connection with the equipment to be detected; and the data acquisition module is used for acquiring the hardware running state data of the equipment to be detected.
Optionally, the hardware detection device provided by the present invention further includes a second communication connection establishment module, and if the connection interface is a custom interface, the second communication connection establishment module is configured to establish a communication connection with the device to be detected through a device driver corresponding to the connection interface.
Optionally, in the hardware detection device provided in the present invention, the data obtaining module includes: the instruction sending submodule is used for sending a data acquisition instruction to the equipment to be detected; and the first data acquisition submodule is used for receiving the hardware running state data sent by the equipment to be detected.
Optionally, in the hardware detection device provided in the present invention, the data obtaining module includes: and the second data acquisition submodule is used for accessing the hardware resources of the equipment to be detected through the connecting interface to acquire hardware running state data.
A third aspect of the present invention provides a computer apparatus comprising: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so as to execute the hardware operation state data acquisition method according to the first aspect of the present invention.
A fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the hardware operating state data acquiring method according to the first aspect of the present invention.
The technical scheme of the invention has the following advantages:
according to the hardware running state data acquisition method and the hardware detection equipment, the connection event is detected, the connection interface connected with the equipment to be detected is determined, then the communication connection is established with the equipment to be detected according to the connection mode corresponding to the connection interface, and finally the hardware running state data of the equipment to be detected is acquired.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a specific example of a hardware operation state data acquisition method in an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a specific example of a hardware detection device in an embodiment of the present invention;
fig. 3 is a schematic block diagram of a specific example of a computer device in the embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. 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.
In the description of the present invention, it should be noted that the terms "first", "second", and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
In the prior art, when a fault existing in hardware is identified, a conventional instrument is usually adopted to measure surface layer data of a hardware circuit board, such as a current value, a voltage value and the like in the circuit board, but a relatively complex problem existing in the hardware cannot be determined through the surface layer data, so that the hardware fault is difficult to accurately identify through data detected by the conventional instrument.
The embodiment of the invention provides a method for acquiring hardware running state data, which is applied to hardware detection equipment and comprises the following steps as shown in figure 1:
step S10: and detecting a connection event, and determining a connection interface connected with the equipment to be detected according to the connection event. In an optional embodiment, the to-be-detected device may be a CPU, a ROM, or the like of the motherboard, and if the to-be-detected motherboard is a network device, the to-be-detected device may be a network interface, a communication module, or the like of the to-be-detected motherboard.
When the hardware detection equipment is connected with the equipment to be detected, the hardware detection equipment and the equipment to be detected can detect a connection event. The hardware detection equipment and the equipment to be detected can be connected through different interfaces, such as a USB interface, a serial port, an Ethernet interface, a contact pin, a flat cable and the like, and for different connection interfaces, the communication connection with the equipment to be detected needs to be established in different modes.
After the connection event is detected, it is necessary to determine whether the connection interface connected to the device to be detected is a general interface, and in an optional embodiment, a system of the device to be detected may be defaulted to include general drivers for the common interfaces such as a USB interface, a serial interface, an ethernet interface, and the like, so that the common interfaces such as the USB interface, the serial interface, the ethernet interface, and the like may be determined to be the general interface.
The embodiment of the invention provides two methods for establishing communication connection with equipment to be detected, wherein the first method is to execute the step S21-the step S22, and the second method is to execute the step S23, and when a connection interface connected with the equipment to be detected is a universal interface, the communication connection with the equipment to be detected can be established by executing any one method.
The method comprises the following steps:
step S21: and setting the characteristic value representing the connection attribute as a preset value by using a preset identification code segment, and when the characteristic value representing the connection attribute is the preset value, indicating that the connection attribute is the slave equipment.
After the hardware detection device is connected with the device to be detected through the interface, the device to be detected and the hardware detection device can both recognize the connection event of each other. However, for two conventional devices with systems, after connecting with another device, the connection attribute of the device is set as a host/server by default, and when both devices have device drivers for the same interface, the connection attribute of the devices that are both host devices cannot be recognized after the devices are connected to each other, so that communication connection cannot be established.
In the embodiment of the invention, the hardware detection equipment is defined with the equipment drivers corresponding to the connection interfaces, the equipment to be detected is defaulted to contain the equipment drivers corresponding to the universal interfaces, and when the interface connected with the equipment to be detected is detected to be the universal interface, in order to avoid that two main devices cannot establish communication connection, the connection attribute of the hardware detection equipment is set as slave device (slave/client), so that the equipment to be detected can actively identify the connection attribute of the hardware detection equipment, and the communication connection between the hardware detection equipment and the equipment to be detected is realized.
Step S22: and establishing communication connection with the equipment to be detected through an equipment driver corresponding to the connection interface in the equipment to be detected. In the embodiment of the invention, the communication connection is established between the equipment driver corresponding to the connection interface in the equipment to be detected and the equipment to be detected, which means that the hardware detection equipment is identified and authorized by the equipment to be detected through the equipment driver corresponding to the connection interface in the equipment to be detected.
In an optional embodiment, step S21 specifically includes:
the method comprises the steps that a preset identification code segment is utilized to control hardware detection equipment to request host role negotiation protocol (HNP) service to equipment to be detected, when the hardware detection equipment requests the HNP service to the equipment to be detected, the positive electrode level of a signal line of the hardware detection equipment is prohibited to be pulled up, and a hardware detection equipment bus enters an idle state (SE 0 state) at a high speed;
the method comprises the steps that a hardware detection device detects the bus state of a device to be detected, when the bus state of the device to be detected is an idle state (J state) at full speed, the level of a pin used for representing the connection attribute of the hardware detection device is converted from a low level to a high level, and the connection attribute is converted from a master device to a slave device; in an optional embodiment, when the device to be detected detects that the bus state of the hardware detection device is the SE0 state, the bus state of the device to be detected is modified into the J state, and the HNP service initiated by the hardware detection device is responded;
and releasing the pull-up prohibition of the positive level of the signal wire, and recovering communication, wherein at the moment, the hardware detection equipment can receive the drive of the equipment to be detected by the identity of the slave equipment, so that the connection between the hardware detection equipment and the equipment to be detected is realized.
In the process, the connection attribute of the hardware detection equipment can be converted without executing any operation on the equipment to be detected, the communication connection between the hardware detection equipment and the equipment to be detected is realized, and the process of establishing the communication connection is simple.
In an optional embodiment, when the hardware detection device is connected with the device to be detected through a USB interface, the preset identification code segment controls the hardware detection device to request HNP service from the device to be detected, in this process, the hardware detection device prohibits the USBD + (positive electrode of the USB signal line) level from being pulled up, so that the bus of the hardware detection device enters an SE0 state, then the bus state of the device to be detected is detected, if the bus state of the device to be detected is a J state, the level of a pin for representing the connection attribute of the device is converted from a low level to a high level, the connection attribute is converted from the master device to the slave device, then the pull-up prohibition of the D + is removed, and communication is resumed.
In an optional embodiment, if the connection interface is a USB interface, the preset identification code segment may be an stty instruction, that is, the hardware detection device modifies the connection attribute using the stty instruction, and then checks all file system and hardware information of the device to be detected using a cat or ls manner. This process can be achieved without the confirmation of the device to be detected.
In the method provided by the embodiment of the invention, if the connection interface of the hardware detection device and the equipment to be detected is a universal interface, the connection attribute of the hardware detection device is modified into slave equipment, and the communication connection between the hardware detection device and the equipment to be detected is established through the equipment driver corresponding to the connection interface in the equipment to be detected. When the equipment driver corresponding to the connection interface exists in the equipment to be detected, the communication connection between the hardware detection equipment and the equipment to be detected can be established on the basis of not performing any operation on the equipment to be detected and not influencing the normal work of the equipment to be detected by implementing the embodiment of the invention even if the equipment driver corresponding to the connection interface exists in the hardware detection equipment and the equipment to be detected at the same time, so that the plug-and-play of the hardware detection equipment is realized, and the hardware running state data of the equipment to be detected can be quickly acquired.
The second method comprises the following steps:
step S23: logging in a server system of the equipment to be detected, and establishing communication connection with the equipment to be detected.
When both devices have device drivers for the same connection interface, in order to solve the problem that the two devices, which are both master devices, cannot identify the connection attributes of each other after being connected to each other, and thus cannot establish communication connection, unlike the above-mentioned step S21-step S22, in the embodiment of the present invention, the communication connection between the hardware detection device and the device to be detected is established in a manner of logging the hardware detection device into the system of the device to be detected in a client manner.
In an optional embodiment, if the connection interface is a serial port, the serial port can be controlled by a screen instruction to log in a system of the device to be detected in a client mode. All file system and hardware information of the device to be tested is then checked using cat or ls. This process can be achieved without the confirmation of the device to be detected.
In an optional embodiment, if the connection interface is an ethernet interface, protocols such as telnet and ssh may be used, so that the hardware detection device logs in the server system of the device to be detected in a client mode. The conventional login mode needs to frequently input login passwords, and the login automation can be realized by adopting an expect function automatic password input method and a ssh-copy-id password-free login method in the embodiment of the invention. After the login is completed, the hardware detection device serves as a client and can send a detection instruction to the device to be detected, and the device to be detected can return a detection result according to the detection instruction.
In the embodiment of the invention, in order to acquire deeper data and information related to hardware, the hardware detection equipment is controlled to establish communication connection with the equipment to be detected, the deeper data can be acquired only by establishing the communication connection with the equipment to be detected, and only the surface layer data of the hardware circuit board can be acquired if simple physical connection is established.
Step S30: and acquiring hardware running state data of the equipment to be detected.
In an optional embodiment, the acquired hardware operation state data of the device to be detected includes one or more items of a use condition, an operating temperature, an operating voltage, an operating current, and the like of the device to be detected.
The obtained hardware running state data are different for different devices to be detected, and exemplarily, if the devices to be detected are a CPU and an RAM, the hardware running state data include CPU usage, CPU occupancy, CPU temperature, CPU power consumption, RAM usage, RAM occupancy, RAM temperature, RAM power consumption and the like;
if the equipment to be detected is a network interface and a communication module, the hardware running state data comprises: network interface on-off condition, network interface rate, expansion module connection condition and the like;
and if the device to be detected is a CPU with multi-core/multi-thread performance, the hardware running state data comprises the running data of each core/thread.
When the method for acquiring the hardware running state data provided by the embodiment of the invention is applied to hardware detection equipment, a connection event is detected firstly, a connection interface connected with the equipment to be detected is determined, then communication connection is established with the equipment to be detected according to a connection mode corresponding to the connection interface, and finally the hardware running state data of the equipment to be detected is acquired.
In an optional embodiment, as shown in fig. 1, if the connection interface connected to the device to be detected is a custom interface, the following steps are performed:
step S24: and establishing communication connection with the equipment to be detected through the equipment driver corresponding to the connection interface.
The self-defined interface is self-defined in the hardware detection equipment, the equipment to be detected does not have corresponding equipment drive, and the equipment to be detected cannot finish active identification on the hardware detection equipment, so the hardware detection equipment can drive the equipment to be detected as slave equipment (slave) by using the role of main equipment (host).
In an optional embodiment, when the hardware detection device is connected with the device to be detected by means of pins and cables, the connection interface may be determined as a custom interface.
In an optional embodiment, one or more custom interfaces and device drivers corresponding to the respective defined interfaces may be predefined in the hardware detection device, and for the device driver corresponding to each custom interface, a software module is defined, where the software module includes an h file and an c file, where the h file defines a data structure of the device driver, and declares an external function, and the c file implements the specific implementation of the device driver. And the software module can directly access the interface of the equipment driver without crossing any layer and directly read the data of the equipment to be detected from the equipment interface.
According to the method provided by the embodiment of the invention, when the hardware detection equipment is connected with the equipment to be detected through the custom interface in the hardware detection equipment, the communication connection between the hardware detection equipment and the equipment to be detected is established through the equipment driver corresponding to the connection interface in the hardware detection equipment.
The two different methods for establishing communication connection provided in steps S21-S22 and S23 are both based on the premise that the device driver corresponding to the connection interface exists in the device under test, and if the two methods are executed, the connection between the hardware testing device and the device under test fails, it is considered that it may be caused by the absence of the device driver corresponding to the connection interface in the device to be inspected, and therefore, in an alternative embodiment, after the above steps S21-S22 and/or S23 are performed, if the connection between the hardware testing device and the device to be tested fails, the characteristic value characterizing the connection attribute in the hardware detection device may be modified, so that the connection attribute of the hardware detection device is the master device, and establishing communication connection between the hardware detection equipment and the equipment to be detected through equipment drivers corresponding to the connection interfaces in the hardware detection equipment.
The method for establishing communication connection provided in step S24 is based on the premise that the device driver corresponding to the connection interface does not exist in the device to be detected, and after step S24 is executed, if the connection between the hardware detection device and the device to be detected fails, it is considered that the connection may be caused by the device driver corresponding to the connection interface existing in the device to be detected, so in an optional embodiment, after step S24 is executed, if the connection between the hardware detection device and the device to be detected fails, step S21-step S22 may be executed, or step S23 is executed to establish communication connection between the hardware detection device and the device to be detected.
In an optional embodiment, if the communication connection with the device to be tested is established by performing the steps S21-S22, or the step S23, the step S30 specifically includes:
firstly, a data acquisition instruction is sent to the device to be detected.
And then, receiving hardware running state data sent by the equipment to be detected.
In an optional embodiment, the instruction set may be pre-selected and stored, where the instruction set includes a plurality of different data acquisition instructions, and the different data acquisition instructions are used to acquire different data, and after the connection with the device to be detected is established, one or more data acquisition instructions in the instruction set may be sent to the device to be detected as required, so as to selectively acquire hardware operating state data of the device to be detected.
In an optional embodiment, some data existing in the device to be detected may change along with the operation of the device to be detected, and therefore, the data acquisition instruction may be sent according to a certain time period, so as to acquire hardware operation state data of the device to be detected at different times. In an optional embodiment, if the communication connection with the device to be tested is established by executing the step S24, the step S30 specifically includes: and accessing hardware resources of the equipment to be detected through the connection interface to obtain hardware running state data.
In an optional embodiment, the acquisition of the hardware running state data can be realized through a preset custom function, and the device to be detected does not need to perform any operation.
In this embodiment, the hardware detection device is based on a Field Programmable Gate Array (FPGA), and as shown in fig. 2, the hardware detection device includes:
at least one connection interface 10 is configured to be connected to a device to be detected, and for details, reference is made to the description of the connection interface in the foregoing embodiment, and details are not described herein again.
The connection event detecting module 20 is configured to detect a connection event, and determine the connection interface 10 connected to the device to be detected according to the connection event, for details, refer to the description of step S10 in the foregoing embodiment, and are not described herein again.
The first communication connection establishing module 30 is configured to, if the connection interface is a universal interface, set a characteristic value representing a connection attribute as a preset value by using a preset identification code segment, and when the characteristic value representing the connection attribute is the preset value, indicate that the connection attribute is a slave device, and establish a communication connection with the device to be detected through a device driver corresponding to the connection interface in the device to be detected, or log in a server system of the device to be detected, and establish a communication connection with the device to be detected. For details, refer to the descriptions of step S21-step S23 in the above embodiments, and are not repeated herein.
The data obtaining module 40 is configured to obtain hardware operating state data of the device to be tested, and details of the data obtaining module refer to the description of step S30 in the foregoing embodiment, which is not described herein again.
The hardware detection equipment provided by the embodiment of the invention firstly detects the connection event, determines the connection interface connected with the equipment to be detected, then establishes communication connection with the equipment to be detected according to the connection mode corresponding to the connection interface, and finally acquires the hardware running state data of the equipment to be detected.
In an alternative embodiment, the first communication connection establishing module 30 may be a conventional bus control chip or a control unit developed by a plug-in method.
In an optional embodiment, the hardware detection device further includes a second communication connection establishment module, the custom interface is connected to the third connection control submodule, and if the custom interface is connected to the device to be detected, the second communication connection establishment module is configured to establish a communication connection with the device to be detected through a device driver corresponding to the connection interface, for details, see the description of step S24 in the foregoing embodiment.
In an alternative embodiment, the second communication connection establishing module may be a dedicated control circuit developed by means of an embedded logic controller, and may be, for example, one of GPIO, control circuit and logic circuit implemented by using Verilog HDL or VHDL language.
In an alternative embodiment, the data acquisition module 40 includes:
and the instruction sending submodule is used for sending a data acquisition instruction to the equipment to be detected.
And the first data acquisition submodule is used for receiving the hardware running state data sent by the equipment to be detected. Details are described in the above method embodiments.
In an alternative embodiment, the data acquisition module 40 includes:
and the second data acquisition submodule is used for accessing the hardware resources of the equipment to be detected through the connecting interface to acquire hardware running state data. Details are described in the above method embodiments.
In an optional embodiment, the hardware detection device provided in the embodiment of the present invention further includes a data storage module, configured to store the operation code and the extracted operation state data.
In an optional embodiment, the hardware detection device provided in the embodiment of the present invention further includes a visualization module, configured to display the extracted running state data of the underlying hardware.
The visualization module includes a display area and an indicator light. The display screen is used for displaying the extracted hardware running state data, and the indicator lamp is used for identifying the running state of each hardware detection device, namely the indicator lamp is normally on when the data are normally extracted, and the indicator lamp is off when the data are abnormally extracted or cannot be extracted.
An embodiment of the present invention provides a computer device, as shown in fig. 3, the computer device mainly includes one or more processors 41 and a memory 42, and one processor 41 is taken as an example in fig. 3.
The computer device may further include: an input device 43 and an output device 44.
The processor 41, the memory 42, the input device 43 and the output device 34 may be connected by a bus or other means, and the bus connection is exemplified in fig. 3.
The processor 41 may be a Central Processing Unit (CPU). The Processor 41 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory 42 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the hardware detection device, and the like. Further, the memory 42 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 42 optionally includes memory located remotely from processor 41, which may be connected to the hardware detection device via a network. The input device 43 may receive a calculation request (or other numeric or character information) input by a user and generate a key signal input in association with the hardware detection apparatus. The output device 34 may include a display device such as a display screen for outputting the calculation result.
An embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and the computer-readable storage medium stores computer-executable instructions, where the computer-executable instructions may execute the hardware operating state data obtaining method in any of the above method embodiments. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (10)

1. A hardware running state data acquisition method is characterized by being applied to hardware detection equipment and comprising the following steps:
detecting a connection event, and determining a connection interface connected with equipment to be detected according to the connection event;
if the connection interface is a general-purpose interface,
setting a characteristic value representing the connection attribute as a preset value by using a preset identification code segment, wherein when the characteristic value representing the connection attribute is the preset value, the connection attribute is represented as slave equipment; establishing communication connection with the equipment to be detected through an equipment driver corresponding to the connection interface in the equipment to be detected;
acquiring hardware running state data of equipment to be detected;
setting the characteristic value representing the connection attribute to be a preset value by using a preset identification code segment, wherein the method comprises the following steps:
the method comprises the steps that a preset identification code segment is utilized to control hardware detection equipment to request host role negotiation protocol service for equipment to be detected, when the hardware detection equipment requests the host role negotiation protocol service for the equipment to be detected, the positive electrode level of a signal wire of the hardware detection equipment is prohibited to be pulled up, and a hardware detection equipment bus enters a high-speed idle state;
detecting the bus state of the equipment to be detected, and when the bus state of the equipment to be detected is an idle state at full speed, converting the level of a pin for representing the connection attribute of hardware detection equipment from a low level to a high level to realize the conversion of the connection attribute from the master equipment to the slave equipment; when the device to be detected detects that the bus state of the hardware detection device is an idle state at a high speed, the device to be detected modifies the bus state of the device to be detected into an idle state at the full speed, and responds to a host role negotiation protocol service initiated by the hardware detection device;
the pull-up prohibition of the positive level of the signal line is released, and communication is resumed.
2. The method of claim 1, further comprising:
and if the connection interface is a user-defined interface, establishing communication connection with the equipment to be detected through an equipment driver corresponding to the connection interface.
3. The method of claim 1, wherein acquiring hardware operating state data of the device under test comprises:
sending a data acquisition instruction to the equipment to be detected;
and receiving hardware running state data sent by the equipment to be detected.
4. The method of claim 2, wherein acquiring hardware operating state data of the device under test comprises:
and accessing the hardware resource of the equipment to be detected through the connecting interface to obtain the hardware running state data.
5. A hardware detection device, comprising:
the connection interface is used for being connected with equipment to be detected;
the device comprises a connection event detection module, a connection event detection module and a connection event detection module, wherein the connection event detection module is used for detecting a connection event and determining a connection interface connected with the device to be detected according to the connection event;
the first communication connection establishing module is used for setting a characteristic value representing a connection attribute to a preset value by using a preset identification code segment if the connection interface is a universal interface, indicating that the connection attribute is slave equipment when the characteristic value representing the connection attribute is the preset value, and establishing communication connection with the equipment to be detected through an equipment driver corresponding to the connection interface in the equipment to be detected;
the data acquisition module is used for acquiring hardware running state data of the equipment to be detected;
setting the characteristic value representing the connection attribute to be a preset value by using a preset identification code segment, wherein the method comprises the following steps:
the method comprises the steps that a preset identification code segment is utilized to control hardware detection equipment to request host role negotiation protocol service for equipment to be detected, when the hardware detection equipment requests the host role negotiation protocol service for the equipment to be detected, the positive electrode level of a signal wire of the hardware detection equipment is prohibited to be pulled up, and a hardware detection equipment bus enters a high-speed idle state;
detecting the bus state of the equipment to be detected, and when the bus state of the equipment to be detected is an idle state at full speed, converting the level of a pin for representing the connection attribute of hardware detection equipment from a low level to a high level to realize the conversion of the connection attribute from the master equipment to the slave equipment; when the device to be detected detects that the bus state of the hardware detection device is an idle state at a high speed, the device to be detected modifies the bus state of the device to be detected into an idle state at the full speed, and responds to a host role negotiation protocol service initiated by the hardware detection device;
the pull-up prohibition of the positive level of the signal line is released, and communication is resumed.
6. The device of claim 5, wherein the hardware detection device further comprises a second communication connection establishment module,
and if the connection interface is a user-defined interface, the second communication connection establishing module is used for establishing communication connection with the equipment to be detected through the equipment driver corresponding to the connection interface.
7. The apparatus of claim 5, wherein the data acquisition module comprises:
the instruction sending submodule is used for sending a data acquisition instruction to the equipment to be detected;
and the first data acquisition submodule is used for receiving the hardware running state data sent by the equipment to be detected.
8. The apparatus of claim 6, wherein the data acquisition module comprises:
and the second data acquisition submodule is used for accessing the hardware resource of the equipment to be detected through the connecting interface to acquire the hardware running state data.
9. A computer device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to perform the method of hardware operational state data acquisition of any of claims 1-4.
10. A computer-readable storage medium storing computer instructions for causing a computer to execute the hardware operation state data acquisition method according to any one of claims 1 to 4.
CN202110810654.0A 2021-07-19 2021-07-19 Hardware running state data acquisition method and hardware detection equipment Active CN113282441B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110810654.0A CN113282441B (en) 2021-07-19 2021-07-19 Hardware running state data acquisition method and hardware detection equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110810654.0A CN113282441B (en) 2021-07-19 2021-07-19 Hardware running state data acquisition method and hardware detection equipment

Publications (2)

Publication Number Publication Date
CN113282441A CN113282441A (en) 2021-08-20
CN113282441B true CN113282441B (en) 2022-04-19

Family

ID=77286710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110810654.0A Active CN113282441B (en) 2021-07-19 2021-07-19 Hardware running state data acquisition method and hardware detection equipment

Country Status (1)

Country Link
CN (1) CN113282441B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101634833A (en) * 2008-07-23 2010-01-27 沈阳中科博微自动化技术有限公司 Open type configuration method and system for IO parameters of field device
CN109684137A (en) * 2017-10-19 2019-04-26 航天信息股份有限公司 A kind of method and system for being detected to target device
CN112070995A (en) * 2020-09-04 2020-12-11 广东工贸职业技术学院 Method, device and system for realizing master-slave USB parallel mode of intelligent equipment
CN112306765A (en) * 2019-07-30 2021-02-02 北京达佳互联信息技术有限公司 Portable device, method, apparatus and storage medium for detecting hard disk failure
CN112316417A (en) * 2020-11-05 2021-02-05 腾讯科技(深圳)有限公司 Control equipment connection method, device, equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019090611A1 (en) * 2017-11-09 2019-05-16 深圳传音通讯有限公司 Detection method and detection apparatus for step counting function of intelligent device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101634833A (en) * 2008-07-23 2010-01-27 沈阳中科博微自动化技术有限公司 Open type configuration method and system for IO parameters of field device
CN109684137A (en) * 2017-10-19 2019-04-26 航天信息股份有限公司 A kind of method and system for being detected to target device
CN112306765A (en) * 2019-07-30 2021-02-02 北京达佳互联信息技术有限公司 Portable device, method, apparatus and storage medium for detecting hard disk failure
CN112070995A (en) * 2020-09-04 2020-12-11 广东工贸职业技术学院 Method, device and system for realizing master-slave USB parallel mode of intelligent equipment
CN112316417A (en) * 2020-11-05 2021-02-05 腾讯科技(深圳)有限公司 Control equipment connection method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN113282441A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
WO2017000424A1 (en) Protocol detection method and apparatus
US10762029B2 (en) Electronic apparatus and detection method using the same
CN106407059A (en) Server node testing system and method
US20120047292A1 (en) Monitoring System, Device Server, Host Computer, Monitoring Method, and Storage Medium
CN111198795A (en) Method and device for acquiring memory temperature by substrate controller
US20100064079A1 (en) USB Devices Pre-Configuration For KVM Switch
CN114384892A (en) Test equipment, state detection method and device of vehicle control unit and electronic equipment
CN113282441B (en) Hardware running state data acquisition method and hardware detection equipment
US11862278B2 (en) Memory test systems and memory test methods
CN112866061A (en) NCSI (network control information system) testing method, device, equipment and medium of onboard network port
CN112732502A (en) Method and device for detecting I2C signal, detection equipment and storage medium
CN114938377A (en) Back-end server management method and device, readable medium and electronic equipment
CN112416678B (en) Fan in-place detection device and method
CN110932930B (en) Detection method, device and medium for server PCIE link stability
CN114003480A (en) APP starting time monitoring system and method
CN112765080A (en) Information processing method and equipment
TW202018507A (en) A host boot detection method and its system
CN113960496B (en) Circuit diagnosis method and device
CN115576765B (en) Test method, test device, electronic equipment and storage medium
CN116306400B (en) Integrated circuit verification method, system, device, equipment and medium
CN114442019B (en) Test correction method and device of test tool and electronic equipment
CN113872829B (en) Bidirectional data transmission testing device and testing method
CN111124804B (en) Test method and device
CN117056154A (en) Method, system, device and medium for detecting network port function of intelligent network card
KR100930194B1 (en) Communication status analysis device and method

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