CN107749820B - Communication state detection method and system - Google Patents

Communication state detection method and system Download PDF

Info

Publication number
CN107749820B
CN107749820B CN201710828804.4A CN201710828804A CN107749820B CN 107749820 B CN107749820 B CN 107749820B CN 201710828804 A CN201710828804 A CN 201710828804A CN 107749820 B CN107749820 B CN 107749820B
Authority
CN
China
Prior art keywords
communication link
gateway
communication
controller
gateway cluster
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710828804.4A
Other languages
Chinese (zh)
Other versions
CN107749820A (en
Inventor
杜光东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shenglu IoT Communication Technology Co Ltd
Original Assignee
Shenzhen Shenglu IoT Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Shenglu IoT Communication Technology Co Ltd filed Critical Shenzhen Shenglu IoT Communication Technology Co Ltd
Priority to CN201710828804.4A priority Critical patent/CN107749820B/en
Publication of CN107749820A publication Critical patent/CN107749820A/en
Application granted granted Critical
Publication of CN107749820B publication Critical patent/CN107749820B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/123Evaluation of link metrics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery

Abstract

The invention relates to a method and a system for detecting a communication state. The method comprises the following steps that a first gateway cluster comprises N first gateways and a first controller, a second gateway cluster comprises M second gateways and a second controller, one or more first gateways in the first gateway cluster and at least one second gateway in the second gateway cluster have a communication link, N and M are integers which are larger than 1 respectively, and the method comprises the following steps: the first controller selects a target communication link according to a preset communication link selection rule; sending a detection message to the second controller over a target communication link; and determining the communication state between the first gateway cluster and the second gateway cluster according to the received feedback message sent by the second controller. Through the technical scheme provided by the embodiment, on one hand, the technical defect that the flow is consumed when the communication state is determined through the communication state of each communication link in the prior art is avoided; on the other hand, the technical effects of realizing efficient data processing and reducing communication load are achieved.

Description

Communication state detection method and system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and a system for detecting a communication state.
Background
With the development and continuous progress of science and technology, communication services are continuously increased, and communication cluster services are continuously expanded. In the prior art, one gateway cluster at least corresponds to one gateway cluster, and at least one communication link exists between each gateway cluster, so as to support transmission of data between the gateway clusters. In the prior art, in order to know the communication state between the first gateway cluster and the second gateway cluster, the method adopted is as follows: and if N communication links exist between the first gateway cluster and the second gateway cluster, the first gateway cluster sends a detection message to each communication link to acquire the communication state of each communication link, so that the communication state between the first gateway cluster and the second gateway cluster is determined according to the communication state of each communication link.
However, in the course of implementing the present invention, the inventors found that at least the following problems exist:
1. determining the communication state between the first gateway cluster and the second gateway cluster according to the acquired communication state of each communication link, and increasing the flow consumption;
2. because the number of the transmitted detection messages is large, and the number of the received feedback messages is natural, the communication load of the communication equipment is increased undoubtedly, and the efficiency of data processing is reduced.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method and a system for detecting a communication state.
According to an aspect of the present invention, an embodiment of the present invention provides a method for detecting a communication state, where a first gateway cluster includes N first gateways and a first controller, a second gateway cluster includes M second gateways and a second controller, at least one first gateway in the first gateway cluster and at least one second gateway in the second gateway cluster have a communication link, where M and N are integers greater than 1, respectively, and the method includes:
the first controller selects a target communication link according to a preset communication link selection rule;
sending a detection message to the second controller over the target communication link;
and determining the communication state between the first gateway cluster and the second gateway cluster according to the received feedback message which is sent by the second controller and corresponds to the detection message.
By the technical scheme provided by the embodiment, on one hand, the technical defects that in the prior art, when the communication state of each communication link is judged for the communication states of the first gateway cluster and the second gateway cluster, the flow is consumed and the data processing is complicated are avoided; on the other hand, the communication states of the first gateway cluster and the second gateway cluster are rapidly obtained, the resource loss is saved, and the technical effect of reducing the communication load of the communication equipment is achieved.
Further, the method further comprises:
within a preset time threshold, if the first controller has not received the feedback message, interrupting the target communication link;
calling a communication link corresponding to a first gateway with the least number of communication links with the second gateway cluster in the first gateway cluster;
the first controller forwards the detection message to the second controller according to the called communication link.
Through the technical scheme provided by the embodiment, if the feedback message is not received within a certain time, the detection message is forwarded in a mode of replacing the communication link, so that the communication state between the first gateway cluster and the second gateway cluster is further ensured to be rapidly acquired, and the technical effect of saving time and resources is realized.
Further, the counting, by the first controller, the number of communication links between each of the plurality of first gateways and each of the plurality of second gateways specifically includes:
obtaining an initial number of communication links between each of the plurality of first gateways and each of the plurality of second gateways;
judging the packet loss rate of each communication link in the initial quantity and the size of a preset threshold value, and deleting the communication links of which the packet loss rates are greater than the preset threshold value;
and determining the number of the communication links according to the initial number and the deleted number of the communication links.
According to the technical scheme provided by the embodiment, the communication links with high packet loss rate are screened in the initial quantity. The method and the device have the advantages that unnecessary flow loss is avoided, and the technical effect of efficiently and accurately obtaining the communication state between the two gateway clusters is achieved.
According to another aspect of the present invention, there is provided a communication state detection system, comprising: a first gateway cluster and a second gateway cluster, wherein the first gateway cluster includes N first gateways and a first controller, the second gateway cluster includes M second gateways and a second controller, at least one of the first gateways in the first gateway cluster and at least one of the second gateways in the second gateway cluster have a communication link, where M and N are integers greater than 1, respectively, where:
the first controller is to: selecting a target communication link according to a preset communication link selection rule, sending a detection message to the second controller through the target communication link, and determining a communication state between the first gateway cluster and the second gateway cluster according to a received feedback message which is sent by the second controller and corresponds to the detection message.
Through the technical scheme provided by the embodiment, on one hand, the technical defects of flow consumption and complex data processing in the prior art are avoided; on the other hand, the communication states of the first gateway cluster and the second gateway cluster are rapidly obtained, the resource loss is saved, and the technical effect of reducing the communication load of the communication equipment is achieved.
Further, the first controller is further specifically configured to:
within a preset time threshold, if the first controller does not receive the feedback message, interrupting the target communication link, and calling a communication link corresponding to a first gateway with the least number of communication links of the second gateway cluster in the first gateway cluster, wherein the first controller forwards the detection message to the second controller according to the called communication link.
Through the technical scheme provided by the embodiment, if the feedback message is not received within a certain time, the detection message is forwarded in a mode of replacing the communication link, so that the communication state between the first gateway cluster and the second gateway cluster is further ensured to be rapidly acquired, and the technical effect of saving time and resources is realized.
Further, the first controller is further specifically configured to:
the method comprises the steps of obtaining the initial number of communication links between each first gateway in the first gateways and each second gateway in the second gateways, judging the packet loss rate of each communication link in the initial number and the size of a preset threshold value, deleting the communication links of which the packet loss rates are larger than the preset threshold value, and determining the number of the communication links according to the initial number and the number of the deleted communication links.
According to the technical scheme provided by the embodiment, the communication links with high packet loss rate are screened in the initial quantity. The method and the device have the advantages that unnecessary flow loss is avoided, and the technical effect of efficiently and accurately obtaining the communication state between the two gateway clusters is achieved.
The method has the advantages that the technical scheme that the first controller selects the target communication link according to the preset communication link selection rule, the detection message is sent to the second controller through the target communication link, and the communication state between the first gateway cluster and the second gateway cluster is determined according to the received feedback message sent by the second controller is adopted, so that on one hand, the technical defect that the flow is consumed when the communication state is determined through the communication state of each communication link in the prior art is avoided; on the other hand, the technical effects of realizing efficient data processing and reducing communication load are achieved.
Drawings
Fig. 1 is a schematic flowchart of a method for detecting a communication status according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for detecting a communication status according to another embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for detecting a communication status according to another embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for detecting a communication status according to another embodiment of the present invention;
fig. 5 is a flowchart illustrating a method for detecting a communication status according to another embodiment of the present invention;
fig. 6 is a flowchart illustrating a method for detecting a communication status according to another embodiment of the present invention;
fig. 7 is a schematic structural diagram of a communication status detection system according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, interfaces, techniques, etc., in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
The invention provides a method and a system for detecting a communication state.
According to an aspect of the present invention, an embodiment of the present invention provides a method for detecting a communication status.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for detecting a communication status according to an embodiment of the present invention.
As shown in fig. 1, the method includes:
step S100: the first controller selects a target communication link according to a preset communication link selection rule;
step S200: sending a detection message to the second controller over the target communication link;
step S300: and determining the communication state between the first gateway cluster and the second gateway cluster according to the received feedback message which is sent by the second controller and corresponds to the detection message.
The first gateway cluster comprises N first gateways and a first controller, the second gateway cluster comprises M second gateways and a second controller, and at least one first gateway in the first gateway cluster and at least one second gateway in the second gateway cluster have a communication link. Wherein N and M are integers greater than 1.
In this embodiment, the first controller selects the target communication link according to a preset communication link selection rule. After the selection of the target communication link is completed, a detection message is sent to the second controller according to the target communication link.
For example: and the first controller selects a target communication link from the five communication links according to the communication link selection rule. It should be noted that the target communication link may be multiple or one.
The first controller sends the detection message to the second controller according to the selected target communication link.
After receiving the detection message sent by the first controller, the second controller sends a feedback message to the first controller according to the detection message.
In a technical solution that may be implemented, if the first controller does not receive the feedback message sent by the second controller within a preset time, it indicates that the communication state of the first gateway cluster and the second gateway cluster is a disconnected state.
In the prior art, the communication states of the first gateway cluster and the second gateway cluster are determined by judging the communication state of each communication link.
In the present application, the communication state of each communication link does not need to be acquired, but only the target communication link is selected according to the preset communication link selection rule, and the communication states of the first gateway cluster and the second gateway cluster are determined through the target communication link.
That is, with the technical solution provided in this embodiment, the technical disadvantages of traffic consumption and resource waste when acquiring the state of each communication link in the prior art are avoided. And the communication state is judged through the target communication link, so that a large amount of data processing processes are avoided, time and resources are saved, and the technical effects of efficiently and quickly acquiring the communication states of the first gateway cluster and the second gateway cluster are achieved.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for detecting a communication status according to another embodiment of the present invention.
As shown in fig. 2, step S100 specifically includes:
step S110: the first controller counts the number of communication links between each first gateway and all second gateways;
step S120: determining a set of communication links according to the number of communication links;
step S130: in the set of communication links, the first controller selects a target communication link according to a communication link selection rule.
In this embodiment, it is understood that there may be a communication link between each first gateway and each second gateway, and the number of communication links may be multiple, and the number of communication links between each first gateway and all second gateways is counted.
The set of communication links is determined based on the number of communication links (either high or low).
For example, there are communication links between the first gateway a and the second gateway B, and the number of the communication links is three. Meanwhile, a communication link also exists between the first gateway a and the second gateway C, and the number of the communication links is two.
The set of communication links may be determined from a large number of communication links, i.e. the communication links between the first gateway a and the second gateway B are added to the set of communication links.
Of course, the communication link set may also be determined according to a small number of communication links, that is, the communication links between the first gateway a and the second gateway C are added to the communication link set.
When the communication link set is determined according to the large number of communication links, one or two communication links are selected as target communication links among three communication links between the first gateway a and the second gateway B according to a communication link selection rule.
When the communication link set is determined according to a large number of communication links, one or two communication links are selected as a target communication link between two communication links between the first gateway a and the second gateway B according to a communication link selection rule.
According to the technical scheme provided by the embodiment, multiple or one communication link is selected as a target communication link in a communication link set according to a communication link selection rule, and the detection message is sent according to the target communication link. Compared with the prior art, the method and the device have the advantages that the communication state of each communication link is obtained to determine the communication states of the first gateway cluster and the second gateway cluster, so that the flow is saved, the time is saved, and the load of communication equipment for data processing is reduced. The technical effect of rapidly and efficiently acquiring the communication states of the first gateway cluster and the second gateway cluster is achieved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for detecting a communication status according to another embodiment of the present invention.
As shown in fig. 3, step S120 specifically includes:
step S121: in a first gateway cluster, selecting a first gateway with the largest number of communication links with a plurality of second gateways in a second gateway cluster, and establishing a preset communication link set corresponding to the first gateway;
step S122: and adjusting the sequence of the communication links in the preset communication link set according to the transmission time and/or the data capacity of the detection message in each communication link of the preset communication link set, so as to obtain the communication link set.
In this embodiment, the first gateway having the largest number of communication links with all the second gateways in the second gateway cluster is owned. And establishing a preset communication link set corresponding to the first gateway by selecting the communication link corresponding to the first gateway.
For example: the number of communication links between the first gateway a in the first gateway cluster and the second gateway cluster is the largest, and there are ten communication links, so a preset communication link set of the first gateway a is established, where there are ten communication links in the preset communication link set.
It is understood that the transmission time and data capacity of the detection message in each of the ten communication links may be the same or different. Therefore, the sequence of the communication links in the preset communication link set is adjusted according to the transmission time and the data capacity of the detection message in each communication link, so as to obtain the communication link set.
According to the technical scheme provided by the embodiment, the communication link set is determined according to two parameters, namely the transmission time of the detection message in each communication link and the data capacity during transmission. The method and the device realize the technical effect of quickly and efficiently acquiring the communication states of the two gateway clusters by quickly selecting the target communication link from the communication link set.
More specifically, in one possible implementation,
the first controller counts the number of communication links between each first gateway and each second gateway;
in the first gateway cluster, selecting a first gateway with the largest number of communication links in a second gateway cluster, and establishing a preset communication link set corresponding to the first gateway;
determining the time weight of each communication link according to the transmission time of the detection message in each communication link and the sum of the transmission times of all the communication links in a preset communication link set;
determining the data capacity weight of each communication link according to the data capacity of the detection message in transmission in each communication link and the sum of the data capacities of the detection message in transmission in all the communication links;
adjusting the sequence of communication links in a preset communication link set according to formula 1 to obtain a communication link set, wherein formula 1:
Figure BDA0001408184280000071
wherein the content of the first and second substances,
Figure BDA0001408184280000072
representing a time weight of the transmission of the detection message in the ith communication link,
Figure BDA0001408184280000073
representing a data capacity weight of the detection message when transmitted in the ith communication link;
in the set of communication links, the first controller selects a target communication link according to a communication link selection rule.
For example: there are three communication links in the preset communication link set, which are the first communication link, the second communication link and the third communication link. The transmission time of the detection message in the first communication link is 0.1s, the transmission time of the detection message in the second communication link is 0.2s, and the transmission time of the detection message in the third communication link is 0.3 s. Then, the time weight of the first communication link is 0.1/(0.1+0.2+ 0.3); the time weight of the second communication link is 0.2/(0.1+0.2+ 0.3); the time weight of the third communication link is 0.3/(0.1+0.2+ 0.3).
The data capacity of the detection message is 10 when transmitted in the first communication link, 12 when transmitted in the second communication link, and 15 when transmitted in the third communication link. Then, the data capacity weight of the first communication link is 10/(10+12+ 15); the data capacity weight of the second communication link is 12/(10+12+ 15); the data capacity weight of the third communication link is 15/(10+12+ 15).
And adjusting the sequence of the three links in the preset link set according to the time weight and the data capacity weight of the three links. That is, the calculation results were obtained by calculating 0.1/(0.1+0.2+0.3) +10/(10+12+15), 0.2/(0.1+0.2+0.3) +12/(10+12+15), and 0.3/(0.1+0.2+0.3) +15/(10+12+15), and the magnitudes of the three results were compared. It can be understood that the smaller the value corresponding to the time weight is, the less time is required when data is transmitted, and the faster the transmission speed is; the smaller the value corresponding to the data capacity weight is, the less time is required for transmitting data, and the faster the transmission speed is. Therefore, the three communication links in the communication link set are in the order of the first communication link, the second communication link, and the third communication link.
By the technical scheme provided by the embodiment, the sequence of a plurality of communication links in a preset communication link set is adjusted to obtain the communication link set. The method and the device have the advantages that the high-quality communication link is quickly selected from the communication link set to serve as the target communication link, and accordingly the technical effect of quickly and efficiently obtaining the communication state between the two gateway clusters is achieved.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a method for detecting a communication status according to another embodiment of the present invention.
As shown in fig. 4, preferably, in one possible embodiment, the step S100 may further include:
step S140: selecting any second gateway from the second gateway cluster as a test second gateway;
step S150: obtaining a test communication link according to each first gateway and the test second gateway in the first gateway cluster;
step S160: performing a data packet test on each first gateway in the first gateway cluster through a test communication link to obtain a test result;
step S170: determining the response level of each first gateway in the first gateway cluster according to the test result;
step S180: selecting the target communication link according to the response level.
In this embodiment, there are ten first gateways in the first gateway cluster, and there are also ten second gateways in the second gateway cluster, and one test second gateway is selected from the ten second gateways. Ten test communication links are obtained, namely, one test communication link exists between each first gateway and each second gateway. And carrying out data packet test on each first gateway in the ten first gateways. It is understood that different first gateways may have different test results.
For example, among ten first gateways, the test results of two first gateways show that the response speed of the two first gateways is very high; the test results of the two first gateways show that the response speeds of the two first gateways are higher; the test results of two first gateways show that the response speeds of the two first gateways are general; and the test results of the four first gateways show that the response speed of the four first gateways is relatively slow.
Then, the response grade corresponding to the first gateway is determined according to the different response speeds of the different first gateways. It can be understood that the faster the response speed, the higher the response level of the first gateway. The communication link with the high response level is selected as the target communication link.
According to the technical scheme provided by the embodiment, the target communication link is selected according to the response level, so that the accuracy of selecting the target communication link is improved, and the technical effect of efficiently and accurately acquiring the communication state between the first gateway cluster and the second gateway cluster through the target communication link can be achieved.
Referring to fig. 5, fig. 5 is a flowchart illustrating a method for detecting a communication status according to another embodiment of the present invention.
As shown in fig. 5, the method includes:
step S100: the first controller selects a target communication link according to a preset communication link selection rule;
step S200: sending a detection message to the second controller over the target communication link;
step S300: determining a communication state between a first gateway cluster and a second gateway cluster according to a received feedback message sent by a second controller;
step S400: within a preset time threshold, if the first controller does not receive the feedback message, interrupting the target communication link;
step S500: calling a communication link corresponding to a first gateway with the minimum number of communication links with a second gateway cluster in the first gateway cluster;
step S600: the first controller forwards the detection message to the second controller according to the called communication link.
In this embodiment, within 5s of the preset time threshold, if the first controller does not receive the feedback message for feeding back the detection message, the target communication link for sending the detection message is directly interrupted. And in turn invokes other communication links to forward the detection message.
For example: the target communication link selected by the first controller is three communication links in the set of communication links. At clock 5s after the detection message is sent, no feedback message has been received. The detection message is no longer sent over the three communication links. And two communication links corresponding to the first gateway D are called to forward the detection message, where the first gateway D is the first gateway with the least number of communication links with the second gateway cluster among all the first gateways.
And if the first controller still does not receive the feedback message when the certain time is reached, reselecting the communication link. It will be appreciated that either communication link may be selected when the communication link is reselected. However, in order to further improve the efficiency, the communication link corresponding to the first gateway having the smallest number of communication links is selected.
For example, the target communication link selected by the first controller is four communication links in the communication link set. At clock 4s after the detection message is sent, no feedback message has been received. The detection message is no longer sent over the four communication links.
The first gateway C corresponds to three communication links, and the first gateway D corresponds to one communication link. Obviously, the time for forwarding the detection message to the first gateway C corresponding to three communication links is longer than the time for forwarding the detection message to the first gateway D corresponding to one communication link. In order to further save time and improve efficiency, the first controller calls the communication link corresponding to the first gateway with the least number of communication links of the second gateway cluster in the first gateway cluster, and forwards the detection message to the called communication link.
By the technical scheme provided by the embodiment, if the feedback message is not received within a certain time, the detection message is forwarded by replacing the communication link, so that the technical disadvantage that the detection message is repeatedly sent to cause waste of time and resources is avoided.
The detection message is forwarded in a mode of replacing the communication link, so that the communication states of the two gateway clusters are rapidly determined according to different communication links. The technical effect of rapidly and efficiently acquiring the communication states of the two gateway clusters is further achieved, and the accuracy and the reliability of the communication states of the two gateway clusters are ensured.
Referring to fig. 6, fig. 6 is a flowchart illustrating a method for detecting a communication status according to another embodiment of the present invention.
As shown in fig. 6, preferably, in a possible implementation manner, the step S110 further includes:
step S111: obtaining an initial number of communication links between each of the plurality of first gateways and each of the plurality of second gateways;
step S112: judging the packet loss rate of each communication link in the initial number and the size of a preset threshold, and deleting the communication links of which the packet loss rates are greater than the preset threshold;
step S113: the number of communication links is determined based on the initial number and the number of deleted communication links.
In this embodiment, when the first controller counts the number of communication links between each first gateway and each second gateway, the initial number is counted first.
For example: the initial number of communication links between the first gateway a and the second gateway B is three. And if the packet loss rate of the first communication link is greater than a preset threshold value, directly deleting the first communication link. And the packet loss rates of the other two communication links are smaller than a preset threshold value. Then, the number of communication links between the first gateway a and the second gateway B is determined to be two based on the initial number of three and the number of deleted communication links of one.
By the technical scheme provided by the embodiment, the communication links with high packet loss rate are screened in the initial quantity. The method and the device have the advantages that unnecessary flow loss is avoided, and the technical effect of efficiently and accurately obtaining the communication state between the two gateway clusters is achieved.
According to another aspect of the present invention, the embodiment of the present invention provides a communication status detection system corresponding to the above method.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a communication status detection system according to an embodiment of the present invention.
As shown in fig. 7, the system includes: the gateway system comprises a first gateway cluster and a second gateway cluster, wherein the first gateway cluster comprises N first gateways and a first controller, the second gateway cluster comprises M second gateways and a second controller, at least one first gateway in the first gateway cluster and at least one second gateway in the second gateway cluster have a communication link, N and M are integers greater than 1, respectively, and the gateway system comprises:
the first controller is configured to: selecting a target communication link according to a preset communication link selection rule, sending a detection message to the second controller through the target communication link, and determining the communication state between the first gateway cluster and the second gateway cluster according to a received feedback message which is sent by the second controller and corresponds to the detection message.
Through the technical scheme provided by the embodiment, on one hand, the technical defects of flow consumption and complex data processing in the prior art are avoided; on the other hand, the communication states of the first gateway cluster and the second gateway cluster are rapidly obtained, the resource loss is saved, and the technical effect of reducing the communication load of the communication equipment is achieved.
More specifically, the first controller is specifically configured to:
and counting the number of communication links between each first gateway and all second gateways, determining a communication link set according to the number of the communication links, and selecting a target communication link from the communication link set according to a communication link selection rule.
According to the technical scheme provided by the embodiment, multiple or one communication link is selected as a target communication link in a communication link set according to a communication link selection rule, and the detection message is sent according to the target communication link. Compared with the prior art, the method and the device have the advantages that the communication state of each communication link is obtained to determine the communication states of the first gateway cluster and the second gateway cluster, so that the flow is saved, the time is saved, and the load of communication equipment for data processing is reduced. The technical effect of rapidly and efficiently acquiring the communication states of the first gateway cluster and the second gateway cluster is achieved.
More specifically, the first controller is specifically configured to:
in the first gateway cluster, selecting a first gateway with the largest number of communication links with a plurality of second gateways in the second gateway cluster, establishing a preset communication link set corresponding to the first gateway, and adjusting the sequence of the communication links in the preset communication link set according to the transmission time and/or the data capacity of the detection message in each communication link of the preset communication link set to obtain the communication link set.
According to the technical scheme provided by the embodiment, the communication link set is determined according to two parameters, namely the transmission time of the detection message in each communication link and the data capacity during transmission. The method and the device realize the technical effect of quickly and efficiently acquiring the communication states of the two gateway clusters by quickly selecting the target communication link from the communication link set.
More specifically, the first controller is specifically configured to:
determining a time weight of each communication link according to the transmission time of the detection message in each communication link and the sum of the transmission times of all the communication links in a preset communication link set, determining a data capacity weight of each communication link according to the data capacity of the detection message in transmission in each communication link and the sum of the data capacities of the detection message in transmission in all the communication links, adjusting the sequence of the communication links in the preset communication link set according to an equation 1 to obtain the communication link set, wherein the equation 1:
Figure BDA0001408184280000121
wherein the content of the first and second substances,
Figure BDA0001408184280000131
representing a time weight of the transmission of the detection message in the ith communication link,
Figure BDA0001408184280000132
representing a data capacity weight of the test message as transmitted in the ith communication link.
By the technical scheme provided by the embodiment, the sequence of a plurality of communication links in a preset communication link set is adjusted to obtain the communication link set. The method and the device have the advantages that the high-quality communication link is quickly selected from the communication link set to serve as the target communication link, and accordingly the technical effect of quickly and efficiently obtaining the communication state between the two gateway clusters is achieved.
More specifically, the first controller is further specifically configured to:
selecting any second gateway from the second gateway cluster as a testing second gateway, obtaining a testing communication link according to each first gateway in the first gateway cluster and the testing second gateway, carrying out data packet testing on each first gateway in the first gateway cluster through the testing communication link to obtain a testing result, determining the response level of each first gateway in the first gateway cluster according to the testing result, and selecting a target communication link according to the response level.
By the technical scheme provided by the embodiment, the target communication link is selected according to the response level, so that the technical effect of efficiently acquiring the communication state between the first gateway cluster and the second gateway cluster through the target communication link can be achieved.
More specifically, the first controller is further specifically configured to:
and within a preset time threshold, if the first controller does not receive the feedback message, interrupting the target communication link, calling a communication link corresponding to a first gateway with the minimum number of communication links of a second gateway cluster in the first gateway cluster, and forwarding the detection message to the second controller by the first controller according to the called communication link.
By the technical scheme provided by the embodiment, if the feedback message is not received within a certain time, the detection message is forwarded by replacing the communication link, so that the technical disadvantage that the detection message is repeatedly sent to cause waste of time and resources is avoided. The detection message is forwarded in a mode of replacing the communication link, so that the communication states of the two gateway clusters are rapidly determined according to different communication links. The technical effect of rapidly and efficiently acquiring the communication states of the two gateway clusters is further achieved, and the accuracy and the reliability of the communication states of the two gateway clusters are ensured.
More specifically, the first controller is further specifically configured to:
the method comprises the steps of obtaining the initial number of communication links between each first gateway in a plurality of first gateways and each second gateway in a plurality of second gateways, judging the packet loss rate of each communication link in the initial number and the size of a preset threshold value, deleting the communication links of which the packet loss rates are larger than the preset threshold value, and determining the number of the communication links according to the initial number and the number of the deleted communication links.
By the technical scheme provided by the embodiment, the target communication link is selected according to the response level, so that the technical effect of efficiently acquiring the communication state between the first gateway cluster and the second gateway cluster through the target communication link can be achieved.
The method has the advantages that the technical scheme that the first controller selects the target communication link according to the preset communication link selection rule, the detection message is sent to the second controller through the target communication link, and the communication state between the first gateway cluster and the second gateway cluster is determined according to the received feedback message sent by the second controller is adopted, so that on one hand, the technical defect that the flow is consumed when the communication state is determined through the communication state of each communication link in the prior art is avoided; on the other hand, the technical effects of realizing efficient data processing and reducing communication load are achieved.
The reader should understand that in the description of this specification, reference to the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for detecting a communication state, wherein a first gateway cluster includes N first gateways and a first controller, a second gateway cluster includes M second gateways and a second controller, at least one first gateway in the first gateway cluster and at least one second gateway in the second gateway cluster have a communication link, where N and M are integers greater than 1, respectively, and the method includes:
the first controller selects a target communication link according to a preset communication link selection rule;
sending a detection message to the second controller over the target communication link;
determining a communication state between the first gateway cluster and the second gateway cluster according to the received feedback message which is sent by the second controller and corresponds to the detection message;
within a preset time threshold, if the first controller has not received the feedback message, interrupting the target communication link;
calling a communication link corresponding to a first gateway with the least number of communication links with the second gateway cluster in the first gateway cluster;
the first controller forwards the detection message to the second controller according to the called communication link.
2. The method according to claim 1, wherein the selecting, by the first controller, the target communication link according to a preset communication link selection rule specifically includes:
the first controller counts the number of communication links between each first gateway and all second gateways in the second gateway cluster;
determining a communication link set according to the number of the communication links;
in the set of communication links, the first controller selects the target communication link according to the communication link selection rule.
3. The method according to claim 2, wherein the determining a communication link set according to the number of the communication links specifically includes:
in the first gateway cluster, selecting a first gateway with the largest number of communication links with a second gateway in the second gateway cluster, and establishing a preset communication link set corresponding to the first gateway;
and adjusting the sequence of the communication links in the preset communication link set according to the transmission time and/or the data capacity of the detection message in each communication link of the preset communication link set, so as to obtain the communication link set.
4. The method according to claim 3, wherein the adjusting, according to the transmission time and the data capacity during transmission of the detection message in each communication link of the preset communication link set, the order of the communication links in the preset communication link set to obtain the communication link set specifically comprises:
determining the time weight of each communication link according to the transmission time of the detection message in each communication link and the sum of the transmission times of all the communication links in the preset communication link set;
determining the data capacity weight of each communication link according to the data capacity of the detection message in the transmission of each communication link and the sum of the data capacities of the detection message in the transmission of all the communication links;
adjusting the sequence of the communication links in the preset communication link set according to formula 1 to obtain the communication link set, wherein formula 1:
Figure FDA0002920932770000021
wherein the content of the first and second substances,
Figure FDA0002920932770000022
representing a time weight of the transmission of the detection message in the ith communication link,
Figure FDA0002920932770000023
and the weight of the data capacity when the detection message is transmitted in the ith communication link is represented, and Si is the transmission time of the detection message in the ith communication link.
5. The method of claim 1, wherein the first controller selects the target communication link according to a preset communication link selection rule, further comprising:
selecting any second gateway from the second gateway cluster as a test second gateway;
obtaining a test communication link according to each first gateway in the first gateway cluster and the test second gateway;
performing a data packet test on each first gateway in the first gateway cluster through the test communication link to obtain a test result;
determining the response level of each first gateway in the first gateway cluster according to the test result;
selecting the target communication link according to the response level.
6. A system for detecting a communication status, the system comprising: a first gateway cluster and a second gateway cluster, wherein the first gateway cluster includes N first gateways and a first controller, the second gateway cluster includes M second gateways and a second controller, at least one of the first gateways in the first gateway cluster and at least one of the second gateways in the second gateway cluster have a communication link, where N and M are integers greater than 1, respectively, where:
the first controller is to: selecting a target communication link according to a preset communication link selection rule, sending a detection message to the second controller through the target communication link, and determining a communication state between the first gateway cluster and the second gateway cluster according to a received feedback message which is sent by the second controller and corresponds to the detection message;
the first controller is further specifically configured to: within a preset time threshold, if the first controller does not receive the feedback message, interrupting the target communication link, and calling a communication link corresponding to a first gateway with the least number of communication links of the second gateway cluster in the first gateway cluster, wherein the first controller forwards the detection message to the second controller according to the called communication link.
7. The system for detecting the communication status according to claim 6, wherein the first controller is specifically configured to:
counting the number of communication links between each first gateway and all second gateways, determining a communication link set according to the number of the communication links, and selecting the target communication link from the communication link set according to the communication link selection rule.
8. The system for detecting a communication status of claim 7, wherein the first controller is further specifically configured to:
in the first gateway cluster, selecting a first gateway having the largest number of communication links with a second gateway in the second gateway cluster, establishing a preset communication link set corresponding to the first gateway, and adjusting the sequence of the communication links in the preset communication link set according to the transmission time and/or the data capacity during transmission of the detection message in each communication link of the preset communication link set to obtain the communication link set.
9. The system for detecting a communication status of claim 8, wherein the first controller is further specifically configured to:
determining a time weight of each communication link according to the transmission time of the detection message in each communication link and the sum of the transmission times of all communication links in the preset communication link set, determining a data capacity weight of each communication link according to the data capacity of the detection message in transmission in each communication link and the sum of the data capacities of the detection message in transmission in all communication links, and adjusting the sequence of the communication links in the preset communication link set according to formula 1 to obtain the communication link set, wherein formula 1:
Figure FDA0002920932770000041
wherein the content of the first and second substances,
Figure FDA0002920932770000042
representing a time weight of the transmission of the detection message in the ith communication link,
Figure FDA0002920932770000043
representing a data capacity weight of the test message as transmitted in the ith communication link.
10. The system for detecting the communication status of claim 6, wherein the first controller is further configured to:
selecting any second gateway from the second gateway cluster as a testing second gateway, obtaining a testing communication link according to each first gateway in the first gateway cluster and the testing second gateway, performing a data packet test on each first gateway in the first gateway cluster through the testing communication link to obtain a test result, determining the response level of each first gateway in the first gateway cluster according to the test result, and selecting the target communication link according to the response level.
CN201710828804.4A 2017-09-14 2017-09-14 Communication state detection method and system Active CN107749820B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710828804.4A CN107749820B (en) 2017-09-14 2017-09-14 Communication state detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710828804.4A CN107749820B (en) 2017-09-14 2017-09-14 Communication state detection method and system

Publications (2)

Publication Number Publication Date
CN107749820A CN107749820A (en) 2018-03-02
CN107749820B true CN107749820B (en) 2021-05-28

Family

ID=61255729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710828804.4A Active CN107749820B (en) 2017-09-14 2017-09-14 Communication state detection method and system

Country Status (1)

Country Link
CN (1) CN107749820B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014117665A1 (en) * 2013-01-30 2014-08-07 华为技术有限公司 Link state detection apparatus and working method thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931999B (en) * 2010-08-31 2014-01-01 深圳市赫迪威信息技术有限公司 Service access method, portal switching server and service access system
CN102438278B (en) * 2011-12-21 2014-07-16 优视科技有限公司 Load allocation method and device for mobile communication network
CN102571571A (en) * 2011-12-28 2012-07-11 南京邮电大学 Multilayer effective routing method applied to delay tolerant network (DTN)
KR20150000324A (en) * 2013-06-24 2015-01-02 한국전자통신연구원 Method and apparatus for routing
CN106452952B (en) * 2016-09-29 2019-11-22 华为技术有限公司 A kind of method and gateway cluster detecting group system communications status

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014117665A1 (en) * 2013-01-30 2014-08-07 华为技术有限公司 Link state detection apparatus and working method thereof

Also Published As

Publication number Publication date
CN107749820A (en) 2018-03-02

Similar Documents

Publication Publication Date Title
CN111711546B (en) Device throughput testing method, device, system and computer readable storage medium
EP2988460A1 (en) Traffic management system and wireless network system
CN110582064B (en) Short message distribution method, device, equipment and medium
KR20160048132A (en) Filter method for adapting a computing load
CN105792153B (en) Bulk SMS sending method, terminal device and short message send server
CN109597800B (en) Log distribution method and device
EP4167149A1 (en) Method and apparatus for building predictive model, computing device, and storage medium
CN110855564B (en) Intelligent routing path selection method, device and equipment and readable storage medium
CN110061924B (en) Message forwarding method and device and related product
US7986714B2 (en) Apparatus and method for transmitting packets in wireless network
CN110311963B (en) Message pushing method and device, computer equipment and computer readable storage medium
CN107749820B (en) Communication state detection method and system
US20130007764A1 (en) Assigning work to a processing entity according to non-linear representations of loadings
EP3345096B1 (en) Method and apparatus for adaptive cache management
CN112953847B (en) Network congestion control method and device, electronic equipment and storage medium
CN109863791B (en) Method and apparatus for selecting access network in wireless communication system
US20170257323A1 (en) Mail Obtaining Method, Terminal, and System
JP2007074607A (en) Data processing circuit for reducing power consumption by using clock control
CN112612631A (en) Message queue accumulation detection method and related device
CN112380011A (en) Dynamic adjustment method and device for service capacity
CN108574623B (en) Method and device for determining and preventing junk information by malicious user
CN111371675B (en) Intelligent addressing method, device, equipment and storage medium thereof
CN114531401A (en) Token bucket flow limiting method based on priority
CN114513408A (en) ECN (electrically controlled network) threshold configuration method and device
CN113542055A (en) Message processing method, device, equipment and machine readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant