Network detection method and device, computer equipment and readable storage medium

By sending a detection request message or a detection request message with an incremental time period in a distributed storage system, the system pressure problem caused by excessive detection request messages in the prior art is solved, and the efficiency and success rate of network connection are improved.

CN119135567APending Publication Date: 2024-12-13DAWNING INFORMATION IND (BEIJING) CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411131575.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing network detection methods in distributed storage systems are under great pressure and inefficient, making it difficult to quickly determine the network connection status between storage nodes.

Method used

When the network connection is abnormal or does not exist, send a detection request message and determine the result; when the connection is normal, increase the time period according to the preset incremental rules and send a detection request message to reduce the number of detection request messages and reduce system pressure. And improve connection efficiency.

Benefits of technology

By reducing the number of probe request messages, the pressure on the distributed storage system is reduced, the network connection establishment efficiency is improved, and the success rate of the detection method is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135567A_ABST
    Figure CN119135567A_ABST
Patent Text Reader

Abstract

The invention relates to a network detection method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: if network connection is abnormal or does not exist, sending a detection request message to a second storage node, and determining a detection result; and if the network connection is normal and the network interaction condition is satisfied, increasing the first time period according to a preset increasing rule, and sending a detection request message to the second storage node according to the increased first time period to obtain a detection result. By adopting the method, the pressure of the distributed storage system can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a network detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] In a distributed storage system, there are multiple storage nodes, and each storage node will establish a network connection with other storage nodes in the distributed storage system for data transmission. Before and after the network connection is established, a network detection method is needed to detect whether the physical link between the two storage nodes is normal.

[0003] In the current network detection method, the first storage node continuously sends a detection request message to the second storage node according to a preset time period, and receives a detection response message from the second storage node, until the first storage node receives the detection response message, and the first storage node determines that the physical link from the first storage node to the second storage node is normal.

[0004] However, the current network detection method, because there are multiple storage nodes in the distributed storage system, and each storage node will continuously send detection request messages, resulting in a large number of detection request messages in the distributed storage system. Therefore, the current network detection method will cause a large pressure on the distributed storage system. Summary of the invention

[0005] Based on this, it is necessary to provide a network detection method, apparatus, computer equipment, computer-readable storage medium and computer program product to address the above technical issues.

[0006] In a first aspect, the present application provides a network detection method, which is applied to a first storage node and includes:

[0007] If the network connection is abnormal or does not exist, send a detection request message to the second storage node and determine the detection result;

[0008] If the network connection is normal and meets the network interaction condition, the first time period is increased according to a preset increasing rule, and the detection request message is sent to the second storage node according to the increased first time period to obtain a detection result.

[0009] In the above network detection method, when the network connection is abnormal or does not exist, a detection request message is sent to the second storage node once to determine the detection result, thereby avoiding continuous sending of detection request messages and reducing the number of detection request messages. Furthermore, when the network connection is normal, by increasing the first time period and sending the detection request message based on the increased first time period, the number of detection request messages is reduced, thereby reducing the pressure on the distributed storage system.

[0010] In one embodiment, sending a detection request message to the second storage node once and determining the detection result includes:

[0011] Sending a detection request message to the second storage node once, and receiving a detection response message sent by the second storage node according to a second time period;

[0012] Determining whether the detection response message is received within the second time period;

[0013] If the detection response message is received within the second time period, it is determined that the detection result corresponding to the detection request message is detection success.

[0014] In this embodiment, by sending a detection request message to the second storage node once, and receiving a detection response message sent by the second storage node according to the second time period, the number of detection request messages is reduced, thereby reducing the pressure on the distributed storage system. In addition, when the physical link is normal, the detection result can be quickly determined by sending a detection request message once, thereby quickly establishing a network connection between storage nodes, and improving the efficiency of establishing a network connection.

[0015] In one of the embodiments, after determining whether the detection response message is received within the second time period, the method further includes:

[0016] If the detection response message is not received within the second time period, updating the number of fast detection times;

[0017] Determining whether the number of rapid detections exceeds a preset rapid detection number threshold;

[0018] If the number of fast detection times does not exceed the fast detection times threshold, execute the step of receiving the detection response message sent by the second storage node according to the second time period until the detection response message is received within the second time period or the number of fast detection times exceeds the fast detection times threshold.

[0019] In this embodiment, if no detection response message is received within the second time period and the updated rapid detection times do not exceed the rapid detection times threshold, the detection response message continues to be received, thereby improving the success rate of the network detection method.

[0020] In one embodiment, after determining whether the number of rapid detections exceeds a preset rapid detection number threshold, the method further includes:

[0021] If the number of rapid detections exceeds the rapid detection number threshold, determining that the initial detection result is a failure;

[0022] The detection request message is sent to the second storage node according to a first time period, and the initial detection result is updated to obtain a detection result.

[0023] In this embodiment, when the number of rapid detection times exceeds the rapid detection times threshold, a detection request message is sent to the second storage node according to the first time period, the normal detection mode is started, and the success rate of the network detection method is improved.

[0024] In one of the embodiments, if the network connection is normal and satisfies the network interaction condition, before increasing the first time period according to a preset incremental rule, the method further includes:

[0025] If the network connection is normal, sending a detection request message to the second storage node based on a first time period, and receiving a detection response message sent by the second storage node according to a third time period;

[0026] Determine whether a detection response message sent by the second storage node is received within a fourth time period, and obtain a first determination result;

[0027] If the first judgment result is that the detection response message is received within the fourth time period, it is determined that the network interaction condition is not met, and the detection result is determined to be a detection success;

[0028] If the judgment result is that the detection response message is not received within the fourth time period, it is determined that the network interaction condition is met.

[0029] In this embodiment, if the network connection is normal, a detection request message is sent according to the first time period, and it is determined whether a detection response message sent by the second storage node is received within the fourth time period to obtain a first judgment result. Then, it is determined whether the network interaction condition is met according to the first judgment result, so as to facilitate the subsequent execution of the network detection method.

[0030] In one embodiment, increasing the first time period according to a preset increasing rule, and sending the detection request message to the second storage node according to the increased first time period to obtain the detection result includes:

[0031] Increase the first time period to twice the current first time period to obtain an increased first time period, and increase the third time period to twice the current third time period to obtain an increased third time period;

[0032] Update the normal detection times, and determine whether the normal detection times exceed a preset normal detection times threshold;

[0033] If the number of normal detection times does not exceed the detection times threshold, sending the detection request message to the second storage node according to the increased first time period, and receiving the detection response message sent by the second storage node according to the increased third time period;

[0034] Determine whether a detection response message sent by the second storage node is received within a fourth time period, obtain a second determination result, and determine a detection result based on the second determination result.

[0035] In this embodiment, if the network connection is normal, the first time period is increased to obtain an increased first time period, and a detection request message is sent based on the increased first time period, thereby reducing the number of detection request messages and reducing the pressure on the distributed storage system.

[0036] In one embodiment, determining the detection result based on the second judgment result includes:

[0037] If the second judgment result is that the detection response message is received within a fourth time period, determining that the detection result is a detection success;

[0038] If the second judgment result is that the detection response message is not received within the fourth time period, execute the step of increasing the first time period to twice the current first time period to obtain the increased first time period, until the detection response message is received within the fourth time period or the normal detection number exceeds the normal detection number threshold, and determine the detection result.

[0039] In this embodiment, the detection result is determined by the second judgment result, and it is clarified whether the physical link between the storage nodes is normal, which facilitates the subsequent network connection between the storage nodes.

[0040] In a second aspect, the present application also provides a network detection device, including:

[0041] A first sending module, configured to send a detection request message to the second storage node once if the network connection is abnormal or does not exist, and determine the detection result;

[0042] The second sending module is used to increase the first time period according to a preset increasing rule if the network connection is normal and meets the network interaction conditions, and send the detection request message to the second storage node according to the increased first time period to obtain the detection result.

[0043] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0044] If the network connection is abnormal or does not exist, send a detection request message to the second storage node and determine the detection result;

[0045] If the network connection is normal and meets the network interaction condition, the first time period is increased according to a preset increasing rule, and the detection request message is sent to the second storage node according to the increased first time period to obtain a detection result.

[0046] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0047] If the network connection is abnormal or does not exist, send a detection request message to the second storage node and determine the detection result;

[0048] If the network connection is normal and meets the network interaction condition, the first time period is increased according to a preset increasing rule, and the detection request message is sent to the second storage node according to the increased first time period to obtain a detection result.

[0049] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0050] If the network connection is abnormal or does not exist, send a detection request message to the second storage node and determine the detection result;

[0051] If the network connection is normal and meets the network interaction condition, the first time period is increased according to a preset increasing rule, and the detection request message is sent to the second storage node according to the increased first time period to obtain a detection result.

[0052] The above-mentioned network detection method, device, computer equipment, computer-readable storage medium and computer program product, if the network connection is abnormal or does not exist, sends a detection request message to the second storage node and determines the detection result; if the network connection is normal and meets the network interaction conditions, the first time period is increased according to the preset incremental rule, and the detection request message is sent to the second storage node according to the increased first time period to obtain the detection result. Using this method, when the network connection is abnormal or does not exist, a detection request message is sent to the second storage node once to determine the detection result, avoiding the continuous sending of detection request messages and reducing the number of detection request messages. In addition, when the network connection is normal, by increasing the first time period and sending the detection request message based on the increased first time period, the number of detection request messages is reduced, thereby reducing the pressure on the distributed storage system. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 A diagram of an application environment of a network detection method in an embodiment;

[0055] Figure 2 A schematic diagram of a flow chart of a network detection method in an embodiment;

[0056] Figure 3 A schematic diagram of a process of sending a probe request message in one embodiment;

[0057] Figure 4 A schematic diagram of a process of continuing to receive a probe response message based on a fast probe number in one embodiment;

[0058] Figure 5 A schematic diagram of a flow chart of a network detection method in a fast detection mode in an embodiment;

[0059] Figure 6 A schematic diagram of a process for determining a detection result and an initial detection result in one embodiment;

[0060] Figure 7 A schematic diagram of a process of sending a probe request message according to a first time period in an embodiment;

[0061] Figure 8A schematic diagram of a process of sending a probe request message according to an increased first time period in an embodiment;

[0062] Fig. 9 A schematic diagram of a process for determining a detection result in one embodiment;

[0063] Fig.10 A schematic diagram of a flow chart of a network detection method in a normal detection mode in an embodiment;

[0064] Fig.11 is a flow chart of a network detection method in another embodiment;

[0065] Fig.12 is a structural block diagram of a network detection device in one embodiment;

[0066] FIG. 13 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0068] The network detection method provided in the embodiment of the present application can be applied to Figure 1 In the distributed storage system 100 shown. The distributed storage system 100 includes multiple storage nodes. The first storage node 110 is any one of the multiple storage nodes. The second storage node 120 is a storage node among the multiple storage nodes that needs to establish a network connection with the first storage node 110 or has established a network connection. The storage node can be a server or a computer device, and can also be a cloud server that provides cloud computing services.

[0069] In an exemplary embodiment, Figure 2 As shown, a network detection method is provided, which is applied to Figure 1 The first storage node 110 (hereinafter referred to as the first storage node) in the example is used for description, and the following steps 202 to 204 are included. Among them:

[0070] Step 202: If the network connection is abnormal or does not exist, a detection request message is sent to the second storage node, and a detection result is determined.

[0071] The network connection is a network connection between the first storage node and the second storage node.

[0072] In implementation, if the network connection with the second storage node is abnormal or does not exist, the first storage node sends a detection request message to the second storage node and receives a detection response message sent by the second storage node. The first storage node determines the detection result based on the reception time of the detection response message.

[0073] Specifically, the first storage node stores the network configuration information of the first storage node. Based on the network configuration information, the first storage node determines the network connection status between the first storage node and the second storage node. If the network connection status is that the network connection is abnormal or does not exist, the first storage node performs a network detection in a fast detection mode. Specifically, the first storage node sends a detection request message to the second storage node through the physical link between the first storage node and the second storage node, and receives a detection response message sent by the second storage node. Then, the first storage node determines the detection result based on the reception time of the detection response message.

