Network quality detection method and device, equipment and storage medium
By dynamically adjusting the number of source hosts and target hosts in network quality detection in the local area network, and adjusting the current round of detection combinations based on the results of the previous round of detection, the problems of low detection efficiency and insufficient accuracy in the existing technology are solved, and a better Efficient and accurate network quality detection.
Patent Information
- Application Number
- CN202410348608.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2024-09-17
AI Technical Summary
When the existing technology detects network quality in a local area network, the source host bears an excessive burden, resulting in low detection efficiency, and cannot balance the accuracy of the network quality value and detection efficiency.
By dynamically adjusting the number of source hosts and target hosts in the target network group, and determining the host combination for this round of detection based on the network quality value and quantity of the previous round of detection, the accuracy and efficiency of network quality detection are balanced.
It improves the efficiency and accuracy of network quality detection, reduces the waste of system and network resources, and achieves a more balanced representation of network conditions.
Smart Images

Figure CN118659989A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network technology, and in particular to a network quality detection method, device, equipment and storage medium. Background Art
[0002] In the prior art, for a local area network with a large number of hosts, a controller performs multiple rounds of network quality detection on the local area network. In each round of network quality detection, any host is selected from the local area network as the source host, and all hosts except the selected host are used as target hosts. The source host pings (Packet Internet Groper) the target host respectively, and then the network quality between the source host and the target host can be determined.
[0003] Although the network quality determined by the above network quality detection method can more accurately characterize the network status of the LAN, the above network quality detection method selects a host as the source host in each round of network quality detection, and the source host needs to ping all hosts in the LAN except the source host, which puts a heavy burden on the source host. Summary of the invention
[0004] The embodiments of the present application provide a network quality detection method, apparatus, device and storage medium for balancing the accuracy of the network quality value between the source host and the target host in the target network group to characterize the network status of the target network group, and the network quality detection efficiency.
[0005] In a first aspect, the present application provides a network quality detection method, the method comprising:
[0006] Determining a first number of hosts from the hosts included in the target network group as source hosts for this round of detection;
[0007] Determining a second number of hosts from the hosts included in the target network group as target hosts for this round of detection;
[0008] The first number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the first number of the previous round of detection, and the second number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the second number of the previous round of detection;
[0009] Triggering the network quality detection between the source host and the target host of the target network group.
[0010] In an embodiment of the present application, a first number of hosts are determined from the hosts included in the target network group as source hosts for this round of detection, and a second number of hosts are determined from the hosts included in the target network group as target hosts for this round of detection, triggering network quality detection between the source hosts and the target hosts of the target network group. As the number of source hosts (the first number) and the number of target hosts (the second number) increase, the accuracy of the network quality value between the source hosts and the target hosts in the target network group in representing the network status of the target network group is higher, but the efficiency of the network quality detection between the source hosts and the target hosts in the target network group is lower; as the number of source hosts and the number of target hosts decreases, the efficiency of the network quality detection between the source hosts and the target hosts in the target network group is higher, but the accuracy of the network quality value between the source hosts and the target hosts in the target network group in representing the network status of the target network group is lower. Therefore, in order to balance the accuracy of the network quality value between the source host and the target host in the target network group in representing the network situation of the target network group, and the network quality detection efficiency, the first number of non-first-round detections in this application is determined based on the network quality values of the source host and the target host in the previous round of detection and the first number of the previous round of detection, and the second number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the second number of the previous round of detection. That is, this application determines the balance point between the accuracy of the network quality value between the source host and the target host in this round of detection in representing the network situation of the target network group and the network quality detection efficiency, that is, the number of source hosts and the number of target hosts in this round of detection, based on the network quality values of the source host and the target host in the previous round of detection, the first number of the previous round of detection, and the second number of the previous round of detection.
[0011] In a second aspect, the present application provides a network quality detection device, the device comprising:
[0012] A first determination module, used to determine a first number of hosts from the hosts included in the target network group as source hosts for this round of detection;
[0013] A second determination module, used to determine a second number of hosts from the hosts included in the target network group as target hosts for this round of detection;
[0014] The first number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the first number of the previous round of detection, and the second number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the second number of the previous round of detection;
[0015] The trigger module is used to trigger the network quality detection between the source host and the target host of the target network group.
[0016] In a third aspect, the present application provides an electronic device, including:
[0017] A memory for storing program instructions;
[0018] The processor is used to call the program instructions stored in the memory, and execute the steps included in any one of the methods in the first aspect according to the obtained program instructions.
[0019] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes any one of the methods described in the first aspect.
[0020] In a fifth aspect, the present application provides a computer program product, comprising: a computer program code, when the computer program code is run on a computer, the computer executes any one of the methods described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a schematic diagram of an application scenario according to an exemplary embodiment;
[0023] Figure 2 is a flow chart of a network quality detection method according to an exemplary embodiment;
[0024] Figure 3 is a detailed flow chart of a network quality detection method according to an exemplary embodiment;
[0025] Figure 4 is a schematic diagram showing a target network group according to an exemplary embodiment;
[0026] Figure 5 is a schematic diagram of a target network according to an exemplary embodiment;
[0027] Figure 6 is a schematic diagram showing another target network group according to an exemplary embodiment;
[0028] Figure 7 is a schematic diagram of a network quality detection device according to an exemplary embodiment;
[0029] Figure 8 is a schematic diagram showing a sending record table according to an exemplary embodiment;
[0030] Fig. 9 is a schematic diagram showing a network device between a source host 1 and a target host 4 according to an exemplary embodiment;
[0031] Fig.10 is a detailed flow chart of a method for determining a location where a fault exists between a source host to be detected and a target host to be detected corresponding to an abnormal network quality value according to an exemplary embodiment;
[0032] Fig.11 is a flow chart showing a method for detecting network quality of a target network group in this round of detection according to an exemplary embodiment;
[0033] Fig.12 is a schematic diagram of a front-end display page according to an exemplary embodiment;
[0034] Fig.13 is a schematic diagram of a details page showing the network quality situation between sub-network group A and sub-network group D according to an exemplary embodiment;
[0035] Fig.14 is a schematic diagram of a details page showing the network quality situation between sub-network group C and sub-network group D according to an exemplary embodiment;
[0036] Fig.15 is a schematic diagram of a network quality detection device according to an exemplary embodiment;
[0037] Fig.16 The figure is a schematic diagram of an electronic device showing a method for detecting network quality according to an exemplary embodiment. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0039] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0040] In the technical solution of this application, the collection, dissemination, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0041] In order to facilitate understanding of the solutions of the embodiments of the present invention, the terms involved are explained in detail below.
[0042] Ping in this application is an Internet packet explorer, a program used to test network connectivity. Ping is a service command that works at the application layer of the Transmission Control Protocol / Internet Protocol (TCP / IP) network architecture, and is mainly used to send Internet Control Message Protocol (ICMP) Echo (computer command) request messages to a specific target host to test whether the target host is reachable and to understand its status.
[0043] Before introducing the network quality detection method provided in the embodiment of the present application, in order to facilitate understanding, the technical background of the embodiment of the present application is first introduced in detail below.
[0044] In the prior art, for a local area network with a large number of hosts, the controller performs multiple rounds of network quality detection on the local area network. In each round of network quality detection, any host is selected from the local area network as the source host, and all hosts except the selected host are used as target hosts. The source host pings the target host respectively, and then the network quality between the source host and the target host can be determined.
[0045] Although the network quality determined by the above network quality detection method can more accurately characterize the network status of the local area network, the above network quality detection method selects a host as the source host in each round of network quality detection, and the source host needs to ping all hosts in the local area network except the source host, which puts a heavy burden on the source host, thereby resulting in the problem of low efficiency of network quality detection.
[0046] In order to solve the above technical problems, the embodiments of the present application provide a network quality detection method, device, equipment and storage medium, which are used to balance the accuracy of the network quality value between the source host and the target host in the target network group to characterize the network status of the target network group, and the network quality detection efficiency.
[0047] First reference Figure 1 , which is a schematic diagram of an application scenario of an embodiment, including a controller 10 and a target network 11. The target network group 11 includes a plurality of hosts 12, and the controller 10 is used to perform network quality detection on each host in the target network group 11.
[0048] In some embodiments, the controller 10 determines a first number of hosts from the hosts 12 included in the target network group 11 as source hosts for this round of detection; determines a second number of hosts from the hosts 12 included in the target network group 11 as target hosts for this round of detection; wherein the first number for non-first-round detection is determined based on the network quality values of the source hosts and the target hosts in the previous round of detection and the first number for the previous round of detection, and the second number for non-first-round detection is determined based on the network quality values of the source hosts and the target hosts in the previous round of detection and the second number for the previous round of detection; triggers network quality detection between the source hosts and the target hosts of the target network group 11.
[0049] In some embodiments, a network quality detection method is described below through a specific embodiment. Figure 2 As shown, including:
[0050] Step 201, determining a first number of hosts from the hosts included in the target network group as source hosts for this round of detection;
[0051] Among them, in order to realize network quality detection for all hosts in the target network group, the present application needs to perform multiple rounds of network quality detection on the target network group, and each round of detection executes steps 201-203. The target network group can be the entire target network, or any network group in the target network including multiple network groups. The first number of non-first round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the first number of the previous round of detection. The first number of the first round of detection can be set according to the actual situation. For example, the first number of the first round of detection can be 2.
[0052] Step 202, determining a second number of hosts from the hosts included in the target network group as target hosts for this round of detection;
[0053] Among them, the second number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the second number of the previous round of detection. The second number of the first round of detection can be set according to actual conditions. For example, the second number of the first round of detection can be 6. The first number of the first round of detection can be the same as the second number of the first round of detection, or it can be different. If the target network group includes more hosts, a larger first number of the first round of detection and the second number of the first round of detection can be selected. The network quality values of the source host and the target host represent the network quality between the source host and the target host. In the embodiment of the present application, the larger the network quality values of the source host and the target host, the better the network quality between the source host and the target host.
[0054] Optionally, if the target network includes multiple network groups, multiple rounds of network quality detection can be performed on each network group in parallel, or multiple rounds of network quality detection can be performed on each network group in sequence. Furthermore, after multiple rounds of network quality detection are performed on the target network group, the network quality detection of the target network group can be terminated when the current round reaches the set round threshold, or the network quality detection of the target network group can be terminated when all hosts in the source network partition of the target partition group are subjected to network quality detection as source hosts at least once, and all hosts in the target network partition of the target partition group are subjected to network quality detection as target hosts at least once. The above-mentioned set round threshold can be set according to actual conditions.
[0055] Taking the example of performing multiple rounds of network quality detection on each network group in sequence, if the target network includes network group 1, network group 2 and network group 3, multiple rounds of network quality detection are performed on network group 1. If network group 1 meets the set end condition, multiple rounds of network quality detection are performed on network group 2. If network group 2 meets the set end condition, multiple rounds of network quality detection are performed on network group 3.
[0056] Step 203: triggering network quality detection between the source host and the target host of the target network group.
[0057] Optionally, after triggering the network quality detection between the source host and the target host corresponding to the target network group, the method further includes:
[0058] Comparing the quality anomaly rate of the target network group with a preset anomaly threshold to obtain a first comparison result; wherein the quality anomaly rate of the target network group represents the degree of network anomaly of the target network group in this round of detection;
[0059] The network status of the target network group in this round of detection is determined based on the first comparison result.
[0060] The preset abnormal threshold value may be set according to actual conditions, for example, the preset abnormal threshold value may be 0. The network status of the target network group in this round of detection includes a normal status and an abnormal status.
[0061] In an embodiment of the present application, the quality anomaly rate of the target network group is compared with the anomaly threshold to determine the network status of the target network group in this round of detection, thereby improving the accuracy and efficiency of determining the network status of the target network group in this round of detection.
[0062] The quality anomaly rate of the above target network group can be determined in the following way:
[0063] Determining a network quality value between a source host and a target host in the target network group;
[0064] A quality abnormality rate of the target network group is determined based on the number of abnormal network quality values among the network quality values.
[0065] Among them, the abnormal network quality value is a network quality value that is less than a preset first quality threshold. The first quality threshold can be set according to actual conditions, for example, the first quality threshold can be 100%. Taking the setting of the first quality threshold as 100% as an example, if the network quality value between source host 1 and target host 1 is 100%, the network quality value between source host 1 and target host 2 is 0%, the network quality value between source host 2 and target host 1 is 75%, and the network quality value between source host 2 and target host 2 is 100%, then the network quality value between source host 1 and target host 2 is an abnormal network quality value, and the network quality value between source host 2 and target host 1 is an abnormal network quality value.
[0066] In an embodiment of the present application, based on the number of abnormal network quality values in the network quality values between the source host and the target host in the determined target network group, the quality anomaly rate of the target network group is determined, thereby more accurately reflecting the degree of network anomaly of the target network group in this round of detection.
[0067] Optionally, the network quality detection is performed between the source host and the target host corresponding to the above-mentioned triggered target network group, including: based on the IP (Internet Protocol) address of each source host and the IP address of each target host, a pingList (network detection list) of each source host is generated, and the pingList is sent to the corresponding source host. The pingList of each source host includes the IP address of at least one target host that the source host needs to ping. Each source host calls fping (network test tool) to perform network quality detection on the IP address of each target host in the pingList of the source host. fping is a network test tool based on the ICMP protocol, which can be used to test whether the network equipment is online. fping can run on multiple operating systems such as Linux and Windows (Microsoft Windows).
[0068] In an embodiment of the present application, a first number of hosts are determined from the hosts included in the target network group as source hosts for this round of detection, and a second number of hosts are determined from the hosts included in the target network group as target hosts for this round of detection, triggering network quality detection between the source hosts and the target hosts of the target network group. As the number of source hosts (the first number) and the number of target hosts (the second number) increase, the accuracy of the network quality value between the source hosts and the target hosts in the target network group in representing the network status of the target network group is higher, but the efficiency of the network quality detection between the source hosts and the target hosts in the target network group is lower; as the number of source hosts and the number of target hosts decreases, the efficiency of the network quality detection between the source hosts and the target hosts in the target network group is higher, but the accuracy of the network quality value between the source hosts and the target hosts in the target network group in representing the network status of the target network group is lower. Therefore, in order to balance the accuracy of the network quality value between the source host and the target host in the target network group in representing the network situation of the target network group, and the network quality detection efficiency, the first number of non-first-round detections in this application is determined based on the network quality values of the source host and the target host in the previous round of detection and the first number of the previous round of detection, and the second number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the second number of the previous round of detection. That is, this application determines the balance point between the accuracy of the network quality value between the source host and the target host in this round of detection in representing the network situation of the target network group and the network quality detection efficiency, that is, the number of source hosts and the number of target hosts in this round of detection, based on the network quality values of the source host and the target host in the previous round of detection, the first number of the previous round of detection, and the second number of the previous round of detection.
[0069] The specific steps of each round of network quality detection are described in detail below. Figure 3 As shown, including:
[0070] Step 301: determine a first number of hosts from the hosts included in the target network group as source hosts for this round of detection.
[0071] The target network group may be the entire target network, and the target network may be a local area network. When the target network group is the entire target network, a first number of hosts may be randomly determined from the hosts included in the target network group as source hosts for this round of detection.
[0072] The target network in the present application may also include multiple network groups, so that each network group is used as a target network group.
[0073] Optionally, the target network group includes a first sub-network group, and determining a first number of hosts from the hosts included in the target network group as source hosts for this round of detection includes:
[0074] A first number of hosts are determined from the hosts in the first sub-network group as source hosts for this round of detection, wherein the hosts included in the first sub-network group are in the same subnet.
[0075] Specifically, the present application can divide the entire target network into multiple subnets, thereby obtaining multiple subnet groups, and any two subnet groups are used as a network group, and any subnet group in each network group can be used as the first subnet group. The specific process of dividing the entire network into multiple subnets is a prior art and will not be described in detail here.
[0076] In an embodiment of the present application, since the target network group includes a first sub-network group, and the hosts included in the first sub-network group are in the same subnet, a first number of hosts are determined from the hosts in the first sub-network group as source hosts for this round of detection to ensure that the source hosts are in the same subnet.
[0077] Step 302: Determine a second number of hosts from the hosts included in the target network group as target hosts for this round of detection.
[0078] Among them, the target network group can be the entire target network. When the target network group is the entire target network, a first number of hosts can be randomly determined from the hosts included in the target network group as the source hosts for this round of detection, and a second number of hosts can be randomly determined from the hosts included in the target network group as the target hosts for this round of detection. However, it is necessary to ensure that the determined source hosts are different from the target hosts during the determination process to prevent the source host from pinging itself. Figure 4 is a schematic diagram showing a target network group according to an exemplary embodiment. Figure 4As shown, the target network group includes host 11, host 12, host 13, host 14 and host 15. If the first number of this round of detection is 2 and the second number of this round of detection is 2, host 11 and host 12 are determined from the hosts included in the target network group as the source hosts of this round of detection, and host 14 and host 15 are determined from the hosts included in the target network group as the target hosts of this round of detection.
[0079] The target network in the present application may also include multiple network groups, so that each network group is used as a target network group. Figure 5 is a schematic diagram of a target network according to an exemplary embodiment. Figure 5 As shown, network B includes four network groups, namely network group 1, network group 2, network group 3 and network group 4. Each network group in network B can be used as a target network group.
[0080] Optionally, the target network group further includes a second sub-network group, and determining a second number of hosts from the hosts included in the target network group as target hosts for this round of detection includes:
[0081] The second number of hosts are determined from the hosts in the second sub-network group as target hosts for this round of detection.
[0082] The hosts of the second subnet group are in the same subnet, and the subnet of the hosts of the first subnet group is different from the subnet of the hosts of the second subnet group. The present application can divide the entire target network into multiple subnets, thereby obtaining multiple subnet groups, and use any two subnet groups as target network groups.
[0083] In an embodiment of the present application, since the target network group includes a first sub-network group and a second sub-network group, and the subnet of the host of the first sub-network group is different from the subnet of the host of the second sub-network group, a first number of hosts are determined from the hosts of the first sub-network group as source hosts for this round of detection, and a second number of hosts are determined from the hosts of the second sub-network group as target hosts for this round of detection, so as to implement cross-subnet network quality detection of the target network and improve the efficiency of network quality detection of the target network.
[0084] For example, if the target network includes sub-network group A, sub-network group B and sub-network group C, then the network 1 includes 6 network groups, namely, network group 1 includes sub-network group A as the first sub-network group and sub-network group B as the second sub-network group, network group 2 includes sub-network group B as the first sub-network group and sub-network group A as the second sub-network group, network group 3 includes sub-network group A as the first sub-network group and sub-network group C as the second sub-network group, network group 4 includes sub-network group C as the first sub-network group and sub-network group A as the second sub-network group, network group 5 includes sub-network group B as the first sub-network group and sub-network group C as the second sub-network group, and network group 6 includes sub-network group C as the first sub-network group and sub-network group B as the second sub-network group.
[0085] Since the target network group includes the first sub-network group and the second sub-network group, the present application can determine the source host from the hosts included in the first sub-network group, and determine the target host from the hosts included in the second sub-network group. Figure 6 is a schematic diagram showing another target network group according to an exemplary embodiment, such as Figure 6 As shown, the target network group includes a first sub-network group and a second sub-network group, the first sub-network group includes hosts 21, 22 and 23, and the second sub-network group includes hosts 24, 25 and 26. If the first number corresponding to this round of detection is 2 and the second number corresponding to this round of detection is 2, host 21 and host 23 are determined as source hosts from the hosts included in the first sub-network group, and host 24 and host 25 are determined as target hosts from the hosts included in the second sub-network group.
[0086] Since the first number of non-first-round detections in the present application is determined based on the network quality values of the source host and the target host in the previous round of detection and the first number of the previous round of detection, the second number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the second number of the previous round of detection. The present application can determine the network status of the target network group in the previous round of detection based on the network quality values of the source host and the target host in the previous round of detection, and determine the number of detections in the previous round of detection based on the first number of detections in the previous round and the second number of detections in the previous round. Therefore, the present application can determine the first number of detections in this round and the second number of detections in this round based on the network status of the target network group in the previous round of detection and the relationship between the number of detections in the previous round of detection and a preset detection threshold, which includes the following four situations:
[0087] In the first case, if the network status of the target network group in the previous round of detection is normal, and the detection number of the previous round of detection is greater than the preset detection threshold, the first number of the previous round of detection and the second number of the previous round of detection are reduced, and the reduced first number of the previous round of detection is used as the first number of the current round of detection, and the reduced second number of the previous round of detection is used as the second number of the current round of detection.
[0088] The network status of the target network group in the previous round of detection is normal, which means that the quality abnormality rate of the target network group in the previous round of detection is less than or equal to the preset abnormality threshold. The preset abnormality threshold can be set according to actual conditions, for example, the preset abnormality threshold can be 0.
[0089] The above-mentioned quality anomaly rate of the target network group in the last round of detection represents the degree of network anomaly of the target network group in the last round of detection. The quality anomaly rate of the target network group in the last round of detection is determined based on the number of abnormal network quality values in the network quality values of the source host and the target host of the target network group in the last round of detection. Specifically, the ratio of the number of abnormal network quality values of the target network group in the last round of detection to the number of detections in the last round of detection can be used as the quality anomaly rate of the target network group in the last round of detection. Among them, the abnormal network quality value is a network quality value less than a preset first quality threshold, and the preset first quality threshold can be set according to actual conditions. For example, the preset first quality threshold can be 100%. The number of detections in the last round of detection is determined based on the first number of detections in the last round and the second number of detections in the last round. In the present application, the product of the first number of detections in the last round and the second number of detections in the last round can be used as the number of detections in the last round of detection.
[0090] Optionally, reducing the first number of the previous round of detection and the second number of the previous round of detection includes the following two methods:
[0091] The first method is to reduce the first number of the previous round of detection and the second number of the previous round of detection according to a preset step size.
[0092] The preset step size may be set according to actual conditions. For example, the preset step size may be 4.
[0093] In addition to presetting one step length, the present application can also preset two different step lengths, namely a first step length and a second step length. Therefore, the first number of the previous round of detection is reduced according to the first step length, and the second number of the previous round of detection is reduced according to the second step length. The first step length and the second step length can be set according to actual conditions.
[0094] Below, take the target network group including the first sub-network group and the second sub-network group as an example. If the preset abnormality threshold is 0, the detection threshold is 4, and in the last round of detection, 6 hosts are determined as source hosts from the hosts included in the first sub-network group, and 6 hosts are determined as target hosts from the hosts included in the second sub-network group, then the number of detections in the last round of detection is 6*6=36. If the quality abnormality rate of the target network group in the last round of detection is 0, that is, the network status of the target network group in the last round of detection is normal, and the number of detections in the last round of detection is 36 greater than 4, then the first number of the last round of detection and the second number of the last round of detection are reduced based on the preset step size. If the preset step size is 4, the first number of detections in this round is determined to be 6-4=2 and the second number of detections in this round is determined to be 6-4=2.
[0095] The present application can also reduce the first number of the previous round of detection based on the preset first step length, and reduce the second number of the previous round of detection based on the preset second step length. If the first step length is 4 and the second step length is 2, then the first number of the current round of detection is determined to be 6-4=2 and the second number of the current round of detection is determined to be 6-2=4.
[0096] The second method is to use the numerical value in the preset data set that is smaller than the first number in the previous round of detection and has the smallest difference with the first number in the previous round of detection as the first number in the previous round of detection after reduction, and to use the numerical value in the data set that is smaller than the second number in the previous round of detection and has the smallest difference with the second number in the previous round of detection as the second number in the previous round of detection after reduction.
[0097] The preset data set includes multiple values, which can be set according to actual conditions. For example, the preset data set includes 2, 4, 5, 7 and 8. The first number of reducing the previous round of detection is to reduce the number of source hosts, and the second number of reducing the previous round of detection is to reduce the number of target hosts.
[0098] In addition to presetting one data set, the present application can also preset two different data sets, namely the first data set and the second data set. Therefore, the value in the first data set that is less than the first number of the previous round of detection and has the smallest difference from the first number of the previous round of detection is used as the first number of the previous round of detection after reduction, and the value in the second data set that is less than the second number of the previous round of detection and has the smallest difference from the second number of the previous round of detection is used as the second number of the previous round of detection after reduction. Among them, the first data set and the second data set can be set according to actual conditions.
[0099] Taking the target network group including the first sub-network group and the second sub-network group as an example, if the preset abnormal threshold is 0, the detection threshold is 4, and in the last round of detection, 6 hosts are determined as source hosts from the hosts included in the first sub-network group, and 7 hosts are determined as target hosts from the hosts included in the second sub-network group, then the number of detections in the last round of detection is 6*7=42. If the quality abnormality rate of the target network group in the last round of detection is 0, that is, the network state of the target network group in the last round of detection is normal, and the number of detections in the last round of detection is 42 greater than 4, then the first number of the last round of detection and the second number of the last round of detection are reduced based on the preset data set. If the preset data set includes 2, 3, 6, 7 and 8, it is determined that the value in the data set that is less than 6 and the smallest difference from 6 is 3, and it is determined that the value in the data set that is less than 7 and the smallest difference from 7 is 6, therefore, the first number of detections in this round is determined to be 3 and the second number of detections in this round is determined to be 6.
[0100] The present application can also reduce the first number of the previous round of detection based on the preset first data set, and reduce the second number of the previous round of detection based on the preset second data set. If the first data set includes 2, 3, 6, 7 and 8, and the second data set includes 2, 4, 7, 8 and 9, then it is determined that the value in the first data set that is less than 6 and has the smallest difference with 6 is 3, and it is determined that the value in the second data set that is less than 7 and has the smallest difference with 7 is 4, therefore, it is determined that the first number of this round of detection is 3 and the second number of this round of detection is 4.
[0101] In an embodiment of the present application, the first number of the previous round of detection and the second number of the previous round of detection are reduced by a preset step size or a preset data set, thereby improving the efficiency of reducing the first number of the previous round of detection and the second number of the previous round of detection.
[0102] Optionally, in the first case, in addition to the above method for determining the first number of detections in this round and the second number of detections in this round, the present application may also determine the first number of detections in this round and the second number of detections in this round by the following method:
[0103] reducing the first number of the previous round of detection, using the reduced first number of the previous round of detection as the first number of the current round of detection, and using the second number of the previous round of detection as the second number of the current round of detection; or;
[0104] The second number of the previous round of detection is reduced, and the reduced second number of the previous round of detection is used as the second number of the current round of detection, and the first number of the previous round of detection is used as the first number of the current round of detection.
[0105] The first number of the previous round of detections can be reduced based on a preset step size or a preset data set. The second number of the previous round of detections can be reduced based on a preset step size or a preset data set.
[0106] Taking the case where the first number of the previous round of detection is reduced based on a preset step size, and the target network group includes a first sub-network group and a second sub-network group as an example, if the preset abnormality threshold is 0, the detection threshold is 4, and in the previous round of detection, 4 hosts are determined as source hosts from the hosts included in the first sub-network group, and 6 hosts are determined as target hosts from the hosts included in the second sub-network group, then the number of detections in the previous round of detection is 4*6=24. If the quality abnormality rate of the target network group in the previous round of detection is 0, that is, the network status of the target network group in the previous round of detection is normal, and the number of detections in the previous round of detection, 24, is greater than 4, then the first number of the previous round of detection is reduced based on the preset step size. If the preset step size is 2, then the first number of detections in this round is determined to be 4-2=2 and the second number of detections in this round is determined to be 6.
[0107] Taking the case where the second number of the previous round of detection is reduced based on a preset step size, and the target network group includes a first sub-network group and a second sub-network group as an example, if the preset abnormality threshold is 0, the detection threshold is 4, and in the previous round of detection, 5 hosts are determined as source hosts from the hosts included in the first sub-network group, and 4 hosts are determined as target hosts from the hosts included in the second sub-network group, then the number of detections in the previous round of detection is 5*4=20. If the quality abnormality rate of the target network group in the previous round of detection is 0, that is, the network status of the target network group in the previous round of detection is normal, and the number of detections in the previous round of detection is greater than 4, then the second number of the previous round of detection is reduced based on the preset step size. If the preset step size is 2, then the first number of detections in this round is determined to be 5 and the second number of detections in this round is determined to be 4-2=2.
[0108] In the embodiment of the present application, since the number of detections in the last round of detection is greater than the preset detection threshold, it indicates that the number of detections in the last round of detection is large, so the network quality value between the source host and the target host in the target network group represents the network situation of the target network group with high accuracy, but the efficiency of the last round of network quality detection is low. And since the network state of the target network group in the last round of detection is normal, the network quality value between the source host and the target host in the target network group represents the network situation of the target network group with high accuracy, indicating that the probability that the network state of the target network group in this round of detection is normal is very high, and the present application does not need to continue to determine a higher first number of source hosts and a second number of target hosts from the hosts included in the target network group for network quality detection. Therefore, the present application reduces the first number of the last round of detection and the second number of the last round of detection, and uses the first number of the last round of detection after the reduction as the first number of this round of detection, and uses the second number of the last round of detection after the reduction as the second number of this round of detection, thereby reducing the accuracy of the network quality value between the source host and the target host in the target network group representing the network situation of the target network group to a certain extent, so as to improve the efficiency of network quality detection and reduce the network resources consumed by network quality detection.
[0109] In the second case, if the network status of the target network group in the previous round of detection is normal, and the detection number of the previous round of detection is less than or equal to the detection threshold, the first number of the previous round of detection is used as the first number of the current round of detection, and the second number of the previous round of detection is used as the second number of the current round of detection.
[0110] In the following, the target network group includes the first sub-network group and the second sub-network group as an example. If the preset abnormal threshold is 0, the detection threshold is 4, and in the previous round of detection, 2 hosts are determined as source hosts from the hosts included in the first sub-network group, and 2 hosts are determined as target hosts from the hosts included in the second sub-network group, then the number of detections in the previous round of detection is 2*2=4. If the quality abnormality rate of the target network group in the previous round of detection is 0, that is, the network status of the target network group in the previous round of detection is normal, and the number of detections in the previous round of detection is 4, which is equal to the detection threshold, then the first number of detections in this round is determined to be 2 and the second number of detections in this round is determined to be 2.
[0111] In the embodiment of the present application, since the number of detections in the previous round of detection is less than or equal to the detection threshold, it indicates that the number of detections in the previous round of detection is small, and therefore, the network quality value between the source host and the target host in the target network group does not accurately characterize the network situation of the target network group, but the efficiency of the previous round of network quality detection is high. And since the network status of the target network group in the previous round of detection is normal, therefore, in order to maintain a high efficiency of network quality detection, the present application uses the first number of the previous round of detection as the first number of this round of detection, and uses the second number of the previous round of detection as the second number of this round of detection.
[0112] In the third case, if the network status of the target network group in the previous round of detection is abnormal, and the detection number of the previous round of detection is less than or equal to the detection threshold, the first number of the previous round of detection and the second number of the previous round of detection are increased, and the increased first number of the previous round of detection is used as the first number of the current round of detection, and the increased second number of the previous round of detection is used as the second number of the current round of detection.
[0113] The network status of the target network group in the previous round of detection being an abnormal state means that the quality abnormality rate of the target network group in the previous round of detection is greater than a preset abnormal threshold.
[0114] Optionally, increasing the first number of the previous round of detection and the second number of the previous round of detection includes the following two methods:
[0115] Method 1, increasing the first number of the previous round of detection and the second number of the previous round of detection according to a preset step size.
[0116] The above-mentioned preset step size can be set according to actual conditions, for example, the preset step size can be 4. However, in the process of increasing the number, it is necessary to ensure that the first number of the previous round of detection after the increase is less than the total number of hosts included in the target network group, and the second number of the previous round of detection after the increase is less than the total number of hosts included in the target network group. If the target network group includes a first sub-network group and a second sub-network group, the first number of the previous round of detection after the increase is less than or equal to the total number of hosts included in the first sub-network group, and the second number of the previous round of detection after the increase is less than or equal to the total number of hosts included in the second sub-network group.
[0117] In addition to presetting one step length, the present application can also preset two different step lengths, namely the third step length and the fourth step length. Therefore, the first number of the previous round of detection is increased according to the third step length, and the second number of the previous round of detection is increased according to the fourth step length. The third step length and the fourth step length can be set according to actual conditions.
[0118] For example, the target network group includes a first sub-network group and a second sub-network group. If the preset abnormality threshold is 0, the detection threshold is 4, and in the last round of detection, 2 hosts are determined as source hosts from the hosts included in the first sub-network group, and 2 hosts are determined as target hosts from the hosts included in the second sub-network group, then the number of detections in the last round of detection is 2*2=4. If the quality abnormality rate of the target network group in the last round of detection is 25%, that is, the network state of the target network group in the last round of detection is an abnormal state, and the number of detections in the last round of detection is 4, then the first number of the last round of detection and the second number of the last round of detection are increased based on the preset step size. If the preset step size is 4, the first number of detections in this round is determined to be 2+4=6 and the second number of detections in this round is determined to be 2+4=6.
[0119] The present application can also increase the first number of the previous round of detection based on the preset third step length, and increase the second number of the previous round of detection based on the preset fourth step length. If the first step length is 4 and the second step length is 2, then the first number of the current round of detection is determined to be 2+4=6 and the second number of the current round of detection is determined to be 2+2=4.
[0120] Method 2, taking the value in the preset data set that is greater than the first number in the previous round of detection and has the smallest difference from the first number in the previous round of detection as the increased first number in the previous round of detection, and taking the value in the data set that is greater than the second number in the previous round of detection and has the smallest difference from the second number in the previous round of detection as the increased second number in the previous round of detection.
[0121] The preset data set includes multiple values, which can be set according to actual conditions. For example, the preset data set includes 2, 4, 5, 7 and 8. The first number of increasing the previous round of detection is to increase the number of source hosts, and the second number of increasing the previous round of detection is to increase the number of target hosts.
[0122] In addition to presetting one data set, the present application can also preset two different data sets, namely the third data set and the fourth data set. Therefore, the value in the third data set that is greater than the first number of the previous round of detection and has the smallest difference from the first number of the previous round of detection is used as the first number of the previous round of detection after increase, and the value in the fourth data set that is greater than the second number of the previous round of detection and has the smallest difference from the second number of the previous round of detection is used as the second number of the previous round of detection after increase. Among them, the first data set and the second data set can be set according to actual conditions.
[0123] For example, the target network group includes a first sub-network group and a second sub-network group. If the preset abnormal threshold is 0, the detection threshold is 10, and in the last round of detection, 3 hosts are determined as source hosts from the hosts included in the first sub-network group, and 2 hosts are determined as target hosts from the hosts included in the second sub-network group, then the number of detections in the last round of detection is 3*2=6. If the quality abnormality rate of the target network group in the last round of detection is 50%, that is, the network state of the target network group in the last round of detection is an abnormal state, and the number of detections in the last round of detection is 6 less than 10, then the first number of the last round of detection and the second number of the last round of detection are increased based on the preset data set. If the preset data set includes 2, 3, 6, 7 and 8, it is determined that the value greater than 3 in the data set and the smallest difference from 3 is 6, and it is determined that the value greater than 2 in the data set and the smallest difference from 2 is 3, therefore, the first number of detections in this round is determined to be 6 and the second number of detections in this round is determined to be 3.
[0124] The present application can also increase the first number of the previous round of detection based on the preset first data set, and increase the second number of the previous round of detection based on the preset second data set. If the first data set includes 2, 3, 6, 7 and 8, and the second data set includes 2, 4, 7, 8 and 9, then it is determined that the value in the first data set that is greater than 3 and has the smallest difference from 3 is 6, and it is determined that the value in the second data set that is greater than 2 and has the smallest difference from 2 is 4, therefore, it is determined that the first number of this round of detection is 6 and the second number of this round of detection is 4.
[0125] In an embodiment of the present application, the first number of the previous round of detection and the second number of the previous round of detection are increased by a preset step size or a preset data set, thereby improving the efficiency of increasing the first number of the previous round of detection and the second number of the previous round of detection.
[0126] Optionally, in the third case, in addition to the above method for determining the first number of detections in this round and the second number of detections in this round, the present application may also determine the first number of detections in this round and the second number of detections in this round by the following method:
[0127] Increase the first number of the previous round of detection, use the increased first number of the previous round of detection as the first number of the current round of detection, and use the second number of the previous round of detection as the second number of the current round of detection; or;
[0128] The second number of the previous round of detection is increased, the increased second number of the previous round of detection is used as the second number of the current round of detection, and the first number of the previous round of detection is used as the first number of the current round of detection.
[0129] The first number of the previous round of detections may be increased based on a preset step size or a preset data set. The second number of the previous round of detections may be increased based on a preset step size or a preset data set.
[0130] Taking the case where the first number corresponding to the previous round of detection is increased based on a preset step size, and the target network group includes a first sub-network group and a second sub-network group, as an example, if the preset abnormality threshold is 0, the detection threshold is 16, and in the previous round of detection, 4 hosts are determined as source hosts from the hosts included in the first sub-network group, and 3 hosts are determined as target hosts from the hosts included in the second sub-network group, then the number of detections in the previous round of detection is 4*3=12. If the quality abnormality rate of the target network group in the previous round of detection is 25%, that is, the network state of the target network group in the previous round of detection is an abnormal state, and the number of detections in the previous round of detection is 12 less than 16, then the first number of the previous round of detection is increased based on the preset step size. If the preset step size is 2, the first number of detections in this round is determined to be 4+2=6 and the second number of detections in this round is determined to be 3.
[0131] Taking the case where the second number of the previous round of detection is increased based on a preset step length, and the target network group includes a first sub-network group and a second sub-network group, as an example, if the preset abnormality threshold is 0, the detection threshold is 16, and in the previous round of detection, 5 hosts are determined as source hosts from the hosts included in the first sub-network group, and 3 hosts are determined as target hosts from the hosts included in the second sub-network group, then the number of detections in the previous round of detection is 5*3=15. If the quality abnormality rate of the target network group in the previous round of detection is 75%, that is, the network state of the target network group in the previous round of detection is an abnormal state, and the number of detections in the previous round of detection is 15 less than 16, then the second number of the previous round of detection is increased based on the preset step length. If the preset step length is 2, then the first number of detections in this round is determined to be 5 and the second number of detections in this round is determined to be 3+2=5.
[0132] In the embodiment of the present application, since the number of detections in the previous round of detection is less than or equal to the detection threshold, it indicates that the number of detections in the previous round of detection is small, so the accuracy of the network quality value between the source host and the target host in the target network group to characterize the network situation of the target network group is not high, but the efficiency of the previous round of network quality detection is high. And since the network state of the target network group in the previous round of detection is an abnormal state, the accuracy of the network quality value between the source host and the target host in the target network group to characterize the network situation of the target network group is not high, and a higher first number of the current round of detection and a higher second number of the current round of detection are required to improve the accuracy of the network quality value between the source host and the target host in the target network group to characterize the network situation of the target network group. Therefore, the present application increases the first number of the previous round of detection and the second number of the previous round of detection, and uses the increased first number of the previous round of detection as the first number of the current round of detection, and uses the increased second number of the previous round of detection as the second number of the current round of detection, thereby reducing the efficiency of network quality detection to a certain extent, so as to improve the accuracy of the network quality value between the source host and the target host in the target network group to characterize the network situation of the target network group.
[0133] In the fourth case, if the network status of the target network group in the previous round of detection is abnormal, and the detection number of the previous round of detection is greater than the detection threshold, the first number of the previous round of detection will be used as the first number of the current round of detection, and the second number of the previous round of detection will be used as the second number of the current round of detection.
[0134] Taking the target network group including the first sub-network group and the second sub-network group as an example, if the preset abnormal threshold is 0, the detection threshold is 4, and in the previous round of detection, 4 hosts are determined as source hosts from the hosts included in the first sub-network group, and 4 hosts are determined as target hosts from the hosts included in the second sub-network group, then the number of detections in the previous round of detection is 4*3=12. If the quality abnormality rate of the target network group in the previous round of detection is 25%, that is, the network state of the target network group in the previous round of detection is abnormal, and the number of detections in the previous round of detection, 12, is greater than the detection threshold, then the first number of detections in this round is determined to be 4 and the second number of detections in this round is determined to be 3.
[0135] In the embodiment of the present application, since the number of detections in the previous round of detection is greater than the detection threshold, it indicates that the number of detections in the previous round of detection is large, and therefore, the network quality value between the source host and the target host in the target network group represents the network situation of the target network group with high accuracy, but the efficiency of the previous round of network quality detection is low. And since the network state of the target network group in the previous round of detection is an abnormal state, the network quality value between the source host and the target host in the target network group represents the network situation of the target network group with high accuracy, therefore, the present application uses the first number of the previous round of detection as the first number of this round of detection, and uses the second number of the previous round of detection as the second number of this round of detection, thereby ensuring that the network quality value between the source host and the target host in the target network group can more accurately represent the network situation of the target network group.
[0136] To summarize the four situations mentioned above, the present application determines the first number of detections in this round and the second number of detections in this round based on the network status of the target network group in the previous round of detection, and the relationship between the number of detections in the previous round of detection and the preset detection threshold, thereby balancing the accuracy of the network quality value between the source host and the target host in the target network group to characterize the network status of the target network group, and the efficiency of network quality detection, and reducing the waste of system and network resources.
[0137] Step 303: triggering network quality detection between the source host and the target host of the target network group.
[0138] Optionally, the above-mentioned network quality detection between the source host and the target host of the target network group is triggered, including: based on the IP address of each source host and the IP address of each target host, generating a pingList of each source host, and sending the pingList to the corresponding source host, and recording the corresponding sending time. Each source host calls fping to perform network quality detection on the IP address of each target host in the pingList of the source host. In addition to fping, other network testing tools can also be used in this application.
[0139] Since the entire target network includes multiple sub-network groups, the present application can use any sub-network group as the first sub-network group, and use the other sub-network groups in the target network except the first sub-network group as the second sub-network groups, thereby generating a pingList for each source host based on the IP address of each source host and the IP address of each target host.
[0140] For example, the target network includes subnetwork group A, subnetwork group B and subnetwork group C, wherein subnetwork group A includes hosts (a1, a2), subnetwork group B includes hosts (b1, b2), and subnetwork group C includes hosts (c1, c2). Therefore, the pingList sent by the controller to host a1 = (b1, b2, c1, c2), the pingList sent by the controller to host a2 = (b1, b2, c1, c2), the pingList sent by the controller to host b1 = (a1, a2, c1, c2), the pingList sent by the controller to host b2 = (a1, a2, c1, c2), the pingList sent by the controller to host c1 = (a1, a2, b1, b2), and the pingList sent by the controller to host c2 = (a1, a2, b1, b2).
[0141] In the present application, the pingList can be sent down in full at regular intervals. Specifically, a first number of hosts are determined as source hosts from the hosts included in the first sub-network group of the target network group according to a set time interval, and a second number of hosts are determined as target hosts from the hosts included in the second sub-network group of the target network group. Based on the IP addresses of each source host and each target host, a pingList of each source host is generated, and the pingList is sent down to the corresponding source host. The above-mentioned set time interval can be set according to actual conditions. For example, the set time interval can be 10 minutes. Since the host is randomly determined each time the pingList is sent down, the higher the sending frequency, that is, the shorter the set time interval, the higher the accuracy of the network quality value between the source host and the target host in the target network group in representing the network situation of the target network group, thereby avoiding always detecting the same host.
[0142] For example, the first sub-network group of the target network includes hosts (a1, a2, a3, a4), and the second sub-network group of the target network includes hosts (b1, b2, b3, b4). At 1:00, the source host is determined to be (a1, a2) from the hosts included in the first sub-network group, and the target host is determined to be (b1, b2) from the hosts included in the second sub-network group. Based on the IP addresses of each source host and each target host, the pingList of host a1 and the pingList of host a2 are generated, and pingList = (b1, b2) is sent to host a1, and pingList = (b1, b2) is sent to host a2. Based on the network status of the target network group in this round of detection and the relationship between the number of detections in this round of detection and the detection threshold, it is determined that the number of source hosts of the target network group in the next round of detection is 2, and the number of target hosts of the next round of detection is 2. Therefore, at 1:10, the source host is determined to be (a1, a4) from the hosts included in the first subnet group, and the target host is determined to be (b2, b3) from the hosts included in the second subnet group. Based on the IP addresses of each source host and each target host, a pingList for host a1 and a pingList for host a4 are generated, and pingList = (b2, b3) is sent to host a1, and pingList = (b2, b3) is sent to host a4.
[0143] Step 304: Determine the network quality value between the source host and the target host in the target network group.
[0144] Specifically, after the duration between the current time and the start time of this round of detection is greater than or equal to the set duration, the network quality value between the source host and the target host in the target network is determined.
[0145] Among them, in addition to using the start time of the above-mentioned current round of detection, the present application can also use the issuance time of the pingList of each source host. The above-mentioned set duration can be set according to the actual situation, for example, it can be set to 30 seconds. The network quality value between the above-mentioned source host and the target host is determined after the source host performs a network quality detection with the target host based on the corresponding pingList. Network quality detection is to detect network connectivity and connectivity quality through a certain network quality detection method (such as ping). The network with many packet losses or slow response has a poor network quality value. Therefore, in the embodiment of the present application, the network quality value between the source host and the target host can be calculated based on the packet loss rate and / or delay duration determined after the source host and the target host perform network quality detection.
[0146] Optionally, if the duration between the current time and the start time of this round of detection is not greater than or equal to the set duration, it is determined that the network quality detection state of the target network in this round of detection is waiting.
[0147] Specifically, if the duration between the current time and the start time of this round of detection is less than the set duration, it indicates that the current time is too short to send out or the pingList fails to send out, and it is necessary to wait, and determine that the network quality detection status of the target network group in this round of detection is waiting.
[0148] Optionally, after the duration between the current time and the start time of this round of detection is greater than or equal to the set duration, the network quality value between the source host and the target host in the target network group is determined, including the following two situations: one is that the detection result between the source host and the target host is received, and the network quality value in the detection result is used as the network quality value between the source host and the target host; the other is that the detection result between the source host and the target host is not received, and the network quality value between the source host and the target host is assumed to be the worst, that is, the network quality value between the source host and the target host is determined to be the second quality threshold. Among them, the first quality threshold is greater than the second quality threshold, and the second quality threshold can be set according to actual conditions, for example, the second quality threshold is 0.
[0149] Among them, the detection result between the above-mentioned source host and the target host is uploaded after the source host performs network quality detection with the target host based on the corresponding pingList, and the detection result between the above-mentioned source host and the target host includes the average delay time, network quality value, source IP, target IP and detection completion time. In the embodiment of the present application, the network quality value between the source host and the target host can be the ratio of the number of response packets received after the source host sends multiple data packets to the target host to the total number of data packets sent by the source host to the target host, that is, the network quality value Q between the source host and the target host = f / h, wherein f is the number of response packets received after the source host sends data packets to the target host, and h is the total number of data packets sent by the source host to the target host. For example, the source host sends 4 data packets to the target host and receives 4 response packets. Therefore, the network quality value between the source host and the target host is 100%.
[0150] In the embodiment of the present application, the detection result between the source host and the target host can be expressed as:
[0151] {
[0152] "dataList":[ / / data list
[0153] {
[0154] "latencyAvg":"0.45", / / Average latency (milliseconds);
[0155] "quality":"100", / / network quality value;
[0156] "sourceIp":"10.97.21.8", / / Source IP, indicating the IP address of the source host;
[0157] "targetIp":"10.97.21.7", / / target IP, indicating the IP address of the target host;
[0158] "time":"2023-11-06 01:18:31", / / Detection completion time;
[0159] }
[0160] ],
[0161] "type":"fping" / / message type;
[0162] }
[0163] Since the number of the received detection results between the source host and the target host in the target network group is different, determining the network quality value between the source host and the target host in the target network group includes the following two cases:
[0164] Case 1: If at least one detection result between the source host and the target host in the target network group is received, it is determined that the network quality values between the source host and the target host in the target network group that have not received the detection results are all the set second quality threshold, and it is determined that the network quality values between the source host and the target host in the target network group that have received the detection results are all the network quality values in the corresponding detection results.
[0165] Taking the second quality threshold value as 0, and the target network group including the first sub-network group and the second sub-network group as an example, the first sub-network group includes source host 1 and source host 2, and the second sub-network group includes target host 1 and target host 2. If only detection result 1 between source host 1 and target host 1 is received, the network quality value 1 between source host 1 and target host 1 is determined to be the network quality value in detection result 1, and the network quality value 2 between source host 1 and target host 2 is determined to be 0, the network quality value 3 between source host 2 and target host 1 is 0, and the network quality value 4 between source host 2 and target host 2 is 0.
[0166] If detection result 1 between source host 1 and target host 1, detection result 2 between source host 1 and target host 2, detection result 3 between source host 2 and target host 1, and detection result 4 between source host 2 and target host 2 are received, since the detection results include network quality values, it is determined that network quality value 1 between source host 1 and target host 1 is the network quality value in detection result 1, network quality value 2 between source host 1 and target host 2 is the network quality value in detection result 2, network quality value 3 between source host 2 and target host 1 is the network quality value in detection result 3, and network quality value 4 between source host 2 and target host 2 is the network quality value in detection result 4.
[0167] Case 2: If at least one detection result between the source host and the target host in the target network group is not received, it is determined that the network quality values between the source host and the target host in the target network group for which no detection result has been received are both the second quality threshold.
[0168] Since at least one detection result between the source host and the target host in the target network group has not been received after the duration between the current time and the start time of this round of detection is greater than or equal to the set duration, it indicates that the network quality value between the source host and the target host in the target network group for which the detection result has not been received is poor, that is, the network quality value between the source host and the target host in the target network group for which the detection result has not been received is both the second quality threshold.
[0169] Taking the second quality threshold value of 0 as an example, the target network group includes the first sub-network group and the second sub-network group, the first sub-network group includes the source host 1 and the source host 2, and the second sub-network group includes the target host 1 and the target host 2. If at least one detection result between the source host and the target host is not received, the network quality value 1 between the source host 1 and the target host 1 is 0, the network quality value 2 between the source host 1 and the target host 2 is 0, the network quality value 3 between the source host 2 and the target host 1 is 0, and the network quality value 4 between the source host 2 and the target host 2 is 0.
[0170] Taking the case where the first sub-network group of the target network group includes one source host and the second sub-network group of the target network group includes one target host as an example, the specific process of the controller determining the network quality value between the source host and the target host in the target network group is described in detail. Figure 7 is a schematic diagram of a network quality detection device according to an exemplary embodiment. Figure 7As shown, the controller 70 has information about all hosts in the target network, and assumes that each host is alive (non-living hosts may be controlled by other systems through a heartbeat detection mechanism, which is not within the scope of this application). The information of each host includes the subnet information where the host is located, so the hosts can be grouped according to the subnet information to obtain multiple subnet groups, and any two subnet groups are used as target network groups.
[0171] The controller 70 is used to generate the pingList of the source host 71 of the first sub-network group, and send the pingList to the source host 71. The controller 70 saves the sent data to the sending record table in the database 74, and the sending record table includes data such as the sending status (failed status or successful status), the sending time, etc. The pingList with a sending status of failed status will also be marked to facilitate the user to troubleshoot the problem. The sending time is used to determine whether the network quality detection status is waiting when summarizing and calculating the detection results. Because the results are calculated immediately after sending, the interval time is too short, and the network quality detection between the source host 71 and the target host 72 has not been completed, which is easy to cause false alarms.
[0172] The source host 71 includes an agent (monitor), which is an application running on the host, responsible for receiving the pingList sent by the controller 70, calling fping to perform a ping test on the target host 72 in the pingList based on the IP address of the target host 72 in the pingList, obtaining the test result, and reporting the test result to the message bus 73. The message bus 73 can be Kafka (stream processing platform), which is a high-throughput distributed publish-subscribe message system.
[0173] The message bus 73 is a program for processing messages, which is responsible for receiving the detection results and providing the detection results to the subscriber (controller 70). The message bus 73 can realize the decoupling of the controller 70 and the agent in the source host 71, avoiding the impact of too many detection results on the controller 70. At the same time, a detection result in the message bus 73 can be obtained by multiple subscribers, and different business processing is performed respectively. The controller 70 obtains the detection results between the source host 71 and the target host 72 from the message bus 73 by subscription, and parses the detection results between the source host 71 and the target host 72, determines the network quality value between the source host 71 and the target host 72, and updates the parameters such as the network quality value, detection completion time, and average delay duration in the detection result to the distribution record table in the database 74. Figure 8 is a schematic diagram showing a sending record table according to an exemplary embodiment. Figure 8As shown, the delivery record table includes 9 delivery records, each of which represents the delivery data between the source host and the target host. Each delivery record includes the IP address of the source host, the IP address of the target host, the delivery status, the delivery time, the network quality value, the detection completion time, the average delay time and other attributes as well as the corresponding parameters.
[0174] In the embodiment of the present application, based on the fping tool for ping detection, the source host can simultaneously initiate network quality detection on multiple target hosts, and automatically calculate the network quality value between the source host and the target host. The detection result is reported to the message bus (such as Kafka) through the agent, and then the controller subscribes to the detection result, analyzes the detection result and updates it to the issued record table, and the record storage can choose different storage methods according to the data volume, such as mysql (a database) when the data volume is small, and redis (a database) when the data volume is large, so as to control the real-time performance within seconds.
[0175] Step 305: Determine the quality abnormality rate of the target network group based on the number of abnormal network quality values in the network quality values.
[0176] In the present application, the ratio of the number of abnormal network qualities in the target network group that is less than the first quality threshold to the number of detections in this round of detection may be used as the quality abnormality rate of the target network, wherein the number of detections in this round of detection is the product of the first number and the second number.
[0177] The present application may also determine the quality abnormality rate of the target network group based on the number of normal network quality values in the network quality values, wherein the normal network quality value is a network quality value greater than or equal to a first quality threshold.
[0178] Specifically, the quality abnormality rate p can be calculated according to the following formula:
[0179] p = 1 - (c / b);
[0180] Wherein, c is the number of normal network qualities in the target network that are greater than or equal to the first quality threshold, and b is the number of detections in this round of detection.
[0181] Taking setting the first quality threshold as 100% as an example, the first sub-network group of the target network group includes source hosts (a1, a2), and the second sub-network group of the target network group includes target hosts (b1, b2). If the network quality value between a1 and b1 is 100%, the network quality value between a1 and b2 is 100%, the network quality value between a2 and b1 is 0, and the network quality value between a1 and b1 is 0, then the number of abnormal network qualities in the target network group that are less than the first quality threshold is determined to be 2, and the number of detections in this round is 2*2=4. Therefore, the quality abnormality rate of the target network group is 2 / 4=50%.
[0182] Since in the prior art, it can only be determined whether there is a fault between the source host and the target host based on the detection results between the source host and the target host, but it is not possible to determine at which specific position between the source host and the target host the fault exists. Therefore, in order to solve the above problem, the embodiment of the present application provides a fault location method after determining the quality abnormality rate of the target network based on the number of abnormal network quality values in the network quality value, including:
[0183] For any abnormal network quality value, the source host of the abnormal network quality value is used as the source host to be detected, and the target host of the abnormal network quality value is used as the target host to be detected;
[0184] The abnormal network quality value is compared with a preset second quality threshold to obtain a second comparison result, and the location of the fault between the source host to be detected and the target host to be detected is determined based on the second comparison result, wherein the first quality threshold is greater than the second quality threshold.
[0185] In an embodiment of the present application, the source host of the abnormal network quality value is used as the source host to be detected, the target host of the abnormal network quality value is used as the target host to be detected, and the abnormal network quality value is compared with the second quality threshold to determine the location of the fault between the source host to be detected and the target host to be detected, thereby improving the efficiency and accuracy of fault location, so that users can handle it in time.
[0186] Optionally, the determining, based on the second comparison result, a location where a fault exists between the source host to be detected and the target host to be detected includes:
[0187] If the abnormal network quality value is greater than the second quality threshold, it is determined that a network line between the source host to be detected and the target host to be detected has a fault;
[0188] If the abnormal network quality value is less than or equal to the second quality threshold, the first network quality value between the target device and the source host to be detected is compared with the first quality threshold to obtain a third comparison result, and the location of the fault between the source host to be detected and the target host to be detected is determined based on the third comparison result, wherein the target device is a fault-free device and the network line between the target device and the source host to be detected is fault-free.
[0189] The network line between the source host to be detected and the target host to be detected has a fault including poor quality of the network line, aging of the line, poor contact, etc. The target device may be a controller or other device.
[0190] Taking the second quality threshold of 0 as an example, if the abnormal network quality value between source host 1 and target host 1 is 75%, then 75%>0, indicating that the network between source host 1 and target host 1 is connected, but the network quality is poor and there is packet loss, that is, there is a fault in the network line between source host 1 and target host 1. The user needs to specifically check the cause of the fault. Possible causes include poor network cable quality, line aging, poor contact and other faults.
[0191] In an embodiment of the present application, by comparing the abnormal network quality value with the second quality threshold, it is determined whether there is a fault in the network line between the source host to be detected and the target host to be detected, thereby improving the efficiency and accuracy of fault location, so that users can handle it in a timely manner.
[0192] In the embodiment of the present application, after comparing the first network quality value between the target device and the source host to be detected with the first quality threshold to obtain a third comparison result, it is necessary to determine the location of the fault between the source host to be detected and the target host to be detected based on the third comparison result, which specifically includes the following three situations:
[0193] Case 1: if the first network quality value is less than the first quality threshold, it is determined that the source host to be detected has a fault.
[0194] Taking the first quality threshold as 100% and the second quality threshold as 0 as an example, if the abnormal network quality value between the source host 1 and the target host 2 is 0, it is determined that the abnormal network quality value is equal to the second quality threshold, so it is necessary to trigger the controller to perform network quality detection with the source host 1 to determine the first network quality value between the controller and the source host 1. If the first network quality value is 75%, that is, the first network quality value is less than 100%, it is determined that the source host 1 has a fault, and the specific cause of the fault is not within the protection scope of this application.
[0195] Case 2: If the first network quality value is greater than or equal to the first quality threshold, and there is no network device between the source host to be detected and the target host to be detected, it is determined that there is a fault in the network line between the source host to be detected and the target host to be detected, and / or there is a fault in the target host to be detected.
[0196] Taking the first quality threshold as 100% and the second quality threshold as 0 as an example, if the abnormal network quality value between the source host 1 and the target host 3 is 0, it is determined that the abnormal network quality value is equal to the second quality threshold, so it is necessary to trigger the controller and the source host 1 to perform network quality detection to determine the first network quality value between the controller and the source host 1. If the first network quality value is 100%, it is determined that there is no fault in the source host 1, therefore, if there is no network device between the source host 1 and the target host 3, it is determined that there is a fault in the network line between the source host 1 and the target host 3, and / or there is a fault in the target host 3.
[0197] Case three: if the first network quality value is greater than or equal to the first quality threshold, and there is a network device between the source host to be detected and the target host to be detected, and the second network quality value between the first network device and the second network device is less than the first quality threshold, it is determined that there is a fault in the network line between the first network device and the second network device, and / or there is a fault in the second network device.
[0198] Specifically, when the first network quality value is greater than or equal to the first quality threshold, and there is a network device between the source host to be detected and the target host to be detected, the present application can calculate the second network quality value between two adjacent devices in sequence starting from the source host to be detected, until the second network quality value between the first network device and the second network device is less than the first quality threshold, and determine that there is a fault in the network line between the first network device and the second network device, and / or there is a fault in the second network device. The present application can also determine the second network quality value between the source host to be detected and each network device respectively, until the second network quality value between the source host to be detected and the second network device is less than the first quality threshold, and determine that there is a fault in the network line between the first network device and the second network device, and / or there is a fault in the second network device.
[0199] Among them, the first network device is the source host to be detected, or a fault-free network device adjacent to the second network device and closest to the source host to be detected; the second network device is a network device between the source host to be detected and the target host to be detected, or a target host to be detected.
[0200] Taking the first quality threshold as 100% and the second quality threshold as 0 as an example, if the abnormal network quality value between the source host 1 and the target host 4 is 0, it is determined that the abnormal network quality value is equal to the second quality threshold, so it is necessary to trigger the controller and the source host 1 to perform network quality detection to determine the first network quality value between the controller and the source host 1. If the first network quality value is 100%, it is determined that there is no fault in the source host 1. Therefore, if there is a network device between the source host 1 and the target host 4, Fig. 9 is a schematic diagram showing a network device between a source host 1 and a target host 4 according to an exemplary embodiment. Fig. 9 As shown, there are two network devices between the source host 1 and the target host 4, namely, network device D1 and network device D2. The source host 1 and the network device D1 perform a network quality detection, and the network quality value 1 between the source host 1 and the network device D1 is 100%, indicating that there is no fault in the network line between the source host 1 and the network device D1, and there is no fault in the network device D1. The network device D1 and the network device D2 perform a network quality detection, and the network quality value 2 between the network device D1 and the network device D2 is 0, and the network quality value 2 is less than the first quality threshold. Therefore, it is determined that there is a fault in the network line between the network device D1 and the network device D2, and / or there is a fault in the network device D2.
[0201] If the source host 1 and the network device D2 perform a network connectivity test, and the network quality value 2 between the source host 1 and the network device D2 is 100%, it indicates that there is no fault in the network line between the network device D1 and the network device D2, and there is no fault in the network device D2. Therefore, the network device D2 performs a network quality test with the target host 4, and the network quality value 3 between the network device D2 and the target host 4 is 75%, and the network quality value 3 is less than the first quality threshold, therefore, it is determined that there is a fault in the network line between the network device D2 and the target host 4, and / or there is a fault in the target host 4.
[0202] In an embodiment of the present application, by comparing the first network quality value between the target device and the source host to be detected with the first quality threshold, as well as the presence of network devices between the source host to be detected and the target host to be detected, the location of the fault between the source host to be detected and the target host to be detected is determined, thereby improving the efficiency and accuracy of fault location, thereby enabling users to handle it in a timely manner.
[0203] The specific steps of determining the location where a fault exists between the source host to be detected and the target host to be detected corresponding to each abnormal network quality value will be described in detail below. Fig.10 As shown, including:
[0204] Step 1001, obtaining an abnormal network quality value between a source host to be detected and a target host to be detected;
[0205] Step 1002, determining whether the abnormal network quality value is greater than a second quality threshold, if so, executing step 1003, otherwise executing step 1004;
[0206] Step 1003, determining that a network line between the source host to be detected and the target host to be detected has a fault;
[0207] Step 1004, determining a first network quality value between the target device and the source host to be detected;
[0208] Step 1005, determining whether the first network quality is less than a first quality threshold, if so, executing step 1006, otherwise executing step 1007;
[0209] Step 1006, determining that the source host to be detected has a fault;
[0210] Step 1007, determine whether there is a network device between the source host to be detected and the target host to be detected, if yes, execute step 1008, otherwise, execute step 1012;
[0211] Step 1008, determining a second network quality value between the first network device and the second network device;
[0212] Step 1009, determining whether the second network quality value is less than the first quality threshold, if so, executing step 1010, otherwise, executing step 1011;
[0213] Step 1010, determining that a network line between the first network device and the second network device has a fault, and / or that the second network device has a fault;
[0214] Step 1011, using the second network device as the first network device, and using a device adjacent to the second network device and farthest from the source host to be detected as the second network device;
[0215] Step 1012: Determine whether a network line between the source host to be detected and the target host to be detected has a fault, and / or whether the target host to be detected has a fault.
[0216] In an embodiment of the present application, after determining that the network quality between the source host to be detected and the target host to be detected is abnormal, the location of the fault between the source host to be detected and the target host to be detected can be quickly and accurately determined, allowing the user to quickly repair it.
[0217] Step 306: Compare the quality abnormality rate of the target network group with a preset abnormality threshold to obtain a first comparison result.
[0218] The above-mentioned abnormal threshold can be set according to actual conditions, for example, the above-mentioned abnormal threshold can be 0%. The above-mentioned target network quality abnormality rate represents the network abnormality degree of the target network group in this round of detection.
[0219] Step 307: Determine the network status of the target network group in this round of detection based on the first comparison result.
[0220] Optionally, the determining, based on the first comparison result, a network status of the target network group in this round of detection includes:
[0221] If the quality abnormality rate of the target network group is less than or equal to the preset abnormality threshold, it is determined that the network state of the target network group in this round of detection is normal;
[0222] If the quality abnormality rate of the target network group is greater than the abnormal threshold, it is determined that the network state of the target network group in this round of detection is an abnormal state.
[0223] In an embodiment of the present application, based on the relationship between the quality anomaly rate of the target network group representing the degree of network anomaly of the target network group in this round of detection and the anomaly threshold, the network status of the target network group in this round of detection can be determined, thereby improving the accuracy of the determined network status.
[0224] In the embodiment of the present application, when it is determined that the network state of the target network group in this round of detection is abnormal, the network abnormality level of the target network group is determined based on the relationship between the detection quantity and the detection threshold of this round of detection, specifically including:
[0225] If the quality anomaly rate of the target network group is greater than the anomaly threshold, and the number of detections in this round of detection is less than or equal to the preset detection threshold, then determining the network anomaly level of the target network group to be a preset minimum network anomaly level, wherein the number of detections in this round of detection is determined based on the first number of detections in this round and the second number of detections in this round;
[0226] If the quality anomaly rate of the target network group is greater than the anomaly threshold, and the number of detections in this round of detection is greater than the detection threshold, then based on the correspondence between the preset anomaly threshold ranges and the network anomaly levels, it is determined that the quality anomaly rate of the target network group belongs to the network anomaly level corresponding to the anomaly threshold range, and the determined network anomaly level is used as the network anomaly level of the target network group.
[0227] After determining the network anomaly level of the target network group, the present application can issue an alarm according to the network anomaly level. The above-mentioned preset minimum network anomaly level can be set according to the actual situation, and the minimum network anomaly level can be a P3 alarm. The corresponding relationship between the above-mentioned preset abnormal threshold ranges and each network anomaly level can be an abnormal threshold range of 0-25%, corresponding to a P3 alarm, an abnormal threshold range of 25%-50%, corresponding to a P2 alarm, an abnormal threshold range of 50%-75%, corresponding to a P1 alarm, and an abnormal threshold range of 75%-100%, corresponding to a P0 alarm.
[0228] Taking the setting of the abnormal threshold to 0 and the setting of the detection threshold to 4 as an example, the abnormal threshold range is 0-25%, corresponding to the P3 alarm, the abnormal threshold range is 25%-50%, corresponding to the P2 alarm, the abnormal threshold range is 50%-75%, corresponding to the P1 alarm, and the abnormal threshold range is 75%-100%, corresponding to the P0 alarm. If 6 hosts are determined as source hosts from the hosts included in the first sub-network group of the target network group, and 6 hosts are determined as target hosts from the hosts included in the second sub-network group of the target network group, the number of detections in this round of detection is 6*6=36. If the quality abnormality rate of the target network group is 60% greater than 0 and the number of detections in this round of detection is greater than 4, then based on the corresponding relationship between the preset abnormal threshold ranges and the network abnormality levels, it is determined that when the quality abnormality rate is 60%, it corresponds to the P1 alarm. Therefore, the network abnormality level of the target network group is the P1 alarm.
[0229] In an embodiment of the present application, when the network status of the target network group in this round of detection is network abnormality, the network anomaly level of the target network group can be determined based on the relationship between the detection quantity and the detection threshold of this round of detection, so that the user can intuitively determine the degree of network anomaly of the target network group based on the network anomaly level, and process it in a timely manner based on the network anomaly level.
[0230] In addition to determining the network anomaly level of the target network group based on the network status of the target network group in this round of detection, and the relationship between the number of detections in this round of detection and the detection threshold, the present application can also determine the first number of the next round of detection and the second number of the next round of detection based on the network status of the target network group in this round of detection, and the relationship between the number of detections in this round of detection and the detection threshold. Therefore, if the anomaly threshold is 0, the detection threshold is 4, and the corresponding relationship between each anomaly threshold range and each alarm level is that the anomaly threshold range 0-25% corresponds to P3 alarm, the anomaly threshold range 25%-50% corresponds to P2 alarm, the anomaly threshold range 50%-75% corresponds to P1 alarm, and the anomaly threshold range 75%-100% corresponds to P0 alarm, then based on the relationship between the quality anomaly rate of the target network group in this round of detection and the anomaly threshold, and the relationship between the number of detections in this round of detection and the detection threshold, the network status of the target network group in this round of detection is determined, and the first number of the next round of detection and the second number of the next round of detection are determined. Fig.11 FIG. 1 is a flow chart showing a method for detecting network quality of a target network group in this round of detection according to an exemplary embodiment. Fig.11 As shown, the following steps are included:
[0231] Step 1101, determining the quality abnormality rate of the target network group in this round of detection;
[0232] Step 1102, determine whether the quality abnormality rate is 0, if so, execute step 1103, otherwise, execute step 1106;
[0233] Step 1103, determine whether the number of detections in this round of detection is less than or equal to 4, if so, execute step 1104, otherwise, execute step 1105;
[0234] Step 1104: No alarm is issued, and the first number of the current round of detection is used as the first number of the next round of detection, and the second number of the current round of detection is used as the second number of the next round of detection;
[0235] Step 1105: No alarm is issued, and the first number of detections in this round and the second number of detections in this round are reduced, and the reduced first number of detections in this round is used as the first number of detections in the next round, and the reduced second number of detections in this round is used as the second number of detections in the next round;
[0236] Step 1106, determining whether the number of detections in this round of detection is less than or equal to 4, if so, executing step 1107, otherwise, executing step 1108;
[0237] Step 1107, a P3 alarm is issued, and the first number of the current round of detection and the second number of the current round of detection are increased, and the increased first number of the current round of detection is used as the first number of the next round of detection, and the increased second number of the current round of detection is used as the second number of the next round of detection;
[0238] Step 1108, determine whether the quality abnormality rate is greater than 0 and less than 25%, if so, execute step 1109, otherwise execute step 1110;
[0239] Step 1109, a P3 alarm is issued, and the first number of the current round of detection is used as the first number of the next round of detection, and the second number of the current round of detection is used as the second number of the next round of detection;
[0240] Step 1110, determining whether the quality abnormality rate is greater than 25% and less than 50%, if so, executing step 1111, otherwise executing step 1112;
[0241] Step 1111, a P2 alarm is issued, and the first number of the current round of detection is used as the first number of the next round of detection, and the second number of the current round of detection is used as the second number of the next round of detection;
[0242] Step 1112, determine whether the quality abnormality rate is greater than 50% and less than 75%, if so, execute step 1113, otherwise execute step 1114;
[0243] Step 1113, a P1 alarm is issued, and the first number of the current round of detection is used as the first number of the next round of detection, and the second number of the current round of detection is used as the second number of the next round of detection;
[0244] Step 1114: issue a P0 alarm, and use the first number of the current round of detection as the first number of the next round of detection, and use the second number of the current round of detection as the second number of the next round of detection.
[0245] In an embodiment of the present application, the controller can perform network quality detection on each network group in the target network, thereby obtaining the network quality detection result of each network group, and send the network quality detection result of each network group to the display for display.
[0246] Fig.12 is a schematic diagram of a front-end display page according to an exemplary embodiment. Fig.12As shown, a 6*6 matrix diagram is displayed, and the matrix diagram includes multiple click blocks to display the corresponding detail page by user click. The left side of the matrix diagram is the first sub-network group, and the top is the second sub-network group. Since the sub-network group itself does not need to be detected, a blank square is displayed. Each click block is used to represent the network quality detection result of the network group, that is, the network quality detection result between the first sub-network group and the second sub-network group in the network group, and the network quality detection result includes the network state, the proportion of normal network quality, and the number of detections in this round of detection. Among them, the network state is P0, P1, P2, P3, normal, waiting, and the proportion of normal network quality value of each click block is determined based on the number of normal network quality values with network quality values greater than or equal to 100%. For example, the proportion of normal network quality values between sub-network group A and sub-network group C is 100%, indicating that the 4 network quality values determined by sub-network group A and sub-network group C in this round of detection are all 100%. The ratio of normal network quality values between sub-network group A and sub-network group B is 75%, which means that one of the four network quality values determined by sub-network group A and sub-network group B in this round of detection is less than 100%, so the P3 alarm is displayed. Click the color of the square to indicate the network abnormality level. The darker the color, the higher the network abnormality level.
[0247] like Fig.12 As shown, the percentage of normal network quality in the click blocks of sub-network group A and sub-network group D is 50%, indicating that two of the four network quality values determined by sub-network group A and sub-network group D in this round of detection are less than 100%, so the displayed network abnormality level is P2. If the user clicks the click block between sub-network group A and sub-network group D, the detailed page of the network quality between sub-network group A and sub-network group D is displayed. Fig.13 is a schematic diagram of a details page of the network quality situation between sub-network group A and sub-network group D according to an exemplary embodiment. Fig.13 As shown, the details page shows that the network quality value between the host (10.1.1.1) of sub-network group A and the host (10.2.2.1) of sub-network group D is 0%, and the diagnosis is that the host (10.2.2.1) is faulty; the network quality value between the host (10.1.1.2) of sub-network group A and the host (10.2.2.1) of sub-network group D is 0%, and the diagnosis is that the host (10.2.2.1) is faulty; the network quality value between the host (10.1.1.1) of sub-network group A and the host (10.2.2.2) of sub-network group D is 100%; the network quality value between the host (10.1.1.2) of sub-network group A and the host (10.2.2.2) of sub-network group D is 100%.
[0248] like Fig.12As shown, the percentage of normal network quality values in the click blocks of sub-network group C and sub-network group D is 0%, indicating that the 4 network quality values determined by sub-network group C and sub-network group D in this round of detection are all less than 100%, so the displayed network abnormality level is P0. If the user clicks the click block between sub-network group C and sub-network group D, the detailed page of the network quality value between sub-network group C and sub-network group D is displayed. Fig.14 is a schematic diagram of a detailed page showing the network quality situation between sub-network group C and sub-network group D according to an exemplary embodiment. Fig.14 As shown, the details page shows that the network quality value between the host (10.3.1.1) of sub-network group C and the host (10.2.2.1) of sub-network group D is 0%, which is diagnosed as a network line failure between network device (10.99.0.1) and network device (10.99.0.2) and / or a network device (10.99.0.2) failure; the network quality value between the host (10.3.1.2) of sub-network group C and the host (10.2.2.1) of sub-network group D is 0%, which is diagnosed as a network line failure between network device (10.99.0.1) and network device (10.99.0.2) and / or a network device (10.99.0.2) failure. 2) Fault; the network quality value between the host (10.3.1.1) of sub-network group C and the host (10.2.2.2) of sub-network group D is 0%, which is diagnosed as a network line fault between the network device (10.99.0.1) and the network device (10.99.0.2) and / or a network device (10.99.0.2) fault; the network quality value between the host (10.3.1.2) of sub-network group C and the host (10.2.2.2) of sub-network group D is 0%, which is diagnosed as a network line fault between the network device (10.99.0.1) and the network device (10.99.0.2) and / or a network device (10.99.0.2) fault.
[0249] In an embodiment of the present application, the controller performs network quality detection on each network group in the target network in real time, thereby obtaining the network quality detection results of each network group in the target network, and sends the network quality detection results of each network group to the display for real-time display, so that the user can perform corresponding processing in time according to the displayed network quality detection results, thereby improving the user's experience satisfaction.
[0250] Based on the same inventive concept, the present application embodiment provides a network quality detection device, please refer to Fig.15 , the device comprises:
[0251] A first determination module 1501 is used to determine a first number of hosts from the hosts included in the target network group as source hosts for this round of detection;
[0252] A second determination module 1502 is used to determine a second number of hosts from the hosts included in the target network group as target hosts for this round of detection;
[0253] The first number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the first number of the previous round of detection, and the second number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the second number of the previous round of detection;
[0254] The trigger module 1503 is used to trigger the network quality detection between the source host and the target host of the target network group.
[0255] As an optional implementation manner, after performing network quality detection between the source host and the target host of the triggering target network group, the trigger module 1503 is further used to:
[0256] Comparing the quality anomaly rate of the target network group with a preset anomaly threshold to obtain a first comparison result; wherein the quality anomaly rate of the target network group represents the degree of network anomaly of the target network group in this round of detection;
[0257] The network status of the target network group in this round of detection is determined based on the first comparison result.
[0258] As an optional implementation manner, the trigger module 1503 is used to:
[0259] If the quality abnormality rate of the target network group is less than or equal to the preset abnormality threshold, it is determined that the network state of the target network group in this round of detection is normal;
[0260] If the quality abnormality rate of the target network group is greater than the abnormal threshold, it is determined that the network state of the target network group in this round of detection is an abnormal state.
[0261] As an optional implementation manner, the trigger module 1503 is further configured to:
[0262] If the quality anomaly rate of the target network group is greater than the anomaly threshold, and the number of detections in this round of detection is less than or equal to the preset detection threshold, then determining the network anomaly level of the target network group to be a preset minimum network anomaly level, wherein the number of detections in this round of detection is determined based on the first number of detections in this round and the second number of detections in this round;
[0263] If the quality anomaly rate of the target network group is greater than the anomaly threshold, and the number of detections in this round of detection is greater than the detection threshold, then based on the correspondence between the preset anomaly threshold ranges and the network anomaly levels, it is determined that the quality anomaly rate of the target network group belongs to the network anomaly level corresponding to the anomaly threshold range, and the determined network anomaly level is used as the network anomaly level of the target network group.
[0264] As an optional implementation manner, the trigger module 1503 is used to determine the quality abnormality rate of the target network group in the following manner:
[0265] Determining a network quality value between a source host and a target host in the target network group;
[0266] The quality abnormality rate of the target network group is determined based on the number of abnormal network quality values in the network quality values, wherein the abnormal network quality value is a network quality value less than a preset first quality threshold.
[0267] As an optional implementation manner, after determining the quality abnormality rate of the target network group based on the number of abnormal network quality values in the network quality values, the trigger module 1503 is further used to:
[0268] For any abnormal network quality value, the source host of the abnormal network quality value is used as the source host to be detected, and the target host of the abnormal network quality value is used as the target host to be detected;
[0269] The abnormal network quality value is compared with a preset second quality threshold to obtain a second comparison result, and the location of the fault between the source host to be detected and the target host to be detected is determined based on the second comparison result, wherein the first quality threshold is greater than the second quality threshold.
[0270] As an optional implementation manner, the trigger module 1503 is used to:
[0271] If the abnormal network quality value is greater than the second quality threshold, it is determined that a network line between the source host to be detected and the target host to be detected has a fault;
[0272] If the abnormal network quality value is less than or equal to the second quality threshold, the first network quality value between the target device and the source host to be detected is compared with the first quality threshold to obtain a third comparison result, and the location of the fault between the source host to be detected and the target host to be detected is determined based on the third comparison result, wherein the target device is a fault-free device and the network line between the target device and the source host to be detected is fault-free.
[0273] As an optional implementation manner, the trigger module 1503 is used to:
[0274] If the first network quality value is less than the first quality threshold, it is determined that the source host to be detected has a fault;
[0275] If the first network quality value is greater than or equal to the first quality threshold, and there is no network device between the source host to be detected and the target host to be detected, it is determined that a network line between the source host to be detected and the target host to be detected is faulty, and / or the target host to be detected is faulty;
[0276] If the first network quality value is greater than or equal to the first quality threshold, and there is a network device between the source host to be detected and the target host to be detected, and the second network quality value between the first network device and the second network device is less than the first quality threshold, it is determined that there is a fault in the network line between the first network device and the second network device, and / or there is a fault in the second network device.
[0277] As an optional implementation manner, the target network group includes a first sub-network group, and the first determining module 1501 is used to:
[0278] A first number of hosts are determined from the hosts in the first sub-network group as source hosts for this round of detection, wherein the hosts included in the first sub-network group are in the same subnet.
[0279] As an optional implementation manner, the target network group further includes a second sub-network group, and the first determining module 1501 is used to:
[0280] The second number of hosts are determined from the hosts of the second subnet group as target hosts for this round of detection, wherein the hosts of the second subnet group are in the same subnet, and the subnet of the hosts of the first subnet group is different from the subnet of the hosts of the second subnet group.
[0281] Based on the same inventive concept, the present application embodiment provides an electronic device, which can realize the network quality detection function discussed above, please refer to Fig.16 , the device comprises a processor 161 and a memory 162, wherein the memory 162 is used to store program instructions;
[0282] The processor 161 calls the program instructions stored in the memory and executes the program instructions to implement the following steps:
[0283] Determining a first number of hosts from the hosts included in the target network group as source hosts for this round of detection;
[0284] Determining a second number of hosts from the hosts included in the target network group as target hosts for this round of detection;
[0285] The first number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the first number of the previous round of detection, and the second number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the second number of the previous round of detection;
[0286] Triggering the network quality detection between the source host and the target host of the target network group.
[0287] The processor 161 implements the steps of the above-mentioned network quality detection method by running the executable instructions, and the repeated parts are not repeated here.
[0288] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, and a computer program product includes: a computer program code, when the computer program code is run on a computer, the computer executes any of the network quality detection methods discussed above. Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the network quality detection method, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.
[0289] Based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the network quality detection methods discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the network quality detection method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.
[0290] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0291] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0292] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0293] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of user-operated steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0294] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A network quality detection method, characterized in that: The method includes: Determining a first number of hosts from the hosts included in the target network group as source hosts for this round of detection; Determining a second number of hosts from the hosts included in the target network group as target hosts for this round of detection; The first number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the first number of the previous round of detection, and the second number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the second number of the previous round of detection; Triggering the network quality detection between the source host and the target host of the target network group.
2. The method according to claim 1, characterized in that After the source host triggering the target network group performs network quality detection with the target host, the method further includes: Comparing the quality anomaly rate of the target network group with a preset anomaly threshold to obtain a first comparison result; wherein the quality anomaly rate of the target network group represents the degree of network anomaly of the target network group in this round of detection; The network status of the target network group in this round of detection is determined based on the first comparison result.
3. The method according to claim 2, characterized in that The determining, based on the first comparison result, a network status of the target network group in this round of detection includes: If the quality abnormality rate of the target network group is less than or equal to the preset abnormality threshold, it is determined that the network state of the target network group in this round of detection is normal; If the quality abnormality rate of the target network group is greater than the abnormal threshold, it is determined that the network state of the target network group in this round of detection is an abnormal state.
4. The method according to claim 3, characterized in that The method further comprises: If the quality anomaly rate of the target network group is greater than the anomaly threshold, and the number of detections in this round of detection is less than or equal to the preset detection threshold, then determining the network anomaly level of the target network group to be a preset minimum network anomaly level, wherein the number of detections in this round of detection is determined based on the first number of detections in this round and the second number of detections in this round; If the quality anomaly rate of the target network group is greater than the anomaly threshold, and the number of detections in this round of detection is greater than the detection threshold, then based on the correspondence between the preset anomaly threshold ranges and the network anomaly levels, it is determined that the quality anomaly rate of the target network group belongs to the network anomaly level corresponding to the anomaly threshold range, and the determined network anomaly level is used as the network anomaly level of the target network group.
5. The method according to claim 2, characterized in that The quality anomaly rate of the target network group is determined by: Determining a network quality value between a source host and a target host in the target network group; The quality abnormality rate of the target network group is determined based on the number of abnormal network quality values in the network quality values, wherein the abnormal network quality value is a network quality value less than a preset first quality threshold.
6. The method according to claim 5, characterized in that After determining the quality abnormality rate of the target network group based on the number of abnormal network quality values in the network quality values, the method further includes: For any abnormal network quality value, the source host of the abnormal network quality value is used as the source host to be detected, and the target host of the abnormal network quality value is used as the target host to be detected; The abnormal network quality value is compared with a preset second quality threshold to obtain a second comparison result, and the location of the fault between the source host to be detected and the target host to be detected is determined based on the second comparison result, wherein the first quality threshold is greater than the second quality threshold.
7. The method according to claim 6, characterized in that The determining, based on the second comparison result, the location where a fault exists between the source host to be detected and the target host to be detected includes: If the abnormal network quality value is greater than the second quality threshold, it is determined that a network line between the source host to be detected and the target host to be detected has a fault; If the abnormal network quality value is less than or equal to the second quality threshold, the first network quality value between the target device and the source host to be detected is compared with the first quality threshold to obtain a third comparison result, and the location of the fault between the source host to be detected and the target host to be detected is determined based on the third comparison result, wherein the target device is a fault-free device and the network line between the target device and the source host to be detected is fault-free.
8. The method according to claim 7, characterized in that Determining the location where a fault exists between the source host to be detected and the target host to be detected based on the third comparison result includes: If the first network quality value is less than the first quality threshold, it is determined that the source host to be detected has a fault; If the first network quality value is greater than or equal to the first quality threshold, and there is no network device between the source host to be detected and the target host to be detected, it is determined that a network line between the source host to be detected and the target host to be detected is faulty, and / or the target host to be detected is faulty; If the first network quality value is greater than or equal to the first quality threshold, and there is a network device between the source host to be detected and the target host to be detected, and the second network quality value between the first network device and the second network device is less than the first quality threshold, it is determined that there is a fault in the network line between the first network device and the second network device, and / or there is a fault in the second network device.
9. The method according to claim 1, characterized in that The target network group includes a first sub-network group, and determining a first number of hosts from the hosts included in the target network group as source hosts for this round of detection includes: A first number of hosts are determined from the hosts in the first sub-network group as source hosts for this round of detection, wherein the hosts included in the first sub-network group are in the same subnet.
10. The method according to claim 9, characterized in that The target network group further includes a second sub-network group, and determining a second number of hosts from the hosts included in the target network group as target hosts for this round of detection includes: The second number of hosts are determined from the hosts of the second subnet group as target hosts for this round of detection, wherein the hosts of the second subnet group are in the same subnet, and the subnet of the hosts of the first subnet group is different from the subnet of the hosts of the second subnet group.
11. A network quality detection device, characterized in that: The device includes: A first determination module, used to determine a first number of hosts from the hosts included in the target network group as source hosts for this round of detection; A second determination module, used to determine a second number of hosts from the hosts included in the target network group as target hosts for this round of detection; The first number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the first number of the previous round of detection, and the second number of non-first-round detections is determined based on the network quality values of the source host and the target host in the previous round of detection and the second number of the previous round of detection; The trigger module is used to trigger the network quality detection between the source host and the target host of the target network group.
12. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of claims 1-10 according to the obtained program instructions.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 10.
14. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 10.
