Node probing method, apparatus, device, medium, and product

By allocating detection tasks among nodes and using target detection nodes, the problem of low efficiency and accuracy in detecting massive numbers of nodes is solved, achieving efficient and accurate node status monitoring and reducing server resource requirements.

CN118802632BActive Publication Date: 2025-11-28CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410395302.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-02
Publication Date
2025-11-28
Estimated Expiration
2044-04-02

AI Technical Summary

Technical Problem

Existing technologies suffer from low detection efficiency and accuracy when detecting massive numbers of nodes, require high server performance, and necessitate a large amount of resources.

Method used

By generating detection tasks and assigning target detection nodes to perform inter-node detection, high-frequency active detection or heartbeat detection on the platform side is replaced by high-frequency availability detection using target detection nodes.

Benefits of technology

It improves the efficiency and accuracy of node detection, reduces the consumption of platform resources, and lowers server pressure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802632B_ABST
    Figure CN118802632B_ABST
Patent Text Reader

Abstract

The application relates to the computer field and provides a node detection method, device, equipment, medium and product. The method comprises the following steps: in response to a detection request of a to-be-detected node, a detection task for detecting the to-be-detected node is generated; the detection request carries first node information of the to-be-detected node; at least one target detection node is allocated to the to-be-detected node based on the first node information; the target detection node is a node capable of detecting the to-be-detected node; the detection task is sent to the at least one target detection node, and the target detection node detects the node state of the to-be-detected node based on the detection task. According to the application, the detection task is distributed to each target detection node, the calculation power resources required for detection are dispersed, the detection efficiency and detection accuracy of node detection are improved, and a large number of nodes can be detected.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a node detection method, device, equipment, medium and product. BACKGROUND

[0002] There are mainly two ways to detect nodes in the related art: one is that a node end reports a node state to a platform side through a regular heartbeat, and the platform side determines whether the node is abnormal according to the reported node state or whether the node end reports the state within a specified period, which is referred to as a heartbeat scheme; the other is that the platform side actively traverses a detection interface provided by a node to obtain node availability information, which is referred to as an active detection scheme. These two schemes can timely find abnormal nodes when the number of nodes is small, but when the number of nodes reaches hundreds of thousands, millions or even tens of millions, the performance of the platform side server becomes a bottleneck, a large number of server resources need to be invested, the requirement for server performance is extremely high, and the detection efficiency and detection accuracy are both low.

[0003] Therefore, how to detect a large number of nodes and improve the detection efficiency and detection accuracy of nodes has become a technical problem to be solved in the industry. SUMMARY

[0004] The present application provides a node detection method, device, equipment, medium and product to solve the technical problem of how to detect a large number of nodes and improve the detection efficiency and detection accuracy of nodes in the prior art.

[0005] In a first aspect, the present application provides a node detection method applied to a detection control module, and the method comprises:

[0006] In response to a detection request of a to-be-detected node, a detection task for detecting the to-be-detected node is generated; the detection request carries first node information of the to-be-detected node;

[0007] At least one target detection node is allocated to the to-be-detected node based on the first node information; the target detection node is a node capable of detecting the to-be-detected node;

[0008] The detection task is sent to the at least one target detection node; wherein the target detection node detects a node state of the to-be-detected node based on the detection task.

[0009] In some embodiments, after the detection task is sent to the at least one target detection node, the method further comprises:

[0010] In the case where the abnormal information of the to-be-detected node sent by a master node in each target detection node is received, the abnormal information is sent to a resource tracking module of a platform side;

[0011] When the node to be detected in the resource tracking module is online, the node to be detected is initialized.

[0012] The master control node is used to notify each target detection node to detect the node to be detected when it receives the detection result of the node to be detected sent by any target detection node, and to generate the abnormal information based on the detection results corresponding to each target detection node.

[0013] In some embodiments, after sending the detection task to the at least one target detection node, the method further includes:

[0014] Receive a supplementary detection node request sent by the node to be detected; the supplementary detection node request carries the second node information of the current detection node that is currently detecting the node to be detected;

[0015] Based on the first node information and the second node information, additional nodes are added to detect the node to be detected;

[0016] The supplementary detection node request is generated by the node to be detected when the number of current detection nodes is less than a preset threshold.

[0017] In some embodiments, the first node information includes the service range of the node to be detected; the step of allocating at least one target detection node to the node to be detected based on the first node information includes:

[0018] Based on the service range, candidate nodes are obtained from each detection node;

[0019] The target detection node is selected from the candidate nodes based on the current number of detections of each candidate node, or the target detection node is selected from the candidate nodes based on the communication relationship between the node to be detected and each candidate node.

[0020] In some embodiments, any target detection node stores a list of identifiers of the nodes to be detected; the identifier list records the node identifiers of each target detection node in sequence based on the detection order of the nodes to be detected.

[0021] The master control node is the target detection node ranked first in the identifier list.

[0022] In some embodiments, prior to responding to a probe request from the node to be probed, the method further includes:

[0023] Receive the public network protocol port probe request sent by the node to be probed, and return the public network protocol and port information corresponding to the node to be probed to the node to be probed;

[0024] receiving the external service interface and the health detection interface of the to-be-detected node returned by the to-be-detected node;

[0025] The public network protocol port detection request is generated by the to-be-detected node in a case where the to-be-detected node is started, and carries the node identifier and the service type of the to-be-detected node; and the health detection interface is used to monitor the node state of the to-be-detected node.

[0026] In a second aspect, a node detection method is provided, applied to a target detection node, and the method comprises:

[0027] receiving a detection task of detecting a to-be-detected node;

[0028] detecting the node state of the to-be-detected node based on the detection task;

[0029] The detection task is generated by a dispatch center or the to-be-detected node based on a detection request of the to-be-detected node, the detection request carries first node information of the to-be-detected node, and the first node information is used to determine a target detection node of the to-be-detected node.

[0030] In a third aspect, a node detection device is provided, comprising:

[0031] a response module, configured to generate a detection task of detecting a to-be-detected node in response to a detection request of the to-be-detected node, and the detection request carries first node information of the to-be-detected node;

[0032] an allocation module, configured to allocate at least one target detection node for the to-be-detected node based on the first node information, and the target detection node is a node capable of detecting the to-be-detected node;

[0033] a detection module, configured to send the detection task to the at least one target detection node, and the target detection node detects the node state of the to-be-detected node based on the detection task.

[0034] In a fourth aspect, an electronic device is provided, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to execute the computer program to implement the above method.

[0035] In a fifth aspect, a non-transitory computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the above method.

[0036] In a sixth aspect, an embodiment of the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described above.

[0037] The node detection method, device, equipment, medium and product provided by the embodiments of the present application generate a detection task through a detection request of a to-be-detected node, and allocate at least one target detection node for the to-be-detected node according to first node information of the to-be-detected node, so that the detection task is sent to the target detection node to realize detection between nodes. The detection between nodes replaces the platform-side active detection or heartbeat detection at a high frequency, so that each to-be-detected node can be detected at a high frequency by at least one target detection node, and the platform side does not need to detect each to-be-detected node, thereby dispersing the computing power resources required for detection, detecting a large number of nodes, and improving the detection efficiency and detection accuracy of node detection. BRIEF DESCRIPTION OF DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0039] Figure 1 One of the flowcharts of the node detection method provided by the embodiments of the present application;

[0040] Figure 2 The structural diagram of the node detection system provided by the embodiments of the present application;

[0041] Figure 3 The second flowchart of the node detection method provided by the embodiments of the present application;

[0042] Figure 4 The third flowchart of the node detection method provided by the embodiments of the present application;

[0043] Figure 5 The structural diagram of the node detection device provided by the embodiments of the present application;

[0044] Figure 6 The structural diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0045] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0046] It should be noted that the terms "first", "second" and the like in the present application are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or modules does not have to be limited to those steps or modules clearly listed, but can include other steps or modules not clearly listed or inherent to these processes, methods, products or devices.

[0047] Figure 1 One of the flowcharts of the node detection method provided by the embodiments of the present application is shown in FIG. 1, which includes steps 110, 120 and 130. The method flowchart steps are only one possible implementation of the present application. Figure 1

[0048] Step 110, in response to a detection request of a to-be-detected node, generating a detection task for detecting the to-be-detected node; the detection request carries first node information of the to-be-detected node.

[0049] Specifically, the node detection method provided by the embodiments of the present application is applicable to a node detection system. Figure 2 The structural diagram of the node detection system provided by the embodiments of the present application is shown in FIG. 2, which includes a platform side and an end side. Figure 2

[0050] The platform side refers to one side of the total control platform, including a scheduling center. The scheduling center is mainly responsible for the scheduling of user resource requests, and provides services by allocating available nodes storing the resources.

[0051] The platform side core module mainly includes a resource tracking module and a detection control module. The resource tracking module is mainly used for resource distribution, indexing and tracking, and provides the scheduling center with the ability to query the cache node according to the resource; the detection control module is mainly used for node service state maintenance, detection task allocation, etc., and provides the scheduling center with the node service availability query capability.

[0052] ​​The detection control module can be centrally deployed, can be deployed in a distributed manner, and can be further sunk to stable nodes, for example, reliable nodes in a certain range are selected to integrate the detection control module to provide services, and the computing power is further sunk, that is, the detection control module can be sunk to the node level, and the computing resources and capabilities of the nodes can be used to support the operation and service provision of the system, thereby further reducing the resource consumption of the platform side. Figure 2 The detection control module in the platform side is provided in the platform side, and the detection control module in the present application can also be provided in the end side.

[0053] The platform side device can be various electronic devices, including but not limited to servers, smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0054] The end side refers to the node end, and the node can be a peer-to-peer content delivery network (PCDN) node, which is not limited herein. The PCDN node is mainly used for caching resources distributed by the resource tracking module and providing content distribution services to the outside.