[0074] In an exemplary embodiment, the network configuration information includes network connection information of each storage node. The first storage node queries whether there is network connection information of the second storage node in the network connection information. If there is no network connection information of the second storage node, the first storage node determines that the network connection does not exist. If there is network connection information of the second storage node, the first storage node determines whether the network connection status in the network connection information is normal. If the network connection status is normal, the first storage node determines that the network connection is normal. If the network connection status is abnormal, the first storage node determines that the network connection is abnormal. If the network connection status is abnormal or does not exist, the first storage node sends a detection request message to the second storage node through the physical link between the first storage node and the second storage node. If the physical link is normal, the second storage node will receive the detection request message and send a detection response message to the first storage node. The first storage node receives the detection response message and determines the detection result based on the reception time of the detection response message.

[0075] Optionally, the probe request message may be, but is not limited to, a ping (Packet Internet Groper, Chinese name Internet Packet Explorer) message, and the embodiment of the present application does not limit the probe request message.

[0076] Step 204: if the network connection is normal and meets the network interaction condition, increase the first time period according to a preset increasing rule, and send a detection request message to the second storage node according to the increased first time period to obtain a detection result.

[0077] In implementation, the first storage node is pre-set with network interaction conditions and incrementing rules. If the network connection with the second storage node is normal and meets the preset network interaction conditions, the first storage node increases the first time period according to the preset incrementing rules to obtain the increased first time period. Then, the first storage node sends a detection request message to the second storage node based on the increased first time period, and determines the detection result.

[0078] Specifically, the network interaction condition set in the first storage node is that no detection response message is received within a fourth time period. If the network connection with the second storage node is normal, the first storage node performs network detection in normal detection mode. Specifically, the first storage node sends a detection request message to the second storage node according to the first time period, and determines whether the detection response message sent by the second storage node is received within the fourth time period. If the detection response message is not received within the fourth time period, the first storage node determines that the network interaction condition is met, and increases the first time period according to a preset incremental rule to obtain the increased first time period. Then, the first storage node sends a detection request message to the second storage node based on the increased first time period, and determines the detection result.

[0079] In an optional embodiment, the incrementing rule is to increment the first time period according to the first time period increment value and to increment the third time period by a preset third time period increment value. If the network connection is normal and the network interaction condition is met, the first storage node adds the first time period and the first time period increment value to obtain the increased first time period. At the same time, the third storage node adds the third time period and the third time period increment value to obtain the increased third time period. Then, the first storage node sends a detection request message to the second storage node based on the increased first time period and determines the detection result.

[0080] In the above network detection method, when the network connection is abnormal or does not exist, a detection request message is sent to the second storage node once to determine the detection result, thereby avoiding continuous sending of detection request messages and reducing the number of detection request messages. Furthermore, when the network connection is normal, by increasing the first time period and sending the detection request message based on the increased first time period, the number of detection request messages is reduced, thereby reducing the pressure on the distributed storage system.

[0081] In an exemplary embodiment, Figure 3 As shown, the specific processing process of step 202 includes steps 302 to 306. Among them:

[0082] Step 302: Send a detection request message to the second storage node once, and receive a detection response message sent by the second storage node according to a second time period.

[0083] In implementation, a second time period is preset in the first storage node. The first storage node sends a detection request message to the second storage node only once. Then, the first storage node attempts to receive a detection response message sent by the second storage node at a time interval corresponding to the preset second time period.

[0084] Specifically, the second time period is 1 ms (milliseconds). The first storage node sends a detection request message to the second storage node based on the physical link between the first storage node and the second storage node. If the physical link is normal, the second storage node receives the detection request message and sends a detection response message to the first storage node based on the physical link. The first storage node attempts to receive the detection response message sent by the second storage node every 1 ms.

[0085] In an exemplary embodiment, if the network connection is abnormal, the first storage node needs to detect whether the physical link between the first storage node and the second storage node is normal to determine the cause of the abnormal network connection. If the network connection does not exist, the first storage node needs to establish a network connection with the second storage node. Before establishing the network connection between the first storage node and the second storage node, it is necessary to first detect whether the physical link between the first storage node and the second storage node is normal. Therefore, if the network connection is abnormal or does not exist, the first storage node sends a detection request message to the second storage node based on the physical link between the first storage node and the second storage node. If the physical link is normal, the second storage node will receive the detection request message and send a detection response message to the first storage node based on the physical link. The first storage node attempts to receive the detection response message sent by the second storage node at a time interval corresponding to the second time period.

[0086] Optionally, the second time period can be set to, but is not limited to, 1 ms according to rapid detection requirements. The embodiment of the present application does not limit the second time period.

[0087] Step 304: Determine whether a detection response message is received within a second time period.

[0088] In implementation, the first storage node determines whether a detection response message sent by the second storage node is received within a second time period.

[0089] Specifically, if the physical link between the first storage node and the second storage node is normal, the first storage node will receive the detection response message sent by the second storage node within the second time period. The second time period here is a second time period within the fast detection number threshold.

[0090] Step 306: If a probe response message is received within the second time period, it is determined that the probe result corresponding to the probe request message is a successful probe.

[0091] In implementation, if the first storage node receives a detection response message within the second time period, the first storage node determines that the detection result corresponding to the detection request message is a detection success, and determines that the physical link between the first storage node and the second storage node is in a normal state.

[0092] Specifically, the second time period is 1ms. If the first storage node receives the detection response message sent by the second storage node within 1ms, the first storage node determines that the detection result corresponding to the detection request message is a successful detection, and determines that the physical link between the first storage node and the second storage node is in a normal state. If the network connection between the first storage node and the second storage node does not exist and the detection result is a successful detection, the first storage node establishes a network connection with the second storage node. If the network connection between the first storage node and the second storage node is abnormal and the detection result is a successful detection, the first storage node determines that the cause of the abnormality is not the disconnection of the physical link between the first storage node and the second storage node, and re-establishes the network connection between the first storage node and the second storage node.

