CN107466079B - Automatic relay switching method and device - Google Patents

Automatic relay switching method and device Download PDF

Info

Publication number
CN107466079B
CN107466079B CN201710707085.0A CN201710707085A CN107466079B CN 107466079 B CN107466079 B CN 107466079B CN 201710707085 A CN201710707085 A CN 201710707085A CN 107466079 B CN107466079 B CN 107466079B
Authority
CN
China
Prior art keywords
gateway
terminals
target gateway
target
standby
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
CN201710707085.0A
Other languages
Chinese (zh)
Other versions
CN107466079A (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 CN201710707085.0A priority Critical patent/CN107466079B/en
Priority to PCT/CN2017/100790 priority patent/WO2019033475A1/en
Publication of CN107466079A publication Critical patent/CN107466079A/en
Application granted granted Critical
Publication of CN107466079B publication Critical patent/CN107466079B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • H04W36/0085Hand-off measurements
    • H04W36/0094Definition of hand-off measurement parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/12Reselecting a serving backbone network switching or routing node

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides an automatic relay switching method and a device, wherein the method comprises the following steps: when a target gateway in an ad hoc network of the internet of things fails, switching N terminals connected with the target gateway to a standby gateway of the target gateway, and indicating the standby gateway to send a maintenance request for requesting to maintain the target gateway to a network management center, wherein N is an integer greater than 1; and when the target gateway returns to be normal, the N terminals are switched to the target gateway from the standby gateway. The embodiment of the invention can automatically switch the standby gateway when a certain gateway is interrupted, and can switch to the certain gateway again after the certain gateway is recovered, thereby ensuring the normal transmission of data.

Description

Automatic relay switching method and device
Technical Field
The invention relates to the technical field of internet, in particular to an automatic relay switching method and device.
Background
With the rapid development of information technology, huge changes are brought to life, for example, the appearance of the internet of things. The internet of things can be understood as follows: the communication between objects is not artificially dominant like the communication between people, and generally, the characteristic of the artificially dominant communication is that if the information is sent by mistake or missed, the dominant person can be corrected in various ways. However, in communication in the internet of things, both communication parties are objects under most conditions, and manual intervention cannot be performed, so that a higher requirement is put forward on the reliability of a wireless communication system in the communication process of the internet of things.
The inventor of the invention finds in practice that if a gateway in the internet of things breaks down, other terminals connected with the gateway lose contact with the internet of things, so that the terminal data cannot be reported, and the reliability of the communication of the internet of things is reduced.
Disclosure of Invention
The embodiment of the invention provides an automatic relay switching method and device, which can ensure normal transmission of data under the condition of gateway interruption.
A first aspect of an embodiment of the present invention provides an automatic relay switching method, including:
when a target gateway in an ad hoc network of the internet of things fails, switching N terminals connected with the target gateway to a standby gateway of the target gateway, and indicating the standby gateway to send a maintenance request for requesting to maintain the target gateway to a network management center, wherein N is an integer greater than 1;
detecting whether the target gateway is recovered to be normal or not;
and when the target gateway returns to be normal, the N terminals are switched to the target gateway from the standby gateway.
With reference to the first aspect of the embodiment of the present invention, in a first possible implementation manner of the first aspect, the switching N terminals connected to the target gateway to a standby gateway of the target gateway includes:
selecting a plurality of gateways in a preset range with the target gateway as a center;
taking the gateway with the minimum load in the plurality of gateways as the standby gateway;
and switching the N terminals connected with the target gateway to the standby gateway.
With reference to the first aspect of the embodiment of the present invention or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the switching the N terminals from the standby gateway to the target gateway includes:
acquiring a load value of the standby gateway;
when the load value is smaller than a preset load value, acquiring the average transmission rate of the reported data sent by each terminal of the N terminals to the standby gateway;
and switching the N terminals from the standby gateway to the target gateway according to the sequence of the average transmission rate from small to large.
With reference to the first aspect of the embodiment of the present invention or the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the switching the N terminals from the standby gateway to the target gateway includes:
selecting M terminals in the N terminals, wherein M is a positive integer smaller than N;
preferentially switching the M terminals to the target gateway;
detecting whether the reported data of the M terminals received by the target gateway is normal or not;
and when the target gateway receives the reported data of the M terminals, switching other terminals except the M terminals in the N terminals to the target gateway.
With reference to the third possible implementation manner of the first aspect of the embodiment of the present invention, in a fourth possible implementation manner of the first aspect, the selecting M terminals from the N terminals includes:
acquiring the reported data volume sent by each terminal in the N terminals to the standby gateway;
dividing the N terminals into the M groups according to the reported data volume;
and selecting M terminals in the N terminals according to the weight in each group in the M groups.
With reference to the first aspect of the embodiment of the present invention or the first possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, after the switching the N terminals connected to the target gateway to the standby gateway of the target gateway and before the switching the N terminals from the standby gateway to the target gateway when the target gateway is recovered to be normal, the method further includes:
monitoring whether reported data of the target gateway is received or not, wherein the reported data comprises state information of the target gateway;
when the reported data of the target gateway is received, analyzing the reported data to obtain the state information of the target gateway;
and matching the state information with preset state information, and when the state information is matched with the preset state information, executing the switching of the N terminals from the standby gateway to the target gateway when the target gateway is recovered to be normal.
A second aspect of the embodiments of the present invention provides an access point, including:
the system comprises an indicating unit, a network management center and a service unit, wherein the indicating unit is used for switching N terminals connected with a target gateway to a standby gateway of the target gateway when the target gateway in the Internet of things ad hoc network fails, and indicating the standby gateway to send a maintenance request for requesting to maintain the target gateway to the network management center, and N is an integer greater than 1;
and the switching unit is used for switching the N terminals from the standby gateway to the target gateway when the target gateway is recovered to be normal.
With reference to the second aspect of the embodiment of the present invention, in a first possible implementation manner of the second aspect, the indicating unit includes:
the first selection module is used for selecting a plurality of gateways in a preset range with the target gateway as a center;
a determining module, configured to use a gateway with a minimum load among the plurality of gateways as the standby gateway;
and the first switching module is used for switching the N terminals connected with the target gateway to the standby gateway.
With reference to the second aspect of the present invention or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the switching unit includes:
the first acquisition module is used for acquiring the load value of the standby gateway;
the first obtaining module is further configured to:
when the load value is smaller than a preset load value, acquiring the average transmission rate of the reported data sent by each terminal of the N terminals to the standby gateway;
and the second switching module is used for switching the N terminals from the standby gateway to the target gateway according to the sequence of the average transmission rate from small to large.
With reference to the second aspect of the present invention or the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the switching unit includes:
the second selecting module is used for selecting M terminals in the N terminals, wherein M is a positive integer smaller than N;
a third switching module, configured to preferentially switch the M terminals to the target gateway;
the detection module is used for detecting whether the reported data of the M terminals received by the target gateway is normal or not;
the third switching module is further configured to:
and when the target gateway receives the reported data of the M terminals, switching other terminals except the M terminals in the N terminals to the target gateway.
With reference to the third possible implementation manner of the second aspect of the embodiment of the present invention, in a fourth possible implementation manner of the second aspect, the second selecting module includes:
a second obtaining module, configured to obtain a reported data amount sent by each of the N terminals to the standby gateway;
the distribution module is used for dividing the N terminals into the M groups according to the reported data volume;
and the third selection module is used for selecting M terminals in the N terminals according to the weight in each group in the M groups.
With reference to the second aspect of the present invention or the first possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the access point further includes:
the monitoring unit is used for monitoring whether the reported data of the target gateway is received or not after the indicating unit switches the N terminals connected with the target gateway to the standby gateway of the target gateway, wherein the reported data comprises the state information of the target gateway;
the analysis unit is used for analyzing the data to obtain the state information of the target gateway when the reported data of the target gateway is received;
and the matching unit is used for matching the state information with preset state information, and when the matching result of the matching unit is that the state information is matched with the preset state information, the switching unit executes the switching of the N terminals from the standby gateway to the target gateway when the target gateway is recovered to be normal.
The embodiment of the invention has the following beneficial effects:
it can be seen that, according to the embodiment of the present invention, when a target gateway in an ad hoc network of the internet of things fails, N terminals connected to the target gateway are switched to a standby gateway of the target gateway, and the standby gateway is instructed to send a maintenance request for requesting maintenance of the target gateway to a network management center, where N is an integer greater than 1; detecting whether the target gateway is recovered to be normal or not; and when the target gateway returns to be normal, the N terminals are switched to the target gateway from the standby gateway. Therefore, when one gateway is interrupted, the standby gateway is automatically switched, and after the one gateway is recovered, the standby gateway can be switched to the one gateway again, so that the normal transmission of data is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a network architecture diagram for implementing an automatic relay switching method based on device grouping according to an embodiment of the present invention;
fig. 1-1 is a schematic diagram of switching based on failure of the gateway in fig. 1 according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an embodiment of an automatic relay switching method according to the present invention;
FIG. 2-1 is a schematic flow chart of a step 200 added in FIG. 2 according to an embodiment of the present invention;
FIG. 2-2 is a schematic flow chart illustrating a refinement of step 202 depicted in FIG. 2 provided by an embodiment of the present invention;
2-3 are detailed flow diagrams of step 202 depicted in FIG. 2 provided by an embodiment of the present invention;
fig. 3a is a schematic structural diagram of a first embodiment of an access point according to an embodiment of the present invention;
fig. 3b is a schematic structural diagram of an indication unit of the access point depicted in fig. 3a according to an embodiment of the present invention;
fig. 3c is a schematic structural diagram of a switching unit of the access point depicted in fig. 3a according to an embodiment of the present invention;
fig. 3d is a schematic diagram of another structure of the switching unit of the access point depicted in fig. 3a according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a second embodiment of an access point according to an embodiment of the present invention;
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of the invention and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The terminal described in the embodiment of the present invention may also generally refer to a terminal equipped with an Internet of things sensor, and may include, for example, a smart Phone (e.g., an Android Phone, an iOS Phone, a Windows Phone, etc.), a tablet computer, a palmtop computer, a notebook computer, a Mobile Internet device (MID, Mobile Internet Devices), or a wearable device, etc., or may include other Devices with a networking function, such as a smart television, a smart air conditioner, a smart water bottle, a smart lamp, a smart switch, or some smart Devices of an Internet of things. The above terminals are only examples, not exhaustive, and include but are not limited to the above terminals. The sensors related in the embodiment of the invention can be temperature sensors, distance sensors, humidity sensors, cameras, pressure sensors, water level detectors and the like, so that the embodiment of the invention can be applied to application scenes of intelligent transportation, traffic police monitoring, water level monitoring, intelligent agriculture, industrial Internet of things and the like. Of course, the sensor involved in the embodiment of the present invention may be an intelligent sensor, and to a certain extent, may be equivalent to a terminal.
It should be explained that the ad hoc network is a network combining mobile communication and computer network, the information exchange of the network adopts the packet switching mechanism in the computer network, the terminal is a portable terminal that can move, and each terminal in the ad hoc network has both the functions of router and host. As a host, the terminal needs to run various user-oriented applications, such as an editor, a browser, and the like; as a router, a terminal needs to run a corresponding routing protocol, and completes forwarding of data packets and route maintenance work according to a routing policy and a routing table, so that a node is required to implement a proper routing protocol. The purpose of the ad hoc network routing protocol is fast, accurate and efficient, accurate and available routing information needs to be found in as short a time as possible, the ad hoc network routing protocol can adapt to the fast change of the network topology, the introduced extra time delay and the control information for maintaining the routing are reduced, and the overhead of the routing protocol is reduced, so that the limitations in the aspects of the computing capacity, the storage space, the power supply and the like of the mobile terminal are met. The embodiment of the invention is implemented based on the Internet of things ad hoc network, wherein the sensor can be installed on a terminal and also can be used independently.
In order to better understand the technical solution of the present invention, a network architecture to which the method for controlling data transmission based on device grouping according to the embodiment of the present invention is applied is briefly introduced below. As shown in fig. 1, fig. 1 is a diagram of the network architecture, wherein it includes: an Access Point (Access Point), a gateway and its standby gateway, and a plurality of terminals (represented by terminal a, terminal B, terminal C, and terminal D only) accessing the gateway and the standby gateway. The gateway can be used for receiving the reported data sent by the plurality of terminals. The gateway in the present network architecture may be configured to perform: when a target gateway in an ad hoc network of the internet of things fails, switching N terminals connected with the target gateway to a standby gateway of the target gateway, and indicating the standby gateway to send a maintenance request for requesting to maintain the target gateway to a network management center, wherein N is an integer greater than 1; detecting whether the target gateway is recovered to be normal or not; and when the target gateway returns to be normal, the N terminals are switched to the target gateway from the standby gateway. Of course, the network architecture described in fig. 1 is only a part of an ad hoc network of the internet of things, and the gateway can also access the internet. In particular, the internet of things ad hoc network may include a plurality of gateways, not only one gateway, but also a plurality of terminals. Further, for example, as shown in fig. 1-1, if the gateway in fig. 1 fails (where the dotted line X in fig. 1-1 indicates that the gateway fails), the standby gateway may be instructed to notify the network management center to perform maintenance or service on the gateway, and switch the terminal a and the terminal B accessed by the gateway to the standby gateway, and further, after the gateway is recovered, the terminal a and the terminal B may be continuously switched to the gateway.
Further, the way that the gateway sends the data packet to the AP (the terminal sends the data packet to the gateway, and the standby gateway sends the request to the network management center) may be sending through a wireless connection, which includes but is not limited to: wireless modes such as bluetooth, Wireless Fidelity (WIFI) and Zigbee, wherein the WIFI needs to comply with the standard of ieee802.11b.
It should be noted that the internet of things and the APs are only for wireless APs, because the internet of things has a large number of devices to access, and for APs, if wired connection is used, the number of APs to access is limited, and for homes, wired connection is used, which is not imaginable for wiring of home users, and in addition, the cost of the wired connection is very high, so that the connection between the terminal of the internet of things and the APs in the technical solution of the present invention is limited to wireless connection only.
Referring to fig. 2, a schematic flow chart of an embodiment of an automatic relay switching method according to an embodiment of the present invention is shown based on the network architecture described in fig. 1. The automatic relay switching method described in this embodiment includes the following steps:
201. when a target gateway in an ad hoc network of the internet of things fails, switching N terminals connected with the target gateway to a standby gateway of the target gateway, and indicating the standby gateway to send a maintenance request for requesting maintenance of the target gateway to a network management center, wherein N is an integer greater than 1.
In the ad hoc network of the internet of things, if a target gateway fails, N terminals connected with the target gateway can be switched to corresponding standby gateways, wherein N is an integer greater than 1, the standby gateways are indicated to send maintenance requests for requesting maintenance of the target gateway to a network management center, and the network management center can inform maintenance personnel to maintain or maintain the target gateway.
Optionally, the manner of determining the failure of the target gateway may be: and in a preset time, if data which needs to be reported by any terminal in the N terminals is not received, the target gateway is judged to have a fault, the N terminals connected with the target gateway can be switched to a standby gateway of the target gateway, and the standby gateway is indicated to send a maintenance request for requesting to maintain the target gateway to a network management center. After the network management center receives the maintenance request, the administrator can be instructed to repair the target gateway.
Optionally, there may be more than one standby gateway, and the embodiment of the present invention is described with only one standby gateway.
Optionally, the switching N terminals connected to the target gateway to the standby gateway of the target gateway may include the following steps:
selecting a plurality of gateways in a preset range with the target gateway as a center;
taking the gateway with the minimum load in the plurality of gateways as the standby gateway;
and switching the N terminals connected with the target gateway to the standby gateway.
The preset range may be set by the user or default by the system, for example, within 10 meters, within 20 meters, within 100 meters, within 1000 meters, within 100-500 meters, and so on. Specifically, the target gateway may be used as a center to obtain a plurality of gateways within a preset range, and the load of each gateway in the plurality of gateways may be obtained, so that the gateway with the smallest load is determined as a standby gateway, and therefore, the gateway with the smallest load may bear more number of terminals, so that the normal operation of the whole internet of things system may be ensured, and further, the N terminals connected to the target gateway are switched to the standby gateway.
Optionally, the following steps may be further included between step 201 and step 202:
200. and detecting whether the target gateway is recovered to be normal or not.
Alternatively, as shown in fig. 2-1, the step 200 may comprise the following steps:
221) monitoring whether reported data of the target gateway is received or not, wherein the reported data comprises state information of the target gateway;
222) when the reported data of the target gateway is received, analyzing the data to obtain the state information of the target gateway;
223) and matching the state information with preset state information, and confirming that the target gateway is recovered to be normal when the state information is matched with the preset state information.
The method can monitor whether reported data of a target gateway is received, where the reported data may contain state information, and the state information may include multiple indexes, and the indexes may include but are not limited to: reporting speed, stability, offline condition, load change condition and the like. The reporting rate is a rate at which the target gateway sends data to the AP, the stability is a working stability of the target gateway, the disconnection condition may be a disconnection condition of the target gateway within a preset time, and the load change condition is a load change of the target gateway. The reported data can comprise a header file and an IP address, so that the reported data can be analyzed to obtain the state information of the target gateway, the state information is matched with the preset state information, if the matching is successful, the target gateway is restored to be normal, and the preset state information can be at least one of the reporting rate, the stability, the disconnection condition and the load change condition.
Optionally, the preset state information is state information of the target gateway under a normal working condition, and if the received state information is not matched with the preset state information of the target gateway, it indicates that the target gateway is not recovered to be normal, the standby gateway may be instructed again to send a maintenance request of the target gateway to the network management center, so as to maintain the target gateway.
202. And when the target gateway returns to be normal, the N terminals are switched to the target gateway from the standby gateway.
When the target gateway returns to normal, the N terminals can be switched back from the standby gateway, so that the load of the standby gateway can be reduced.
Alternatively, as shown in fig. 2-2, the step 202 may comprise the following steps:
231) acquiring a load value of the standby gateway;
232) when the load value is smaller than a preset load value, acquiring the average transmission rate of the reported data sent by each terminal of the N terminals to the standby gateway;
233) and switching the N terminals from the standby gateway to the target gateway according to the sequence of the average transmission rate from small to large.
The preset load value can be set by default of the system or by the user. Of course, when the load of the standby gateway is small, the switching is performed, so that the data loss rate can be reduced. The AP may obtain a load value of the standby gateway, and when the load value is smaller than a preset load value, obtain an average transmission rate at which each of the N terminals sends reported data to the standby gateway, where the average transmission rate may be an average of transmission rates in a certain period of time. And switching the N terminals to the target gateway according to the sequence of the average transmission rate from small to large.
Optionally, the step 202 may include the following steps:
234) selecting M terminals in the N terminals, wherein M is a positive integer smaller than N;
235) preferentially switching the M terminals to the target gateway;
236) detecting whether the reported data of the M terminals received by the target gateway is normal or not;
237) and when the target gateway receives the reported data of the M terminals, switching other terminals except the M terminals in the N terminals to the target gateway.
The AP can select part of the terminals from the N terminals as test terminals, and supposing M terminals, the M terminals are used for detecting whether a target gateway is really recovered to be normal or not, so that the M terminals can be firstly preferentially switched to the target gateway, whether the target gateway is really recovered to be normal or not is judged by detecting whether the reported data of the M terminals are received by the target gateway or not, and when the target gateway receives the reported data of the M terminals, other terminals in the N terminals are all switched to the target gateway.
Optionally, the selecting M terminals from the N terminals includes:
acquiring the reported data volume sent by each terminal in the N terminals to the standby gateway;
dividing the N terminals into the M groups according to the reported data volume;
and selecting M terminals in the N terminals according to the weight in each group in the M groups.
The method comprises the steps of obtaining reported data volume sent by each terminal of N terminals to a standby gateway, obtaining N reported data volumes, dividing the N terminals into M groups according to the sequence of the reported data volumes from large to small, namely selecting the terminals from each group according to the number proportion (weight) of the terminals occupied by each group, and obtaining the M terminals. For example, the sequence of the N reported data amounts from large to small is as follows: A. b, C, D, E, F, G, H and I, M is 3, then, in this order from large to small, we can divide into: 3 groups, respectively: the first group (A, B and C), the second group (D, E and F), and the third group (G, H and I), one terminal from each group can be selected, thereby, obtaining 3 terminals.
It can be seen that, according to the embodiment of the present invention, when a target gateway in an ad hoc network of the internet of things fails, N terminals connected to the target gateway are switched to a standby gateway of the target gateway, and the standby gateway is instructed to send a maintenance request for requesting maintenance of the target gateway to a network management center, where N is an integer greater than 1; detecting whether the target gateway is recovered to be normal or not; and when the target gateway returns to be normal, the N terminals are switched to the target gateway from the standby gateway. Therefore, when one gateway is interrupted, the standby gateway is automatically switched, and after the one gateway is recovered, the standby gateway can be switched to the one gateway again, so that the normal transmission of data is ensured.
In accordance with the foregoing, the following is a gateway for implementing the automatic relay switching method provided in the foregoing embodiment of the present invention, specifically as follows:
please refer to fig. 3a, which is a schematic structural diagram of an access point according to a first embodiment of the present invention. The access point described in this embodiment includes: the indicating unit 301 and the switching unit 302 are specifically as follows:
an indicating unit 301, configured to switch N terminals connected to a target gateway to a standby gateway of the target gateway when the target gateway in an ad hoc network of the internet of things fails, and instruct the standby gateway to send a maintenance request for requesting maintenance of the target gateway to a network management center, where N is an integer greater than 1;
a switching unit 302, configured to switch the N terminals from the standby gateway to the target gateway when the target gateway returns to normal.
Alternatively, as shown in fig. 3b, the indication unit 301 of the access point depicted in fig. 3a may include: the first selecting module 3011, the determining module 3012, and the first switching module 3013 are as follows:
a first selecting module 3011, configured to select multiple gateways within a preset range with the target gateway as a center;
a determining module 3012, configured to use a gateway with a smallest load in the plurality of gateways as the standby gateway;
a first switching module 3013, configured to switch the N terminals connected to the target gateway to the standby gateway.
Of course, the indicating unit 301 may further include an indicating module (not shown in the figure), configured to instruct the standby gateway to send a maintenance request for requesting to maintain the target gateway to a network management center,
alternatively, as shown in fig. 3b, the switching unit 302 of the access point depicted in fig. 3a may include: the first obtaining module 3021 and the second switching module 3022 are as follows:
a first obtaining module 3021, configured to obtain a load value of the standby gateway;
the first obtaining module 3021 is further configured to:
when the load value is smaller than a preset load value, acquiring the average transmission rate of the reported data sent by each terminal of the N terminals to the standby gateway;
and the second switching module is used for switching the N terminals from the standby gateway to the target gateway according to the sequence of the average transmission rate from small to large.
Alternatively, as shown in fig. 3c, the switching unit 303 of the access point depicted in fig. 3a may include: the second selecting module 3023, the third switching module 3024, and the detecting module 3025 are specifically as follows:
a second selecting module 3023, configured to select M terminals from the N terminals, where M is a positive integer smaller than N;
a third switching module 3024, configured to preferentially switch the M terminals to the target gateway;
a detecting module 3025, configured to detect whether the target gateway receives the report data of the M terminals normally;
the third switching module 3024 is further configured to:
and when the target gateway receives the reported data of the M terminals, switching other terminals except the M terminals in the N terminals to the target gateway.
Further, the second selecting module 3023 may include: a second obtaining module (not shown), a distributing module (not shown), and a third selecting module (not shown), which are as follows:
a second obtaining module, configured to obtain a reported data amount sent by each of the N terminals to the standby gateway;
the distribution module is used for dividing the N terminals into the M groups according to the reported data volume;
and the third selection module is used for selecting M terminals in the N terminals according to the weight in each group in the M groups.
Optionally, the access point depicted in fig. 3a may further include: the monitoring unit (not shown in the figure), the monitoring unit (not shown in the figure) and the matching unit (not shown in the figure) are as follows:
a monitoring unit, configured to monitor whether report data of the target gateway is received after the indicating unit 3021 switches the N terminals connected to the target gateway to a standby gateway of the target gateway, where the report data includes state information of the target gateway;
the monitoring unit is used for analyzing the data to obtain the state information of the target gateway when the reported data of the target gateway is received;
and a matching unit, configured to match the state information with preset state information, and when a matching result of the matching unit is that the state information matches the preset state information, the switching unit 302 performs switching of the N terminals from the standby gateway to the target gateway when the target gateway returns to normal.
It can be seen that, with the access point described in the embodiment of the present invention, when a target gateway in an ad hoc network of the internet of things fails, N terminals connected to the target gateway may be switched to a standby gateway of the target gateway, and the standby gateway is instructed to send a maintenance request for requesting maintenance of the target gateway to a network management center, where N is an integer greater than 1; detecting whether the target gateway is recovered to be normal or not; and when the target gateway returns to be normal, the N terminals are switched to the target gateway from the standby gateway. Therefore, when one gateway is interrupted, the standby gateway is automatically switched, and after the one gateway is recovered, the standby gateway can be switched to the one gateway again, so that the normal transmission of data is ensured.
In accordance with the above, please refer to fig. 4, which is a schematic structural diagram of an access point according to a second embodiment of the present invention. The access point described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, e.g., a CPU; and a memory 4000, the input device 1000, the output device 2000, the processor 3000, and the memory 4000 being connected by a bus 5000.
It should be noted that the processor 3000 may be a single processing element or may be a general term for a plurality of processing elements. For example, the Processing element may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present Application, such as: one or more microprocessors (digital signal processors, DSPs), or one or more Field Programmable Gate Arrays (FPGAs).
The memory 4000 may be a storage device or a combination of storage elements, and is used for storing executable program codes or parameters, data, etc. required by the operation of the application program running device. And the memory 4000 may include a Random Access Memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as a magnetic disk memory, a Flash memory (Flash), and the like.
The bus 5000 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
The processor 3000 is configured to:
when a target gateway in an ad hoc network of the internet of things fails, switching N terminals connected with the target gateway to a standby gateway of the target gateway, and indicating the standby gateway to send a maintenance request for requesting to maintain the target gateway to a network management center, wherein N is an integer greater than 1;
detecting whether the target gateway is recovered to be normal or not;
and when the target gateway returns to be normal, the N terminals are switched to the target gateway from the standby gateway.
Optionally, the processor 3000 switches N terminals connected to the target gateway to a standby gateway of the target gateway, including:
selecting a plurality of gateways in a preset range with the target gateway as a center;
taking the gateway with the minimum load in the plurality of gateways as the standby gateway;
and switching the N terminals connected with the target gateway to the standby gateway.
Optionally, the switching the N terminals from the standby gateway to the target gateway by the processor 3000 includes:
acquiring a load value of the standby gateway;
when the load value is smaller than a preset load value, acquiring the average transmission rate of the reported data sent by each terminal of the N terminals to the standby gateway;
and switching the N terminals from the standby gateway to the target gateway according to the sequence of the average transmission rate from small to large.
Optionally, the switching the N terminals from the standby gateway to the target gateway by the processor 3000 includes:
selecting M terminals in the N terminals, wherein M is a positive integer smaller than N;
preferentially switching the M terminals to the target gateway;
detecting whether the reported data of the M terminals received by the target gateway is normal or not;
and when the target gateway receives the reported data of the M terminals, switching other terminals except the M terminals in the N terminals to the target gateway.
Optionally, the selecting, by the processor 3000, M terminals from the N terminals includes:
acquiring the reported data volume sent by each terminal in the N terminals to the standby gateway;
dividing the N terminals into the M groups according to the reported data volume;
and selecting M terminals in the N terminals according to the weight in each group in the M groups.
Optionally, after the switching the N terminals connected to the target gateway to the standby gateway of the target gateway and before the switching the N terminals from the standby gateway to the target gateway when the target gateway is recovered to be normal, the processor 3000 is further specifically configured to:
monitoring whether reported data of the target gateway is received or not, wherein the reported data comprises state information of the target gateway;
when the reported data of the target gateway is received, analyzing the reported data to obtain the state information of the target gateway;
and matching the state information with preset state information, and when the state information is matched with the preset state information, executing the switching of the N terminals from the standby gateway to the target gateway when the target gateway is recovered to be normal.
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and the program includes, when executed, some or all of the steps of any one of the automatic relay switching methods described in the above method embodiments.
While the invention has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, gateway (device), or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. A computer program stored/distributed on a suitable medium supplied together with or as part of other hardware, may also take other distributed forms, such as via the Internet or other wired or wireless telecommunication systems.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, gateway (devices) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a gateway for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the invention has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations can be made thereto without departing from the spirit and scope of the invention. Accordingly, the specification and figures are merely exemplary of the invention as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (6)

