A monitoring method, apparatus, device and medium

By periodically acquiring the cluster self-check information table, determining the status of the command channel and asynchronous file transfer channel of each child node, generating a node status table and sending it to the terminal, the problems of no alarm, false alarm, and late alarm in asynchronous data file transfer alarm monitoring are solved, and accurate monitoring and timely processing of nodes are achieved.

CN115604077BActive Publication Date: 2026-03-17CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing alarm monitoring methods for asynchronous data file transfer suffer from issues such as no alarms, false alarms, and late alarms, making it impossible to detect and respond to emergencies in a timely manner.

Method used

By periodically retrieving the cluster self-check information table, the status of the command channel and asynchronous file transfer channel of each child node is determined, a node status table is generated, and it is sent to the terminal for abnormal node handling.

Benefits of technology

It enables precise monitoring of multiple nodes, improves the timeliness and accuracy of node monitoring, avoids resource waste, and ensures timely detection and handling of abnormal situations in the master node.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115604077B_ABST
    Figure CN115604077B_ABST
Patent Text Reader

Abstract

The application relates to the field of data analysis, in particular to a monitoring method and device, equipment and medium, which are used for improving the timeliness of node monitoring. The method periodically acquires a cluster self-check information table from a database; based on the cluster self-check information table, the command channel state of each subnode in the cluster and the asynchronous file transmission channel state of each subnode are determined; the command channel state is used for determining whether the corresponding subnode normally receives and processes a command, and the asynchronous file transmission channel state is used for determining whether the corresponding subnode normally performs asynchronous file transmission; based on the command channel state and the asynchronous file transmission channel state of each subnode, a node state table is generated; and the node state table is sent to a terminal, so that the terminal processes an abnormal node based on the node state table. In the application, the cluster self-check information table is set, the multiple nodes are simultaneously monitored, whether to alarm is determined according to the state of the nodes, and the timeliness of node monitoring is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data analysis technology, specifically to a monitoring method, device, equipment, and medium. Background Technology

[0002] Data processing systems typically require asynchronous data file transfer, necessitating the installation of a file transfer component client to facilitate data file interaction. Currently, the alarm monitoring method for asynchronous data file transfer involves individual nodes writing their own scripts to generate alarms, frequently resulting in no alarms, false alarms, or late alarms, hindering proactive detection and timely emergency response. Summary of the Invention

[0003] This application provides a monitoring method, apparatus, device, and medium to improve the timeliness of node monitoring.

[0004] In a first aspect, embodiments of this application provide a monitoring method, the method comprising:

[0005] Periodically retrieve the cluster self-test information table from the database;

[0006] Based on the cluster self-test information table, the command channel status of each child node in the cluster and the asynchronous file transfer channel status of each child node are determined; wherein, the command channel status is used to determine whether the corresponding child node receives and processes commands normally, and the asynchronous file transfer channel status is used to determine whether the corresponding child node performs asynchronous file transfer normally.

[0007] A node status table is generated based on the command channel status and asynchronous file transfer channel status of each child node;

[0008] The node status table is sent to the terminal so that the terminal can process abnormal nodes based on the node status table.

[0009] This application enables simultaneous monitoring of multiple nodes by setting up a cluster self-check information table, and determines whether to issue an alarm based on the node's status, thereby improving the timeliness of node monitoring.

[0010] In some possible embodiments, the command channel status of each child node is determined as follows:

[0011] Control the child node to periodically send a first self-test message to the command channel port of the child node;

[0012] If a first reply message is received from the command channel port within a first preset time period, the command channel status of the child node is determined to be normal.

[0013] If no first reply message is received from the command channel port within the first preset time period, the command channel status of the child node is determined to be abnormal.

[0014] In this application, the command channel status of each child node is self-checked by sending a first self-check message, thus achieving accurate monitoring of the command channel status of each child node.

[0015] In some possible embodiments, the asynchronous file transfer channel status of each child node is determined as follows:

[0016] A second self-test message is periodically sent to the target asynchronous file transfer channel port of the child node;

[0017] If a second reply message is received from the target asynchronous file transfer channel port within the second preset time period, then the target asynchronous file transfer channel status of the child node is determined to be normal.

[0018] If no second reply message is received from the target asynchronous file transfer channel port within the second preset time period, the target asynchronous file transfer channel status of the child node is determined to be abnormal.