[0093] In this embodiment, by sending a detection request message to the second storage node once, and receiving a detection response message sent by the second storage node according to the second time period, the number of detection request messages is reduced, thereby reducing the pressure on the distributed storage system. In addition, when the physical link is normal, the detection result can be quickly determined by sending a detection request message once, thereby quickly establishing a network connection between storage nodes, and improving the efficiency of establishing a network connection.

[0094] In an exemplary embodiment, if no detection response message is received within the second time period, it is necessary to continue to receive detection response messages according to the number of fast detection times. Figure 4 As shown, after step 304 is executed, the specific processing process of the network detection method also includes steps 402 to 406. Among them:

[0095] Step 402: If no detection response message is received within the second time period, the number of rapid detection times is updated.

[0096] In implementation, the first storage node is pre-set with a fast detection number. If the first storage node does not receive a detection response message sent by the second storage node within the second time period, the first storage node updates the fast detection number to obtain an updated fast detection number.

[0097] Specifically, the number of fast detections pre-set in the first storage node is 0. The second time period is 1 ms. If the first storage node does not receive a detection response message returned by the second storage node within 1 ms, the first storage node adds 1 to the current number of fast detections to obtain an updated number of fast detections.

[0098] In an exemplary embodiment, the current number of fast detections is 499. If the first storage node does not receive a detection response message fed back by the second storage node within the second time period, the first storage node adds 1 to the current number of fast detections, and obtains an updated number of fast detections of 500.

[0099] Step 404, determining whether the number of rapid detections exceeds a preset rapid detection number threshold.

[0100] In implementation, a fast detection threshold is preset in the first storage node. The first storage node determines whether the updated fast detection number threshold exceeds the preset fast detection number threshold.

[0101] Specifically, the updated fast detection coefficient is 500 times. The fast detection number threshold is 1000 times. The first storage node determines that the updated fast detection number does not exceed the preset fast detection number threshold.

[0102] In an exemplary embodiment, since there may be a large distance between the first storage node and the second storage node, the data transmission time between the first storage node and the second storage node is long, so that within the second time period, the detection request message may not reach the second storage node or the detection response message may not reach the first storage node, and multiple rapid detections are required. Therefore, a rapid detection number threshold is set in the first storage node to ensure the transmission of the detection request message and the detection response message. If the first storage node does not receive the detection response message in the second time period, it updates the rapid detection request and determines whether the rapid detection number exceeds the rapid detection number threshold.

[0103] Optionally, the threshold of the number of rapid detection times can be set to, but is not limited to, 1000 times, which is determined according to the rapid detection requirements. The embodiment of the present application does not limit the threshold of the number of rapid detection times.

[0104] Step 406, if the number of fast detection times does not exceed the fast detection times threshold, execute the step of receiving the detection response message sent by the second storage node according to the second time period until the detection response message is received within the second time period or the number of fast detection times exceeds the fast detection times threshold.

[0105] In implementation, if the number of rapid detections does not exceed the rapid detection threshold, the first storage node executes the step of receiving the detection response message sent by the second storage node according to the second time period until the detection response message is received within the second time period or the number of rapid detections exceeds the detection threshold. Receiving the detection response message sent by the second storage node according to the second time period is the processing procedure in the above step 302, and the above step 302 has already described this processing procedure in detail, and the embodiment of the present application will not be repeated here.

[0106] Specifically, if the detection response message is received within the second time period, the first storage node determines that the detection result is a successful detection. If the number of rapid detections exceeds the rapid detection number threshold, the first storage node executes the following step 602. The specific processing process of step 602 is detailed in the following embodiment.

[0107] In an exemplary embodiment, after the network process of the first storage node is started, the first storage node determines the second storage node that needs to establish a network connection or rebuild a network connection based on the network configuration information. The first storage node performs a quick detection to determine whether the physical link between the first storage node and the second storage node is normal. When the physical link is normal, the first storage node establishes a network connection with the second storage node. Otherwise, when the physical link is abnormal, the first storage node fails to establish a network connection with the second storage node, which is an invalid operation. Therefore, in the case where the network connection with the second storage node does not exist or is abnormal, the present application provides a network detection method in a quick detection mode, such as Figure 5 shown. Figure 5 The flowchart of a network detection method in a fast detection mode in one embodiment includes:

[0108] Step 501: Send a detection request message to a second storage node.

[0109] Step 502: Try to receive a detection response message from the second storage node every 1 ms.

[0110] Step 503, determine whether a probe response message is received within 1 ms. If a probe response message is received, execute step 506. If no probe response message is received, execute step 504.

[0111] Step 504, update the fast detection times, and determine whether the updated fast detection times exceed the fast detection times threshold. If the updated fast detection times exceed the fast detection times threshold, execute step 505; if the updated fast detection times do not exceed the fast detection times threshold, execute step 502.

[0112] Step 505: determine that the initial detection result is a detection failure.

[0113] Step 506: Determine whether the detection result is successful.

[0114] When the physical link between the first storage node and the second storage node is normal, a detection response message can usually be received in one attempt. The network process startup usually occurs when the cluster is just being deployed. At this time, the physical link is expected to be normal. By sending a detection request message once and reducing the second time period, the detection can be completed quickly, thereby quickly establishing a network connection.

[0115] In this embodiment, if no detection response message is received within the second time period and the updated rapid detection times do not exceed the rapid detection times threshold, the detection response message continues to be received, thereby improving the success rate of the network detection method.

[0116] In an exemplary embodiment, if the number of rapid detections exceeds the rapid detection threshold, a normal mode network detection method needs to be executed. Figure 6 As shown, after step 404 is executed, the specific processing process of the network detection method further includes steps 602 to 604. Among them:

[0117] Step 602: If the number of rapid detections exceeds the rapid detection threshold, it is determined that the initial detection result is a failure.

[0118] In implementation, if the updated fast detection times exceed the fast detection times threshold, the first storage node determines that the initial detection result is a failure.

[0119] Specifically, when the updated number of fast detection times exceeds the fast detection times threshold, the first storage node ends the fast detection mode and determines that the initial detection result corresponding to the fast detection mode is a failure.