1. An automatic relay switching method, comprising:
when a target gateway in an Internet of things ad hoc network fails, switching N terminals connected with the target gateway to a standby gateway of the target gateway, wherein the standby gateway is obtained by selecting a gateway with the minimum load from a plurality of gateways in a preset range taking the target gateway as a center, the gateway with the minimum load is used for bearing more terminal numbers and indicating the standby gateway to send a maintenance request for requesting to maintain the target gateway to a network management center, and N is an integer greater than 1;
monitoring whether reported data of the target gateway is received or not, wherein the reported data comprises state information of the target gateway;
when the reported data of the target gateway is received, analyzing the reported data to obtain the state information of the target gateway;
matching the state information with preset state information, and confirming that the target gateway is recovered to be normal when the state information is matched with the preset state information, wherein the preset state information can be at least one of reporting rate, stability, a disconnection condition and a load change condition; when the target gateway returns to normal, switching the N terminals from the standby gateway to the target gateway, wherein switching the N terminals from the standby gateway to the target gateway includes: selecting M terminals in the N terminals, wherein M is a positive integer smaller than N; preferentially switching the M terminals to the target gateway; detecting whether the reported data of the M terminals received by the target gateway is normal or not; when the target gateway receives the reported data of the M terminals, other terminals except the M terminals in the N terminals are switched to the target gateway;
the method for judging the fault of the target gateway comprises the following steps: and in a preset time, if the data which needs to be reported by any one of the N terminals is not received, determining that the target gateway has a fault.
2. The method of claim 1, wherein the handing over the N terminals from the standby gateway to the target gateway comprises:
acquiring a load value of the standby gateway;
when the load value is smaller than a preset load value, acquiring the average transmission rate of the reported data sent by each terminal of the N terminals to the standby gateway;
and switching the N terminals from the standby gateway to the target gateway according to the sequence of the average transmission rate from small to large.
3. The method of claim 1, wherein the selecting M of the N terminals comprises:
acquiring the reported data volume sent by each terminal in the N terminals to the standby gateway;
dividing the N terminals into the M groups according to the reported data volume;
and selecting M terminals in the N terminals according to the weight in each group in the M groups.
4. An access point, comprising:
the system comprises an indicating unit, a network management center and a standby gateway, wherein the indicating unit is used for switching N terminals connected with a target gateway to the standby gateway of the target gateway when the target gateway in the Internet of things ad hoc network fails, the standby gateway is obtained by selecting the gateway with the minimum load from a plurality of gateways in a preset range taking the target gateway as the center, the gateway with the minimum load is used for bearing more terminal numbers and indicating the standby gateway to send a maintenance request for requesting to maintain the target gateway to the network management center, and N is an integer greater than 1; monitoring whether reported data of the target gateway is received or not, wherein the reported data comprises state information of the target gateway; when the reported data of the target gateway is received, analyzing the reported data to obtain the state information of the target gateway; matching the state information with preset state information, and confirming that the target gateway is recovered to be normal when the state information is matched with the preset state information, wherein the preset state information can be at least one of reporting rate, stability, a disconnection condition and a load change condition;
a switching unit, configured to switch the N terminals from the standby gateway to the target gateway when the target gateway returns to normal, where the switching the N terminals from the standby gateway to the target gateway includes: selecting M terminals in the N terminals, wherein M is a positive integer smaller than N; preferentially switching the M terminals to the target gateway; detecting whether the reported data of the M terminals received by the target gateway is normal or not; when the target gateway receives the reported data of the M terminals, other terminals except the M terminals in the N terminals are switched to the target gateway; the method for judging the fault of the target gateway comprises the following steps: and in a preset time, if the data which needs to be reported by any one of the N terminals is not received, determining that the target gateway has a fault.
5. The access point of claim 4, wherein the switching unit comprises:
the first acquisition module is used for acquiring the load value of the standby gateway;
the first obtaining module is further configured to:
when the load value is smaller than a preset load value, acquiring the average transmission rate of the reported data sent by each terminal of the N terminals to the standby gateway;
and the second switching module is used for switching the N terminals from the standby gateway to the target gateway according to the sequence of the average transmission rate from small to large.
6. The access point of claim 5, wherein the switching unit further comprises:
a second obtaining module, configured to obtain a reported data amount sent by each of the N terminals to the standby gateway;
the distribution module is used for dividing the N terminals into the M groups according to the reported data volume;
and the third selection module is used for selecting M terminals in the N terminals according to the weight in each group in the M groups.
CN201710707085.0A 2017-08-17 2017-08-17 Automatic relay switching method and device Active CN107466079B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710707085.0A CN107466079B (en) 2017-08-17 2017-08-17 Automatic relay switching method and device
PCT/CN2017/100790 WO2019033475A1 (en) 2017-08-17 2017-09-06 Automatic relay switching method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710707085.0A CN107466079B (en) 2017-08-17 2017-08-17 Automatic relay switching method and device