[0055] The to-be-detected node refers to a node that is detected by other nodes; the detection node refers to a node used for detecting other nodes.

[0056] Each node can be a to-be-detected node and a detection node at the same time. The to-be-detected node and the detection node can be mutually detected and cooperatively supervised only in a small group, or can not be grouped, and each to-be-detected node can be periodically detected and abnormally cooperatively detected by a part of detection nodes in its service range (such as the same network segment, the same autonomous system number (ASN) domain routing, and the same ASN).

[0057] Node detection refers to detection and monitoring of service availability of the node. In order to improve detection accuracy, each to-be-detected node can correspond to multiple detection nodes, and the number of detection nodes required by each to-be-detected node can be set to a threshold according to the overall volatility of the to-be-detected nodes in the region to avoid excessive detection, and the number of nodes that can be detected by each detection node can also be set to a threshold according to the hardware configuration and network status of the detection node to ensure the timeliness and stability of detection.

[0058] The service interface module and the detection agent module can be deployed in the node, and the detection control module can also be deployed in the node.

[0059] When the detection control module is deployed in the dispatch center, the to-be-detected node generates a detection request and sends it to the dispatch center; when the detection control module is deployed in the to-be-detected node, the to-be-detected node generates a detection request and sends it to the detection control module of the to-be-detected node to generate a detection task.

[0060] For the detection node, the detection agent module is configured to obtain a detection task from the detection control module, periodically detect the to-be-detected node corresponding to the detection node, and perform abnormal cooperative detection and abnormal reporting.

[0061] For the to-be-detected node, the detection agent module is configured to periodically obtain node state data of the to-be-detected node, including load, storage, bandwidth, and service interface detection data, and report the data to the dispatch center. When the number of service interface detection IDs is found to be small, a supplementary detection node process can be initiated, that is, when the number of detection nodes for detecting the to-be-detected node is found to be small, the to-be-detected node can apply for adding detection nodes.

[0062] The service module is configured to provide PCDN services and provide an external health detection interface. After receiving a detection request sent by the to-be-detected node each time, the service module synchronizes information to the node detection agent module. When the health detection interface responds, it carries a recent detection node ID list. The health detection interface is configured to monitor the node state of the to-be-detected node, that is, the health detection interface can be used to determine whether the to-be-detected node is abnormal.

[0063] At least part of the function of one or more of the above modules can be combined with at least part of the function of other modules and implemented in one module.

[0064] The node detection method provided by the embodiments of the present application has an execution subject of a node detection device. The device can be a hardware device independently arranged in the detection control module, or a software program running in the detection control module.

[0065] The detection request is a request for detecting the to-be-detected node. When the to-be-detected node is just started, the to-be-detected node sends a detection request to the detection control module, and the detection control module generates a detection task according to the detection request.

[0066] The first node information can include a node ID, a service type, an external service interface, and a corresponding health detection uniform resource locator (URL) address of the to-be-detected node.

[0067] Step 120: allocating at least one target detection node for the to-be-detected node based on the first node information; the target detection node is a node capable of detecting the to-be-detected node.

[0068] Specifically, the detection control module allocates at least one target detection node for the to-be-detected node according to the first node information of the node and a preset allocation principle.

[0069] The allocation principle of the detection node can be various, including but not limited to unified allocation management by the platform side, provision of a redundant list by the platform, autonomous selection of a part of the to-be-detected node, or autonomous detection and negotiation of the detection node by the to-be-detected node through a decentralized manner such as a distributed hash table (DHT).

[0070] The target detection node refers to a currently determined detection node capable of detecting the to-be-detected node.

[0071] Step 130, sending the detection task to at least one target detection node, wherein the target detection node detects the node state of the to-be-detected node based on the detection task.

[0072] Specifically, after the detection control module determines the target detection node corresponding to the to-be-detected node, the generated detection task is issued to at least one target detection node.

[0073] After receiving the detection task, the target detection node analyzes the detection task and then detects the to-be-detected node.

[0074] The detection node can detect the to-be-detected node in multiple dimensions in real time, and the detection is more comprehensive and efficient.

[0075] The node detection method provided by the embodiments of the present application generates a detection task through a detection request of a to-be-detected node, allocates at least one target detection node for the to-be-detected node according to the first node information of the to-be-detected node, and sends the detection task to the target detection node to realize detection between nodes. Through the detection between nodes, the high-frequency active detection or heartbeat detection on the platform side is replaced, so that each to-be-detected node can be detected by at least one target detection node, and the platform side does not need to detect each to-be-detected node, thereby dispersing the computing resource required for detection, detecting a large number of nodes, and improving the detection efficiency and detection accuracy of node detection.

[0076] It should be noted that each embodiment of the present application can be freely combined, the order can be changed, or each embodiment can be executed independently, and does not need to rely on or depend on a fixed execution order.

[0077] In some embodiments, before step 110, the method further comprises:

[0078] Receiving the acquisition public network protocol port detection request sent by the to-be-detected node, and returning the public network protocol and port information corresponding to the to-be-detected node to the to-be-detected node;