[0120] In an exemplary embodiment, the number of fast detections after the update is 1001 times, and the threshold number of fast detections is 1000 times. The first storage node determines that the number of fast detections after the update exceeds the threshold number of fast detections. If the number of fast detections after the update exceeds the threshold number of fast detections, the first storage node ends the fast detection mode and determines that the initial detection result corresponding to the fast detection mode is a failure.

[0121] Step 604: Send a detection request message to the second storage node according to the first time period, and update the initial detection result to obtain the detection result.

[0122] In implementation, a first time period is pre-set in the first storage node. The first storage node continuously sends a detection request message to the second storage node according to the first time period, and updates the initial detection result to obtain the detection result.

[0123] Specifically, when the initial detection result corresponding to the quick detection mode is a failure, the first storage node performs network detection in a normal detection mode. Specifically, a third time period and a fourth time period are pre-set in the first storage node. The first storage node sends a detection request message to the second storage node according to the first time period, and attempts to receive a detection response message based on the third time period. The first storage node determines whether the detection response message is received within the fourth time period, and obtains a first judgment result. Then, the first storage node updates the initial detection result according to the first judgment result, and obtains a detection result. Among them, the network detection process of the normal detection mode is similar to the processing process of the following steps 702 to 708 and steps 802 to 808, and the embodiments of the present application will not be repeated here.

[0124] In this embodiment, when the number of rapid detection times exceeds the rapid detection times threshold, a detection request message is sent to the second storage node according to the first time period, the normal detection mode is started, and the success rate of the network detection method is improved.

[0125] In an exemplary embodiment, before increasing the first time period, it is necessary to first determine whether the network interaction condition is met. Figure 7 As shown, before step 204 is executed, the specific processing process of the network detection method also includes steps 702 to 708. Among them:

[0126] Step 702: If the network connection is normal, send a detection request message to the second storage node based on the first time period, and receive a detection response message sent by the second storage node according to a third time period.

[0127] In implementation, if the network connection with the second storage node is normal, the first storage node sends a detection request message to the second storage node according to a first time period. Then, the first storage node attempts to receive a detection response message sent by the second storage node according to a third time period.

[0128] Specifically, a first time period and a third time period are pre-set in the first storage node. If the network connection is normal, the first storage node sends a detection request message to the second storage node at a time interval corresponding to the first time period. For example, if the first time period is 100ms, the first storage node sends a detection request message every 100ms. When the physical link between the first storage node and the second storage node is normal, the detection request message will reach the second storage node through the physical link. The second storage node receives the detection request message and sends a detection response message to the first storage node. The first storage node attempts to receive the detection response message sent by the second storage node at a time interval corresponding to the preset third time period. For example, the third time period is 50ms. The first storage node attempts to receive the detection response message sent by the second storage node every 50ms.

[0129] In an exemplary embodiment, if the network connection is normal, the first storage node performs a regular detection of the physical link between the first storage node and the second storage node to ensure that the data transmission between the first storage node and the second storage node is normal. If the network connection is normal and there is no data transmission with the second storage node, the first storage node sends a detection request message to the second storage node at a time interval corresponding to the first time period. Then, the first storage node attempts to receive a detection response message sent by the second storage node at a time interval corresponding to a third time period.

[0130] Optionally, the first time period can be but is not limited to being set to 100ms, and the third time period can be but is not limited to being set to 50ms, determined according to normal detection requirements. The embodiment of the present application does not limit the first time period and the third time period.

[0131] Step 704: Determine whether a detection response message sent by the second storage node is received within a fourth time period, and obtain a first determination result.

[0132] In implementation, a fourth time period is preset in the first storage node. The first storage node determines whether a detection response message sent by the second storage node is received within the fourth time period, obtains a first determination result, and determines whether the network interaction condition is met based on the first determination result.

[0133] Specifically, the fourth time period is set to 1 minute. The first storage node determines whether the detection response message sent by the second storage node is received within 1 minute. If the detection response message is received within 1 minute, the first storage node determines that the first judgment result is that the detection response message is received within the fourth time period. If the detection response message is not received within 1 minute, the first storage node determines that the first judgment result is that if the detection response message is received within 1 minute, the first storage node determines that the first judgment result is that the detection response message is not received within the fourth time period.

[0134] Optionally, the fourth time period can be set to, but not limited to, 1 minute or 2 minutes, determined according to normal detection requirements. The embodiment of the present application does not limit the fourth time period.

[0135] Step 706: If the first determination result is that a detection response message is received within the fourth time period, it is determined that the network interaction condition is not met, and the detection result is determined to be a detection success.

[0136] The first storage node is pre-set with a network interaction condition, wherein the first judgment result is that a detection response message is received within a fourth time period.

[0137] In implementation, if the first judgment result is that the detection response message is received within the fourth time period, the first storage node determines that the network interaction condition is not met. Then, the first storage node determines that the detection result is a detection success, and determines that the physical link between the first storage node and the second storage node is normal.

[0138] In an exemplary embodiment, since the first storage node performs a regular detection of the physical link between the first storage node and the second storage node, when the detection result is successful, the first storage node determines that the network connection with the second storage node is normal, and performs data transmission with the second storage node normally.

[0139] Step 708: If the judgment result is that no detection response message is received within the fourth time period, it is determined that the network interaction condition is met.

[0140] In implementation, if the judgment result is that the detection response message is not received within the fourth time period, the first storage node determines that the network interaction condition is met. Then, the first storage node executes step 204. The specific processing process of step 204 has been specifically described in the above embodiment, and the embodiment of the present application will not be repeated here.

[0141] In this embodiment, if the network connection is normal, a detection request message is sent according to the first time period, and it is determined whether a detection response message sent by the second storage node is received within the fourth time period to obtain a first judgment result. Then, it is determined whether the network interaction condition is met according to the first judgment result, so as to facilitate the subsequent execution of the network detection method.

[0142] In an exemplary embodiment, Figure 8 As shown, the specific processing process of step 204 includes steps 802 to 808. Among them:

[0143] Step 802, increase the first time period to twice the current first time period to obtain an increased first time period, and increase the third time period to twice the current third time period to obtain an increased third time period.