Publications (2)

Publication Number Publication Date
CN107466079A CN107466079A (en) 2017-12-12
CN107466079B true CN107466079B (en) 2020-11-13

Family

ID=60549864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710707085.0A Active CN107466079B (en) 2017-08-17 2017-08-17 Automatic relay switching method and device

Country Status (2)

Country Link
CN (1) CN107466079B (en)
WO (1) WO2019033475A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109410554B (en) * 2018-11-20 2020-09-01 北京千丁互联科技有限公司 Intelligent meter reading system and method based on intelligent door lock
US11722383B2 (en) 2019-02-22 2023-08-08 Telefonaktiebolaget Lm Ericsson (Publ) Method for mitigating disruption during maintenance of an edge gateway node
CN110768840A (en) * 2019-10-30 2020-02-07 珠海格力电器股份有限公司 Control method, device, equipment and storage medium of communication equipment
CN110995513B (en) * 2019-12-27 2023-02-17 远景智能国际私人投资有限公司 Data sending and receiving method in Internet of things system, internet of things equipment and platform
CN111262864B (en) * 2020-01-16 2022-07-08 广州酷狗计算机科技有限公司 Method, device and system for sending live broadcast state data and storage medium
CN112055347A (en) * 2020-09-14 2020-12-08 厦门阳光恩耐照明有限公司 Multi-gateway cooperative work method and system
CN112822735B (en) * 2020-12-31 2022-02-01 广州技象科技有限公司 Gateway switching management method, device, equipment and storage medium based on Internet of things
CN113660109A (en) * 2021-07-06 2021-11-16 深圳市联洲国际技术有限公司 Gateway switching method, device, terminal equipment and computer readable storage medium
CN113949605B (en) * 2021-11-03 2024-03-08 珠海格力电器股份有限公司 Gateway, automatic control system and gateway control method
CN114884805B (en) * 2022-05-25 2023-07-21 远景智能国际私人投资有限公司 Data transmission method, device, terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387514A (en) * 2010-08-27 2012-03-21 中兴通讯股份有限公司 Backup method and backup system of wireless sensor network gateway
CN102624929A (en) * 2012-04-20 2012-08-01 武汉邮电科学研究院 Wireless sensor network gateway redundancy method based on virtual gateway
CN103796271A (en) * 2014-02-19 2014-05-14 重庆邮电大学 Redundancy method of IPv6 router suitable for tree type wireless sensor network
CN104468776A (en) * 2014-12-04 2015-03-25 中国联合网络通信集团有限公司 Method for achieving sensor network data transmission and sink nodes

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5821467B2 (en) * 2011-09-26 2015-11-24 富士通株式会社 Wireless terminal
CN103840956A (en) * 2012-11-23 2014-06-04 于智为 Backup method for gateway device of Internet of Things
CN103888277B (en) * 2012-12-19 2018-09-04 中国移动通信集团公司 A kind of gateway disaster-tolerant backup method, device and system
CN103888994B (en) * 2012-12-21 2017-11-21 中国科学院计算技术研究所 A kind of multiple gateway processing method and system with hot calamity for ability
CN103607306B (en) * 2013-11-26 2019-03-01 网神信息技术(北京)股份有限公司 The switching method and apparatus of multi-host hot swap system
KR20170042156A (en) * 2015-10-08 2017-04-18 삼성전자주식회사 Electronic device and method for implementing of service thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387514A (en) * 2010-08-27 2012-03-21 中兴通讯股份有限公司 Backup method and backup system of wireless sensor network gateway
CN102624929A (en) * 2012-04-20 2012-08-01 武汉邮电科学研究院 Wireless sensor network gateway redundancy method based on virtual gateway
CN103796271A (en) * 2014-02-19 2014-05-14 重庆邮电大学 Redundancy method of IPv6 router suitable for tree type wireless sensor network
CN104468776A (en) * 2014-12-04 2015-03-25 中国联合网络通信集团有限公司 Method for achieving sensor network data transmission and sink nodes