[0019] In this application, by setting a second self-test message, the asynchronous file transfer channel self-test of each child node is realized, ensuring accurate monitoring of the status of the asynchronous file transfer channel of each child node.

[0020] In some possible embodiments, the target asynchronous file transfer channel port is determined in the following manner:

[0021] Control the child node to establish a connection with the target node; wherein, the target node is a server node that communicates with the cluster to which the child node belongs;

[0022] Receive the target port identifier sent by the target node;

[0023] The asynchronous file transfer channel port indicated by the target port identifier is used as the target asynchronous file transfer channel port.

[0024] In this application, by determining the target asynchronous file transfer channel port, the waste of resources caused by traversing all asynchronous file transfer channel ports is avoided.

[0025] In some possible embodiments, after generating the node status table based on the command channel status and asynchronous file transfer channel status of each child node, the method further includes:

[0026] Traverse the command channel status of all child nodes in the node status table, and the asynchronous file transfer channel status of all child nodes;

[0027] If the command channel status of all child nodes in the node status table is abnormal, and the asynchronous file transfer channel status of all child nodes is also abnormal, then the master node is determined to be abnormal. A master node abnormality notification is then generated and sent to the terminal.

[0028] In this embodiment, the status of the master node is accurately monitored by considering the command channel status and asynchronous file transfer channel status of each child node.

[0029] Secondly, this application provides a monitoring device, the device comprising:

[0030] The acquisition module is used to periodically retrieve the cluster self-test information table from the database;

[0031] The status determination module is used to determine the command channel status of each child node in the cluster and the asynchronous file transfer channel status of each child node based on the cluster self-test information table; wherein, the command channel status is used to determine whether the corresponding child node is receiving and processing commands normally, and the asynchronous file transfer channel status is used to determine whether the corresponding child node is performing asynchronous file transfer normally.

[0032] The generation module is used to generate a node status table based on the command channel status and asynchronous file transfer channel status of each child node;

[0033] The sending module is used to send the node status table to the terminal so that the terminal can process abnormal nodes based on the node status table.

[0034] In some possible embodiments, the command channel status of each child node is determined as follows:

[0035] Control the child node to periodically send a first self-test message to the command channel port of the child node;

[0036] If a first reply message is received from the command channel port within a first preset time period, the command channel status of the child node is determined to be normal.

[0037] If no first reply message is received from the command channel port within the first preset time period, the command channel status of the child node is determined to be abnormal.

[0038] In some possible embodiments, the asynchronous file transfer channel status of each child node is determined as follows:

[0039] A second self-test message is periodically sent to the target asynchronous file transfer channel port of the child node;

[0040] If a second reply message is received from the target asynchronous file transfer channel port within the second preset time period, then the target asynchronous file transfer channel status of the child node is determined to be normal.

[0041] If no second reply message is received from the target asynchronous file transfer channel port within the second preset time period, the target asynchronous file transfer channel status of the child node is determined to be abnormal.

[0042] In some possible embodiments, the target asynchronous file transfer channel port is determined in the following manner:

[0043] Control the child node to establish a connection with the target node; wherein, the target node is a server node that communicates with the cluster to which the child node belongs;

[0044] Receive the target port identifier sent by the target node;

[0045] The asynchronous file transfer channel port indicated by the target port identifier is used as the target asynchronous file transfer channel port.

[0046] In some possible embodiments, the generation module executes on the command channel status and asynchronous file transfer channel status of each child node, and after generating the node status table, it is further configured as follows:

[0047] Traverse the command channel status of all child nodes in the node status table, and the asynchronous file transfer channel status of all child nodes;

[0048] If the command channel status of all child nodes in the node status table is abnormal, and the asynchronous file transfer channel status of all child nodes is also abnormal, then the master node is determined to be abnormal. A master node abnormality notification is then generated and sent to the terminal.

[0049] Thirdly, this application provides an electronic device, comprising:

[0050] Memory, used to store program instructions;

[0051] A processor is configured to invoke program instructions stored in the memory and execute the steps of the method described in any one of the first aspects according to the obtained program instructions.

[0052] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in any one of the first aspects.

[0053] Fifthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of the first aspects. Attached Figure Description

[0054] Figure 1 This is a schematic diagram illustrating an application scenario of a monitoring method provided in an embodiment of this application;