[0144] The increasing rule is to increase the first time period to twice the current first time period, and to increase the third time period to twice the current third time period.

[0145] In implementation, the first storage node increases the first time period to twice the current first time period to obtain an increased first time period. At the same time, the first storage node increases the third time period to twice the current third time period to obtain an increased third time period.

[0146] Specifically, a first time period threshold and a third time period threshold are set in the first storage node. The first storage node determines whether the first time period after being increased by two times exceeds the first time period threshold. If the first time period after being increased by two times does not exceed the first time period threshold, the first storage node increases the first time period to two times the current first time period to obtain the increased first time period. If the first time period after being increased by two times exceeds the first time period threshold, the first storage node updates the first time period to the first time period threshold. The first storage node determines whether the third time period after being increased by two times exceeds the third time period threshold. If the third time period after being increased by two times does not exceed the third time period threshold, the first storage node increases the third time period to two times the current third time period to obtain the increased third time period. If the third time period after being increased by two times exceeds the third time period threshold, the first storage node updates the third time period to the third time period threshold.

[0147] For example, the first time period is 100ms, and the first time period threshold is 1000ms. The third time period is 50ms, and the third time period threshold is 500ms. The first storage node determines that the first time period 200ms after being doubled does not exceed the first time period threshold 1000ms, and the first storage node increases the first time period 100ms to twice the current first time period, and obtains the increased first time period 200ms. The first storage node determines that the third time period 100ms after being doubled does not exceed the third time period threshold 500ms, and the first storage node increases the third time period 50ms to twice the current third time period, and obtains the increased third time period 100ms.

[0148] For example, the first time period is 800ms, and the first time period threshold is 1000ms. The third time period is 400ms, and the third time period threshold is 500ms. The first storage node determines that the first time period 1600ms after being doubled exceeds the first time period threshold of 1000ms, and the first storage node updates the first time period to 1000ms. The first storage node determines that the third time period 800ms after being doubled exceeds the third time period threshold of 500ms, and the first storage node updates the third time period to 500ms.

[0149] Optionally, the first time period threshold may be, but is not limited to, set to 1000 ms, and the third time period may be, but is not limited to, set to 500 ms. The embodiment of the present application does not limit the first time period threshold and the third time period threshold.

[0150] Step 804, updating the normal detection times, and determining whether the normal detection times exceed a preset normal detection times threshold.

[0151] In implementation, the first storage node is pre-set with a normal detection number, which is pre-set to 0. The first storage node updates the normal detection number, and then determines whether the updated normal detection number exceeds a normal detection number threshold.

[0152] Specifically, the first storage node adds the normal detection times and 1 to obtain the updated normal detection times. Then, the first storage node determines whether the updated normal detection times exceed the preset normal detection times threshold. If the updated normal detection times exceed the preset normal detection times threshold, the first storage node determines that the detection result is a detection failure, and determines that the physical link between the first storage node and the second storage node is abnormal. If the updated normal detection times do not exceed the normal detection times threshold, step 804 is executed.

[0153] For example, the threshold value of the number of normal detections is 5 times, and the number of normal detections is also 5 times. The first storage node adds the number of normal detections of 5 times and 1 to obtain an updated number of normal detections of 6 times. Then, the first storage node determines that the updated number of normal detections of 6 times exceeds the threshold value of the number of normal detections of 5 times, and the first storage node determines that the detection result is a detection failure, and determines that the physical link between the first storage node and the second storage node is abnormal. The first storage node closes the connection with the second storage node. Then, the first storage node determines that there is no network connection with the second storage node, and executes the above step 202 to re-establish the connection with the second storage node.

[0154] Optionally, the normal detection times threshold may be set to 5 times or 6 times, according to normal detection requirements. The embodiment of the present application does not limit the normal detection times threshold.

[0155] Step 806: If the normal detection times do not exceed the detection times threshold, send a detection request message to the second storage node according to the increased first time period, and receive a detection response message sent by the second storage node according to the increased third time period.

[0156] In implementation, if the number of normal detections does not exceed the detection number threshold, the first storage node sends a detection request message to the second storage node according to the increased first time period to detect again whether the physical link between the first storage node and the second storage node is normal. Then, the first storage node attempts to receive a detection response message sent by the second storage node according to the increased third time period.

[0157] Specifically, the first storage node sends a detection request message to the second storage node at a time interval corresponding to the increased first time period. For example, if the increased first time period is 200ms, the first storage node sends a detection request message to the second storage node every 200ms. When the physical link between the first storage node and the second storage node is normal, the detection request message will reach the second storage node through the physical link. The second storage node receives the detection request message and sends a detection response message to the first storage node. The first storage node attempts to receive the detection response message sent by the second storage node at a time interval corresponding to the increased third time period. For example, the increased third time period is 100ms. The first storage node attempts to receive the detection response message sent by the second storage node every 100ms.

[0158] Step 808, determining whether a detection response message sent by the second storage node is received within a fourth time period, obtaining a second determination result, and determining a detection result based on the second determination result.

[0159] In implementation, the first storage node determines whether a detection response message sent by the second storage node is received within the fourth time period to obtain a second determination result. Then, the first storage node determines the detection result according to the second determination result.

[0160] Specifically, the fourth time period is set to 1 minute. The first storage node determines whether the detection response message sent by the second storage node is received within 1 minute. If the detection response message is received within 1 minute, the first storage node determines that the second judgment result is that the detection response message is received within the fourth time period. If the detection response message is not received within 1 minute, the first storage node determines that the second judgment result is that the detection response message is not received within the fourth time period. Then, the first storage node determines the detection result according to the second judgment result.

[0161] In this embodiment, if the network connection is normal, the first time period is increased to obtain an increased first time period, and a detection request message is sent based on the increased first time period, thereby reducing the number of detection request messages and reducing the pressure on the distributed storage system.

[0162] In an exemplary embodiment, Fig. 9 As shown, the specific processing process of determining the detection result based on the second judgment result in step 808 includes steps 902 to 904. Among them:

[0163] Step 902: If the second determination result is that a detection response message is received within a fourth time period, the detection result is determined to be a detection success.