Also Published As

Publication number Publication date
CN107466079A (en) 2017-12-12
WO2019033475A1 (en) 2019-02-21

Similar Documents

Publication Publication Date Title
CN107466079B (en) Automatic relay switching method and device
CN102257848B (en) Main and secondary apparatuses conversion method betwenn communication equipment, communication equipment and system, and request equipment of system and service
US10944667B2 (en) Loop check packets
RU2016113885A (en) Method, device and system for accessing a network
CN107659612A (en) Data transfer control method and device based on device packets
CN114071560B (en) Network optimization method, device and storage medium
CN106603261A (en) Hot backup method, first master device, backup device and communication system
KR20190005990A (en) DATA TRANSMISSION METHOD, DEVICE, AND SYSTEM
CN107483234B (en) Method and device for split backup of access point of Internet of things
CN105763463B (en) Method and device for transmitting link detection message
CN108235800B (en) Network fault detection method, control center equipment and computer storage medium
CN107483236B (en) Method and device for backing up access point of Internet of things
CN110808967B (en) Detection method for challenging black hole attack and related device
US10079893B2 (en) M2M application request sending method, CSE and system
CN106817316B (en) Method, device and system for detecting path MTU
CN109561482B (en) Data acquisition method, data acquisition device and intelligent terminal
CN107579896B (en) Internet of things data transmission method based on ring network and storage medium
CN107404404B (en) Terminal routing method based on Internet of things and Internet of things terminal
CN107548019B (en) Method and device for processing network beacon in wireless sensor network
CN113261249A (en) Data transmission method, related equipment and computer storage medium
CN105812160B (en) A kind of seamless redundant network mode adaptive method and device
CN109086292B (en) Database switching method and system
CN113452763A (en) Smart home service registration method and device and smart home system
CN108989069B (en) Network link detection method, electronic equipment and computer storage medium
US20140341034A1 (en) Transmission management device, system, and method

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