CN117555713A - Fault reproduction method, system and computer readable storage medium - Google Patents

Fault reproduction method, system and computer readable storage medium Download PDF

Info

Publication number
CN117555713A
CN117555713A CN202311503206.1A CN202311503206A CN117555713A CN 117555713 A CN117555713 A CN 117555713A CN 202311503206 A CN202311503206 A CN 202311503206A CN 117555713 A CN117555713 A CN 117555713A
Authority
CN
China
Prior art keywords
host
command
level signal
diagnosis
basic input
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.)
Pending
Application number
CN202311503206.1A
Other languages
Chinese (zh)
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 Inovance Technology Co Ltd
Original Assignee
Shenzhen Inovance Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Inovance Technology Co Ltd filed Critical Shenzhen Inovance Technology Co Ltd
Priority to CN202311503206.1A priority Critical patent/CN117555713A/en
Publication of CN117555713A publication Critical patent/CN117555713A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/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/0706Error 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 the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0721Error 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 the processing taking place on a specific hardware platform or in a specific software environment within a central processing unit [CPU]
    • 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/0766Error or fault reporting or storing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/572Secure firmware programming, e.g. of basic input output system [BIOS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Abstract

The application discloses a fault reproduction method, a system and a computer readable storage medium, wherein the method comprises the following steps: sending a diagnosis command to a basic input/output system of a host, and receiving a response command corresponding to the diagnosis command fed back by the host; analyzing the response command to obtain dynamic operation data and static firmware data when the basic input/output system fails; and performing fault reproduction based on the dynamic operation data and the static firmware data. The dynamic operation data and the static firmware data of the basic input and output system of the host are obtained through the diagnosis device, the fault reproduction is carried out through the dynamic operation data and the static firmware data of the host during the fault, the fault site is restored, and the fault diagnosis efficiency of the basic input and output system is improved.

Description

Fault reproduction method, system and computer readable storage medium
Technical Field
The present disclosure relates to the field of basic input/output systems, and in particular, to a fault reproduction method, system, and computer readable storage medium.
Background
The Basic Input/Output System (BIOS) is a section of program code that is first loaded when a computer is started, and has functions of initializing and detecting hardware and peripheral devices, and booting the computer to be loaded into an Operating System (OS) after the above-mentioned tasks are completed. The basic input/output system is usually provided with a corresponding debugging switch, and after the basic input/output system is loaded, a developer can open the debugging switch in a basic input/output system setting interface to start a debugging mode of the basic input/output system, and a serial port is used for acquiring basic input/output system data for debugging and analyzing host abnormality. However, it only analyzes the fault data, but the fault site reproduction cannot be realized through the fault data, resulting in a decrease in the fault diagnosis efficiency of the basic input output system.
Disclosure of Invention
The embodiment of the application aims to acquire the dynamic operation data and the static firmware data of a host computer when a basic input/output system fails through a diagnosis device, perform fault reproduction through the dynamic operation data and the static firmware data when the host computer fails, restore a fault site and improve the failure diagnosis efficiency of the basic input/output system by providing a fault reproduction method, a system and a computer readable storage medium.
The embodiment of the application provides a fault reproduction method, which comprises the following steps:
sending a diagnosis command to a basic input/output system of a host, and receiving a response command corresponding to the diagnosis command fed back by the host;
analyzing the response command to obtain dynamic operation data and static firmware data when the basic input/output system fails;
and performing fault reproduction based on the dynamic operation data and the static firmware data.
Optionally, the step of sending a diagnostic command to the basic input output system of the host and receiving a response command corresponding to the diagnostic command fed back by the host includes:
detecting a level signal of a designated receiving end and a level signal of a designated transmitting end of the host;
When the level signal of the appointed receiving end and the level signal of the appointed sending end meet a first preset condition, a diagnosis command is sent to a basic input output system of a host;
and when the level signal of the appointed receiving end and the level signal of the appointed sending end meet a second preset condition, receiving a response command corresponding to the diagnosis command fed back by the host.
Optionally, the first preset condition includes: the level signal of the appointed receiving end is changed from a first level signal to a second level signal, and the level signal of the appointed sending end is the first level signal;
the second preset condition includes: the level change condition of the appointed sending end is changed from a second level signal to a first level signal, and the level signal of the appointed receiving end is the second level signal.
Optionally, before the step of sending a diagnostic command to the basic input output system of the host and receiving a response command corresponding to the diagnostic command fed back by the host, the method further includes:
acquiring an identity of a host, and requesting a server certificate associated with the identity from a server;
encrypting the diagnosis command by adopting the server certificate to obtain an encrypted diagnosis command;
And sending the encrypted diagnosis command to a basic input/output system of the host.
The embodiment of the application provides a fault reproduction method, which comprises the following steps:
the basic input/output system of the host computer receives the diagnostic command sent by the diagnostic device;
determining dynamic operation data and static firmware data when the basic input/output system fails according to the diagnosis command;
and generating a response command according to the dynamic operation data and the static firmware data, and feeding back the response command to the diagnosis device.
Optionally, the fault reproduction method further includes:
the basic input/output system of the host detects whether the host starts a fault diagnosis function within a preset time period after the host is powered on;
if yes, the basic input/output system of the host receives a diagnosis command sent by the diagnosis device;
if not, entering a normal running mode of the host.
Optionally, the detecting whether the host initiates a fault diagnosis function includes:
when the level signal of the appointed receiving end and the level signal of the appointed sending end of the host are both first level signals, determining that the host does not start a fault diagnosis function;
And when the level signal of the appointed receiving end of the host is a second level signal and the level signal of the appointed sending end of the host is a first level signal, determining that the host has started a fault diagnosis function.
Optionally, the feeding back the response command to the diagnostic device includes:
encrypting the response command by adopting a server certificate pre-stored by the host to obtain an encrypted response command;
and sending the encrypted response command to the diagnosis device.
In addition, to achieve the above object, the present application further provides a fault reproduction system including: the system comprises a diagnostic device and a host, wherein the host is connected with the diagnostic device;
the diagnostic device includes: a first memory, a first processor, and a failure reproduction program stored in the first memory and operable on the first processor, the failure reproduction program implementing the steps of the failure reproduction method when executed by the first processor;
the host includes: the fault reproduction method comprises the steps of a second memory, a second processor and a fault reproduction program which is stored in the second memory and can run on the second processor, wherein the fault reproduction program is executed by the second processor to realize the fault reproduction method.
In addition, in order to achieve the above object, the present application also provides a computer-readable storage medium having stored thereon a failure reproduction program that, when executed by a processor, implements the steps of the failure reproduction method described above.
According to the technical scheme of the fault reproduction method, the system and the computer readable storage medium, the dynamic operation data and the static firmware data during the faults of the basic input and output system can be safely exported through the diagnosis device, the fault site data can be acquired and reserved, and the fault site is restored through the dynamic operation data and the static firmware data, so that the faults are diagnosed, and the fault diagnosis efficiency is improved.
Drawings
FIG. 1 is a schematic flow chart of a first embodiment of a fault recovery method of the present application;
FIG. 2 is a schematic diagram of the format of the diagnostic command and response command of the present application;
FIG. 3 is a schematic diagram of the connection of a host computer to a diagnostic device according to the present application;
FIG. 4 is a schematic flow chart of a second embodiment of the fault recovery method of the present application;
FIG. 5 is a schematic diagram of interactions of a host, diagnostic device and server of the present application;
FIG. 6 is a schematic flow chart diagram of a third embodiment of a fault recovery method according to the present application;
FIG. 7 is a schematic diagram of a power-on diagnostic process of the basic input/output system of the present application;
fig. 8 is a schematic structural diagram of a hardware running environment according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to embodiments, with reference to the accompanying drawings, which are only illustrations of one embodiment, and not all of the applications.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Aiming at the problem of low failure diagnosis efficiency of a basic input/output system in the related technology, the application provides a novel failure reproduction method, and the main technical scheme comprises the following steps: sending a diagnosis command to a basic input/output system of a host, and receiving a response command corresponding to the diagnosis command fed back by the host; analyzing the response command to obtain dynamic operation data and static firmware data when the basic input/output system fails; and performing fault reproduction of the basic input/output system based on the dynamic operation data and the static firmware data. According to the method and the device, the dynamic operation data and the static firmware data during the failure of the basic input and output system can be safely exported, the failure site data can be acquired and reserved, and the failure site is restored through the dynamic operation data and the static firmware data, so that the failure is reproduced, and the failure reproduction efficiency is improved. Meanwhile, specific fault problems can be accurately positioned.
In addition, in the related art, when the black screen problem caused by the abnormality of the basic input/output system fault can be solved, the basic input/output system chip can only be returned to the factory for maintenance, and then the after-sale cost is increased by brushing. According to the method and the device, the fault site is restored through the dynamic operation data and the static firmware data when the basic input/output system is in fault, so that the after-sale cost can be reduced.
In addition, when the diagnosis command is sent to the host or the response command is sent to the diagnosis device by the host, the diagnosis command and the response command are encrypted through the server certificate, so that the data transmission safety is improved.
Finally, the above technical scheme adopted by the application can also solve the problems that the basic input/output system suffers from faults in the loading process, the loading cannot be completed, and then the setting interface of the basic input/output system cannot be loaded, so that a developer cannot start a debugging mode and position the faults suffered by the basic input/output system at the moment. According to the method and the device, the level change of the port of the host is controlled through the diagnostic device, the host is further controlled to start the debugging mode, and when a fault is encountered in the loading process of the basic input/output system, the diagnostic function of the basic input/output system is started to smoothly acquire dynamic operation data and static firmware data when the basic input/output system is in fault, so that the acquisition efficiency of the dynamic operation data and the static firmware data is improved, and the fault reproduction efficiency is further improved.
In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As shown in fig. 1, in a first embodiment of the present application, the fault reproduction method of the present application is applied to a diagnostic apparatus including, but not limited to, a usb disk, a complex programmable logic device, or other apparatus having a diagnostic function, and the fault reproduction method includes the steps of:
step S110, a diagnosis command is sent to a basic input/output system of a host, and a response command corresponding to the diagnosis command fed back by the host is received.
In this embodiment, the bios is firmware located on the motherboard of the computer, which provides the basic control and initialization functions of the computer hardware. The basic input and output system is located on the main board of the computer and runs before the operating system is started.
Specifically, the basic input/output system is responsible for initializing hardware devices of the computer, such as a processor, a memory, a hard disk, a display card, and the like, and providing basic input/output functions. It contains some predefined firmware programs for managing and controlling the operation of the hardware devices. The basic input output system is also responsible for determining the start-up sequence of the computer. When the computer is started, the basic input/output system detects bootable devices (such as a hard disk, an optical drive, a USB device and the like) and tries to load the operating system according to a preset starting sequence. Typically, the bios will first attempt to load the operating system from the hard disk and if it fails, continue to attempt other devices in the set order. Basic input output systems typically provide a setup interface that allows a user to modify some basic system configuration options. By pressing a specific key, the user can enter a basic input output system setting interface, perform configuration such as date and time setting, starting device sequence, hardware detection, and the like. Since the bios is firmware, it can be updated to fix errors, add functionality, or improve compatibility.
In the prior art, a corresponding debug switch is usually provided in the bios, and after the bios is loaded, a developer may turn on the switch in the bios setup interface to start the debug mode of the bios. However, there is a problem in that a setting interface of the bios cannot be loaded due to a failure in the bios loading process. The utility model provides a diagnostic device, this diagnostic device can be connected through the serial ports with the host computer, through the level signal of the appointed receiving terminal of adjustment host computer and the level signal of appointed transmitting terminal for can get into basic input output system's setting interface smoothly, carry out basic input output system debugging.
In this embodiment, the present application sends a diagnostic command to the bios of the host through the diagnostic device, and feeds back a response command corresponding to the diagnostic command through the diagnostic device. The diagnosis device can circularly send diagnosis commands to the host and circularly receive response commands fed back by the host so as to acquire all information during faults and realize the recurrence of the faults.
The command formats of the diagnostic command and the response command may be set according to actual situations, and the command formats of the diagnostic command and the response command in the present application are not limited to the command formats shown in fig. 2. For example, the command formats of the diagnostic command and the response command may be as shown in fig. 2, wherein the command may be composed of a command header for indicating the function and effect of the command, a command length, data, and CRC check information, and when the command headers are different, the function and effect of the command are different, for example, the following command header may be defined to refer to the commands having different effects:
CMD 0// Security authentication handshake command.
CMD 1// read data.
CMD 2// write data.
CMD 3// read context refers to information including status registers or hardware context data at the time of an exception.
CMD 4// end.
Optionally, the dynamic operation data includes, but is not limited to, status registers or hardware environment data when the basic input output system is abnormal.
Optionally, the static firmware data includes, but is not limited to, basic hardware configuration information of the computer, such as a processor, a memory, a hard disk, a video card, etc., where the configuration information includes the following: the bios version number is typically provided by the manufacturer. The bios version typically includes a major version number and a minor version number, such as "a05" or "2.0", etc. A Real Time Clock (RTC) of the computer for recording the system time and date. This information is typically configured in a basic input output system setup interface. Basic information of the processor, such as model number, frequency, core number, etc. Such information may be viewed in a basic input output system setup interface or operating system. Basic information of the memory, such as capacity, type, speed, etc. Such information may be viewed in a basic input output system setup interface or operating system. Basic information of the hard disk, such as model, capacity, interface type, etc. Such information may be viewed in a basic input output system setup interface or operating system. Basic information of the display card, such as model, memory capacity, interface type, etc. Such information may be viewed in a basic input output system setup interface or operating system. Basic information of other hardware devices, such as a network card, a sound card, a USB interface and the like. Such information may be viewed in a basic input output system setup interface or operating system.
In this embodiment, when power-up of the host is detected and the diagnostic device is connected to the host, a diagnostic command may be sent to the bios of the host. Or when the host is detected to be electrified, the diagnosis device is connected with the host, and the host starts a fault diagnosis function, a diagnosis command is sent to a basic input output system of the host.
And step S120, analyzing the response command to obtain dynamic operation data and static firmware data when the basic input/output system fails.
In this embodiment, since the diagnostic device receives the response command from the host computer, there are different types of response commands, and some of the response commands may be interference content or content unrelated to the failure recovery, after the diagnostic device obtains the response command, the diagnostic device parses the response command, if the parsed data are dynamic operation data and static firmware data when the basic input/output system fails, the failure recovery is performed based on the dynamic operation data and the static firmware data, otherwise, the interference content is filtered to avoid interference of the interference content on the failure recovery result.
And step S130, performing fault reproduction based on the dynamic operation data and the static firmware data.
In this embodiment, the present application may employ a diagnostic apparatus to perform fault reproduction based on dynamic operation data and static firmware data to reproduce or reproduce a fault site, implement fault diagnosis, analyze and locate a fault problem, and determine a fault resolution policy. It should be noted that the environment and configuration of the diagnostic device need to be adapted to the environment and configuration of the host computer, so as to ensure that the fault site can be successfully reproduced.
In other embodiments, a third party device may be employed to perform the failure recovery based on the dynamic operating data and the static firmware data, and the third party device may be a smart computer, a cell phone, or other device with failure recovery functionality. When the third party device is adopted for fault recovery, the diagnosis device and the third party device can be connected through a serial port, and dynamic operation data and static firmware data can be fed back to the third party device through the serial port. The serial port between the diagnosis device and the third party device can adopt UART serial port standard, RS-232 serial port standard, IIC serial port standard, SPI serial port standard and RS485 serial port standard. Any one of the serial port standards can be selected according to actual conditions to realize communication connection between the diagnosis device and the third party device. Similarly, the serial port between the diagnosis device and the host can also select one of UART serial port standard, RS-232 serial port standard, IIC serial port standard, SPI serial port standard and RS485 serial port standard according to actual conditions.
In other embodiments, the present application may obtain a user operation log into the bios in addition to performing fault replication according to the dynamic operation data and the static firmware data of the bios. The user operation log comprises key information of each operation when entering a fault diagnosis function, a time stamp corresponding to an operation key of each operation, and an interface screenshot of each operation; and generating a user operation log according to the operation keys of each operation, the time stamp corresponding to the operation keys of each operation and the interface screenshot of each operation. When receiving the user operation log, the diagnosis device or the third party device can enter the basic input/output system of the diagnosis device or the third party device based on the user operation log to realize the recurrence of the faults.
In other embodiments, the diagnostic device or the third party device also has a basic input/output system identical to the host, and in the basic input/output system entering the diagnostic device or the third party device, normal preset dynamic operation data and preset static firmware data associated with the basic input/output system are obtained, and the obtained dynamic operation data and static firmware data are respectively compared with corresponding preset dynamic operation data and preset static firmware data; determining abnormal data in the dynamic operation data, which is different from preset dynamic operation data, and determining abnormal data in the static firmware data, which is different from preset static firmware data, can locate a specific fault problem based on the abnormal data.
According to the technical scheme, the dynamic operation data and the static firmware data during the failure of the basic input/output system can be safely exported through the diagnosis device, the failure site data can be acquired and reserved, and the failure site is restored through the dynamic operation data and the static firmware data, so that the failure is diagnosed, and the failure diagnosis efficiency is improved.
Optionally, step S110 includes the steps of:
step S111, detecting a level signal of a designated receiving end and a level signal of a designated transmitting end of the host.
In this embodiment, the embodiment of the present application is not limited to specific level signals of the designated receiving end and the designated transmitting end of the host, so long as the signals are signals detectable by the basic input/output system, for example, the signals may be input signals of designated pins on a CPU of the host, or input signals of designated pins on a GPIO port, and may be selected according to practical application requirements. The number of the pins is not limited, and may be selected according to practical application requirements. In order to save hardware resources, in this embodiment, only the input signal of a single designated pin on the CPU of the host or the input signal of a single designated pin on the GPIO may be used as the level signal. The embodiment of the application also does not limit whether the basic input/output system detects the level signal of the appointed receiving end or the level signal of the appointed sending end in real time or periodically detects the level signal of the appointed receiving end or the level signal of the appointed sending end.
For example, as shown in fig. 3, the host and the diagnostic module may be connected through 2 GPIOs, and the transmitting terminal c_gp_tx of the diagnostic module is connected to the receiving terminal b_gp_rx of the host; the sending terminal B_GP_TX of the host is connected with the receiving terminal C_GP_RX of the diagnosis module.
In the present embodiment, the diagnostic apparatus can directly control the level signals of the designated receiving side and the designated transmitting side of the host. Specifically, under the default condition, the diagnostic device may control the level signals of the designated receiving end and the designated transmitting end to be the first level signal, which indicates that the diagnostic device is not connected to the host. The diagnostic device controls the level signal of the designated receiving end of the host to be the second level signal and controls the level signal of the designated transmitting end of the host to be the first level signal, which indicates that the diagnostic device is connected with the host.
Step S112, when the level signal of the specified receiving end and the level signal of the specified transmitting end meet a first preset condition, a diagnostic command is sent to the basic input/output system of the host.
In this embodiment, the diagnosis command is sent to the bios of the host, which can be implemented by controlling the level signals of the designated receiving end and the designated transmitting end.
Optionally, when the level signal of the designated receiving end is changed from the first level signal to the second level signal and the level signal of the designated transmitting end is the first level signal, a diagnosis command is sent to the basic input output system of the host. The first level signal is assumed to be a low level signal, the second level signal is assumed to be a high level signal, and when the level signal of the designated receiving end is changed from the low level signal to the high level signal and the level signal of the designated transmitting end is assumed to be the low level signal, the diagnosis command is sent to the basic input output system of the host.
Step S113, when the level signal of the specified receiving end and the level signal of the specified sending end meet a second preset condition, a response command corresponding to the diagnostic command fed back by the host is received.
In this embodiment, receiving the response command corresponding to the diagnostic command fed back by the host may be implemented by controlling the level signals of the designated receiving end and the designated transmitting end.
Optionally, when the level change condition of the designated transmitting end is changed from the second level signal to the first level signal and the level signal of the designated receiving end is the second level signal, receiving a response command fed back by the host. The first level signal is assumed to be a low level signal, the second level signal is assumed to be a high level signal, and when the level signal of the designated transmitting end is changed from the high level signal to the low level signal and the level signal of the designated receiving end is assumed to be the high level signal, the response command corresponding to the diagnosis command fed back by the host is indicated to be received.
According to the technical scheme, the control of sending the diagnosis command and receiving the response command to the basic input/output system of the host is realized by controlling the level signals of the receiving end and the sending end of the host, so that when the basic input/output system of the host fails, the related information of the basic input/output system of the host can be read, and the subsequent failure recurrence is facilitated.
Further, referring to fig. 4 and 5, in the second embodiment of the present application, before step S110, the method further includes the following steps:
step S210, the identity of the host is obtained, and a server certificate associated with the identity is requested to a server.
In this embodiment, the identity of each host is unique, and the identity may be one or a combination of a MAC address, an IP address, and a device serial number of the host device. The server certificate is a form of SSL (Secure Sockets Layer) digital certificate, and by submitting the digital certificate, the diagnostic device and the host can be provided with identity authentication, and the diagnostic device and the host can be ensured to have high-strength encryption security. In particular, SSL is an encryption protocol for protecting the security of information in network communications. SSL server certificates are a core component of the SSL protocol, which provides authentication and key exchange required for encrypted communications. The encryption principle of SSL server certificates is based on public key encryption techniques. The server stores server certificates associated with the identities of different hosts.
And step S220, encrypting the diagnosis command by adopting the server certificate to obtain the encrypted diagnosis command.
And step S230, the encrypted diagnosis command is sent to a basic input/output system of the host.
In this embodiment, the server generates a pair of keys, including a private key and a public key. The private key is used to encrypt and decrypt diagnostic commands, while the public key is used to open externally for other people to verify and encrypt data. When a secure connection is established, the server associates its public key with a set of digital certificates and sends the certificates to the diagnostic device. Upon receipt of the certificate, the diagnostic device uses a built-in root Certificate Authority (CA) list to verify the legitimacy of the server certificate. These CAs are widely trusted third party authorities responsible for issuing and verifying the authenticity of certificates. If the certificate is verified, the diagnostic device generates a random sequence associated with the diagnostic command, encrypts the diagnostic command using the public key, and sends the encrypted diagnostic command back to the host. After receiving the encrypted diagnosis command, the host decrypts the encrypted diagnosis command by using the public key and the private key, thereby obtaining the decrypted diagnosis command. Next, the host and the diagnostic device generate a session key for secure communication using the premaster secret as an encryption key. From this point on, the host and diagnostic device encrypt and decrypt the diagnostic command and response command using the session key to ensure confidentiality and integrity of the data. The encryption principle and technology of the SSL server certificate enable secure communication, and effectively protect the privacy and data security of users. By using public key encryption techniques and digital certificates, SSL server certificates ensure the security and verifiability of diagnostic and response commands during transmission.
Illustratively, referring to fig. 5, after receiving the identity sent by the host, the diagnostic device sends the identity to the server to obtain a server certificate corresponding to the identity; the diagnosis device encrypts the diagnosis command through a private key to generate an encryption string; encrypting the encrypted string by adopting a public key to obtain an encrypted diagnosis command; sending the digital certificate composed of the encrypted diagnosis command and the identification mark to a host; and the host receives an encrypted diagnosis instruction carrying the digital certificate sent by the diagnosis device, and acquires an original diagnosis command from the encrypted diagnosis command according to the digital certificate.
In other embodiments, in addition to using the server certificate to encrypt the transmission data between the host and the diagnostic device, other encryption methods may be used, for example: symmetric encryption (Symmetric Encryption): the same key is used for encryption and decryption. Common symmetric encryption algorithms are DES, 3DES, AES, etc. Asymmetric encryption (Asymmetric Encryption): a pair of keys, namely a public key and a private key, is used. The public key is used to encrypt data and the private key is used to decrypt data. A common asymmetric encryption algorithm is RSA, DSA, ECC. Hash Function (Hash Function): data of an arbitrary length is converted into a hash value of a fixed length. The hash function is one-way, irreversible, and is commonly used to verify data integrity and generate digital signatures. Common hash functions are MD5, SHA-1, SHA-256, etc. Message authentication code (Message Authentication Code, MAC): the message is encrypted using a key and appended to the message to ensure message integrity and authenticity. Common MAC algorithms are HMAC, CMAC, etc. Digital signature (Digital Signature): the message is encrypted using a private key to ensure the source and integrity of the message. A common digital signature algorithm is RSA, DSA, ECDSA. Public key infrastructure (Public Key Infrastructure, PKI): public keys and digital certificates are managed and distributed by certificate authorities (Certificate Authority, CA) for verifying and protecting the security of communications. Virtual private network (Virtual Private Network, VPN): by using encryption protocols and tunneling techniques, a private communication channel is created over the public network to protect the transmission and privacy of data.
As shown in fig. 6, in a third embodiment of the present application, the fault replication method of the present application is applied to a host, and the processor adopted by the host of the present application includes, but is not limited to, intel (Intel) serial processors: such as intel cool i3, i5, i7, i9 series, intel to strong (Xeon) series, etc., AMD (Advanced Micro Devices) series processor: such as AMD Ryzen, AMD Athlon, AMD EPYC, etc. The fault reproduction method comprises the following steps:
in step S310, the bios of the host receives the diagnostic command sent by the diagnostic device.
Step S320, determining the dynamic operation data and the static firmware data when the bios fails according to the diagnostic command.
Step S330, generating a response command according to the dynamic operation data and the static firmware data, and feeding back the response command to the diagnostic device.
In this embodiment, the present application continuously receives the diagnostic command transmitted by the diagnostic device. The command formats of the diagnostic command and the response command may be set according to actual situations, for example, the command formats of the diagnostic command and the response command may be as shown in fig. 2, where the command may be composed of a command header, a command length, data, and CRC check information, the command header is used to indicate functions and roles of the command, and when the command header is different, the functions and roles of the command are different, for example, the following command header may be defined to refer to the roles of the different commands:
CMD 0// Security authentication handshake command.
CMD 1// read data.
CMD 2// write data.
CMD 3// read context refers to information including status registers or hardware context data at the time of an exception.
CMD 4// end.
In this embodiment, after receiving the diagnostic command, the host analyzes the diagnostic command to obtain the content that the diagnostic device wants to acquire, and the physical storage address of the content. And acquiring corresponding contents from the corresponding physical storage address, wherein the diagnosis command is assumed to acquire data in a certain physical storage address, and then the host acquires the corresponding contents in the physical storage address when receiving the diagnosis command, such as dynamic operation data and static firmware data when the basic input/output system fails, so as to acquire the data. Of course, in addition to retrieving data, the corresponding data in the physical memory address may also be read.
According to the technical scheme, the system and the method for diagnosing the faults can safely derive dynamic operation data and static firmware data when the basic input and output system fails, can acquire and retain the failure site data, and can restore the failure site through the dynamic operation data and the static firmware data so as to diagnose the faults and improve the failure diagnosis efficiency.
Further, based on the third embodiment, in a fourth embodiment of the present application, the fault reproduction method of the present application further includes the steps of:
in step S410, the bios of the host detects whether the host starts the fault diagnosis function within a preset period of time after the host is powered on.
In this embodiment, when the host starts the fault diagnosis function, the host can only receive the subsequent diagnosis command and send the response command. The preset time length can be set according to actual conditions.
Optionally, when the level signal of the designated receiving end and the level signal of the designated transmitting end of the host are both the first level signal, it is determined that the host does not start the fault diagnosis function. And assuming that the first level signal is a low level signal, the second level signal is a high level signal, and determining that the host does not start a fault diagnosis function when the designated receiving end and the designated transmitting end of the host are both low level signals, wherein the fault diagnosis function is indicated that the diagnosis device is not connected with the host.
Optionally, when the level signal of the designated receiving end of the host is the second level signal and the level signal of the designated transmitting end of the host is the first level signal, determining that the host has started the fault diagnosis function. Assuming that the first level signal is a low level signal and the second level signal is a high level signal, when the designated receiving end of the host is a high level signal and the designated transmitting end is a low level signal, the host is determined to start a fault diagnosis function, and the fault diagnosis function indicates that the diagnosis device is connected with the host.
If yes, step S310-step S330:
in step S310, the bios of the host receives the diagnostic command sent by the diagnostic device.
Step S320, determining the dynamic operation data and the static firmware data when the bios fails according to the diagnostic command.
Step S330, generating a response command according to the dynamic operation data and the static firmware data, and feeding back the response command to the diagnostic device.
If not, go to step S420, and enter the normal operation mode of the host.
In this embodiment, when it is detected that the diagnostic device is not connected to the host, it indicates that the host does not activate the fault diagnosis function, and the host enters the normal operation mode.
For example, referring to fig. 7, when the host is powered on, if the diagnostic device is found not to be connected, the normal power-on flow is performed; if the diagnostic device is found to be connected, entering a diagnostic program; when the diagnostic program is executed, the diagnostic device interacts with the host computer through the command until no more diagnostic commands are issued, and then the normal starting-up flow is continued.
Optionally, feeding back the response command to the diagnostic device includes:
step S331, encrypting the response command by using a server certificate pre-stored by the host computer to obtain an encrypted response command;
Step S332, sending the encrypted response command to the diagnostic device.
In this embodiment, the encryption scheme of the host computer is similar to that of the diagnostic apparatus, and specifically, the encryption scheme of the host computer is adopted. The server generates a pair of keys, including a private key and a public key. The private key is used to encrypt and decrypt diagnostic commands, while the public key is used to open externally for other people to verify and encrypt data. When a secure connection is established, the server associates its public key with a set of digital certificates and sends the certificates to the diagnostic device. Upon receipt of the certificate, the diagnostic device uses a built-in root Certificate Authority (CA) list to verify the legitimacy of the server certificate. These CAs are widely trusted third party authorities responsible for issuing and verifying the authenticity of certificates. If the certificate is verified, the diagnostic device generates a random sequence associated with the diagnostic command, encrypts the diagnostic command using the public key, and sends the encrypted diagnostic command back to the host. After receiving the encrypted diagnosis command, the host decrypts the encrypted diagnosis command by using the public key and the private key, thereby obtaining the decrypted diagnosis command. Next, the host and the diagnostic device generate a session key for secure communication using the premaster secret as an encryption key. From this point on, the host and diagnostic device encrypt and decrypt the diagnostic command and response command using the session key to ensure confidentiality and integrity of the data. The encryption principle and technology of the SSL server certificate enable secure communication, and effectively protect the privacy and data security of users. By using public key encryption techniques and digital certificates, SSL server certificates ensure the security and verifiability of diagnostic and response commands during transmission.
In a fourth embodiment of the present application, in the fault reproduction method of the present application, the interaction procedure of the diagnostic apparatus and the host is as follows:
(1) The basic input/output system of the host detects whether the host starts a fault diagnosis function within a preset time period after the host is powered on; if not, executing the step (2) to enter a normal operation mode of the host; if yes, executing (3);
(3) The diagnosis device acquires the identity of the host and requests a server certificate associated with the identity from the server;
(4) The diagnosis device encrypts the diagnosis command by adopting the server certificate to obtain an encrypted diagnosis command;
(5) The diagnostic device sends the encrypted diagnostic command to the basic input output system of the host.
(6) The basic input/output system of the host computer receives the diagnostic command sent by the diagnostic device;
(7) The basic input/output system of the host determines dynamic operation data and static firmware data when the basic input/output system fails according to the diagnosis command;
(8) The basic input/output system of the host generates a response command according to the dynamic operation data and the static firmware data;
(9) The host encrypts the response command by adopting a server certificate pre-stored by the host to obtain an encrypted response command;
(10) And sending the encrypted response command to the diagnosis device.
(11) The diagnosis device receives a response command corresponding to the diagnosis command fed back by the host;
(12) The diagnosis device analyzes the response command to obtain dynamic operation data and static firmware data when the basic input/output system fails;
(13) The diagnostic device performs fault reproduction based on the dynamic operation data and the static firmware data, or the diagnostic device feeds back the dynamic operation data and the static firmware data to the third party device, and the third party device performs fault reproduction based on the dynamic operation data and the static firmware data.
Therefore, static firmware data of the basic input and output system and system running environment data are safely exported through a diagnosis device, and the effect of more scientifically reserving customer site data is achieved; meanwhile, the application also provides a method for writing normal firmware data. Through safe data transmission, the data is protected from being illegally modified, and the safety of the data transmission is improved.
The present embodiments provide embodiments of failure recovery methods, it being noted that although a logical order is illustrated in the flow chart, in some cases the steps illustrated or described may be performed in a different order than that illustrated herein.
As an implementation manner, the hardware environment architecture involved in the fault reproduction method may be as shown in fig. 8. Optionally, the hardware architecture related to the fault reproduction method includes a diagnostic device and a host. The host is connected with the diagnostic device. The diagnostic device or host includes: a processor 101, such as a CPU, a memory 102, and a communication bus 103. The processor corresponding to the diagnosis device is a first processor, and the corresponding memory is a first memory. The processor corresponding to the host is a second processor, and the corresponding memory is a second memory. Wherein the communication bus 103 is used to enable connected communication among the components. The processor 101 is configured to invoke an application program to perform a control operation.
The memory 102 may be a high-speed RAM memory or a stable memory, such as a disk memory.
It will be appreciated that in one embodiment, the fault resilient program is stored in the memory 102 or in a computer readable storage medium, and the processor 101 executes the following operations when the fault resilient program is called from the memory 102 or the computer readable storage medium:
sending a diagnosis command to a basic input/output system of a host, and receiving a response command corresponding to the diagnosis command fed back by the host;
Analyzing the response command to obtain dynamic operation data and static firmware data when the basic input/output system fails;
and performing fault reproduction based on the dynamic operation data and the static firmware data.
When the processor 101 invokes a failure reproduction program from the memory 102 or the computer-readable storage medium, the following operations are performed:
the basic input/output system of the host computer receives the diagnostic command sent by the diagnostic device;
determining dynamic operation data and static firmware data when the basic input/output system fails according to the diagnosis command;
and generating a response command according to the dynamic operation data and the static firmware data, and feeding back the response command to the diagnosis device.
Based on the same inventive concept, the embodiments of the present application further provide a computer readable storage medium, where a fault reproduction program is stored, where each step of the fault reproduction method described above is implemented when the fault reproduction program is executed by a processor, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
Because the storage medium provided in the embodiments of the present application is a storage medium used for implementing the method in the embodiments of the present application, based on the method described in the embodiments of the present application, a person skilled in the art can understand the specific structure and the modification of the storage medium, and therefore, the description thereof is omitted herein. All storage media used in the methods of the embodiments of the present application are within the scope of protection intended in the present application.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, a television, or a network device, etc.) to perform the method described in the embodiments of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (10)

1. A failure recovery method, applied to a diagnostic apparatus, comprising:
sending a diagnosis command to a basic input/output system of a host, and receiving a response command corresponding to the diagnosis command fed back by the host;
analyzing the response command to obtain dynamic operation data and static firmware data when the basic input/output system fails;
and performing fault reproduction based on the dynamic operation data and the static firmware data.
2. The fault reproduction method of claim 1, wherein the step of transmitting a diagnostic command to a basic input output system of a host and receiving a response command corresponding to the diagnostic command fed back by the host comprises:
detecting a level signal of a designated receiving end and a level signal of a designated transmitting end of the host;
when the level signal of the appointed receiving end and the level signal of the appointed sending end meet a first preset condition, a diagnosis command is sent to a basic input output system of a host;
And when the level signal of the appointed receiving end and the level signal of the appointed sending end meet a second preset condition, receiving a response command corresponding to the diagnosis command fed back by the host.
3. The method for recovering from a failure according to claim 2,
the first preset condition includes: the level signal of the appointed receiving end is changed from a first level signal to a second level signal, and the level signal of the appointed sending end is the first level signal;
the second preset condition includes: the level change condition of the appointed sending end is changed from a second level signal to a first level signal, and the level signal of the appointed receiving end is the second level signal.
4. The fault reproduction method according to claim 1, wherein before the step of sending a diagnostic command to a basic input output system of a host and receiving a response command corresponding to the diagnostic command fed back by the host, the fault reproduction method further comprises:
acquiring an identity of a host, and requesting a server certificate associated with the identity from a server;
encrypting the diagnosis command by adopting the server certificate to obtain an encrypted diagnosis command;
And sending the encrypted diagnosis command to a basic input/output system of the host.
5. A failure recovery method, applied to a host, the failure recovery method comprising:
the basic input/output system of the host computer receives the diagnostic command sent by the diagnostic device;
determining dynamic operation data and static firmware data when the basic input/output system fails according to the diagnosis command;
and generating a response command according to the dynamic operation data and the static firmware data, and feeding back the response command to the diagnosis device.
6. The method of fault reproduction as claimed in claim 5, further comprising:
the basic input/output system of the host detects whether the host starts a fault diagnosis function within a preset time period after the host is powered on;
if yes, the basic input/output system of the host receives a diagnosis command sent by the diagnosis device;
if not, entering a normal running mode of the host.
7. The method of fault reproduction as claimed in claim 6, wherein the detecting whether the host initiates a fault diagnosis function comprises:
when the level signal of the appointed receiving end and the level signal of the appointed sending end of the host are both first level signals, determining that the host does not start a fault diagnosis function;
When the level signal of the appointed receiving end of the host is a second level signal and the level signal of the appointed sending end is a first level signal, determining that the host has started a fault diagnosis function.
8. The fault reproduction method of claim 5, wherein the feeding back the response command to the diagnostic apparatus comprises:
encrypting the response command by adopting a server certificate pre-stored by the host to obtain an encrypted response command;
and sending the encrypted response command to the diagnosis device.
9. A failure recovery system, the failure recovery system comprising:
the system comprises a diagnostic device and a host, wherein the host is connected with the diagnostic device;
the diagnostic device includes: a first memory, a first processor, and a failure recovery program stored on the first memory and running on the first processor, which when executed by the first processor, implements the steps of the failure recovery method of any of claims 1-4;
the host includes: a second memory, a second processor and a failure recovery program stored on the second memory and running on the second processor, which failure recovery program, when executed by the second processor, implements the steps of the failure recovery method according to any of claims 5-8.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a failure reproduction program, which when executed by a processor, implements the steps of the failure reproduction method of any one of claims 1-8.
CN202311503206.1A 2023-11-09 2023-11-09 Fault reproduction method, system and computer readable storage medium Pending CN117555713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311503206.1A CN117555713A (en) 2023-11-09 2023-11-09 Fault reproduction method, system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311503206.1A CN117555713A (en) 2023-11-09 2023-11-09 Fault reproduction method, system and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117555713A true CN117555713A (en) 2024-02-13