[0164] In implementation, if the second judgment result is that a detection response message fed back by the second storage node is received within the fourth time period, the first storage node determines that the detection result is a detection success. Then, the first storage node determines that the physical link between the first storage node and the second storage node is normal, and performs data transmission with the second storage node normally.

[0165] Step 904, if the second judgment result is that no detection response message is received within the fourth time period, execute the step of increasing the first time period to twice the current first time period to obtain the increased first time period, until a detection response message is received within the fourth time period or the number of normal detections exceeds the normal detection number threshold, and determine the detection result.

[0166] In implementation, if the second judgment result is that no detection response message is received within the fourth time period, the first storage node continues to execute the above step 802 until a detection response message is received within the fourth time period or the number of normal detections exceeds the normal detection number threshold. Among them, the specific processing process of step 802 has been described in detail in the above steps, and the embodiments of the present application will not be repeated here. If a detection response message is received within the fourth time period, the first storage node determines that the detection result is a successful detection. If the number of normal detections exceeds the normal detection number threshold, the first storage node determines that the detection result is a detection failure.

[0167] In an exemplary embodiment, Fig.10 FIG. 1 is a flow chart of a network detection method in a normal detection mode in an embodiment. Fig.10 As shown, the normal network detection method includes:

[0168] Step 1001, obtaining a first time period threshold and a first time period.

[0169] Step 1002: Send a detection request message to a second storage node according to a first time period.

[0170] Step 1003: Try to receive a detection response message according to a third time period, where the third time period is half of the first time period.

[0171] Step 1004, determining whether a probe response message is received within the fourth time period. If a probe response message is received within the fourth time period, executing step 1009. If no probe response message is received, executing step 1005.

[0172] Step 1005, update the normal detection times, and determine whether the updated normal detection times exceed the normal detection times threshold. If the updated normal detection times exceed the normal detection times threshold, execute step 1010. If the updated normal detection times do not exceed the normal detection times threshold, execute step 1006.

[0173] Step 1006: the first time period is increased to twice the current first time period to obtain an increased first time period, and the third time period is increased to twice the current third time period to obtain an increased third time period.

[0174] Step 1007, determine whether the increased first time period exceeds the first time period threshold. If the first time period exceeds the first time period threshold, execute step 1008. If the first time period does not exceed the first time period threshold, execute step 1002 according to the increased first time period.

[0175] Step 1008, updating the first time period to the first time period threshold, and updating the third time period to the third time period threshold, and executing step 1002 according to the updated first time period.

[0176] Step 1009: Determine whether the detection result is successful.

[0177] Step 1010: determine that the detection result is a detection failure, and determine that the physical link is faulty.

[0178] In this embodiment, the detection result is determined by the second judgment result, and it is clarified whether the physical link between the storage nodes is normal, which facilitates the subsequent establishment of the network connection between the storage nodes.

[0179] In an exemplary embodiment, Fig.11 FIG. 1 is a flow chart of a network detection method in another embodiment. Fig.11 As shown, the network detection method includes:

[0180] Step 1101, start the network process.

[0181] Step 1102, execute the rapid detection mode to obtain the initial detection result of the rapid detection mode.

[0182] Step 1103, determine whether the initial detection result is a successful detection. If the initial detection result is a successful detection, execute step 1106. If the initial detection result is a failed detection, execute step 1104.

[0183] Step 1104, executing the normal detection mode to obtain the detection result of the normal detection mode.

[0184] Step 1105, determine whether the detection result is a detection success. If the detection result is a detection success, execute step 1106. If the detection result is a detection failure, execute step 1104.

[0185] Step 1106: Establish a network connection with the second storage node.

[0186] Step 1107, monitor whether the network connection is running normally. If it is running normally, then end the execution of the network detection method. If it is running abnormally, then execute step 1108.

[0187] Step 1108, determine whether there is a successful message transmission. If there is a successful message transmission, execute step 1107. If there is no successful message transmission, execute step 1109.

[0188] Step 1109, executing the normal detection mode to obtain the detection result of the normal detection mode.

[0189] Step 1110, determine whether the detection result is a detection success. If the detection result is a detection success, execute step 1107. If the detection result is a detection failure, execute step 1111.

[0190] Step 1111, determine whether the physical link is faulty. If the physical link is faulty, execute step 1112. If the physical link is not faulty, execute step 1107.

[0191] Step 1112 , close the network connection with the second storage node, and execute step 1102 .

[0192] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0193] Based on the same inventive concept, the embodiment of the present application also provides a network detection device for implementing the network detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more network detection device embodiments provided below can refer to the limitations on the network detection method above, and will not be repeated here.

[0194] In an exemplary embodiment, Fig.12 As shown, a network detection device 1200 is provided, including: a first sending module 1201 and a second sending module 1202, wherein:

[0195] The first sending module 1201 is used to send a detection request message to the second storage node once if the network connection is abnormal or does not exist, and determine the detection result.

[0196] The second sending module 1202 is used to increase the first time period according to a preset increasing rule if the network connection is normal and meets the network interaction conditions, and send a detection request message to the second storage node according to the increased first time period to obtain a detection result.

[0197] In an exemplary embodiment, the first sending module 1201 includes:

[0198] The first sending submodule is used to send a detection request message to the second storage node once, and receive a detection response message sent by the second storage node according to a second time period.

[0199] The first judgment submodule is used to judge whether a detection response message is received within a second time period.

[0200] The first determining submodule is configured to determine that the detection result corresponding to the detection request message is a detection success if a detection response message is received within a second time period.

[0201] In an exemplary embodiment, the network detection device 1200 further includes:

[0202] The first updating module is used to update the number of fast detection times if no detection response message is received within a second time period.

[0203] The first judgment module is used to judge whether the number of rapid detection times exceeds a preset rapid detection times threshold.

[0204] The first execution module is used to execute the step of receiving a detection response message sent by the second storage node according to a second time period if the number of rapid detection times does not exceed the rapid detection times threshold, until a detection response message is received within the second time period or the number of rapid detection times exceeds the rapid detection times threshold.