[0079] Receive the external service interface and health detection interface of the node to be detected returned by the node to be detected;

[0080] The public network protocol port probe request is generated by the node to be probed when the node to be probed is started; the public network protocol port probe request carries the node identifier and service type of the node to be probed; the health probe interface is used to monitor the node status of the node to be probed.

[0081] Specifically, Figure 3 This is a second schematic flowchart of the node detection method provided in the embodiments of this application, as shown below. Figure 3 As shown, when the node to be probed starts up, it first notifies the probe proxy module, which then performs Network Address Translation (NAT) traversal (using the port listened to locally by the PCDN service to actively send packets to the public network, generating a NAT mapping on the NAT device) and public Internet Protocol (IP) and port probe. Then, it starts the service interface, and the probe proxy module reports the service interface and the corresponding health probe URL to the probe control module. For the initial probe, the platform can perform an online check on the node. After passing the online check, the node's service will be managed and tracked by the platform's resource tracking service, and will officially provide services externally through the scheduling center. The detailed process is as follows:

[0082] When the node to be probed service module starts up, it synchronizes the local service interface information (mainly including service type and local port to be listened to) to the probe proxy module.

[0083] The detection agent module will use the service interface to send a public IP port detection request to the dispatch center detection control module through the local port being listened to. The request will carry information such as the ID of the node to be detected and the service type.

[0084] After receiving the request, the detection control module extracts the node ID, marks the node status as pending online, obtains its corresponding public IP and port from the socket, and responds to the detection proxy module.

[0085] After receiving the corresponding public IP address and port, the detection proxy module synchronizes them with the service module.

[0086] Once the service module receives the corresponding public IP address and port, it immediately starts listening to the service interface and synchronizes the external service interface and the corresponding health detection URL address to the detection proxy module.

[0087] After receiving the external service interface and the corresponding health detection URL, the detection agent module reports it to the detection control module of the scheduling center.

[0088] After the probe control module receives the request, the target probe node is allocated to detect the to-be-probed node.

[0089] After the probe agent module of the target probe node receives the probe task, the service module health probe interface of the to-be-probed node is probed.

[0090] After the to-be-probed node service module health probe first receives the probe request sent by the target probe node, on the one hand, a quick response code and a node ID are responded, and on the other hand, the received probe interface and ID information are synchronized to the probe agent module of the node.

[0091] The probe agent node aggregates all service interface probe results of the to-be-probed node and locally caches them, and when the first probe or an exception is found, the probe results are reported to the probe control module of the dispatch center.

[0092] After the probe control module receives the probe results of the current probe task, the type and public network IP and port information of the node that can be served are synchronized to the resource tracking service, and the node is marked as online.

[0093] The node probe method provided by the embodiment of the application provides an information basis for subsequent allocation of the target probe node by counting the related information of the to-be-probed node to the probe control module when the to-be-probed node is started, and improves the allocation efficiency.

[0094] In some embodiments, after step 130, the method further includes:

[0095] In the case where the abnormal information of the to-be-probed node sent by the master node in each target probe node is received, the abnormal information is sent to the resource tracking module on the platform side;

[0096] In the case where the resource tracking module analyzes the online state of the to-be-probed node, the to-be-probed node is initialized;

[0097] The master node is configured to, in the case where the probe result of the to-be-probed node sent by any target probe node is received, notify each target probe node to probe the to-be-probed node, and generate abnormal information based on each probe result corresponding to each target probe node.

[0098] After step 130, the method further includes:

[0099] The supplementary probe node request sent by the to-be-probed node is received, and the second node information of the current probe node currently probing the to-be-probed node is carried in the supplementary probe node request;

[0100] Based on the first node information and the second node information, a node probing the to-be-probed node is added.

[0101] The supplementary probe node request is generated by the to-be-probed node when the number of current probe nodes is less than a preset threshold.

[0102] Specifically, after the to-be-probed node completes the online probe and formally provides services, the probe agent module will periodically count the number of target probe nodes corresponding to the to-be-probed node. In order to ensure the monitoring quality, when the number of target probe nodes of the to-be-probed node is small, the process of supplementing probe nodes can be initiated.

[0103] When any target probe node finds that the to-be-probed node probes abnormally, the target probe node will immediately notify the master node, requiring other target probe nodes to quickly detect the service module health probe interface of the abnormal to-be-probed node in cooperation. After the master node aggregates the detection results to obtain abnormal information, the abnormal information is reported, and other target probe nodes are notified to end the detection task of the to-be-probed node.

[0104] The probe control module synchronizes the public network IP and port information corresponding to the abnormal service interface to the resource tracking service. If the platform side finds that the to-be-probed node is actually online, only the service module health probe interface is unavailable (may be only network abnormality, such as optical modem restart causing public network IP and port change), the node will be reinitialized and started through the original heartbeat notification.