Family

ID=89812117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311503206.1A Pending CN117555713A (en) 2023-11-09 2023-11-09 Fault reproduction method, system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117555713A (en)

Similar Documents

Publication Publication Date Title
US11258792B2 (en) Method, device, system for authenticating an accessing terminal by server, server and computer readable storage medium
CN109858265B (en) Encryption method, device and related equipment
US8555069B2 (en) Fast-reconnection of negotiable authentication network clients
JP5410500B2 (en) Apparatus, method and storage medium using apparatus identifier
US8127146B2 (en) Transparent trust validation of an unknown platform
US9768951B2 (en) Symmetric keying and chain of trust
CN110621014B (en) Vehicle-mounted equipment, program upgrading method thereof and server
CN104639516A (en) Method, equipment and system for authenticating identities
KR20040075293A (en) Apparatus and method simplifying an encrypted network
WO2012075904A1 (en) Method, device and system for verifying binding data card and mobile host
WO2016101559A1 (en) Secure data access method and device, and computer storage medium
EP3720042B1 (en) Method and device for determining trust state of tpm, and storage medium
CN113301537B (en) Method, device, electronic equipment and storage medium for establishing communication connection
EP3221996B1 (en) Symmetric keying and chain of trust
CN111858094B (en) Data copying and pasting method and system and electronic equipment
CN113127844A (en) Variable access method, device, system, equipment and medium
US20230244797A1 (en) Data processing method and apparatus, electronic device, and medium
CN114189862A (en) Wireless terminal and interface access authentication method of wireless terminal in Uboot mode
JP2009199147A (en) Communication control method and communication control program
CN108154037B (en) Inter-process data transmission method and device
CN117555713A (en) Fault reproduction method, system and computer readable storage medium
CN112149167B (en) Data storage encryption method and device based on master-slave system
WO2018028359A1 (en) Service processing method and device, and storage medium and electronic device
CN109543367B (en) Quantum encryption-based software authorization method and device and storage medium
CN113557703B (en) Authentication method and device of network camera

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