[0055] Figure 2 This is a schematic diagram of the overall process of a monitoring method provided in an embodiment of this application;

[0056] Figure 3 A flowchart illustrating a monitoring method for determining the status of a node command channel, provided in an embodiment of this application;

[0057] Figure 4 A flowchart illustrating a monitoring method for determining the status of an asynchronous file transfer channel of a node, provided in an embodiment of this application;

[0058] Figure 5 A flowchart illustrating a monitoring method for determining the target asynchronous file transfer channel port of a node, provided in an embodiment of this application;

[0059] Figure 6 A flowchart illustrating a monitoring method for determining whether a master node is abnormal, provided in an embodiment of this application;

[0060] Figure 7 A schematic diagram of a monitoring method apparatus provided in an embodiment of this application;

[0061] Figure 8 This is a schematic diagram of an electronic device for a monitoring method provided in an embodiment of this application. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0063] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and the embodiments of this application do not impose limitations.

[0064] The data collection, dissemination, and use in this application all comply with relevant national laws and regulations.

[0065] Before introducing a monitoring method provided by the embodiments of this application, for ease of understanding, the technical background of the embodiments of this application will be described in detail below.

[0066] Data processing systems typically require asynchronous data file transfer, necessitating the installation of a file transfer component client to facilitate data file interaction. Currently, the alarm monitoring method for asynchronous data file transfer involves individual nodes writing their own scripts to generate alarms, frequently resulting in no alarms, false alarms, or late alarms, hindering proactive detection and timely emergency response.

[0067] In view of this, this application proposes a monitoring method, apparatus, electronic device, and storage medium to solve the above-mentioned problems. The inventive concept of this application can be summarized as follows: periodically retrieving a cluster self-test information table from a database; based on the cluster self-test information table, determining the command channel status and asynchronous file transfer channel status of each child node in the cluster; wherein, the command channel status is used to determine whether the corresponding child node is receiving and processing commands normally, and the asynchronous file transfer channel status is used to determine whether the corresponding child node is performing asynchronous file transfer normally; generating a node status table based on the command channel status and asynchronous file transfer channel status of each child node; and sending the node status table to a terminal so that the terminal can handle abnormal nodes based on the node status table.

[0068] To facilitate understanding of the monitoring method provided in this application, the following description, in conjunction with the accompanying drawings, illustrates the monitoring method provided in this application:

[0069] like Figure 1 The diagram shown illustrates an application scenario of a monitoring method according to an embodiment of this application. The diagram includes: a master node 10, a database 20, and a child node 30; wherein:

[0070] The master node 10 periodically retrieves the cluster self-test information table from the database 20; based on the cluster self-test information table, it determines the command channel status and asynchronous file transfer channel status of each child node 30 in the cluster; wherein, the command channel status is used to determine whether the corresponding child node 30 is receiving and processing commands normally, and the asynchronous file transfer channel status is used to determine whether the corresponding child node 30 is performing asynchronous file transfer normally; based on the command channel status and asynchronous file transfer channel status of each child node 30, a node status table is generated; the node status table is sent to the terminal so that the terminal can handle abnormal nodes based on the node status table.

[0071] The description in this application details only a single master node 10, database 20, and child node 30. However, those skilled in the art should understand that the illustrated master node 10, database 20, and child node 30 are intended to represent the operation of the master node 10, database 20, and child node 30 involved in the technical solution of this application, and do not imply any limitation on the number, type, or location of the master node 10, database 20, and child node 30. It should be noted that adding additional modules to or removing individual modules from the illustrated environment will not change the underlying concept of the exemplary embodiments of this application. Furthermore, those skilled in the art will understand that the aforementioned data transmission and reception also need to be implemented through a network.

[0072] It should be noted that the database in this application embodiment can be, for example, a cache system, hard disk storage, memory storage, etc. Furthermore, the monitoring method proposed in this application is not only applicable to… Figure 1 The application scenarios shown are also applicable to any device with monitoring needs.

[0073] like Figure 2 The diagram shown is a schematic representation of the overall process of a monitoring method provided in an embodiment of this application, wherein:

[0074] In step 201: Periodically retrieve the cluster self-test information table from the database;