[0105] Figure 4 A third flowchart of the node probing method provided by the embodiment of the application is shown in FIG. 3. As shown in FIG. 3, the to-be-probed node D has two target probe nodes A and B, that is, the probing targets of the target probe nodes A and B are the same. The probe node supplementing process and the abnormality cooperative probing process are as follows. Figure 4

[0106] Step 1: The probe agent module of the master node B periodically (high frequency) probes the service module health probe interface of the to-be-probed node D and carries the to-be-probed node ID and the node ID of the probe node B.

[0107] Step 2: The service module health probe interface of the to-be-probed node D responds to the protocol status code, the node ID and node state of the to-be-probed node D, and the target probe node ID list and other information.

[0108] Step 3: The to-be-probed node D service module synchronizes the detected situation and the target probe node ID to the probe agent module.

[0109] ​Step 4, the detection agent module of the to-be-detected node D counts the number of target detection nodes of normal detection, and when the number is small, a supplementary detection node process can be initiated, and meanwhile, it can be compared whether the to-be-detected node ID in step 1 is the same as the node ID of the to-be-detected node D. If they are not the same, it is possible that the public network IP port of the to-be-detected node serving externally has changed, and an abnormal situation can be reported to the detection control module for further processing.

[0110] Step 5, when the detection agent module of the to-be-detected node D finds that the number of detection nodes is small, it generates a supplementary detection node request to report the service interface of the current detection node and the corresponding detection node ID list to the detection control module. The second node information can include the service interface of the current detection node and the corresponding detection node ID list.

[0111] Step 6, the detection control module adds a new detection node for the to-be-detected node D according to a preset threshold condition.

[0112] Step 7, the detection control module informs the newly allocated detection node C to perform periodic detection on the to-be-detected node D.

[0113] Step 8, the detection node C detects the service module service interface of the to-be-detected node D and carries the node ID of the to-be-detected node D and the node ID of the detection node C.

[0114] Step 9, the to-be-detected node D service module health detection interface responds to the protocol status code, the node ID and the node state of the to-be-detected node D, and the detection node ID list and other information.

[0115] Step 10, the to-be-detected node D service module synchronizes the detected situation and the detection node ID to the detection agent module.

[0116] Step 11, the to-be-detected node D detection agent module counts the number of current detection nodes of normal detection, and when the number of current detection nodes is less than a preset threshold, it can apply for increasing detection nodes, and meanwhile, it can be compared whether the to-be-detected node ID in step 8 is the same as the node ID of the to-be-detected node D. If they are not the same, it is possible that the public network IP port of the to-be-detected node serving externally has changed, and an abnormal situation can be reported to the detection control module for further processing.

[0117] Step 12, after receiving the response of the to-be-detected node D service module health detection interface, the detection node C judges whether the node is a master node. If it is not a master node, it actively establishes contact with the master node B.

[0118] Step 13, the detection agent module of the ordinary node A, i.e., the non-master node A, detects the to-be-detected node D service module health detection interface and carries the to-be-detected node ID and the node ID of the master node B.

[0119] Step 14, if the common node A detects that the service module health detection interface of the to-be-detected node D is abnormal, the common node A detection agent module notifies the master node B that the to-be-detected node D has an abnormality and needs to be further detected by other detection nodes.

[0120] Step 15, the master node B coordinates the common node C to perform cooperative rapid detection, and the master node B also starts rapid detection. The master node B and the common node C perform rapid detection on the service module health detection interface of the to-be-detected node D.

[0121] Step 16, the common node C feeds back the detection result to the master node B. The master node B collects and summarizes the detection results to confirm that the to-be-detected node D has an abnormality and generates abnormality information.

[0122] Step 17, the master node B reports the abnormality information to the detection control module, and notifies the common nodes C and A to end the detection task of the to-be-detected node D, and only the common node C ends the detection task of the to-be-detected node D.

[0123] Step 18, the detection control module synchronizes the abnormality of the to-be-detected node D to the resource tracking module. The resource tracking module excludes the to-be-detected node D, that is, does not provide the node to the outside during scheduling, and checks whether the node is online (such as whether the periodic heartbeat is normal), and if the node is online, attempts to perform a service start initialization process by responding to the heartbeat.

[0124] Step 19, if the to-be-detected node D receives the heartbeat response, it starts the initialization process as required.

[0125] For the cooperation mode between the detection nodes of the same to-be-detected node, gossip, Paxos, Raft and other consistency protocols can be directly used for master selection and detection task and result data synchronization. Gossip, Paxos and Raft are consistency protocols commonly used in distributed systems, which are used for coordination and data synchronization between different nodes to ensure consistency of the system in the face of node failure or network partition and the like. These protocols can help distributed systems achieve high availability and fault tolerance.

[0126] The node detection method provided by the embodiment of the application can realize cooperative detection of multiple target detection nodes for the same to-be-detected node, thereby more comprehensively and efficiently detecting the to-be-detected node. The end-side nodes supervise and cooperatively detect each other to quickly discover and confirm node abnormalities, and report to the platform for processing, thereby improving detection efficiency and accuracy. Compared with the heartbeat scheme and the active detection scheme, the application quickly discovers node abnormalities through mutual detection and cooperative detection between end-side nodes, and can report only when an abnormality is discovered, thereby consuming less server resources and putting less pressure on the platform side firewall.