[0205] In an exemplary embodiment, the network detection device 1200 further includes:

[0206] The first determination module is used to determine that the initial detection result is a failure if the number of rapid detection times exceeds a rapid detection times threshold.

[0207] The second updating module is used to send a detection request message to the second storage node according to the first time period, and update the initial detection result to obtain the detection result.

[0208] In an exemplary embodiment, the network detection device 1200 further includes:

[0209] The third sending module is used to send a detection request message to the second storage node based on the first time period if the network connection is normal, and receive a detection response message sent by the second storage node according to a third time period.

[0210] The second judgment module is used to judge whether a detection response message sent by the second storage node is received within a fourth time period to obtain a first judgment result.

[0211] The second determination module is used to determine that the network interaction condition is not met and determine the detection result as a detection success if the first judgment result is that the detection response message is received within a fourth time period.

[0212] The third determination module is used to determine that the network interaction condition is met if the judgment result is that no detection response message is received within a fourth time period.

[0213] In an exemplary embodiment, the second sending module 1202 includes:

[0214] The increasing submodule is used to increase the first time period to twice the current first time period to obtain the increased first time period, and to increase the third time period to twice the current third time period to obtain the increased third time period.

[0215] The second judgment submodule is used to update the normal detection times and judge whether the normal detection times exceed a preset normal detection times threshold.

[0216] The second sending submodule is used to send a detection request message to the second storage node according to the increased first time period if the normal detection times do not exceed the detection times threshold, and receive a detection response message sent by the second storage node according to the increased third time period.

[0217] The third judgment submodule is used to judge whether the detection response message sent by the second storage node is received within a fourth time period, obtain a second judgment result, and determine the detection result based on the second judgment result.

[0218] In an exemplary embodiment, the third judgment submodule includes a fourth judgment submodule and a second determination submodule. The second determination submodule includes:

[0219] The third determination submodule is configured to determine that the detection result is a detection success if the second determination result is that a detection response message is received within a fourth time period.

[0220] The fourth determination submodule is used to, if the second judgment result is that no detection response message is received within the fourth time period, execute the step of increasing the first time period to twice the current first time period to obtain the increased first time period, until a detection response message is received within the fourth time period or the number of normal detections exceeds the normal detection number threshold, and determine the detection result.

[0221] Each module in the above network detection device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0222] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG13. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data used by the network detection method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a network detection method is implemented.

[0223] Those skilled in the art will understand that the structure shown in FIG. 13 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0224] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0225] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0226] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0227] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0228] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0229] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A network detection method, It is characterized in that The method is applied to a first storage node, and the method includes: If the network connection is abnormal or does not exist, send a detection request message to the second storage node and determine the detection result; If the network connection is normal and meets the network interaction condition, the first time period is increased according to a preset increasing rule, and the detection request message is sent to the second storage node according to the increased first time period to obtain a detection result.

2. The method according to claim 1, It is characterized in that The sending a detection request message to the second storage node once and determining the detection result includes: Sending a detection request message to the second storage node once, and receiving a detection response message sent by the second storage node according to a second time period; Determining whether the detection response message is received within the second time period; If the detection response message is received within the second time period, it is determined that the detection result corresponding to the detection request message is detection success.

3. The method according to claim 2, It is characterized in that After determining whether the detection response message is received within the second time period, the method further includes: If the detection response message is not received within the second time period, updating the number of fast detection times; Determining whether the number of rapid detections exceeds a preset rapid detection number threshold; If the number of fast detection times does not exceed the fast detection times threshold, execute the step of receiving the detection response message sent by the second storage node according to the second time period until the detection response message is received within the second time period or the number of fast detection times exceeds the fast detection times threshold.

4. The method according to claim 3, It is characterized in that After determining whether the number of rapid detections exceeds a preset rapid detection number threshold, the method further includes: If the number of rapid detections exceeds the rapid detection number threshold, determining that the initial detection result is a failure; The detection request message is sent to the second storage node according to a first time period, and the initial detection result is updated to obtain a detection result.

5. The method according to claim 1, It is characterized in that If the network connection is normal and meets the network interaction condition, before increasing the first time period according to a preset incremental rule, the method further includes: If the network connection is normal, sending a detection request message to the second storage node based on a first time period, and receiving a detection response message sent by the second storage node according to a third time period; Determine whether a detection response message sent by the second storage node is received within a fourth time period, and obtain a first determination result; If the first judgment result is that the detection response message is received within the fourth time period, it is determined that the network interaction condition is not met, and the detection result is determined to be a detection success; If the judgment result is that the detection response message is not received within the fourth time period, it is determined that the network interaction condition is met.

6. The method according to claim 1, It is characterized in that The step of increasing the first time period according to a preset increasing rule, and sending the detection request message to the second storage node according to the increased first time period to obtain the detection result includes: Increase the first time period to twice the current first time period to obtain an increased first time period, and increase the third time period to twice the current third time period to obtain an increased third time period; Update the normal detection times, and determine whether the normal detection times exceed a preset normal detection times threshold; If the number of normal detection times does not exceed the detection times threshold, sending the detection request message to the second storage node according to the increased first time period, and receiving the detection response message sent by the second storage node according to the increased third time period; Determine whether a detection response message sent by the second storage node is received within a fourth time period, obtain a second determination result, and determine a detection result based on the second determination result.

7. The method according to claim 6, It is characterized in that The determining of the detection result based on the second judgment result includes: If the second judgment result is that the detection response message is received within a fourth time period, determining that the detection result is a detection success; If the second judgment result is that the detection response message is not received within the fourth time period, execute the step of increasing the first time period to twice the current first time period to obtain the increased first time period, until the detection response message is received within the fourth time period or the normal detection number exceeds the normal detection number threshold, and determine the detection result.

8. A network detection device, It is characterized in that The device comprises: A first sending module, configured to send a detection request message to the second storage node once if the network connection is abnormal or does not exist, and determine the detection result; The second sending module is used to increase the first time period according to a preset increasing rule if the network connection is normal and meets the network interaction conditions, and send the detection request message to the second storage node according to the increased first time period to obtain the detection result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.