[0075] In step 202: Based on the cluster self-test information table, determine the command channel status of each child node in the cluster, and the asynchronous file transfer channel status of each child node; wherein, the command channel status is used to determine whether the corresponding child node is receiving and processing commands normally, and the asynchronous file transfer channel status is used to determine whether the corresponding child node is performing asynchronous file transfer normally.

[0076] In step 203: Based on the command channel status and asynchronous file transfer channel status of each child node, a node status table is generated;

[0077] In step 204: The node status table is sent to the terminal so that the terminal can process abnormal nodes based on the node status table.

[0078] This application enables simultaneous monitoring of multiple nodes by setting up a cluster self-check information table, and determines whether to issue an alarm based on the node's status, thereby improving the timeliness of node monitoring.

[0079] To facilitate a further understanding of the monitoring method provided in the embodiments of this application, the following describes the execution order of the embodiments of this application. Figure 2 The steps are explained in detail below:

[0080] First, the cluster self-test information table provided in this application embodiment is explained, as shown in Table 1, which is a table illustrating the field names, the length of each field, and the function of each field:

[0081]

[0082] Table 1

[0083] In the embodiments of this application, in order to promptly determine the command channel status and asynchronous file transfer channel status of each node, and then identify abnormal nodes based on the node status, it is necessary to periodically obtain the field values ​​of target fields from the cluster self-check information table. Table 2 shows the cluster self-check information table provided in the embodiments of this application, which includes:

[0084]

[0085]

[0086] Table 2

[0087] Since all nodes in this cluster share a single cluster self-check information table, the status of each task is determined based on the node identity field, the node command channel status field, and the asynchronous file transfer channel status field. This can be implemented as follows: For each node, determine the order of the node's identity field value among the values ​​of the identity field; and use the state represented by the field value in that order of the node's command channel status field as the state of the node's command channel.

[0088] For example, as shown in Table 2, the node identity identifier includes six child nodes. The field value of the identity identifier corresponding to child node 3 is the third in the order of the field values ​​corresponding to the identity identifier field. Therefore, the state represented by the third field value "0" in the field value corresponding to the node command channel status field is taken as the state corresponding to the command channel of child node 3.

[0089] In this application, 1 represents the normal state of the node's command channel and asynchronous file transfer channel, while 0 represents the abnormal state. It should be noted that this application provides only one embodiment; in specific implementations, other identifiers may be used to represent the node's command channel and asynchronous file transfer channel states, and this application does not limit this usage.

[0090] In some possible implementations, for each child node, the following can be used: Figure 3 The method shown determines the command channel status of each child node, where:

[0091] In step 301: Control the child node to periodically send the first self-test message to the command channel port of the child node;

[0092] In step 302: If a first reply message is received from the command channel port within the first preset time period, the command channel status of the child node is determined to be normal.

[0093] In step 303: If no first reply message is received from the command channel port within the first preset time period, the command channel status of the child node is determined to be abnormal.

[0094] For example, if the command channel port corresponding to node A is port A, then the master node controls node A to periodically send the first self-test message to port A, and the first duration is set to 0.5 seconds. If the first reply message sent by port A is received within 0.5 seconds, then the command channel status of node A is determined to be normal; otherwise, the command channel status of node A is determined to be abnormal.

[0095] It should be noted that, in the embodiments of this application, the period during which the master node queries the cluster self-test information table and the period during which the child node sends the first self-test message can be the same or different. This application does not impose any restrictions on this, and those skilled in the art can set it according to their needs.

[0096] In this application, the command channel status of each child node is self-checked by sending a first self-check message, thus achieving accurate monitoring of the command channel status of each child node.

[0097] In some other possible embodiments, for each child node, the following approach can be adopted: Figure 4 The method shown determines the asynchronous file transfer channel status for each child node, where:

[0098] In step 401: Periodically send a second self-test message to the target asynchronous file transfer channel port of the child node;

[0099] In this application, considering that each child node has multiple asynchronous file transfer channel ports, in order to save resources consumed during the child node self-test process, the embodiments of this application can be implemented as follows: Figure 5 The steps shown determine the target asynchronous file transfer channel port corresponding to each child node, where:

[0100] In step 501: the control child node establishes a connection with the target node; whereby the target node is the server node that communicates with the cluster to which the child node belongs;

[0101] In step 502: Receive the target port identifier sent by the target node;