[0127] In some embodiments, the first node information comprises a service range of the to-be-probed node; and the at least one target probing node is assigned to the to-be-probed node based on the first node information, comprising:

[0128] The candidate nodes are obtained from the respective probing nodes based on the service range;

[0129] The target probing node is selected from the candidate nodes based on a current probing number of each candidate node, or the target probing node is selected from the candidate nodes based on a communication relationship between the to-be-probed node and each candidate node.

[0130] Specifically, in order to reduce cross-domain traffic and avoid causing great impact on the operator network, the PCDN service generally needs to provide services nearby, and in order to reduce probing delay and improve probing efficiency, the to-be-probed node can be probed by other nodes in the same service range, for example, the candidate probing nodes can be determined by the probing control module according to the priority of the same public IP>longest route in the same ASN>grouping in the same ASN strategy, and the target probing node is selected from the candidate nodes.

[0131] The probing control module can record the current probing number of each node, and each time a batch of candidate probing nodes with a probing number not reaching an upper limit are selected as the target probing node for the to-be-probed node.

[0132] The probing control module can also not record the probing number, and a batch of nodes meeting the conditions are randomly selected, and the target probing node list is determined by negotiation between the to-be-probed node and the selected nodes, and if the number of target probing nodes is insufficient, the platform side can be applied to add.

[0133] A decentralized manner can also be used, and the end-side probing module can autonomously discover other probing nodes in the same service range through Chord, Pastry, CAN or Kademlia DHT algorithm to negotiate and probe itself.

[0134] The node probing method provided by the embodiments of the present application can realize probing between nodes by obtaining the target probing node of the to-be-probed node, and improve the probing efficiency.

[0135] In some embodiments, the identification list of the to-be-probed node is stored in any target probing node; and the identification list sequentially records the node identification of each target probing node based on the probing order of the to-be-probed node;

[0136] The target probing node ranked first in the identification list is controlled by the master node.

[0137] Specifically, to avoid repeated reporting of the same target detection node finding an exception at the same time. These target detection nodes can be divided into master nodes and ordinary nodes. When the ordinary nodes detect an exception of the to-be-detected node, they will report it to the master node. The master node initiates an exception collaborative detection, and after summarizing the detection results, it reports to the platform side, so that each target detection node that detects the same to-be-detected node collaborates with each other.

[0138] When the target detection node detects the to-be-detected node, the to-be-detected node carries a list of nodes that have been successfully detected in the recent period in the response. The list is sorted according to the order of joining the node detection. The node sorted first by default is the master node of the task, which is responsible for the exception judgment and reporting of the to-be-detected node detection task.

[0139] The node detection method provided by the embodiment of the application can control multiple target detection nodes to collaboratively detect a to-be-detected node through a master node when an exception occurs, thereby improving detection efficiency and detection accuracy.

[0140] The application can be applied to live streaming, on-demand, large file download acceleration, website acceleration, edge computing, shared acceleration, and shared storage fields, and is suitable for all scenarios such as availability detection, stress testing, and health detection of CDN, PCDN, edge computing, shared computing, shared storage, and shared NAS terminals. The application can be applied to computing power routers, NAS, and other related computing network terminal shared acceleration and shared storage products.

[0141] In some embodiments, the node detection method is applied to a target detection node, and the method comprises:

[0142] receiving a detection task of detecting a to-be-detected node;

[0143] detecting a node state of the to-be-detected node based on the detection task;

[0144] The detection task is generated by a scheduling center or the to-be-detected node based on a detection request of the to-be-detected node. The detection request carries first node information of the to-be-detected node. The first node information is used to determine a target detection node of the to-be-detected node.

[0145] Specifically, after receiving the detection task, the target detection node analyzes the detection task and then detects the to-be-detected node. The detection agent module of the target detection node obtains the detection task from the detection control module, and periodically detects the to-be-detected node corresponding to the target detection node and performs exception collaborative detection and exception reporting.

[0146] The node detection method applied to the target detection node of the embodiments of the present application can be correspondingly referred to the node detection method applied to the to-be-detected node or the scheduling center in the foregoing, and the same technical effects can be achieved. Here, the same parts and beneficial effects of the method embodiments in the foregoing will not be described in detail.

[0147] The node detection device provided by the embodiments of the present application is described below. The node detection device described below can be correspondingly referred to the node detection method described above.

[0148] Figure 5 The structure diagram of the node detection device provided by the embodiments of the present application is shown in FIG. 5, which includes a response module 510, an allocation module 520 and a detection module 530. Figure 5

[0149] The response module is configured to generate a detection task for detecting the to-be-detected node in response to a detection request of the to-be-detected node. The detection request carries first node information of the to-be-detected node.

[0150] The allocation module is configured to allocate at least one target detection node for the to-be-detected node based on the first node information. The target detection node is a node capable of detecting the to-be-detected node.

