Computer plug-in fault detection and handling methods, devices, equipment and storage media
By combining host detection and plugin detection, targeted plugin fault detection is achieved, solving the problem of low efficiency in existing technologies and realizing more efficient plugin fault detection.
Patent Information
- Application Number
- CN202211604142.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-12-13
AI Technical Summary
Existing plug-in fault detection and handling methods cannot perform targeted detection, resulting in low efficiency.
By detecting the hardware usage and heartbeat status of the host machine where the virtual server running the plugin is located, it can determine whether the host machine is faulty. When the host machine is not faulty, it can use interface status codes, interface latency and alarm log files to detect plugin faults, thus achieving targeted detection.
It improves the efficiency of plugin fault detection, reduces unnecessary detection steps, and enhances the overall efficiency of plugin fault detection.
Smart Images

Figure CN116204358B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to computer software fault detection technology, and more particularly to a method, apparatus, device, and medium for detecting and processing computer plug-in faults. Background Technology
[0002] A plug-in system is a system where the core modules and application functions are completely separated, allowing developers to extend and enrich project functionality through plug-ins. Currently, plug-in systems in the industry require fault detection and handling for plug-ins to ensure their proper functioning.
[0003] However, existing plugin fault detection and processing methods perform fault detection on all plugins, and cannot perform targeted fault detection and processing on plugins, resulting in low efficiency of plugin fault detection and processing. Summary of the Invention
[0004] This invention provides a computer plug-in fault detection and processing method, apparatus, electronic device and storage medium, the main purpose of which is to improve the efficiency of plug-in fault detection and processing.
[0005] Detect the host machine where the virtual server running the plugin to be tested is located; Hardware usage detection and / or heartbeat detection are performed on the host machine to obtain the host machine detection results; When the host machine detection result indicates a fault, a fault recovery operation is performed on the host machine, and the fault recovery operation result and the host machine detection result are sent to a preset terminal device; When the host machine detection result is no fault, the interface status code, interface latency and alarm log file of the plugin to be tested are obtained, and the plugin fault detection is performed on the plugin to be tested using the interface status code, the interface latency and the alarm log file to obtain the plugin detection result. When the plugin detection result is faulty, a fault recovery operation is performed on the plugin to be detected, and the operation result and the plugin detection result are sent to a preset terminal device. When the plugin detection result is no fault, the plugin detection result is sent to the preset terminal device.
[0006] Optionally, the step of performing hardware usage detection and / or heartbeat detection on the host machine to obtain the host machine detection result includes: Obtain the physical resource usage values of different preset types of hardware in the host machine, and perform host node hardware fault detection based on the physical resource usage values and the preset detection thresholds of the corresponding hardware to obtain the host hardware detection results. When the host hardware detection result is faulty, the host hardware detection result is determined as the host machine detection result; When the host hardware detection result is no fault, the host machine is used to perform heartbeat detection using a pre-built heartbeat communication protocol, and host node service fault detection is performed based on the heartbeat result returned by the host machine to obtain the host service detection result, and the host service detection result is determined as the host machine detection result.
[0007] Optionally, the fault recovery operation on the host machine includes: Shut down the host machine and create a new host machine, then schedule all plugins from the original host machine to the new host machine.
[0008] Optionally, the step of using the interface status code, the interface latency, and the alarm log file to perform plugin fault detection on the plugin to be tested, and obtaining the plugin detection result, includes: The interface status code is compared with a preset abnormal status code to obtain the running status detection result; The interface latency is compared with a preset latency threshold to obtain the interface latency detection result; Extract alarm logs of a preset type from the alarm log file, and perform alarm fault detection based on the number of alarm logs to obtain abnormal alarm detection results; Logical operations are performed on the running status detection results, the interface latency detection results, and the abnormal alarm detection results to obtain the plug-in detection results.
[0009] Optionally, the step of extracting alarm logs of a preset type from the alarm log file and performing alarm fault detection based on the number of alarm logs to obtain abnormal alarm detection results includes: Construct a time interval based on the current time and a preset time length; Extract alarm logs of a preset type from the alarm log file whose alarm time falls within the time interval; Calculate the number of alarm logs; Determine whether the number of alarm logs is greater than a preset threshold; If the number of alarm logs exceeds a preset threshold, the abnormal alarm detection result is determined to be faulty. If the number of alarm logs is not greater than a preset threshold, the abnormal alarm detection result is determined to be fault-free.
[0010] Optionally, the step of extracting alarm logs of a preset type from the alarm log file and performing alarm fault detection based on the number of alarm logs to obtain abnormal alarm detection results includes: Construct a time interval based on the current time and a preset time length; Extract alarm logs of a preset type from the alarm log file whose alarm time falls within the time interval; Calculate the number of alarm logs; Calculate the total number of logs in the alarm log file within the time interval to obtain the total number of logs. Calculate the ratio of the number of alarm logs to the total number of logs; Determine whether the ratio value is greater than a preset ratio threshold; When the ratio value is greater than the preset ratio threshold, the abnormal alarm detection result is determined to be faulty; When the ratio value is not greater than the preset ratio threshold, the abnormal alarm detection result is determined to be fault-free.
[0011] Optionally, the fault recovery operation for the plug-in under test includes: Determine whether the plugin system to which the plugin to be tested belongs meets the preset failover criteria; When the plug-in system meets the preset failover criteria, the plug-in to be tested will be scheduled to run on a host machine other than the host machine of the plug-in system. When the plug-in system does not meet the preset failover criteria, the plug-in to be tested is either restarted or disabled.
[0012] To address the above problems, the present invention also provides a computer plug-in fault detection and processing device, the device comprising: The host detection module is used to detect the host machine where the virtual server on which the plugin to be detected runs is located; it performs hardware usage detection and / or heartbeat detection on the host machine to obtain the host machine detection result. The host machine fault repair module is used to perform fault recovery operations on the host machine when the host machine detection result is that there is a fault, and send the fault recovery operation result and the host machine detection result to a preset terminal device; The plugin fault detection and repair module is used to: when the host machine detection result is no fault, obtain the interface status code, interface latency, and alarm log file of the plugin to be tested, and use the interface status code, interface latency, and alarm log file to perform plugin fault detection on the plugin to be tested to obtain the plugin detection result; when the plugin detection result is faulty, perform a fault recovery operation on the plugin to be tested, and send the operation result and the plugin detection result to a preset terminal device; when the plugin detection result is no fault, send the plugin detection result to the preset terminal device.
[0013] To address the above problems, the present invention also provides an electronic device, the electronic device comprising: Memory, storing at least one computer program; and The processor executes the computer program stored in the memory to implement the computer plug-in fault detection and processing method described above.
[0014] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the computer plug-in fault detection and processing method described above.
[0015] This invention detects the host machine where the virtual server running the plugin to be tested resides; performs hardware usage detection and / or heartbeat detection on the host machine to obtain a host machine detection result; when the host machine detection result indicates a fault, performs a fault recovery operation on the host machine and sends the fault recovery operation result and the host machine detection result to a preset terminal device; when the host machine detection result indicates no fault, obtains the interface status code, interface latency, and alarm log file of the plugin to be tested, and uses the interface status code, interface latency, and alarm log file to perform plugin fault detection on the plugin to be tested to obtain a plugin detection result; firstly, fault detection processing is performed on the host machine where the virtual server running the plugin to be tested resides. If the host machine is faulty, the plugin detection step can be directly omitted. Only when the host machine is running normally is a comprehensive fault detection performed on the plugin to be tested. Compared with directly performing comprehensive fault detection processing on the plugin to be tested, plugin fault detection processing is more efficient. Therefore, the computer plugin fault detection processing method, device, electronic device, and readable storage medium proposed in this invention improve the efficiency of plugin fault detection processing. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a computer plug-in fault detection and processing method according to an embodiment of the present invention. Figure 2 This is a schematic flowchart illustrating the process of obtaining plug-in detection results in a computer plug-in fault detection and processing method according to an embodiment of the present invention. Figure 3 This is a schematic diagram of a computer plug-in fault detection and processing device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the internal structure of an electronic device that implements a computer plug-in fault detection and processing method according to an embodiment of the present invention. The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0017] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0018] This invention provides a method for detecting and handling computer plugin failures. The execution subject of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application embodiment: a server, a terminal, etc. In other words, the method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0019] Reference Figure 1 The flowchart shown is a schematic diagram of a computer plug-in fault detection and processing method provided in an embodiment of the present invention. In this embodiment, the computer plug-in fault detection and processing method includes: S1. Detect the host machine where the virtual server running the plugin to be detected is located; In this embodiment of the invention, the plug-in to be detected is a functional plug-in running on a computer, generally running in a plug-in system; there are one or more host machines, and the host machine runs one or more plug-ins in the form of a virtual server; the plug-in is a plug-in instance, which is a functional module that can implement different software functions.
[0020] Optionally, in this embodiment of the invention, the plugin to be tested can be a plugin in a preset plugin system. The plugin system to which the plugin to be tested belongs includes: a main system service module, a scheduling management module, a host machine, and the plugin. The main system service is responsible for the main functional services of the system; the scheduling management module is responsible for the scheduling and management of the host machine and the plugin; there are one or more host machines, and different programming languages have corresponding host machine nodes to call plugins for the corresponding programming languages. The host machine runs one or more plugins in the form of a virtual server; the plugin is a plugin instance, a functional module that can be injected into the main system service to run. In the plugin system, the main system module is connected to the scheduling management module via HTTP, and the scheduling management module is connected to the host machine via TCP; the host machine and the plugin communicate via virtual server method calls. Therefore, in this embodiment of the invention, the plugin and the main system are separate, and plugin failure will not affect the main system process.
[0021] Since the host machine calls the plugin in the form of a virtual server, this embodiment of the invention needs to determine the host machine where the virtual server in which the plugin runs is located.
[0022] S2. Perform hardware usage detection and / or heartbeat detection on the host machine to obtain the host machine detection result; Since the plugin runs on the host machine, if the host machine malfunctions, the plugin will inevitably malfunction. Therefore, in order to detect whether the plugin to be tested has malfunctioned, this embodiment of the invention needs to detect whether the host machine has malfunctioned.
[0023] Specifically, in this embodiment of the invention, hardware usage detection and heartbeat detection are performed on the host machine to obtain host machine detection results, including: Obtain the physical resource usage values of different preset types of hardware in the host machine, and perform host node hardware fault detection based on the physical resource usage values and the preset detection thresholds of the corresponding hardware to obtain the host hardware detection results. If the host hardware detection result is faulty, then the host hardware result is determined as the host machine detection result; If the host hardware detection result is no fault, the host machine is used to perform heartbeat detection using a pre-built heartbeat communication protocol, and host node service fault detection is performed based on the heartbeat result returned by the host machine to obtain the host service detection result, and the host service detection result is determined as the host machine detection result.
[0024] In another embodiment of the present invention, a heartbeat detection may be performed first, that is, the hardware usage detection and / or heartbeat detection of the host machine to obtain the host machine detection result includes: A pre-built heartbeat communication protocol is used to perform heartbeat detection on the host machine, and host node service failure detection is performed based on the heartbeat results returned by the host machine to obtain the host service detection results; If the host service detection result is faulty, then the host service detection result is determined as the host machine detection result; When the host service detection result is no fault, the physical resource usage values of different preset types of hardware in the host are obtained. Based on the physical resource usage values and the preset detection thresholds of the corresponding hardware, host node hardware fault detection is performed to obtain the host hardware detection result. The host hardware detection result is determined as the host detection result.
[0025] Specifically, in this embodiment of the invention, the method of performing host node hardware fault detection based on the physical resource usage value and the corresponding hardware preset detection threshold to obtain host hardware detection results includes: Determine whether the physical resource usage of the hardware exceeds the preset detection threshold of the hardware; When the physical resource usage value of the hardware exceeds the preset detection threshold of the hardware, the hardware inspection result is determined to be faulty. When the physical resource usage value of the hardware is not greater than the preset detection threshold of the hardware, the hardware inspection result is determined to be fault-free. Boolean operations are performed based on the hardware inspection results of all the aforementioned hardware to obtain the host hardware detection results.
[0026] Furthermore, in this embodiment of the invention, the Boolean operations of AND and OR are performed based on the hardware inspection results of all the aforementioned hardware, that is: If the hardware check results for all the aforementioned hardware are fault-free, then the host hardware check result is fault-free. If any of the aforementioned hardware detection results is faulty, then the host hardware detection result is faulty.
[0027] In detail, in this embodiment of the invention, a pre-built heartbeat communication protocol is used to perform heartbeat detection on the host machine, and host node service failure detection is performed based on the heartbeat results returned by the host machine to obtain host service detection results, including: Based on the TCP protocol, a preset number of heartbeats are sent to the host machine, and the number of heartbeats that the host machine returns a heartbeat within a preset time range after receiving the heartbeats is calculated. Determine whether the heart rate is equal to a preset heart rate threshold; When the number of heartbeats equals a preset heartbeat threshold, the host service detection result is no fault. If the number of heartbeats is not equal to the preset heartbeat threshold, the host service detection result is faulty.
[0028] S3. Determine whether the host machine detection result indicates a fault; In order to improve the detection efficiency of plug-in faults in this embodiment of the invention, it is necessary to first determine whether the host machine detection result is faulty. If the host machine detection result is faulty, then the host machine needs to be repaired. If the host machine detection result is fault-free, then the plug-in to be detected needs to be further detected for faults.
[0029] S4. When the host machine detection result indicates a fault, perform a fault recovery operation on the host machine and send the fault recovery operation result and the host machine detection result to a preset terminal device. In this embodiment of the invention, when the host machine malfunctions, a fault recovery operation is performed on the host machine, and the result of the fault recovery operation is sent to a preset terminal device. In this embodiment of the invention, the terminal device can be a mobile phone, computer, tablet, etc.
[0030] Specifically, the fault recovery operation performed on the host machine in this embodiment of the invention includes: Shut down the host machine and create a new host machine, then schedule all plugins from the original host machine to the new host machine.
[0031] In another embodiment of the present invention, the fault recovery operation on the host machine includes: Obtain the host machine's fault type; When the host failure type is a host service failure, shut down the host machine, create a new host machine, and schedule all plugins on the host machine to the new host machine; When the host failure type is a hardware failure, the faulty plugins in the host machine are screened, and the faulty plugins are restored.
[0032] In detail, in this embodiment of the invention, a new host machine is created, and the plugins on the host machine are scheduled to the new host machine in sequence. After each plugin is scheduled, the hardware usage of the host machine is detected to obtain the plugin scheduling detection result corresponding to each plugin. The plugins whose plugin scheduling detection result is faulty are identified as faulty plugins, and the faulty plugins are restored.
[0033] Furthermore, in this embodiment of the invention, if the host machine detection result indicates a hardware failure, the host failure type is a hardware failure; if the host machine detection result indicates a service failure, the host failure type is a service failure. After performing a fault recovery operation on the host machine, the operation result and the host machine detection result will be sent to a preset terminal device.
[0034] S5. When the host machine detection result is no fault, obtain the interface status code, interface latency and alarm log file of the plugin to be tested, and use the interface status code, interface latency and alarm log file to perform plugin fault detection on the plugin to be tested to obtain the plugin detection result. In this embodiment of the invention, when the host machine detection result is that the host machine is fault-free, it is necessary to detect whether the plugin to be tested is running normally in the host machine. Therefore, the interface status code, interface latency and alarm log file of the plugin to be tested are obtained, and then the plugin fault analysis is performed on the plugin to be tested based on the obtained data, so as to analyze whether the plugin to be tested has failed.
[0035] For details, please refer to Figure 2 In this embodiment of the invention, the method of using the interface status code, the interface latency, and the alarm log file to perform plugin fault detection on the plugin to be detected, and obtaining the plugin detection result, includes: S51. Compare the interface status code with the preset abnormal status code to obtain the running status detection result; In this embodiment of the invention, the interface status code represents the running status of the plugin. Therefore, a status code comparison is performed based on the preset abnormal status code and the interface status code to determine whether the interface status code is an abnormal status code.
[0036] Specifically, in this embodiment of the invention, comparing the interface status code with a preset abnormal status code to obtain the running status detection result includes: Determine whether there is an abnormal status code that matches the interface status code; If an abnormal status code that matches the interface status code is present, the running status detection result is determined to be faulty. If there is no abnormal status code that matches the interface status code, the running status detection result is determined to be fault-free.
[0037] S52. Compare the interface latency with a preset latency threshold to obtain the interface latency detection result; In this embodiment of the invention, in order to determine whether the latency of the plug-in interface is normal, the interface latency can be compared with a preset latency threshold to obtain the interface latency detection result.
[0038] In detail, in this embodiment of the invention, comparing the interface latency with a preset latency threshold to obtain the interface latency detection result includes: Determine whether the interface latency is greater than a preset latency threshold; When the interface latency is greater than the latency threshold, the interface latency detection result is determined to be faulty; If the interface latency is not greater than the latency threshold, then the interface latency detection result is determined to be fault-free.
[0039] S53. Extract alarm logs of a preset type from the alarm log file, and perform alarm fault detection based on the number of alarm logs to obtain abnormal alarm detection results; In this embodiment of the invention, the preset type is either warn or error.
[0040] Specifically, in this embodiment of the invention, the step of extracting alarm logs of a preset type from the alarm log file and performing alarm fault detection based on the number of alarm logs to obtain abnormal alarm detection results includes: Construct a time interval based on the current time and a preset time length; Extract alarm logs of a preset type from the alarm log file whose alarm time falls within the time interval; Calculate the number of alarm logs; Determine whether the number of alarm logs is greater than a preset threshold; If the number of alarm logs exceeds a preset threshold, the abnormal alarm detection result is determined to be faulty. If the number of alarm logs is not greater than a preset threshold, the abnormal alarm detection result is determined to be fault-free.
[0041] In another embodiment of the present invention, the step of extracting alarm logs of a preset type from the alarm log file and performing alarm fault detection based on the number of alarm logs to obtain abnormal alarm detection results includes: Construct a time interval based on the current time and a preset time length; Extract alarm logs of a preset type from the alarm log file whose alarm time falls within the time interval; Calculate the number of alarm logs; Calculate the total number of logs in the alarm log file within the time interval to obtain the total number of logs. Calculate the ratio of the number of alarm logs to the total number of logs; Determine whether the ratio value is greater than a preset ratio threshold; When the ratio value is greater than the preset ratio threshold, the abnormal alarm detection result is determined to be faulty; When the alarm ratio value is not greater than the preset ratio threshold, the abnormal alarm detection result is determined to be fault-free.
[0042] S54. Perform logical operations on the running status detection result, the interface latency detection result, and the abnormal alarm detection result to obtain the plug-in detection result; In this embodiment of the invention, the step of performing logical operations on the running status detection result, the interface latency detection result, and the abnormal alarm detection result to obtain the plug-in detection result includes: If any one of the running status detection result, the interface latency detection result, and the fault alarm detection result is faulty, then the plug-in detection result is determined to be faulty. When each of the running status detection result, the interface latency detection result, and the fault alarm detection result is fault-free, the plug-in detection result is determined to be fault-free.
[0043] S6. Determine whether the plug-in detection result indicates a fault; In this embodiment of the invention, when the plug-in detection result is faulty, it is necessary to perform fault recovery on the plug-in to be detected. Therefore, it is necessary to determine whether the plug-in detection result is faulty or not.
[0044] S7. When the plug-in detection result is faulty, perform a fault recovery operation on the plug-in to be detected, and send the operation result and the plug-in detection result to a preset terminal device. Furthermore, in this embodiment of the invention, when the plug-in detection result is faulty, it is necessary to perform a fault recovery operation on the plug-in to be detected.
[0045] Specifically, the fault recovery operation for the plug-in to be tested, as described in this embodiment of the invention, includes: The plugin to be tested is scheduled to run on a host machine other than the host machine in the plugin system to which the plugin to be tested belongs.
[0046] Specifically, in this embodiment of the invention, if there are other host machines in the plug-in system besides the host machine, the plug-in to be detected will be scheduled to run on other suitable host machines besides the host machine. If there are no other host machines in the plug-in system besides the host machine, a new host machine will be created and the plug-in to be detected will be scheduled to run on the new host machine.
[0047] In another embodiment of the present invention, the fault recovery operation for the plug-in to be tested includes: Determine whether the plugin system to which the plugin to be tested belongs meets the preset failover criteria; When the plug-in system meets the preset failover criteria, the plug-in to be tested will be scheduled to run on a host machine other than the host machine of the plug-in system. When the plug-in system does not meet the preset failover criteria, the plug-in to be tested is either restarted or disabled.
[0048] Specifically, the preset failover metric in this embodiment of the invention can be idempotency. In this embodiment, if there are other hosts in the plug-in system besides the host machine, the plug-in to be tested is scheduled to run on a suitable host machine other than the host machine. If there are no other hosts in the plug-in system besides the host machine, a new host machine is created, and the plug-in to be tested is scheduled to run on the new host machine.
[0049] Furthermore, in this embodiment of the invention, after performing a fault recovery operation on the plug-in to be tested, the operation result and the plug-in detection result are sent to a preset terminal device.
[0050] S8. When the plug-in detection result is no fault, the plug-in detection result is sent to the preset terminal device.
[0051] When the plug-in detection result is no fault, the plug-in detection result is directly sent to the preset terminal device.
[0052] Furthermore, in this embodiment of the invention, the plug-in detection results are sent to the terminal device via email, SMS, or other means. The terminal device includes smart terminals such as mobile phones, computers, and tablets.
[0053] like Figure 3 The diagram shown is a functional block diagram of the computer plug-in fault detection and processing device of the present invention.
[0054] The computer plug-in fault detection and processing device 100 of the present invention can be installed in an electronic device. Depending on the functions implemented, the computer plug-in fault detection and processing device may include a host detection module 101, a host fault repair module 102, and a plug-in fault detection and repair module 103. The module mentioned in the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.
[0055] In this embodiment, the functions of each module / unit are as follows: The host detection module 101 is used to detect the host machine where the virtual server where the plugin to be detected runs is located; to perform hardware usage detection and / or heartbeat detection on the host machine, and to obtain the host machine detection result; The host fault repair module 102 is used to perform a fault recovery operation on the host when the host detection result is a fault, and send the fault recovery operation result and the host detection result to a preset terminal device. The plugin fault detection and repair module 103 is used to obtain the interface status code, interface latency, and alarm log file of the plugin to be tested when the host machine detection result is no fault, and to perform plugin fault detection on the plugin to be tested using the interface status code, interface latency, and alarm log file to obtain the plugin detection result; when the plugin detection result is faulty, to perform a fault recovery operation on the plugin to be tested, and to send the operation result and the plugin detection result to a preset terminal device; when the plugin detection result is no faulty, to send the plugin detection result to the preset terminal device.
[0056] In detail, each module in the computer plug-in fault detection and processing device 100 described in this embodiment of the invention adopts the same characteristics as described above during use. Figure 1 The method used is the same as the computer plug-in fault detection and processing method described in the article, and can produce the same technical effect, so it will not be repeated here.
[0057] like Figure 4 The diagram shown is a structural schematic of the electronic device that implements the computer plug-in fault detection and processing method of the present invention.
[0058] The electronic device may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a computer plug-in fault detection and processing program.
[0059] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as the code of a computer plug-in fault detection and handling program, but also to temporarily store data that has been output or will be output.
[0060] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules (such as computer plug-in fault detection processing programs) stored in the memory 11, and calls data stored in the memory 11 to perform various functions of the electronic device and process data.
[0061] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is configured to enable communication between the memory 11 and at least one processor 10, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus.
[0062] Figure 4 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 4The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0063] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault classification circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0064] Optionally, the communication interface 13 may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device and other electronic devices.
[0065] Optionally, the communication interface 13 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.
[0066] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.
[0067] The computer plug-in fault detection processing program stored in the memory 11 of the electronic device is a combination of multiple computer programs. When run in the processor 10, it can achieve the following: Detect the host machine where the virtual server running the plugin to be tested is located; Hardware usage detection and / or heartbeat detection are performed on the host machine to obtain the host machine detection results; When the host machine detection result indicates a fault, a fault recovery operation is performed on the host machine, and the fault recovery operation result and the host machine detection result are sent to a preset terminal device; When the host machine detection result is no fault, the interface status code, interface latency and alarm log file of the plugin to be tested are obtained, and the plugin fault detection is performed on the plugin to be tested using the interface status code, the interface latency and the alarm log file to obtain the plugin detection result. When the plugin detection result is faulty, a fault recovery operation is performed on the plugin to be detected, and the operation result and the plugin detection result are sent to a preset terminal device. When the plugin detection result is no fault, the plugin detection result is sent to the preset terminal device.
[0068] Specifically, the processor 10's implementation method of the above-mentioned computer program can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.
[0069] Furthermore, if the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable medium can be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0070] Embodiments of the present invention may also provide a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following: Detect the host machine where the virtual server running the plugin to be tested is located; Hardware usage detection and / or heartbeat detection are performed on the host machine to obtain the host machine detection results; When the host machine detection result indicates a fault, a fault recovery operation is performed on the host machine, and the fault recovery operation result and the host machine detection result are sent to a preset terminal device; When the host machine detection result is no fault, the interface status code, interface latency and alarm log file of the plugin to be tested are obtained, and the plugin fault detection is performed on the plugin to be tested using the interface status code, the interface latency and the alarm log file to obtain the plugin detection result. When the plugin detection result is faulty, a fault recovery operation is performed on the plugin to be detected, and the operation result and the plugin detection result are sent to a preset terminal device. When the plugin detection result is no fault, the plugin detection result is sent to the preset terminal device.
[0071] Furthermore, the computer's usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system, applications required for at least one function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.
[0072] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0073] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0074] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0075] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0076] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0077] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0078] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0079] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The term "second class" is used to indicate names and does not indicate any specific order.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for detecting and handling computer plug-in faults, characterized in that, The method includes: Detect the host machine where the virtual server running the plugin to be tested is located; Hardware usage detection and / or heartbeat detection are performed on the host machine to obtain the host machine detection results; When the host machine detection result indicates a fault, a fault recovery operation is performed on the host machine, and the fault recovery operation result and the host machine detection result are sent to a preset terminal device; When the host machine detection result is no fault, the interface status code, interface latency and alarm log file of the plugin to be tested are obtained, and the plugin fault detection is performed on the plugin to be tested using the interface status code, the interface latency and the alarm log file to obtain the plugin detection result. When the plugin detection result is faulty, a fault recovery operation is performed on the plugin to be detected, and the operation result and the plugin detection result are sent to a preset terminal device. When the plugin detection result is no fault, the plugin detection result is sent to the preset terminal device.
2. The computer plug-in fault detection and processing method as described in claim 1, characterized in that, The step of performing hardware usage detection and / or heartbeat detection on the host machine to obtain the host machine detection result includes: Obtain the physical resource usage values of different preset types of hardware in the host machine, and perform host node hardware fault detection based on the physical resource usage values and the preset detection thresholds of the corresponding hardware to obtain the host hardware detection results. When the host hardware detection result is faulty, the host hardware detection result is determined as the host machine detection result; When the host hardware detection result is fault-free, a pre-built heartbeat communication protocol is used to perform heartbeat detection on the host machine, and host node service fault detection is performed based on the heartbeat result returned by the host machine to obtain the host service detection result, which is then determined as the host machine detection result; or A pre-built heartbeat communication protocol is used to perform heartbeat detection on the host machine, and host node service failure detection is performed based on the heartbeat results returned by the host machine to obtain the host service detection results; If the host service detection result is faulty, then the host service detection result is determined as the host machine detection result; When the host service detection result is no fault, the physical resource usage values of different preset types of hardware in the host are obtained. Based on the physical resource usage values and the preset detection thresholds of the corresponding hardware, host node hardware fault detection is performed to obtain the host hardware detection result. The host hardware detection result is determined as the host detection result.
3. The computer plug-in fault detection and processing method as described in claim 1, characterized in that, The fault recovery operation on the host machine includes: Shut down the host machine and create a new host machine, then schedule all plugins from the original host machine to the new host machine.
4. The computer plug-in fault detection and processing method as described in claim 1, characterized in that, The method of using the interface status code, the interface latency, and the alarm log file to perform plugin fault detection on the plugin to be tested, and obtaining the plugin detection result, includes: The interface status code is compared with a preset abnormal status code to obtain the running status detection result; The interface latency is compared with a preset latency threshold to obtain the interface latency detection result; Extract alarm logs of a preset type from the alarm log file, and perform alarm fault detection based on the number of alarm logs to obtain abnormal alarm detection results; Logical operations are performed on the running status detection results, the interface latency detection results, and the abnormal alarm detection results to obtain the plug-in detection results.
5. The computer plug-in fault detection and processing method as described in claim 4, characterized in that, The step of extracting alarm logs of a preset type from the alarm log file and performing alarm fault detection based on the number of alarm logs to obtain abnormal alarm detection results includes: Construct a time interval based on the current time and a preset time length; Extract alarm logs of a preset type from the alarm log file whose alarm time falls within the time interval; Calculate the number of alarm logs; Determine whether the number of alarm logs is greater than a preset threshold; If the number of alarm logs exceeds a preset threshold, the abnormal alarm detection result is determined to be faulty. If the number of alarm logs is not greater than a preset threshold, the abnormal alarm detection result is determined to be fault-free.
6. The computer plug-in fault detection and processing method as described in claim 4, characterized in that, The step of extracting alarm logs of a preset type from the alarm log file and performing alarm fault detection based on the number of alarm logs to obtain abnormal alarm detection results includes: Construct a time interval based on the current time and a preset time length; Extract alarm logs of a preset type from the alarm log file whose alarm time falls within the time interval; Calculate the number of alarm logs; Calculate the total number of logs in the alarm log file within the time interval to obtain the total number of logs. Calculate the ratio of the number of alarm logs to the total number of logs; Determine whether the ratio value is greater than a preset ratio threshold; When the ratio value is greater than the preset ratio threshold, the abnormal alarm detection result is determined to be faulty; When the ratio value is not greater than the preset ratio threshold, the abnormal alarm detection result is determined to be fault-free.
7. The computer plug-in fault detection and processing method according to any one of claims 1 to 6, characterized in that, The fault recovery operation for the plug-in under test includes: Determine whether the plugin system to which the plugin to be tested belongs meets the preset failover criteria; When the plug-in system meets the preset failover criteria, the plug-in to be tested will be scheduled to run on a host machine other than the host machine of the plug-in system. When the plug-in system does not meet the preset failover criteria, the plug-in to be tested is either restarted or disabled.
8. A computer plug-in fault detection and processing device, characterized in that, include: The host machine detection module is used to detect the host machine where the virtual server running the plugin to be detected is located; Hardware usage detection and / or heartbeat detection are performed on the host machine to obtain the host machine detection results; The host machine fault repair module is used to perform fault recovery operations on the host machine when the host machine detection result is that there is a fault, and send the fault recovery operation result and the host machine detection result to a preset terminal device; The plugin fault detection and repair module is used to obtain the interface status code, interface latency, and alarm log file of the plugin to be tested when the host machine detection result is no fault, and to perform plugin fault detection on the plugin to be tested using the interface status code, interface latency, and alarm log file to obtain the plugin detection result; when the plugin detection result is faulty, to perform fault recovery operation on the plugin to be tested, and to send the operation result and the plugin detection result to a preset terminal device. When the plugin detection result is no fault, the plugin detection result is sent to the preset terminal device.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory that is communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the computer plug-in fault detection processing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the computer plug-in fault detection and processing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Container cloud cluster node anomaly detection method and system
CN114942875A
Fault detection system and method of processing request in the fault detection system
EP2546746A1