[0102] In step 503: the asynchronous file transfer channel port indicated by the target port identifier is used as the target asynchronous file transfer channel port.

[0103] For example: For child node A, there are 100 asynchronous file transfer channel ports corresponding to child node A. The asynchronous file transfer channel port indicated by the target port identifier sent by the target node is the 5th one. Then, the 5th asynchronous file transfer channel port is taken as the target asynchronous file transfer channel port.

[0104] In this application, by determining the target asynchronous file transfer channel port, the waste of resources caused by traversing all asynchronous file transfer channel ports is avoided.

[0105] In step 402: If a second reply message is received from the target asynchronous file transfer channel port within the second preset time period, then the target asynchronous file transfer channel status of the child node is determined to be normal.

[0106] In step 403: If no second reply message is received from the target asynchronous file transfer channel port within the second preset time period, the target asynchronous file transfer channel status of the child node is determined to be abnormal.

[0107] For example, if the target asynchronous file transfer channel port corresponding to node A is port 5, then the master node controls node A to periodically send a second self-test message to port 5, and the second duration is set to 0.5 seconds. If the first reply message sent by port 5 is received within 0.5 seconds, then the target asynchronous file transfer channel status of node A is determined to be normal; otherwise, the target asynchronous file transfer channel status of node A is determined to be abnormal.

[0108] It should be noted that, in the embodiments of this application, the period during which the master node queries the cluster self-test information table and the period during which the child node sends the second self-test message can be the same or different. This application does not limit this, and those skilled in the art can set it according to their needs.

[0109] In some possible embodiments, the master node may fail. In this application, to facilitate timely detection and handling of node failures, it can be achieved through methods such as... Figure 6 The steps shown are for determining whether the master node has failed, wherein:

[0110] In step 601: Traverse the command channel status of all child nodes in the node status table, and the asynchronous file transfer channel status of all child nodes;

[0111] In step 602: If the command channel status of all child nodes in the node status table is abnormal, and the asynchronous file transfer channel status of all child nodes is abnormal, then the master node is determined to be abnormal.

[0112] In step 603: Generate a master node exception notification and send the master node exception notification to the terminal.

[0113] For example, the node status table is shown in Table 3:

[0114]

[0115]

[0116] Table 3

[0117] Iterate through the command channel status of all child nodes in the node status table, as well as the asynchronous file transfer channel status of all child nodes. If it is determined that the command channel status of all child nodes is abnormal and the asynchronous file transfer channel status of all child nodes is also abnormal, then it is determined that the master node has encountered an abnormality, and a master node abnormality notification is generated.

[0118] In this embodiment, the status of the master node is accurately monitored by considering the command channel status and asynchronous file transfer channel status of each child node.

[0119] like Figure 7 As shown, based on the same inventive concept, a monitoring device 700 is proposed, comprising:

[0120] The acquisition module 7001 is used to periodically retrieve the cluster self-test information table from the database;

[0121] The status determination module 7002 is used to determine the command channel status of each child node in the cluster and the asynchronous file transfer channel status of each child node based on the cluster self-test information table; wherein, the command channel status is used to determine whether the corresponding child node receives and processes commands normally, and the asynchronous file transfer channel status is used to determine whether the corresponding child node performs asynchronous file transfer normally.

[0122] The generation module 7003 is used to generate a node status table based on the command channel status and asynchronous file transfer channel status of each child node;

[0123] The sending module 7004 is used to send the node status table to the terminal so that the terminal can process abnormal nodes based on the node status table.

[0124] In some possible embodiments, the command channel status of each child node is determined as follows:

[0125] Control the child node to periodically send a first self-test message to the command channel port of the child node;

[0126] If a first reply message is received from the command channel port within a first preset time period, the command channel status of the child node is determined to be normal.

[0127] If no first reply message is received from the command channel port within the first preset time period, the command channel status of the child node is determined to be abnormal.

[0128] In some possible embodiments, the asynchronous file transfer channel status of each child node is determined as follows:

[0129] A second self-test message is periodically sent to the target asynchronous file transfer channel port of the child node;

[0130] If a second reply message is received from the target asynchronous file transfer channel port within the second preset time period, then the target asynchronous file transfer channel status of the child node is determined to be normal.

[0131] If no second reply message is received from the target asynchronous file transfer channel port within the second preset time period, the target asynchronous file transfer channel status of the child node is determined to be abnormal.