[0151] The detection module is configured to send the detection task to the at least one target detection node, and the target detection node detects the node state of the to-be-detected node based on the detection task.

[0152] Specifically, according to the embodiments of the present application, any multiple modules of the response module, the allocation module and the detection module can be combined in one module for implementation, or any one of the modules can be split into multiple modules.

[0153] Alternatively, at least part of the functions of one or more of the modules can be combined with at least part of the functions of other modules, and implemented in one module.

[0154] According to the embodiments of the present application, at least one of the response module, the allocation module and the detection module can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging a circuit, etc. hardware or firmware, or any one of software, hardware and firmware or a proper combination of any of them.

[0155] ​Alternatively, at least one of the response module, the allocation module and the detection module can be implemented at least partially as a computer program module which, when executed, can perform the corresponding function.

[0156] The node detection device provided by the embodiments of the present application generates a detection task through a detection request of a to-be-detected node, allocates at least one target detection node for the to-be-detected node according to first node information of the to-be-detected node, and sends the detection task to the target detection node, so as to realize detection between nodes. The detection between nodes replaces the platform-side active detection or heartbeat detection at a high frequency, so that each to-be-detected node can be detected at a high frequency by at least one target detection node, and the platform side does not need to detect each to-be-detected node, thereby dispersing the computing power resources required for detection, enabling detection of a large number of nodes, and improving the detection efficiency and detection accuracy of node detection.

[0157] In some embodiments, the node detection device further comprises an exception coordination module, and the exception coordination module is specifically configured to:

[0158] In a case where the exception information is received from a master node in each target detection node, the exception information is sent to a resource tracking module on the platform side;

[0159] In a case where the resource tracking module on the platform side analyzes the online state of the to-be-detected node, the to-be-detected node is initialized;

[0160] The master node is configured to, in a case where a detection result of a node to-be-detected exception is received from any target detection node, notify each target detection node to detect the to-be-detected node, and generate exception information based on each detection result of each target detection node.

[0161] In some embodiments, the node detection device further comprises a supplementary node module, and the supplementary node module is specifically configured to:

[0162] Receive a supplementary detection node request sent by the to-be-detected node, and the supplementary detection node request carries second node information of a current detection node currently detecting the to-be-detected node;

[0163] Based on the first node information and the second node information, a node detecting the to-be-detected node is added;

[0164] The supplementary detection node request is generated by the to-be-detected node in a case where the number of current detection nodes is less than a preset threshold.

[0165] In some embodiments, the first node information comprises a service range of the to-be-detected node, and the allocation module is specifically configured to:

[0166] Candidate nodes are obtained from each probe node based on the service range;

[0167] The target detection node can be selected from the candidate nodes based on the current number of detections of each candidate node, or based on the communication relationship between the node to be detected and each candidate node.

[0168] In some embodiments, any target detection node stores a list of identifiers of nodes to be detected; the identifier list records the node identifiers of each target detection node in sequence based on the detection order of the nodes to be detected.

[0169] The master node is the target detection node that is ranked first in the identifier list.

[0170] In some embodiments, the node detection device further includes a startup module, which is specifically used for:

[0171] Receive the public network protocol port probe request sent by the node to be probed, and return the public network protocol and port information corresponding to the node to be probed to the node to be probed;

[0172] Receive the external service interface and health detection interface of the node to be detected returned by the node to be detected;

[0173] The public network protocol port probe request is generated by the node to be probed when the node to be probed is started; the public network protocol port probe request carries the node identifier and service type of the node to be probed; the health probe interface is used to monitor the node status of the node to be probed.

[0174] It should be noted that the node detection device provided in this application embodiment can implement all the method steps implemented in the above node detection method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0175] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 can call a computer program in the memory 630 to execute the above-mentioned methods, such as a node detection method applied to a detection control module, including:

[0176] In response to a detection request of the to-be-detected node, a detection task of detecting the to-be-detected node is generated; the detection request carries first node information of the to-be-detected node;

[0177] At least one target detection node is allocated to the to-be-detected node based on the first node information; the target detection node is a node capable of detecting the to-be-detected node;

[0178] The detection task is sent to the at least one target detection node, and the target detection node detects the node state of the to-be-detected node based on the detection task.

[0179] For example, a node detection method applied to a target detection node includes:

[0180] A detection task of detecting a to-be-detected node is received;

[0181] A node state of the to-be-detected node is detected based on the detection task;

[0182] The detection task is generated by a scheduling center or the to-be-detected node based on a detection request of the to-be-detected node; the detection request carries first node information of the to-be-detected node; and the first node information is used to determine a target detection node of the to-be-detected node. In addition, the logic instructions in the memory described above can be implemented in the form of a software function module and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0183] On the other hand, the embodiments of the present application also provide a computer program product, which includes a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program is executed by a processor, so that the computer can execute the method provided by the above-mentioned embodiments.

