Method, device, equipment and storage medium for processing node pseudo-death
By detecting the node hardware operating parameters and load, determining the suspended state and shutting down the network port, and using high-availability services to cut off the storage service, the storage service problem caused by the suspended state of the node is solved, and the stability and reliability of the storage service are improved.
Patent Information
- Application Number
- CN202411454163.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-10-17
AI Technical Summary
In the existing technology, the suspended state of nodes causes the performance of storage services to degrade or fail to be provided normally, and affects the storage services for a long time, causing serious adverse consequences. The traditional watchdog method cannot effectively handle the suspended state of individual nodes.
By detecting the hardware operating parameters and node load of the node, the suspended state is determined, and the network port of the node is closed in the suspended state, the high-availability service is obtained and the storage service is cut off, and the high-availability service is used for rapid fault switching.
Effectively identify and handle node suspended states to avoid long-term impact on storage services, improve the stability and reliability of storage services, and reduce the difficulty of operation and maintenance.
Smart Images

Figure CN119512888B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for processing node pseudo-death. Background Art
[0002] The suspended state of a node refers to a situation in which the computer operating system, although running, temporarily does not respond to user operations. Suspended state is a common failure phenomenon that may be encountered when using a computer. It is different from a complete system freeze. In the suspended state, the basic input and output system can still work, but the node's response will be significantly slowed down or seem completely unresponsive, usually lasting from a few seconds to a few minutes.
[0003] In the prior art, the acquisition of suspended animation state is usually processed by the mode of watchdog, that is, at regular intervals, node sends a signal to the feeding dog end, thereby resetting the watchdog timer. If the node breaks down, such as has entered an endless loop that cannot exit, causing failing to "feed the dog" within the specified time, then the watchdog timer will time out, and send a reset signal, so that MCU (Microcontroller Unit, micro control unit) is reset, thereby recovering the normal operation of the node, but this mode can only be triggered when the operating system level is on the verge of collapse. Because the priority of watchdog is very high, a lot of abnormal situations will occur, namely operating system can also normally feed the dog, is unlikely to trigger the watchdog restart system, but because of hardware or software failure, causes the storage service of node to not normally operate. At this moment, due to the suspended animation state of individual node, cause storage service performance to decline significantly, even may not normally provide storage service, and usually affect storage service for a long time, cause serious adverse consequences.
[0004] Therefore, in order to address the shortcomings of the existing technical solutions, the present invention provides a method for processing node suspended animation. Summary of the Invention
[0005] Based on this, it is necessary to provide a method, device, equipment and storage medium for processing node pseudo-death in order to address the above technical problems.
[0006] On the one hand, a method for processing node suspended state is provided, the method comprising: detecting the hardware operating parameters and node load of the node, wherein the hardware operating parameters include the operating parameters of each hardware and the operating parameters between hardware; judging whether the node is in suspended state according to the hardware operating parameters and / or node load of the node; when it is determined that the node is in suspended state, closing the network port corresponding to the node; obtaining the high-availability service corresponding to the node, and cutting off the storage service corresponding to the node through the high-availability service.
[0007] Optionally, detecting the hardware operating parameters and node load of the node includes: determining a polling instruction corresponding to the node based on the hardware configuration of the node; and detecting the hardware operating parameters and node load of the node through the polling instruction.
[0008] Optionally, judging whether the node is in a suspended state based on the hardware operating parameters and / or node load of the node includes: recording the historical hardware operating parameters and historical node load of the node; judging whether the node is in a suspended state based on at least one of the historical hardware operating parameters, current hardware operating parameters, historical node load and current node load of the node.
[0009] Optionally, judging whether the node is in a suspended state based on the hardware operating parameters and / or node load of the node includes: obtaining the hardware operating parameters of the node, and determining the hardware status of each hardware in the node; when detecting that hardware in an abnormal state exists in the node, determining that the node is in a suspended state; if each hardware of the node is in a normal state, obtaining the node load of the node, and when detecting that the node load of the node is in an abnormal state, determining that the node is in a suspended state.
[0010] Optionally, the obtaining of the hardware operating parameters of the node and the determination of the hardware status of each hardware in the node include: obtaining the current operating parameters of the central processing unit, determining whether the central processing unit is in the first abnormal state of the central processing unit, and when the central processing unit is not in the first abnormal state of the central processing unit and the current operating parameters are abnormal, obtaining the historical operating parameters of the central processing unit, and determining whether the central processing unit is in the second abnormal state of the central processing unit based on the historical operating parameters and current operating parameters of the central processing unit; when the central processing unit is in a normal state, obtaining the current operating parameters and historical operating parameters of the memory, and determining whether the central processing unit is in the second abnormal state of the central processing unit based on the current operating parameters and historical operating parameters of the memory. Whether the memory is in a memory abnormal state; when the memory is in a normal state, obtaining the current operating parameters of the disk, and judging whether the disk is in a disk abnormal state; when the disk is in a normal state, obtaining the current operating parameters of the network card, and judging whether the network card is in a network card abnormal state; when the network card is in a normal state, obtaining the current operating parameters of the link, and judging whether the link is in a first link abnormal state; when the link is not in the first link abnormal state and the current operating parameters are abnormal, obtaining the historical operating parameters of the link, and judging whether the link is in a second link abnormal state according to the historical operating parameters and current operating parameters of the link, wherein the link is a link between the hardware of the nodes.
[0011] Optionally, if each hardware of the node is in a normal state, the node load of the node is obtained, and when it is detected that the node load of the node is in an abnormal state, it is determined that the node is in a suspended state, including: obtaining the current node load of the node, and judging whether the current node load is within a preset standard range; if the current node load is outside the preset standard range, obtaining the historical node load, and judging whether the node load of the node is in an abnormal state based on the current node load and the historical node load.
[0012] Optionally, obtaining the high-availability service corresponding to the node and cutting off the storage service corresponding to the node through the high-availability service includes: performing a heartbeat detection on the node through the high-availability service corresponding to the node; and cutting off the storage service corresponding to the node based on the heartbeat detection result of the node.
[0013] On the other hand, a device for processing node suspended state is provided, the device comprising: a detection module for detecting the hardware operating parameters and node load of the node, wherein the hardware operating parameters include the operating parameters of each hardware and the operating parameters between the hardware; a judgment module for judging whether the node is in suspended state based on the hardware operating parameters and / or node load of the node; a shutdown module for closing the network port corresponding to the node when determining that the node is in suspended state; and a processing module for obtaining the high-availability service corresponding to the node and cutting off the storage service corresponding to the node through the high-availability service.
[0014] On the other hand, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: detecting the hardware operating parameters and node load of the node, wherein the hardware operating parameters include the operating parameters of each hardware and the operating parameters between the hardware; judging whether the node is in a suspended state based on the hardware operating parameters and / or node load of the node; closing the network port corresponding to the node when determining that the node is in a suspended state; obtaining the high-availability service corresponding to the node, and cutting off the storage service corresponding to the node through the high-availability service.
[0015] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: detecting the hardware operating parameters and node load of the node, wherein the hardware operating parameters include the operating parameters of each hardware and the operating parameters between the hardware; judging whether the node is in a suspended state based on the hardware operating parameters and / or node load of the node; when it is determined that the node is in a suspended state, closing the network port corresponding to the node; obtaining the high-availability service corresponding to the node, and cutting off the storage service corresponding to the node through the high-availability service.
[0016] The above-mentioned method, device, equipment and storage medium for processing node pseudo-death, the method includes: detecting the hardware operating parameters and node load of the node, wherein the hardware operating parameters include the operating parameters of each hardware and the operating parameters between hardware; judging whether the node is in a pseudo-death state based on the hardware operating parameters and / or node load of the node; when it is determined that the node is in a pseudo-death state, closing the network port corresponding to the node; obtaining the high-availability service corresponding to the node, and cutting off the storage service corresponding to the node through the high-availability service; in this way, by detecting the hardware status and load status of the node, the pseudo-death state of the node is identified, and at the same time, processing operations are performed on the pseudo-death node to ensure that the pseudo-death of the node will not affect the storage service for a long time, improve the stability and reliability of the storage service, and reduce the difficulty of operation and maintenance personnel in analyzing and handling problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 1 is a flow chart of a method for processing a node suspended state in one embodiment;
[0018] Figure 2 A schematic diagram of the system architecture of a method for processing a node suspended state in one embodiment;
[0019] Figure 3 A schematic diagram of a process flow of identifying a node suspended state in a method for handling suspended state of a node in one embodiment;
[0020] Figure 4 is a structural block diagram of a device for processing a node suspended state in one embodiment;
[0021] Figure 5 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0022] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0023] It should be understood that in the description of this application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like throughout the specification should be interpreted as inclusive rather than exclusive or exhaustive; that is, as "including but not limited to".
[0024] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.
[0025] It should be noted that the terms "S1", "S2", etc. are used only for the purpose of describing the steps and do not specifically refer to the order or sequence, nor are they used to limit this application. They are merely for the convenience of describing the method of this application and should not be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that ordinary technicians in this field can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0026] In one embodiment, Figure 1 As shown, a method for processing a node suspended state is provided, comprising the following steps:
[0027] S101: Detecting hardware operating parameters and node load of a node, wherein the hardware operating parameters include operating parameters of each hardware and operating parameters between hardware.
[0028] Here, a node may include multiple hardware and correspondingly multiple hardware operating parameters. For example, a node includes a CPU (Central Processing Unit), a memory, and a network card.
[0029] When a node includes a CPU, a memory, and a network card, the operating parameters of each hardware may be, for example, the operating parameters of the CPU, and the operating parameters between the hardware may be, for example, the operating parameters between the CPU and the memory.
[0030] S102: Determine whether the node is in a suspended state according to the hardware operating parameters and / or node load of the node.
[0031] Here, the suspended state is a state of temporarily stopping response.
[0032] In one embodiment, whether the node is in a suspended state may be determined based on one hardware operating parameter, or may be determined based on all hardware operating parameters of the node.
[0033] S103: When it is determined that the node is in a suspended state, the network port corresponding to the node is closed.
[0034] Here, one node can correspond to one network port, or one node can correspond to multiple network ports. When the node is in a suspended state, all network ports corresponding to the node are closed.
[0035] S104: Acquire a high-availability service corresponding to the node, and disconnect the storage service corresponding to the node through the high-availability service.
[0036] Here, high-availability services refer to services that can continue to run even when a node fails.
[0037] It should be noted that this application collects and analyzes the hardware status of the node. When it is found that the hardware is in a certain state that may cause the node to freeze, or the node load value at the operating system level is obviously abnormal and exceeds the threshold, the node's network port is immediately closed, thereby triggering the high-availability service achieved through network heartbeat detection to quickly failover the storage service, thereby quickly handling the node's frozen failure.
[0038] In some specific implementations, the detecting node hardware operating parameters and node load includes:
[0039] Determining a polling instruction corresponding to the node according to the hardware configuration of the node;
[0040] The hardware operating parameters and node load of the node are detected through the polling instruction.
[0041] Here, a time interval may be preset for the polling instruction, and the polling instruction sends the detection instruction on time according to the time interval.
[0042] The polling instructions include instructions for detecting operating parameters of each hardware of a node, instructions for detecting operating parameters between hardware, and instructions for detecting node load.
[0043] In this way, corresponding polling instructions can be designed according to the actual situation of the node to improve detection efficiency.
[0044] In some specific implementations, determining whether the node is in a suspended state based on the hardware operating parameters and / or node load of the node includes:
[0045] Record the historical hardware operating parameters and historical node load of the node;
[0046] Whether the node is in a suspended state is determined according to at least one of a historical hardware operating parameter of the node, a current hardware operating parameter, a historical node load, and a current node load.
[0047] Here, the historical hardware operating parameters and the historical node loads may be multiple sets of historical hardware operating parameters and multiple historical node load values.
[0048] Among them, there may be situations where the node is determined to be in a state of suspended animation through current hardware operating parameters, there may be situations where the node is determined to be in a state of suspended animation through current hardware operating parameters and historical hardware operating parameters, and there may be situations where the node is determined to be in a state of suspended animation through current node load, including but not limited to the above combinations.
[0049] In this way, by detecting the hardware status and load of the node, the suspended state of the node that cannot be identified by the watchdog method can be identified.
[0050] In some specific implementations, determining whether the node is in a suspended state based on the hardware operating parameters and / or node load of the node includes:
[0051] Obtaining hardware operating parameters of the node and determining the hardware status of each hardware in the node;
[0052] When detecting that hardware in the node is in an abnormal state, determining that the node is in a suspended state;
[0053] If each hardware of the node is in a normal state, the node load of the node is obtained, and when it is detected that the node load of the node is in an abnormal state, it is determined that the node is in a suspended state.
[0054] Here, whether the target hardware is abnormal is determined by detecting the operating parameters of the target hardware and the operating parameters between the target hardware and other hardware.
[0055] Specifically, each hardware in the node is detected in turn to see if it is in an abnormal state. When it is detected that some hardware is in an abnormal state, the node is determined to be in a suspended state. If all the hardware of the node is in a normal state, the node load of the node is detected. When it is detected that the node load is in an abnormal state, the node is determined to be in a suspended state.
[0056] In one embodiment, when it is detected in sequence that any hardware in the node is in an abnormal state, the detection is terminated and it is determined that the node is in a suspended state.
[0057] In this way, the abnormality of any indicator can be used to determine the suspended state of the node, thereby improving the detection efficiency.
[0058] In some specific implementations, obtaining the hardware operating parameters of the node and determining the hardware status of each hardware in the node includes:
[0059] obtaining current operating parameters of a central processing unit (CPU), determining whether the CPU is in a first abnormal state of the CPU; and when the CPU is not in the first abnormal state of the CPU and the current operating parameters are abnormal, obtaining historical operating parameters of the CPU, and determining whether the CPU is in a second abnormal state of the CPU based on the historical operating parameters and the current operating parameters of the CPU;
[0060] When the central processing unit is in a normal state, obtaining current operating parameters and historical operating parameters of the memory, and judging whether the memory is in a memory abnormal state according to the current operating parameters and historical operating parameters of the memory;
[0061] When the memory is in a normal state, obtaining current operating parameters of the disk and determining whether the disk is in an abnormal disk state;
[0062] When the disk is in a normal state, obtaining current operating parameters of the network card and determining whether the network card is in an abnormal state;
[0063] When the network card is in a normal state, the current operating parameters of the link are obtained to determine whether the link is in a first abnormal link state; when the link is not in the first abnormal link state and the current operating parameters are abnormal, the historical operating parameters of the link are obtained, and based on the historical operating parameters and the current operating parameters of the link, it is determined whether the link is in a second abnormal link state, wherein the link is a link between the hardware of the nodes.
[0064] Here, the CPU has two abnormal states: one determined by current operating parameters and the other determined by both current and historical operating parameters. For example, a CPU stuck state can be determined based on current operating parameters. A CPU instruction abnormality is detected when an instruction abnormality is detected. The CPU obtains the corresponding historical operating parameters and determines whether the CPU instruction abnormality is present in these historical operating parameters. If the instruction abnormality occurs a preset number of times in a row, the node is determined to be in a suspended state. The preset number can be three or any other number.
[0065] For example, the first abnormal state of the central processing unit may be a CPU stuck abnormality, and the second abnormal state of the central processing unit may be a CPU instruction abnormality; the abnormal state of the memory may be a CE (Correctable Error) storm or a UCE (Uncorrectable Error) abnormality; the abnormal state of the disk may be a read-only abnormality; the abnormal state of the network card may be a serious network card error abnormality; the first abnormal state of the link may be an unexplained shutdown abnormality, and the second abnormal state of the link may be a frequent interruption abnormality. The abnormal states corresponding to the hardware include but are not limited to the above-mentioned abnormal states.
[0066] Specifically, the CPU is checked in turn to see if there are CPU instruction anomalies, CPU stuck anomalies, etc. If so, the detection is terminated to determine whether the node is in a suspended state. If not, the memory is continued to be checked for CE storms or UCE anomalies. If so, the detection is terminated. If not, the disk is continued to be checked for read-only conditions. If so, the detection is terminated. If not, the network card is continued to be checked for serious errors. If so, the detection is terminated. If not, the link is continued to be checked for frequent interruptions or unexplained shutdowns. If so, the detection is terminated.
[0067] In some specific implementations, if each hardware of the node is in a normal state, obtaining the node load of the node, and determining that the node is in a suspended state when detecting that the node load of the node is in an abnormal state includes:
[0068] Obtaining the current node load of the node, and determining whether the current node load is within a preset standard range;
[0069] If the current node load is outside a preset standard range, a historical node load is obtained, and whether the node load of the node is in an abnormal state is determined based on the current node load and the historical node load.
[0070] Here, the preset standard range can be preset according to user needs.
[0071] Specifically, when there are no abnormalities in all hardware, the node load of the node is detected, the current node load and the historical node load are obtained, and it is determined whether the node load exceeds the standard range for multiple consecutive times. If so, it is determined that the node is in a suspended state.
[0072] In some specific implementations, obtaining the high-availability service corresponding to the node and disconnecting the storage service corresponding to the node through the high-availability service includes:
[0073] Performing heartbeat detection on the node through the high availability service corresponding to the node;
[0074] According to the heartbeat detection result of the node, the storage service corresponding to the node is disconnected.
[0075] Here, the heartbeat detection is that end A sends a heartbeat message to end B to detect whether end A can receive the heartbeat message returned by end B within a preset time.
[0076] The node is in a system, and the system may include multiple nodes.
[0077] Furthermore, after the storage service of the suspended node is cut off, the data to be stored in the suspended node is distributed to other nodes.
[0078] Exemplarily, the heartbeat detection of a node may be to send heartbeat information to any other node for the current node, and determine whether the current node can receive the heartbeat information returned by the other node within a preset time.
[0079] Specifically, a waiting time is preset, and the high availability service of the current node sends heartbeat information to other nodes. After the waiting time is reached, the high availability service checks the current node, and after detecting that the heartbeat information has not been received, the storage service of the current node is cut off.
[0080] In this way, the stability of the system can be ensured by handling the suspended nodes through high-availability services.
[0081] In some embodiments, the method further comprises:
[0082] Obtaining the network status corresponding to the node;
[0083] determining a network delay of the node according to the network state;
[0084] According to the network delay, the hardware operating parameters of the node are modified.
[0085] In this way, the influence of the network status on the detection of the suspended state of the node can be avoided.
[0086] In one embodiment, Figure 2 This is a schematic diagram of the system architecture in the embodiment of the present application. Figure 2 As shown, the system architecture of the present application includes: the system includes multiple nodes, each of which includes a suspended animation detection module, a high-availability service module, and a storage service module. Specifically, the suspended animation detection module identifies the suspended node, interrupts the network port of the suspended node, and performs heartbeat detection between nodes through the high-availability service corresponding to the suspended node. Since the suspended animation detection module interrupts the network port of the suspended node, causing the heartbeat detection to time out, the high-availability service implements the operation of disconnecting the storage service of the node with the heartbeat detection timeout.
[0087] In one embodiment, Figure 3 This is a flow chart of suspended animation recognition in an embodiment of the present application, as shown in FIG. Figure 3 As shown, the process of false death identification includes: S301: capturing the kernel's error report on CPU abnormality; S302: capturing the kernel's error report on memory abnormality; S303: capturing the kernel's error report on system disk read-only status; S304: capturing the kernel's error report on network card abnormality; S305: capturing the kernel's error report on link abnormality; S306: judging whether there is a read-only status or abnormal error, if so, executing S308: shutting down all network cards of the node, if not, executing S307: judging whether the system load is greater than the threshold, if so, executing S308, if not, ending the process.
[0088] It should be understood that although Figure 1-3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1-3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0089] In one embodiment, Figure 4 As shown, a device for processing node suspended state is provided, the device comprising: a detection module 401, for detecting the hardware operating parameters and node load of the node, wherein the hardware operating parameters include the operating parameters of each hardware and the operating parameters between the hardware; a judgment module 402, for judging whether the node is in suspended state according to the hardware operating parameters and / or node load of the node; a closing module 403, for closing the network port corresponding to the node when determining that the node is in suspended state; a processing module 404, for obtaining the high-availability service corresponding to the node, and cutting off the storage service corresponding to the node through the high-availability service.
[0090] As a preferred implementation, in the embodiment of the present application, the detection module 401 is specifically used to: determine the polling instruction corresponding to the node based on the hardware configuration of the node; and detect the hardware operating parameters and node load of the node through the polling instruction.
[0091] As a preferred implementation method, in an embodiment of the present application, the judgment module 402 is specifically used to: record the historical hardware operating parameters and historical node load of the node; and determine whether the node is in a suspended state based on at least one of the historical hardware operating parameters, current hardware operating parameters, historical node load and current node load of the node.
[0092] As a preferred implementation, in an embodiment of the present application, the judgment module 402 is further specifically used to: obtain the hardware operating parameters of the node, and determine the hardware status of each hardware in the node; when it is detected that there is hardware in an abnormal state in the node, determine that the node is in a suspended state; if each hardware of the node is in a normal state, obtain the node load of the node, and when it is detected that the node load of the node is in an abnormal state, determine that the node is in a suspended state.
[0093] As a preferred implementation, in the embodiment of the present application, the judgment module 402 is further specifically used to: obtain the current operating parameters of the central processing unit, determine whether the central processing unit is in the first abnormal state of the central processing unit, and when the central processing unit is not in the first abnormal state of the central processing unit and the current operating parameters are abnormal, obtain the historical operating parameters of the central processing unit, and determine whether the central processing unit is in the second abnormal state of the central processing unit based on the historical operating parameters and current operating parameters of the central processing unit; when the central processing unit is in a normal state, obtain the current operating parameters and historical operating parameters of the memory, and determine whether the memory is in the second abnormal state based on the current operating parameters and historical operating parameters of the memory. whether it is in a memory abnormal state; when the memory is in a normal state, obtaining the current operating parameters of the disk, and judging whether the disk is in a disk abnormal state; when the disk is in a normal state, obtaining the current operating parameters of the network card, and judging whether the network card is in a network card abnormal state; when the network card is in a normal state, obtaining the current operating parameters of the link, and judging whether the link is in a first abnormal link state; when the link is not in the first abnormal link state and the current operating parameters are abnormal, obtaining the historical operating parameters of the link, and judging whether the link is in a second abnormal link state according to the historical operating parameters and current operating parameters of the link, wherein the link is a link between the hardware of the nodes.
[0094] As a preferred implementation method, in an embodiment of the present application, the judgment module 402 is specifically used to: obtain the current node load of the node, and determine whether the current node load is within a preset standard range; if the current node load is outside the preset standard range, obtain the historical node load, and determine whether the node load of the node is in an abnormal state based on the current node load and the historical node load.
[0095] As a preferred implementation, in the embodiment of the present application, the processing module 404 is specifically used to: perform heartbeat detection on the node through the high-availability service corresponding to the node; and cut off the storage service corresponding to the node based on the heartbeat detection result of the node.
[0096] For the specific definition of the processing device for node suspended animation, please refer to the definition of the processing method for node suspended animation above, which will not be repeated here. The various modules in the above-mentioned processing device for node suspended animation can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0097] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for processing node pseudo-death is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0098] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0099] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1: detecting the hardware operating parameters and node load of the node, wherein the hardware operating parameters include the operating parameters of each hardware and the operating parameters between the hardware; S2: judging whether the node is in a suspended state based on the hardware operating parameters and / or node load of the node; S3: closing the network port corresponding to the node when determining that the node is in a suspended state; S4: obtaining the high-availability service corresponding to the node, and cutting off the storage service corresponding to the node through the high-availability service.
[0100] In one embodiment, when executing the computer program, the processor further implements the following steps: determining a polling instruction corresponding to the node according to the hardware configuration of the node; and detecting the hardware operating parameters and node load of the node through the polling instruction.
[0101] In one embodiment, when the processor executes the computer program, it also implements the following steps: recording the historical hardware operating parameters and historical node load of the node; and judging whether the node is in a suspended state based on at least one of the historical hardware operating parameters, current hardware operating parameters, historical node load and current node load of the node.
[0102] In one embodiment, when the processor executes the computer program, it also implements the following steps: obtaining the hardware operating parameters of the node and determining the hardware status of each hardware in the node; when detecting that there is hardware in an abnormal state in the node, determining that the node is in a suspended state; if each hardware of the node is in a normal state, obtaining the node load of the node, and when detecting that the node load of the node is in an abnormal state, determining that the node is in a suspended state.
[0103] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtaining the current operating parameters of the central processing unit, determining whether the central processing unit is in a first abnormal state of the central processing unit; when the central processing unit is not in the first abnormal state of the central processing unit and the current operating parameters are abnormal, obtaining the historical operating parameters of the central processing unit, and determining whether the central processing unit is in a second abnormal state of the central processing unit based on the historical operating parameters and current operating parameters of the central processing unit; when the central processing unit is in a normal state, obtaining the current operating parameters and historical operating parameters of the memory, and determining whether the memory is in a normal state based on the current operating parameters and historical operating parameters of the memory. When the memory is in a normal state, the current operating parameters of the disk are obtained to determine whether the disk is in an abnormal disk state; when the disk is in a normal state, the current operating parameters of the network card are obtained to determine whether the network card is in an abnormal network card state; when the network card is in a normal state, the current operating parameters of the link are obtained to determine whether the link is in a first abnormal link state; when the link is not in the first abnormal link state and the current operating parameters are abnormal, the historical operating parameters of the link are obtained, and according to the historical operating parameters and the current operating parameters of the link, it is determined whether the link is in a second abnormal link state, wherein the link is a link between the hardware of the nodes.
[0104] In one embodiment, when the processor executes the computer program, it also implements the following steps: obtaining the current node load of the node, and determining whether the current node load is within a preset standard range; if the current node load is outside the preset standard range, obtaining the historical node load, and determining whether the node load of the node is in an abnormal state based on the current node load and the historical node load.
[0105] In one embodiment, when the processor executes the computer program, it further implements the following steps: performing a heartbeat detection on the node through the high-availability service corresponding to the node; and disconnecting the storage service corresponding to the node based on the heartbeat detection result of the node.
[0106] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: S1: detecting the hardware operating parameters and node load of the node, wherein the hardware operating parameters include the operating parameters of each hardware and the operating parameters between the hardware; S2: judging whether the node is in a suspended state based on the hardware operating parameters and / or node load of the node; S3: when it is determined that the node is in a suspended state, closing the network port corresponding to the node; S4: obtaining the high-availability service corresponding to the node, and cutting off the storage service corresponding to the node through the high-availability service.
[0107] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining the polling instruction corresponding to the node according to the hardware configuration of the node; and detecting the hardware operating parameters and node load of the node through the polling instruction.
[0108] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: recording the historical hardware operating parameters and historical node load of the node; and judging whether the node is in a suspended state based on at least one of the historical hardware operating parameters, current hardware operating parameters, historical node load and current node load of the node.
[0109] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the hardware operating parameters of the node and determining the hardware status of each hardware in the node; when detecting that there is hardware in an abnormal state in the node, determining that the node is in a suspended state; if each hardware of the node is in a normal state, obtaining the node load of the node, and when detecting that the node load of the node is in an abnormal state, determining that the node is in a suspended state.
[0110] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: obtaining the current operating parameters of the central processing unit, determining whether the central processing unit is in a first abnormal state of the central processing unit; when the central processing unit is not in the first abnormal state of the central processing unit and the current operating parameters are abnormal, obtaining the historical operating parameters of the central processing unit, and determining whether the central processing unit is in a second abnormal state of the central processing unit based on the historical operating parameters and current operating parameters of the central processing unit; when the central processing unit is in a normal state, obtaining the current operating parameters and historical operating parameters of the memory, and determining whether the memory is in a second abnormal state based on the current operating parameters and historical operating parameters of the memory. Memory abnormal state; when the memory is in a normal state, obtain the current operating parameters of the disk to determine whether the disk is in a disk abnormal state; when the disk is in a normal state, obtain the current operating parameters of the network card to determine whether the network card is in a network card abnormal state; when the network card is in a normal state, obtain the current operating parameters of the link to determine whether the link is in a first abnormal link state; when the link is not in the first abnormal link state and the current operating parameters are abnormal, obtain the historical operating parameters of the link, and determine whether the link is in a second abnormal link state based on the historical operating parameters and current operating parameters of the link, wherein the link is a link between the hardware of the nodes.
[0111] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the current node load of the node, and determining whether the current node load is within a preset standard range; if the current node load is outside the preset standard range, obtaining the historical node load, and determining whether the node load of the node is in an abnormal state based on the current node load and the historical node load.
[0112] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: performing heartbeat detection on the node through the high-availability service corresponding to the node; and disconnecting the storage service corresponding to the node based on the heartbeat detection result of the node.
[0113] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0114] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0115] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for processing a node suspended state, characterized in that: The method comprises: Detecting hardware operating parameters and node load of the node, wherein the hardware operating parameters include operating parameters of each hardware and operating parameters between hardware; Determining whether the node is in a suspended state based on the hardware operating parameters and / or node load of the node; When determining that the node is in a suspended state, closing the network port corresponding to the node; Obtaining a high-availability service corresponding to the node, and disconnecting the storage service corresponding to the node through the high-availability service; The obtaining of the high-availability service corresponding to the node and disconnecting the storage service corresponding to the node through the high-availability service includes: Performing heartbeat detection on the node through the high availability service corresponding to the node; According to the heartbeat detection result of the node, the storage service corresponding to the node is disconnected.
2. The method for processing a node suspended state according to claim 1, wherein: The hardware operating parameters and node load of the detection node include: Determining a polling instruction corresponding to the node according to the hardware configuration of the node; The hardware operating parameters and node load of the node are detected through the polling instruction.
3. The method for processing a node suspended state according to claim 2, wherein: The determining whether the node is in a suspended state according to the hardware operating parameters and / or node load of the node includes: Record the historical hardware operating parameters and historical node load of the node; Whether the node is in a suspended state is determined according to at least one of a historical hardware operating parameter of the node, a current hardware operating parameter, a historical node load, and a current node load.
4. The method for processing a node suspended state according to claim 3, wherein: The determining whether the node is in a suspended state according to the hardware operating parameters and / or node load of the node includes: Obtaining hardware operating parameters of the node and determining the hardware status of each hardware in the node; When detecting that hardware in the node is in an abnormal state, determining that the node is in a suspended state; If each hardware of the node is in a normal state, the node load of the node is obtained, and when it is detected that the node load of the node is in an abnormal state, it is determined that the node is in a suspended state.
5. The method for processing a node suspended state according to claim 4, characterized in that: The obtaining of the hardware operating parameters of the node and determining the hardware status of each hardware in the node includes: obtaining current operating parameters of a central processing unit (CPU), determining whether the CPU is in a first abnormal state of the CPU; and when the CPU is not in the first abnormal state of the CPU and the current operating parameters are abnormal, obtaining historical operating parameters of the CPU, and determining whether the CPU is in a second abnormal state of the CPU based on the historical operating parameters and the current operating parameters of the CPU; When the central processing unit is in a normal state, obtaining current operating parameters and historical operating parameters of the memory, and judging whether the memory is in a memory abnormal state according to the current operating parameters and historical operating parameters of the memory; When the memory is in a normal state, obtaining current operating parameters of the disk and determining whether the disk is in an abnormal disk state; When the disk is in a normal state, obtaining current operating parameters of the network card and determining whether the network card is in an abnormal state; When the network card is in a normal state, the current operating parameters of the link are obtained to determine whether the link is in a first abnormal link state; when the link is not in the first abnormal link state and the current operating parameters are abnormal, the historical operating parameters of the link are obtained, and based on the historical operating parameters and the current operating parameters of the link, it is determined whether the link is in a second abnormal link state, wherein the link is a link between the hardware of the nodes.
6. The method for processing a node suspended state according to claim 4, characterized in that: If each hardware of the node is in a normal state, obtaining the node load of the node, and determining that the node is in a suspended state when detecting that the node load of the node is in an abnormal state, includes: Obtaining the current node load of the node, and determining whether the current node load is within a preset standard range; If the current node load is outside a preset standard range, a historical node load is obtained, and whether the node load of the node is in an abnormal state is determined based on the current node load and the historical node load.
7. A device for processing a node suspended state for implementing the method for processing a node suspended state according to any one of claims 1 to 6, characterized in that: The device comprises: A detection module, configured to detect hardware operating parameters and node load of a node, wherein the hardware operating parameters include operating parameters of each hardware and operating parameters between hardware; A judgment module, configured to judge whether the node is in a suspended state based on the hardware operating parameters and / or node load of the node; A closing module, configured to close the network port corresponding to the node when determining that the node is in a suspended state; The processing module is used to obtain the high-availability service corresponding to the node and cut off the storage service corresponding to the node through the high-availability service.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data state storage system, and system and method for processing node data of block chains
CN108052620A
Video conference signaling processing method and device, computer equipment and storage medium
CN110830753A