[0132] In some possible embodiments, the target asynchronous file transfer channel port is determined in the following manner:

[0133] Control the child node to establish a connection with the target node; wherein, the target node is a server node that communicates with the cluster to which the child node belongs;

[0134] Receive the target port identifier sent by the target node;

[0135] The asynchronous file transfer channel port indicated by the target port identifier is used as the target asynchronous file transfer channel port.

[0136] In some possible embodiments, the generation module executes on the command channel status and asynchronous file transfer channel status of each child node, and after generating the node status table, it is further configured as follows:

[0137] Traverse the command channel status of all child nodes in the node status table, and the asynchronous file transfer channel status of all child nodes;

[0138] If the command channel status of all child nodes in the node status table is abnormal, and the asynchronous file transfer channel status of all child nodes is also abnormal, then the master node is determined to be abnormal. A master node abnormality notification is then generated and sent to the terminal.

[0139] Having described the monitoring method and apparatus according to exemplary embodiments of this application, we will now describe an electronic device according to another exemplary embodiment of this application.

[0140] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."

[0141] In some possible implementations, the electronic device according to this application may include at least one processor and at least one memory. The memory stores program code that, when executed by the processor, causes the processor to perform the steps of the monitoring methods described above according to various exemplary embodiments of this application.

[0142] The following reference Figure 8 To describe an electronic device 130 according to this embodiment of the present application. Figure 8 The electronic device 130 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0143] like Figure 8 As shown, the electronic device 130 is presented in the form of a general-purpose electronic device. The components of the electronic device 130 may include, but are not limited to: at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including memory 132 and processor 131).

[0144] Bus 133 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.

[0145] The memory 132 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.

[0146] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0147] Electronic device 130 can also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable a user to interact with electronic device 130, and / or with any device that enables electronic device 130 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 135. Furthermore, electronic device 130 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 136. As shown, network adapter 136 communicates with other modules used in electronic device 130 via bus 133. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0148] In some possible implementations, various aspects of the monitoring method provided in this application can also be implemented in the form of a program product, which includes program code that, when the program product is run on a computer device, causes the computer device to perform the steps in a monitoring method according to various exemplary embodiments of this application as described above.

[0149] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0150] The monitoring program product of the embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0151] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take many forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0152] The program code contained on the readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wired, fiber optic, RF, etc., or any suitable combination thereof.

[0153] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's electronic device, partially on the user's device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).

[0154] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0155] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0156] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0157] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0158] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0159] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0160] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A monitoring method characterized by, The method applied to a master node in a cluster comprises: periodically obtaining a cluster self-check information table from a database; wherein the self-check information table comprises a node identity field, a field value of a node command channel state field corresponding to the node, and a field value of a node asynchronous file transfer channel state field; controlling a sub-node to periodically send a first self-check message to a command channel port of the sub-node; if a first reply message sent by the command channel port is received within a first preset time period, determining that the command channel state of the sub-node is normal; if the first reply message sent by the command channel port is not received within the first preset time period, determining that the command channel state of the sub-node is abnormal; periodically sending a second self-check message to a target asynchronous file transfer channel port of the sub-node; if a second reply message sent by the target asynchronous file transfer channel port is received within a second preset time period, determining that the target asynchronous file transfer channel state of the sub-node is normal; if the second reply message sent by the target asynchronous file transfer channel port is not received within the second preset time period, determining that the target asynchronous file transfer channel state of the sub-node is abnormal; based on the cluster self-check information table, determining the command channel state of each sub-node in the cluster and the asynchronous file transfer channel state of each sub-node; wherein the command channel state is used to determine whether the corresponding sub-node normally receives and processes commands, and the asynchronous file transfer channel state is used to determine whether the corresponding sub-node normally performs asynchronous file transfer; for each node, determining the order of the field value corresponding to the node identity field in the field value corresponding to the identity field; taking the state represented by the field value in the order in the field value corresponding to the node command channel state field as the state of the node command channel; determining the order of the field value corresponding to the node identity field in the field value corresponding to the identity field; taking the state represented by the field value in the order in the field value corresponding to the node asynchronous file transfer channel state field as the state of the node asynchronous file transfer channel; generating a node state table based on the command channel state and the asynchronous file transfer channel state of each sub-node; sending the node state table to a terminal to enable the terminal to process abnormal nodes based on the node state table.