[0184] On the other hand, the embodiments of the present application also provide a processor readable storage medium, which stores a computer program, and the computer program is used to make the processor execute the method provided by the above-mentioned embodiments.

[0185] The processor-readable storage medium can be any available medium or data storage device that a processor can access, including but not limited to a magnetic storage (e.g., floppy disk, hard disk, tape, MO, etc.), an optical storage (e.g., CD, DVD, BD, HVD, etc.), and a semiconductor storage (e.g., ROM, EPROM, EEPROM, NAND FLASH, SSD, etc.), etc.

[0186] The apparatus embodiments described above are merely illustrative, wherein the modules described as separate components can or can not be physically separated, and the components shown as modules can or can not be physical modules, i.e., can be located in one place or distributed to multiple network modules. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0187] Through the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and necessary general hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software products, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and include a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0188] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A node detection method, characterized in that, Applied to a detection control module, the method includes: In response to a probe request from a node to be probed, a probe task is generated to probe the node to be probed; the probe request carries first node information of the node to be probed; At least one target detection node is assigned to the node to be detected based on the first node information; the target detection node is a node capable of detecting the node to be detected. The detection task is sent to the at least one target detection node; wherein the target detection node detects the node status of the node to be detected based on the detection task; The step of sending the detection task to the at least one target detection node further includes: Receive a supplementary detection node request sent by the node to be detected; the supplementary detection node request carries the second node information of the current detection node that is currently detecting the node to be detected; Based on the first node information and the second node information, additional nodes are added to detect the node to be detected; The supplementary detection node request is generated by the node to be detected when the number of current detection nodes is less than a preset threshold.

2. The node detection method according to claim 1, characterized in that, After sending the detection task to the at least one target detection node, the method further includes: Upon receiving abnormal information about the target node from the master node in each target detection node, the abnormal information is sent to the resource tracking module on the platform side. If the resource tracking module analyzes that the node to be detected is online, it performs initialization processing on the node to be detected. The master control node is used to notify each target detection node to detect the node to be detected when it receives a detection result of an abnormality of the node to be detected sent by any target detection node, and to generate the abnormal information based on the detection results corresponding to each target detection node.

3. The node detection method according to claim 1, characterized in that, The first node information includes the service range of the node to be detected; the step of allocating at least one target detection node to the node to be detected based on the first node information includes: Based on the service range, candidate nodes are obtained from each detection node; The target detection node is selected from the candidate nodes based on the current number of detections of each candidate node, or the target detection node is selected from the candidate nodes based on the communication relationship between the node to be detected and each candidate node.

4. The node detection method according to claim 2, characterized in that, Each target detection node stores a list of identifiers of the nodes to be detected; the identifier list records the node identifiers of each target detection node in sequence based on the detection order of the nodes to be detected. The master control node is the target detection node ranked first in the identifier list.

5. The node detection method according to claim 1, characterized in that, Prior to responding to the probe request from the node to be probed, the method further includes: Receive the public network protocol port probe request sent by the node to be probed, and return the public network protocol and port information corresponding to the node to be probed to the node to be probed; Receive the external service interface and health detection interface of the node to be detected returned by the node to be detected; The public network protocol port probe request is generated by the node to be probed when the node to be probed is started; the public network protocol port probe request carries the node identifier and service type of the node to be probed; the health probe interface is used to monitor the node status of the node to be probed.

6. A node detection method, characterized in that, Applied to target detection nodes, the method includes: Receive the detection task sent by the detection control module to detect the node to be detected; The node status of the node to be detected is detected based on the detection task; The detection task is generated by the scheduling center or the node to be detected based on the detection request of the node to be detected; the detection request carries first node information of the node to be detected; the first node information is used to determine the target detection node of the node to be detected; The detection control module sends the detection task to the target detection node and then receives a supplementary detection node request from the node to be detected. The supplementary detection node request carries second node information of the current detection node that is currently detecting the node to be detected. Based on the first node information and the second node information, additional nodes are added to detect the node to be detected. The supplementary detection node request is generated by the node to be detected when the number of current detection nodes is less than a preset threshold.

7. A node detection device, characterized in that, include: The response module is used to generate a detection task to detect the node in response to the detection request from the node to be detected. The detection request carries the first node information of the node to be detected; The allocation module is used to allocate at least one target detection node to the node to be detected based on the first node information; The target detection node is a node capable of detecting the node to be detected; A detection module is used to send the detection task to the at least one target detection node, wherein the target detection node detects the node status of the node to be detected based on the detection task; The node detection device further includes a supplementary node module, which is specifically used for: receiving a supplementary detection node request sent by the node to be detected; the supplementary detection node request carries second node information of the currently detecting node that is currently detecting the node to be detected; adding nodes to detect the node to be detected based on the first node information and the second node information; the supplementary detection node request is generated by the node to be detected when the number of currently detecting nodes is less than a preset threshold.

8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the node detection method according to any one of claims 1 to 6 through the computer program.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the node detection method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the node detection method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • DNS service condition monitoring method and device, electronic equipment and storage medium

    CN114500252A