2. The method of claim 1, wherein, The target asynchronous file transfer channel port is determined by the following method: controlling the sub-node to establish a connection with a target node; wherein the target node is a server node that communicates with the cluster to which the sub-node belongs; receiving a target port identifier sent by the target node; taking the asynchronous file transfer channel port indicated by the target port identifier as the target asynchronous file transfer channel port.

3. The method of claim 1, wherein, After generating the node state table based on the command channel state and the asynchronous file transfer channel state of each sub-node, the method further comprises: traversing the command channel state of all sub-nodes in the node state table and the asynchronous file transfer channel state of all sub-nodes; If the command channel state of all the child nodes in the node state table is an abnormal state, and the asynchronous file transfer channel state of all the child nodes is an abnormal state, it is determined that the master node is abnormal, a master node abnormality notification is generated, and the master node abnormality notification is sent to the terminal.

4. A monitoring device, characterized in that The application is applied to a master node in a cluster, and the device comprises: An acquisition module is configured to periodically acquire a cluster self-check information table from a database, wherein the self-check information table comprises a node identity field, a field value of a node command channel state field corresponding to the node, and a field value of a node asynchronous file transfer channel state field; A state determination module is configured to periodically send a first self-check message to a command channel port of a child node, determine that the command channel state of the child node is a normal state if a first reply message sent by the command channel port is received within a first preset time period, determine that the command channel state of the child node is an abnormal state if the first reply message sent by the command channel port is not received within the first preset time period, periodically send a second self-check message to a target asynchronous file transfer channel port of the child node, determine that the target asynchronous file transfer channel state of the child node is a normal state if a second reply message sent by the target asynchronous file transfer channel port is received within a second preset time period, and determine that the target asynchronous file transfer channel state of the child node is an abnormal state if the second reply message sent by the target asynchronous file transfer channel port is not received within the second preset time period; determine the command channel state of each child node in the cluster and the asynchronous file transfer channel state of each child node based on the cluster self-check information table; wherein the command channel state is used to determine whether the corresponding child node normally receives and processes a command, and the asynchronous file transfer channel state is used to determine whether the corresponding child node normally performs asynchronous file transfer; for each node, determine the order of the field value corresponding to the node identity field in the field value corresponding to the identity field; take the state represented by the field value in the order in the field value corresponding to the node command channel state field as the state of the command channel of the node; determine the order of the field value corresponding to the node identity field in the field value corresponding to the identity field; and take the state represented by the field value in the order in the field value corresponding to the node asynchronous file transfer channel state field as the asynchronous file transfer channel state of the node; A generation module is configured to generate a node state table based on the command channel state and the asynchronous file transfer channel state of each child node. A sending module is configured to send the node state table to a terminal, so that the terminal processes an abnormal node based on the node state table.

5. The apparatus of claim 4, wherein, The target asynchronous file transfer channel port is determined in the following manner: The child node is controlled to establish a connection with a target node; wherein the target node is a server node that communicates with a cluster to which the child node belongs; A target port identifier sent by the target node is received. The target asynchronous file transfer channel port indicated by the target port identification is taken as the target asynchronous file transfer channel port.

6. The apparatus of claim 4, wherein, The generation module, after generating the node state table according to the command channel state and the asynchronous file transfer channel state of each sub-node, is further configured to: traverse the command channel state of all sub-nodes in the node state table and the asynchronous file transfer channel state of all sub-nodes in the node state table; if the command channel state of all sub-nodes in the node state table is an abnormal state and the asynchronous file transfer channel state of all sub-nodes in the node state table is an abnormal state, it is determined that the master node is abnormal, a master node abnormality notification is generated, and the master node abnormality notification is sent to the terminal.

7. An electronic device, comprising: comprise: a memory for storing program instructions; a processor for invoking the program instructions stored in the memory to perform the steps included in the method according to any one of claims 1-3 according to the obtained program instructions.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program comprises program instructions, which, when executed by a computer, cause the computer to execute the method according to any one of claims 1-3.

9. A computer program product, characterised in that, The computer program product comprises computer program code, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Data processing method and device, equipment and storage medium

    CN112764968A

  • Fault positioning system, method and calculation device

    CN113992501A