WO2019041371A1 - 物联网基于连接数量的路由器切换方法及装置 - Google Patents

物联网基于连接数量的路由器切换方法及装置 Download PDF

Info

Publication number
WO2019041371A1
WO2019041371A1 PCT/CN2017/100793 CN2017100793W WO2019041371A1 WO 2019041371 A1 WO2019041371 A1 WO 2019041371A1 CN 2017100793 W CN2017100793 W CN 2017100793W WO 2019041371 A1 WO2019041371 A1 WO 2019041371A1
Authority
WO
WIPO (PCT)
Prior art keywords
internet
iot
router
things
terminal
Prior art date
Application number
PCT/CN2017/100793
Other languages
English (en)
French (fr)
Inventor
杜光东
Original Assignee
深圳市盛路物联通讯技术有限公司
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 深圳市盛路物联通讯技术有限公司 filed Critical 深圳市盛路物联通讯技术有限公司
Publication of WO2019041371A1 publication Critical patent/WO2019041371A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/122Avoiding congestion; Recovering from congestion by diverting traffic away from congested entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring

Definitions

  • the present application relates to the field of communications, and in particular, to a method and an apparatus for switching a router based on the number of connections of an Internet of Things.
  • the Internet of Things is an important part of the new generation of information technology, and an important stage of development in the era of "informatization.” Its English name is: “Internet of things (IoT)". As the name suggests, the Internet of Things is the Internet that connects things. This has two meanings: First, the core and foundation of the Internet of Things is still the Internet, which is an extended and extended network based on the Internet; Second, its client extends and extends to any item and item for information. Exchange and communication, that is, things and things.
  • the Internet of Things solves the interconnection between objects and the exchange of data between objects.
  • the existing Internet of Things is connected to the Internet based on IoT routers when networking.
  • the existing routers have limited number of terminals that can be connected. When the number of terminal connections exceeds a certain number, the connection quality is degraded or even unable to be connected.
  • the existing technology of the Internet of Things terminal cannot switch the router, so when the number of connections of the terminal is too large, the data transmission of the terminal is affected. Quality, affecting the customer experience.
  • the application provides a method for router switching based on the number of connections of the Internet of Things. It can improve the transmission quality of IoT data and improve the user experience.
  • a method for router switching based on the number of connections of an Internet of Things comprising the following steps:
  • the Internet of Things router receives the data packet sent by the first Internet of Things terminal
  • the Internet of Things router counts the number of connected IoT terminals, and the connected Internet of Things ends.
  • the terminal is a terminal that sends a data packet to the IoT router within a set time or receives an IoT router to send a data packet;
  • the IoT router determines whether the number of connected IoT terminals is lower than a quantity threshold. If the number of connected IoT terminals is higher than the quantity threshold, the first IoT terminal is switched to the standby IoT router.
  • the switching the first Internet of Things terminal to the alternate IoT router specifically includes:
  • the IoT router sends a handover request to the alternate IoT router, where the handover request includes: an identifier of the first Internet of Things terminal and a frame sequence number corresponding to the data packet;
  • the IoT router receives a handover response sent by the standby IoT router after the handover is successful, and the handover response includes: an indication that the first IoT terminal successfully switches.
  • the method further includes:
  • the IoT router receives the handover request sent by the third IoT router, where the handover request includes: an identifier of the second Internet of Things terminal and a frame sequence number corresponding to the data packet sent by the second Internet of Things terminal;
  • the IoT router stores the frame serial number, and sends a connection request to the second Internet of Things terminal, where the destination address of the connection request is an identifier of the second Internet of Things terminal;
  • the IoT router receives the connection response sent by the second IoT terminal, and the IoT router establishes a connection with the second IoT terminal, and the IoT router sends a handover response to the third IoT router, where the handover response includes: The indication that the second Internet of Things terminal is successfully switched.
  • the method further includes: after counting the number of terminals that have been connected:
  • the IoT router periodically receives the number of connected terminals of each alternate IoT router sent by each alternate IoT router.
  • the switching the first Internet of Things terminal to the standby Internet of Things router comprises:
  • the foregoing method for switching the IoT terminal to the standby IoT router may also be:
  • the Internet of Things router counts the trend of the number of connected IoT terminals of each standby IoT router. If the trend is decreasing, the switching priority of the alternate IoT router is adjusted. High, the IoT terminal chooses to switch the IoT router with the highest priority as the alternate IoT router for switching.
  • an Internet of Things based router number switching device comprising:
  • a statistical unit configured to count the number of connected Internet of Things terminals, wherein the connected Internet of Things terminal is a terminal that sends a data packet to the Internet of Things router within a set time or receives an IoT router to send a data packet;
  • a determining unit configured to determine whether the number of connected Internet of Things terminals is higher than a quantity threshold
  • a switching unit configured to switch the first Internet of Things terminal to the standby IoT router, if the number of connected IoT terminals is higher than a quantity threshold.
  • the switching unit is configured to send a handover request to the standby Internet of Things router, where the handover request includes: an identifier of the first Internet of Things terminal and a frame sequence number corresponding to the data packet;
  • the receiving unit is further configured to receive a handover response sent by the standby IoT router after the handover is successful, where the handover response includes: an indication that the first IoT terminal successfully switches.
  • the receiving unit is further configured to receive a handover request sent by the third Internet of Things router, where the handover request includes: an identifier of the second Internet of Things terminal, and a data packet corresponding to the second Internet of Things terminal a frame serial number; the device further includes:
  • a storage unit configured to store the frame serial number
  • a sending unit configured to send a connection request to the second Internet of Things terminal, where the destination address of the connection request is an identifier of the second Internet of Things terminal;
  • the IoT router receives a connection response sent by the second IoT terminal, and the IoT router establishes a connection with the second IoT terminal, and sends a handover response to the third IoT router, where the handover response includes: The indication that the two IoT terminals switch successfully.
  • the receiving unit is further configured to periodically receive the number of connected terminals of each standby IoT router sent by each standby IoT router.
  • the switching unit is specifically configured to switch the first Internet of Things terminal to the lowest number of alternate Internet of Things routers among the number of connected Internet of Things terminals.
  • the foregoing statistics unit is specifically configured to collect a trend of the number of connected IoT terminals of each standby IoT router. If the change trend is decrement, the switching priority of the standby IoT router is adjusted. The high, switching unit is also used to select the IoT router with the highest priority switching as the alternate IoT router for the handover.
  • a computer storage medium can store a program, and the program includes some or all of the steps of the IoT connection number based router switching method of any one of the foregoing aspects.
  • an Internet of Things router device comprising: one or more processors, a memory, a bus system, a transceiver, and one or more programs, the processor, the memory, and The transceiver is coupled by the bus system; wherein the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the Internet of Things router, cause the Internet of Things router to perform the above.
  • the technical solution provided by the present invention determines the number of access terminals by counting the number of access terminals of the Internet of Things terminal, and when the number threshold is lower than the number threshold, the IoT terminal is switched to the standby IoT router for communication, thereby ensuring The rate of data transmission increases the effectiveness of the technology.
  • 1 is a schematic flow chart of a repeater-based data routing method
  • FIG. 2 is a flow chart of a method for switching a router based on the number of connections of the Internet of Things
  • Figure 3 is a schematic diagram of the structure of the object network
  • FIG. 4 is a schematic flowchart of a method for switching a router based on the number of connections of the Internet of Things according to an embodiment of the present application;
  • FIG. 5 is a schematic flowchart of a standby IoT router switching operation procedure according to an embodiment of the present application.
  • FIG. 6 is a flow of a method for switching a router based on the number of connections of the Internet of Things according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a router switching device based on the number of connections of an Internet of Things provided by the present application.
  • FIG. 8 is a schematic structural diagram of an Internet of Things router provided by the present application.
  • Computer device also referred to as “computer” in the context, is meant an intelligent electronic device that can perform predetermined processing, such as numerical calculations and/or logical calculations, by running a predetermined program or instruction, which can include a processor and The memory is executed by the processor to execute a predetermined process pre-stored in the memory to execute a predetermined process, or is executed by hardware such as an ASIC, an FPGA, a DSP, or the like, or a combination of the two.
  • Computer devices include, but are not limited to, servers, personal computers, notebook computers, tablets, smart phones, and the like.
  • first first
  • second second
  • first first
  • second second
  • an Internet of Things based connection number based router switching method is provided.
  • the method is applied to the object network shown in FIG. 1.
  • the object network includes: the Internet of Things terminal 10, the Internet of Things router 20, and the wireless access controller 30, and the foregoing Internet of Things terminal.
  • the Internet of Things terminal may specifically be: a mobile phone, a tablet computer, a computer, etc., of course, it may also include other devices with networking functions, such as smart TV, smart air conditioner, and smart device.
  • the IoT terminal 10 is connected to the Internet of Things router 20 by wireless means, and the Internet of Things router 20 accesses the Internet by another means (ie, a connection mode different from the wireless mode).
  • a connection mode different from the wireless mode.
  • the other way may be LTE or wired, usually in most cases, the router and the gateway are connected by wire.
  • the wired mode is taken as an example, and for convenience of representation, only one solid line is shown here.
  • the wireless access controller 30 may be a personal computer (PC) according to the size of the Internet of Things. Of course, in actual applications, it may also be multiple PCs, servers, or core network side devices. The implementation manner is not limited to the specific manifestation of the above wireless access controller.
  • PC personal computer
  • FIG. 2 is a schematic diagram of a router switching number of an Internet of Things based on the number of connections provided by the present invention.
  • the method includes the following steps:
  • Step S201 The Internet of Things router receives the data packet sent by the Internet of Things terminal;
  • the data packet sent by the receiving IoT terminal in the above step S201 is only sent by means of a wireless connection, and the wireless mode includes but is not limited to: wireless mode such as Bluetooth, Wireless Fidelity (WIFI) or Zigbee. Among them, the above WIFI needs to comply with the IEEE802.11b standard.
  • wireless mode such as Bluetooth, Wireless Fidelity (WIFI) or Zigbee.
  • WIFI Wireless Fidelity
  • Zigbee Zigbee
  • the Internet of Things and IoT routers here are only for wireless routers, because for the Internet of Things, the number of devices accessed by them is large. For routers, if the connection is through a wired connection, the number of accesses of the router first. There will be restrictions, and for the family, the wired connection is unimaginable for the wiring of the home user, and the cost of the cable is also very high, so the Internet of Things terminal in the technical solution of the present invention The connection between the routers is limited to wireless connections.
  • the above-mentioned Internet of Things terminals may have different forms of expression according to different scenarios.
  • the above-mentioned Internet of Things terminals may specifically be: smart televisions, smart air conditioners, smart refrigerators and other terminal devices having communication functions
  • the foregoing IoT terminal may specifically be: a smart electric light, a smart door, a smart door and window controller, a smart curtain, and the like.
  • the specific embodiment of the present invention does not limit the specific expression form of the foregoing Internet of Things terminal.
  • Step S202 The Internet of Things router counts the number of terminals that have been connected, and the connected Internet of Things terminal is a terminal that sends a data packet to the Internet of Things router or receives a data packet from the Internet of Things router within a set time;
  • the set time in the above step S202 can be set by the user. Of course, in actual applications, it can also be implemented by the manufacturer through the default setting.
  • the statistics in the foregoing step S202 may be periodic statistics, and the foregoing period may be set by the user.
  • an external setting interface may be set on the Internet of Things router, and the external device is connected.
  • the Internet of Things router sets the above cycle.
  • the above cycle can also be set by the manufacturer for the convenience of the user.
  • the present invention does not limit the specific value of the above cycle.
  • Step S203 Determine whether the number of connected Internet of Things terminals is lower than a quantity threshold. If the number of connected Internet of Things terminals is higher than the quantity threshold, switch the Internet of Things terminal to the standby IoT router.
  • the specific method for switching the IoT terminal to the standby IoT router can be:
  • the Internet of Things router receives a broadcast message of each standby IoT router, and the broadcast message includes the number of connected IoT terminals, and the IoT router extracts the number of connected IoT terminals in the broadcast message, and establishes an alternate Internet of Things.
  • the IoT router extracts from the list the IoT routers whose number of connected terminals is lower than the threshold of the number of IoT routers that are switched by the IoT terminal.
  • the specific method for switching the IoT terminal to the standby IoT router may also be:
  • the Internet of Things router counts the trend of the number of connected IoT terminals of each standby IoT router. If the trend is decreasing, the switching priority of the alternate IoT router is increased, and the IoT terminal selects the switching priority. The highest level IoT router acts as a backup IoT router for switching.
  • the purpose of setting up this scheme is mainly to avoid switching the access point too frequently, because for the main IoT router, the number of terminal accesses is large, but for the IoT router, the number of terminal accesses varies, so It is necessary to obtain the trend of the number of accesses of the terminal in the set time period. First, it cannot be incremental. If it is incremental, the number of terminals will soon be higher than the threshold again after switching to the router. It will switch again, even if there is a null switch, so you need to find the IoT router with decreasing trend.
  • the foregoing method may further include:
  • the IoT router receives a handover request sent by another IoT router, where the handover request includes: an identifier of the second Internet of Things terminal and a frame sequence number corresponding to the second Internet of Things terminal sending data packet (a sequence of frames corresponding to the second Internet of Things terminal) number);
  • the IoT router stores the frame serial number, and sends a connection request to the second Internet of Things terminal, where the destination address of the connection request is an identifier of the second Internet of Things terminal;
  • the IoT router receives the connection response sent by the second IoT terminal, and the IoT router establishes a connection with the second IoT terminal, and sends a handover response to the additional (ie, the third) IoT router, the handover response includes: The indication that the second Internet of Things terminal is successfully switched.
  • the above indication may be a value representation of one bit, and of course other forms.
  • the technical solution provided by the present invention determines the number of access terminals by periodically detecting the number of access terminals of the Internet of Things terminal, and when the number threshold is lower than the threshold, the IoT terminal is switched to the standby IoT router for communication. Thereby ensuring the rate of data transmission and improving the effectiveness of the technology.
  • an Internet of Things based connection number based router switching method is provided.
  • the method is applied to the Internet of Things network as shown in FIG. 3, as shown in FIG. 3, the Internet of Things network includes: an Internet of Things terminal 39, and a plurality of Internet of Things routers (for convenience of description, there are multiple The Internet of Things routers are identified as 21, 22) and the wireless access controller 30.
  • the above-mentioned Internet of Things terminal may have different manifestations according to different situations.
  • the Internet of Things terminal may specifically be: a mobile phone, a tablet computer, a computer, etc., of course, it may also include other devices with networking functions, such as a smart TV.
  • a smart air conditioner, a smart water bottle or some smart devices of the Internet of Things, the above-mentioned Internet of Things terminal 39 is connected to the router 21 by wireless means, wherein the router 22 is a standby Internet of Things router of the router 21, and the router 21 is in another way (ie, with the wireless mode) Different connection methods) access to the Internet.
  • the ongoing wireless communication connection is indicated by a solid line, and the wireless communication connection is about to be connected by a dotted line.
  • the above wireless methods include but are not limited to: Bluetooth, WIFI, etc.
  • Another way can be LTE or wired.
  • the wired mode is taken as an example, and for convenience of representation, only one solid line is shown here.
  • the above-mentioned wireless access controller 30 may be a personal computer (PC) according to the size of the Internet of Things. Of course, in practical applications, it may also be multiple PCs or servers.
  • PC personal computer
  • the specific embodiment of the present invention is not limited. The specific manifestation of the above wireless access controller.
  • FIG. 4 is a schematic diagram of a method for switching an Internet of Things based on a number of connections according to the present invention. The method is as shown in FIG. 4, and includes the following steps:
  • Step S401 The Internet of Things router receives the data packet sent by the Internet of Things terminal;
  • the data packet sent by the receiving IoT terminal in the above step S401 is only sent by means of a wireless connection, and the wireless mode includes but is not limited to: wireless mode such as Bluetooth, Wireless Fidelity (WIFI) or Zigbee.
  • wireless mode such as Bluetooth, Wireless Fidelity (WIFI) or Zigbee.
  • the Internet of Things and routers here are only for wireless routers, because for the Internet of Things, the number of devices it accesses is large. For routers, if the connection is through a wired connection, the number of accesses to the router will be the first. It is limited, and for the family, it is wired, which is unimaginable for the wiring of home users, and the cost of this cable is also very high, so this The connection between the Internet of Things terminal and the router in the technical solution of the invention is limited to the wireless connection.
  • the above-mentioned Internet of Things terminals may have different forms of expression according to different scenarios.
  • the above-mentioned Internet of Things terminals may specifically be: smart televisions, smart air conditioners, smart refrigerators and other terminal devices having communication functions
  • the foregoing IoT terminal may specifically be: a smart electric light, a smart door, a smart door and window controller, a smart curtain, and the like.
  • the specific embodiment of the present invention does not limit the specific expression form of the foregoing Internet of Things terminal.
  • Step S402 the Internet of Things router counts the number of connected IoT terminals
  • the period of the statistics in the above step S402 can be set by the user.
  • an external setting interface can be set on the Internet of Things router, and the external device connects to the Internet of Things router to set the above.
  • the cycle of course, for the convenience of the user, the above cycle can also be set by the manufacturer, and the present invention does not limit the specific value of the above cycle.
  • Step S403 Determine whether the number of connected terminals is lower than a quantity threshold. If the number of connected terminals is higher than the quantity threshold, send a handover request to the alternate Internet of Things router 22, where the handover request includes, but is not limited to, an identifier of the Internet of Things terminal. And frame serial number;
  • the frame in the above step S403 may be: a medium access control protocol data unit (MPDU), and the frame sequence number may be a number indicating the order in which the frame is sent.
  • MPDU medium access control protocol data unit
  • the identifier of the Internet of Things terminal may be specifically: the MAC address of the Internet of Things terminal.
  • the Internet of Things terminal may be identified by other means, for example, by using an IP address or other identifier to identify the Internet of Things terminal.
  • Step S404 The IoT router receives the handover response sent by the standby Internet of Things router, and the handover response may include an indication of whether the IoT terminal is successfully switched.
  • the indication value may be that the handover succeeds or the handover is unsuccessful, and the handover may be specifically performed.
  • the packet header field of the response is represented by a bit. For example, 1 indicates that the handover is successful, and 0 indicates that the handover is unsuccessful. Of course, the handover success is 0, and 1 indicates that the handover is unsuccessful.
  • the invention is not limited to the specific forms of the above description.
  • Step S405 The Internet of Things router deletes the information of the Internet of Things terminal, and the information of the Internet of Things terminal includes but is not limited to: a frame serial number.
  • the deletion is for the purpose of placing the object serial number confusion when the IoT terminal switches back from the alternate IoT router 22 to the IoT router 21.
  • the frame sequence number is carried in the handover request and sent to the backup Use the IoT router, so that the frame serial number in the alternate IoT router is exactly the same as the frame serial number of the IoT terminal, because for the handover, it needs to last for a period of time, such as not sending the frame serial number to the alternate Internet of Things. Routers, because of the difference in frame sequence numbers, are likely to cause packet loss. Here, packet loss is avoided, so it has the advantage of reducing packet loss rate.
  • the step is as shown in FIG. 5, and includes:
  • Step S501 The standby Internet of Things router stores the frame serial number, and sends a connection request to the Internet of Things terminal, and the destination identifier of the connection request may be an identifier of the Internet of Things terminal.
  • Step S502 the standby Internet of Things router receives the connection response sent by the Internet of Things terminal;
  • Step S503 The standby Internet of Things router establishes a wireless connection with the Internet of Things terminal, and sends a handover response to the Internet of Things router.
  • an Internet of Things based connection number based router switching method is provided.
  • the method is applied to the Internet of Things network as shown in FIG. 3, as shown in FIG. 3, the Internet of Things network includes: an Internet of Things terminal 39, and a plurality of Internet of Things routers (for convenience of description, there are multiple The Internet of Things routers are identified as 21, 22) and the wireless access controller 30.
  • the above-mentioned Internet of Things terminal may have different manifestations according to different situations.
  • the Internet of Things terminal may specifically be: a mobile phone, a tablet computer, a computer, etc., of course, it may also include other devices with networking functions, such as a smart TV.
  • a smart air conditioner, a smart water bottle or some IoT smart device, the above-mentioned Internet of Things terminal 39 is wirelessly connected to the router 21, wherein the router 22 is the standby Internet of Things router of the router 21, and the router 21 passes another way (ie, with the wireless Different ways of connecting) access to the Internet, see Figure 3, where the ongoing wireless communication connection is indicated by the solid line, and the wireless communication connection is about to be connected by a dotted line.
  • the above wireless methods include but are not limited to: Bluetooth, WIFI, etc.
  • the other way of the above may be LTE or wired.
  • the wired mode is taken as an example, and for convenience of representation, only one solid line is shown here.
  • the above-mentioned wireless access controller 30 may be a personal computer (PC) according to the size of the Internet of Things. Of course, in practical applications, it may also be multiple PCs or servers.
  • PC personal computer
  • the specific embodiment of the present invention is not limited. The specific manifestation of the above wireless access controller.
  • FIG. 6 is a schematic diagram of a method for switching an Internet of Things based on a number of connections according to the present invention. The method is as shown in FIG.
  • Step S601 The Internet of Things router receives the data packet sent by the Internet of Things terminal;
  • the data packet sent by the receiving IoT terminal in the above step S601 is only sent by means of a wireless connection, and the wireless mode includes but is not limited to: wireless mode such as Bluetooth, Wireless Fidelity (WIFI) or Zigbee. Among them, the above WIFI needs to comply with the IEEE802.11b standard.
  • wireless mode such as Bluetooth, Wireless Fidelity (WIFI) or Zigbee.
  • WIFI Wireless Fidelity
  • Zigbee Zigbee
  • the Internet of Things and APs here are only for wireless APs, because for the Internet of Things, the number of devices accessed by them is large.
  • the connection is through a wired connection, the number of APs to access first will be The limitation is, and for the family, the wired connection is unimaginable for the wiring of the home user, and the cost of the cable is also very high, so the Internet of Things terminal and the AP in the technical solution of the present invention The connection between them is limited to wireless connections.
  • the above-mentioned Internet of Things terminals may have different forms of expression according to different scenarios.
  • the above-mentioned Internet of Things terminals may specifically be: smart televisions, smart air conditioners, smart refrigerators and other terminal devices having communication functions
  • the foregoing IoT terminal may specifically be: a smart electric light, a smart door, a smart door and window controller, a smart curtain, and the like.
  • the specific embodiment of the present invention does not limit the specific expression form of the foregoing Internet of Things terminal.
  • Step S602 the Internet of Things router counts the number of terminals that have been connected
  • the period of the statistics in the above step S602 can be set by the user.
  • an external setting interface can be set on the Internet of Things router, and the external device connects to the Internet of Things router to set the above.
  • the cycle of course, for the convenience of the user, the above cycle can also be set by the manufacturer, and the present invention does not limit the specific value of the above cycle.
  • Step S603 the Internet of Things router receives the number of access terminals sent by each standby IoT router;
  • the implementation of the foregoing step S603 may specifically be: receiving the number of access terminals sent by each standby IoT router by using a wired manner, and the specific implementation scheme may adopt the number of access terminals in the heartbeat message, because for each object For a networked router, the number of access terminals varies in real time. How to get the latest number of access terminals is a problem.
  • the number of access terminals carried by heartbeat messages has two advantages. First, it can pass the heartbeat.
  • the message is used to detect whether the standby IoT router is normal (if the heartbeat message can be received, that is, the normal is determined, otherwise, the fault is determined), and the second heartbeat message is originally sent periodically, so that the Internet of Things router can obtain each of the real-time routers in real time. The number of access terminals sent by the alternate IoT router.
  • Step S604 The Internet of Things router determines whether the number of access terminals is lower than a quantity threshold. If the number of access terminals of the Internet of Things terminal is lower than the quantity threshold, the IoT terminal is switched to the standby IoT router with the lowest number of access terminals.
  • the standby IoT router with the lowest number of access terminals can effectively allocate the terminal, and the number of terminals of the IoT router is too high, which exceeds the load of the router, and the load of the standby IoT router is too heavy.
  • the technical solution provided by the present invention determines the number of access terminals by periodically detecting the number of access terminals of the Internet of Things terminal, and when the number threshold is lower than the threshold, the IoT terminal is switched to the standby IoT router for communication. Thereby ensuring the rate of data transmission and improving the effectiveness of the technology.
  • FIG. 7 provides an IoT connection-based router switching device 700.
  • the above-mentioned Internet-based number-based router switching device 700 may specifically be an Internet of Things terminal as shown in FIG. 3 or FIG.
  • the terminal device For technical terms and definitions in the terminal device, reference may be made to the definitions shown in FIG. 2 or FIG. 6, the device comprising:
  • the receiving unit 701 is configured to receive a data packet sent by the Internet of Things terminal;
  • the statistics unit 702 is configured to count the number of IoT terminals that have been connected, and the connected Internet of Things terminals are terminals that send data packets to the IoT router or receive an IoT router to send data packets within a set time;
  • the determining unit 703 is configured to determine whether the number of connected Internet of Things terminals is higher than a quantity threshold
  • the switching unit 704 is configured to switch the first Internet of Things terminal to the standby IoT router if the number of connected IoT terminals is higher than the quantity threshold.
  • the switching unit 704 is configured to send a handover request to the standby Internet of Things router, where the handover request includes: an identifier of the first Internet of Things terminal and a frame sequence number corresponding to the data packet;
  • the receiving unit 701 is further configured to receive a handover response sent by the standby IoT router after the handover is successful, where the handover response includes: an indication that the first IoT terminal successfully switches.
  • the receiving unit 701 is further configured to receive a handover request sent by the third Internet of Things router, where the handover request includes: an identifier of the second Internet of Things terminal, and the second Internet of Things terminal sends The frame sequence number corresponding to the data packet; the device further includes:
  • a storage unit 705, configured to store the frame serial number
  • the sending unit 706 is configured to send a connection request to the second Internet of Things terminal, where the destination address of the connection request is an identifier of the second Internet of Things terminal;
  • the IoT router receives a connection response sent by the second IoT terminal, and the IoT router establishes a connection with the second IoT terminal, and sends a handover response to the third IoT router, where the handover response includes: The indication that the two IoT terminals switch successfully.
  • the receiving unit 701 is further configured to periodically receive the number of connected terminals of each standby IoT router sent by each standby IoT router.
  • the switching unit 704 is specifically configured to switch the first Internet of Things terminal to a standby IoT router with the lowest number of connected Internet of Things terminals.
  • the present invention provides a computer storage medium, wherein the computer storage medium can store a program, and the program includes some or all of the steps of the IoT connection number based router switching method of any one of the above aspects.
  • FIG. 8 is an Internet of Things router 800 provided by the present invention.
  • the Internet of Things router may be a node deployed in an Internet system, and the Internet system may further include: an Internet of Things terminal and a wireless access controller.
  • the Internet of Things router 800 includes, but is not limited to, a computer, a server, etc., as shown in FIG. 9, the Internet of Things router 800 includes a processor 801, a memory 802, a wireless transceiver 803, and a bus 804.
  • the wireless transceiver 803 is configured to transmit and receive data with external devices (eg, other devices in the interconnection system, including but not limited to: repeaters, core network devices, etc.).
  • the number of processors 801 in the Internet of Things router 800 may be one or more.
  • processor 801, memory 802, and wireless transceiver 803 may be connected by a bus system or other means.
  • bus system or other means.
  • the program code can be stored in the memory 802.
  • the processor 801 is configured to call program code stored in the memory 802 for performing the following operations:
  • a wireless transceiver 803 configured to receive a data packet sent by the Internet of Things terminal;
  • the processor 801 is configured to identify the type of the Internet of Things terminal, and query the first encryption unit corresponding to the type in the pre-configured type and the encryption unit mapping table according to the type, and invoke the first An encryption unit performs encryption processing on the data packet.
  • the wireless transceiver 803 is further configured to send the encrypted data packet to the wireless access controller.
  • processor 801 and the wireless transceiver 803 can also be used to perform the refinement and the steps of the steps and steps in the embodiment shown in FIG. 2 or FIG. 6.
  • the processor 801 herein may be a processing component or a general term of multiple processing components.
  • the processing component may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • DSPs digital singal processors
  • FPGAs Field Programmable Gate Arrays
  • the memory 803 may be a storage device or a collective name of a plurality of storage elements, and is used to store executable program code or parameters, data, and the like required for the application running device to operate. And the memory 803 may include random access memory (RAM), and may also include non-volatile memory such as a magnetic disk memory, a flash memory, or the like.
  • RAM random access memory
  • non-volatile memory such as a magnetic disk memory, a flash memory, or the like.
  • the bus 804 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 8, but it does not mean that there is only one bus or one type of bus.
  • the user equipment may also include an input/output device, i.e., an external interface 805, coupled to bus 804 for connection to other portions, such as processor 801, via a bus.
  • the input/output device can provide an input interface for the operator, so that the operator can select the control item through the input interface, and can also be other interfaces through which other devices can be externally connected.
  • the program may be stored in a computer readable storage medium, and the storage medium may include: Flash disk, read-only memory (English: Read-Only Memory, referred to as: ROM), random accessor (English: Random Access Memory, referred to as: RAM), disk or optical disk.
  • ROM Read-Only Memory
  • RAM Random Access Memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请公开了一种物联网基于连接数量的路由器切换方法及装置,所述方法包括如下步骤:物联网路由器接收第一物联网终端发送的数据包;物联网路由器统计已经连接的物联网终端数量;物联网路由器判断该连接的物联网终端数量是否低于数量阈值,如连接的终端的数量高于数量阈值,则将第一物联网终端切换到备用物联网路由器。本发明提供的技术方案具有用户体验度好的优点。

Description

物联网基于连接数量的路由器切换方法及装置
本发明要求2017年8月29日递交的发明名称为“物联网基于连接数量的路由器切换方法及装置”的申请号201710759325.1的在先申请优先权,上述在先申请的内容以引入的方式并入本文本中。
技术领域
本申请涉及通信领域,尤其涉及一种物联网基于连接数量的路由器切换方法及装置。
背景技术
物联网是新一代信息技术的重要组成部分,也是“信息化”时代的重要发展阶段。其英文名称是:“Internet of things(IoT)”。顾名思义,物联网就是物物相连的互联网。这有两层意思:其一,物联网的核心和基础仍然是互联网,是在互联网基础上的延伸和扩展的网络;其二,其用户端延伸和扩展到了任何物品与物品之间,进行信息交换和通信,也就是物物相息。
物联网解决的是物物之间的互联以及物物之间的数据交换,现有的物联网在联网时均基于物联网路由器来接入互联网,现有的路由器由于能够连接的终端的数量有限,当终端连接的数量超过一定数量时,连接质量下降甚至是无法连接的问题,而现有的技术的物联网终端无法进行路由器的切换,所以在终端的连接数量过多时,影响终端的数据传输质量,影响客户体验。
发明内容
本申请提供一种物联网基于连接数量的路由器切换方法。可以提高物联网数据的传输质量,提高用户体验。
第一方面,提供一种物联网基于连接数量的路由器切换方法,所述方法包括如下步骤:
物联网路由器接收第一物联网终端发送的数据包;
物联网路由器统计已经连接的物联网终端数量,所述已经连接的物联网终 端为在设定时间内向所述物联网路由器发送数据包或接收物联网路由器发送数据包的终端;
物联网路由器判断所述已经连接的物联网终端数量是否低于数量阈值,如已经连接的物联网终端的数量高于数量阈值,则将第一物联网终端切换到备用物联网路由器。
可选的,所述将第一物联网终端切换到备用物联网路由器具体,包括:
物联网路由器向备用物联网路由器发送切换请求,所述切换请求包括:所述第一物联网终端的标识以及所述数据包对应的帧序列号;
物联网路由器接收备用物联网路由器在切换成功后发送的切换响应,所述切换响应包括:所述第一物联网终端切换成功的指示。
可选的,所述方法还包括:
物联网路由器接收第三物联网路由器发送的切换请求,所述切换请求包括:第二物联网终端的标识以及所述第二物联网终端发送的数据包对应的帧序列号;
物联网路由器存储所述帧序列号,向所述第二物联网终端发送连接请求,所述连接请求的目的地址为所述第二物联网终端的标识;
物联网路由器接收第二物联网终端发送的连接响应,物联网路由器建立与所述第二物联网终端的连接,物联网路由器向所述第三物联网路由器发送切换响应,所述切换响应包括:所述第二物联网终端切换成功的指示。
可选的,所述方法在统计已经连接的终端数量之后还包括:
物联网路由器周期性的接收每个备用物联网路由器发送的每个备用物联网路由器的已连接的终端数量。
可选的,所述将所述第一物联网终端切换到备用物联网路由器具体,包括:
将所述第一物联网终端切换到已经连接的物联网终端数量中数量最低的备用物联网路由器。
可选的,上述将物联网终端切换到备用物联网路由器的具体方法还可以为:
物联网路由器统计每个备用物联网路由器的已连接的物联网终端的数量的变化趋势,如该变化趋势为递减,则将该备用物联网路由器的切换优先级调 高,物联网终端选择切换优先级最高的物联网路由器作为切换的备用物联网路由器。
第二方面,提供一种物联网基于连接数量的路由器切换装置,所述装置包括:
统计单元,用于统计已经连接的物联网终端数量,所述已经连接的物联网终端为在设定时间内向所述物联网路由器发送数据包或接收物联网路由器发送数据包的终端;
判断单元,用于判断所述已经连接的物联网终端数量是否高于数量阈值;
切换单元,用于如所述已经连接的物联网终端数量高于数量阈值,则将所述第一物联网终端切换到备用物联网路由器。
可选的,所述切换单元具体,用于向备用物联网路由器发送切换请求,所述切换请求包括:所述第一物联网终端的标识以及所述数据包对应的帧序列号;
所述接收单元,还用于接收备用物联网路由器在切换成功后发送的切换响应,所述切换响应包括:所述第一物联网终端切换成功的指示。
可选的,所述接收单元,还用于接收第三物联网路由器发送的切换请求,所述切换请求包括:第二物联网终端的标识以及所述第二物联网终端发送的数据包对应的帧序列号;所述装置还包括:
存储单元,用于存储所述帧序列号;
发送单元,用于向所述第二物联网终端发送连接请求,所述连接请求的目的地址为所述第二物联网终端的标识;
物联网路由器接收第二物联网终端发送的连接响应,物联网路由器建立与所述第二物联网终端的连接,向所述第三物联网路由器发送切换响应,所述切换响应包括:所述第二物联网终端切换成功的指示。
可选的,所述接收单元,还用于周期性的接收每个备用物联网路由器发送的每个备用物联网路由器的已连接的终端数量。
可选的,所述切换单元具体,用于将所述第一物联网终端切换到已经连接的物联网终端数量中数量最低的备用物联网路由器。
可选的,上述统计单元,具体用于统计每个备用物联网路由器的已连接的物联网终端的数量的变化趋势,如该变化趋势为递减,则将该备用物联网路由器的切换优先级调高,切换单元,还用于选择切换优先级最高的物联网路由器作为切换的备用物联网路由器。
第三方面,提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述第一方面记载的任何一种物联网基于连接数量的路由器切换方法的部分或全部步骤。
第四方面,提供一种物联网路由器设备,所述物联网路由器设备包括:一个或多个处理器、存储器、总线系统、收发器以及一个或多个程序,所述处理器、所述存储器和所述收发器通过所述总线系统相连;其中所述一个或多个程序被存储在所述存储器中,一个或多个程序包括指令,指令当被物联网路由器执行时使物联网路由器执行上述第一方面及第一方面全部可能设计提供的方法中的任意一种。
本发明提供的技术方案的通过统计物联网终端的接入终端数量,对该接入终端数量进行判断,当低于数量阈值时,将该物联网终端切换到备用物联网路由器进行通信,从而保证了数据传输的速率,提高了技术的有效性。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是一种基于中继器的数据路由方法的流程示意图;
图2是一种物联网基于连接数量的路由器切换方法的流程图;
图3为物联网络的结构示意图
图4是本申请实施例提供的物联网基于连接数量的路由器切换方法的流程示意图;
图5是本申请实施例的备用物联网路由器切换操作流程示意图;
图6是本申请实施例提供的物联网基于连接数量的路由器切换方法的流 程示意图;
图7是本申请提供的一种基于物联网基于连接数量的路由器切换装置的结构示意图;
图8是本申请提供的一种物联网路由器的结构示意图。
具体实施方式
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作描述成顺序的处理,但是其中的许多操作可以被并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
在上下文中所称“计算机设备”,也称为“电脑”,是指可以通过运行预定程序或指令来执行数值计算和/或逻辑计算等预定处理过程的智能电子设备,其可以包括处理器与存储器,由处理器执行在存储器中预存的存续指令来执行预定处理过程,或是由ASIC、FPGA、DSP等硬件执行预定处理过程,或是由上述二者组合来实现。计算机设备包括但不限于服务器、个人电脑、笔记本电脑、平板电脑、智能手机等。
后面所讨论的方法(其中一些通过流程图示出)可以通过硬件、软件、固件、中间件、微代码、硬件描述语言或者其任意组合来实施。当用软件、固件、中间件或微代码来实施时,用以实施必要任务的程序代码或代码段可以被存储在机器或计算机可读介质(比如存储介质)中。(一个或多个)处理器可以实施必要的任务。
这里所公开的具体结构和功能细节仅仅是代表性的,并且是用于描述本发明的示例性实施例的目的。但是本发明可以通过许多替换形式来具体实现,并且不应当被解释成仅仅受限于这里所阐述的实施例。
应当理解的是,虽然在这里可能使用了术语“第一”、“第二”等等来描述各个单元,但是这些单元不应当受这些术语限制。使用这些术语仅仅是为了将一个单元与另一个单元进行区分。举例来说,在不背离示例性实施例的范围的情 况下,第一单元可以被称为第二单元,并且类似地第二单元可以被称为第一单元。这里所使用的术语“和/或”包括其中一个或更多所列出的相关联项目的任意和所有组合。
这里所使用的术语仅仅是为了描述具体实施例而不意图限制示例性实施例。除非上下文明确地另有所指,否则这里所使用的单数形式“一个”、“一项”还意图包括复数。还应当理解的是,这里所使用的术语“包括”和/或“包含”规定所陈述的特征、整数、步骤、操作、单元和/或组件的存在,而不排除存在或添加一个或更多其他特征、整数、步骤、操作、单元、组件和/或其组合。
还应当提到的是,在一些替换实现方式中,所提到的功能/动作可以按照不同于附图中标示的顺序发生。举例来说,取决于所涉及的功能/动作,相继示出的两幅图实际上可以基本上同时执行或者有时可以按照相反的顺序来执行。
下面结合附图对本发明作进一步详细描述。
根据本发明的一个方面,提供了一种物联网基于连接数量的路由器切换方法。其中,该方法应用在如图1所示的物联网络中,如图1所示,该物联网络包括:物联网终端10、物联网路由器20以及无线接入控制器30,上述物联网终端根据不同的情况可以具有不同的表现形式,例如该物联网终端具体可以为:手机、平板电脑、计算机等设备,当然其也可以包含带有联网功能的其他设备,例如智能电视、智能空调、智能水壶或一些物联网的智能设备,上述物联网终端10通过无线方式与物联网路由器20连接,物联网路由器20通过另一种方式(即与无线方式不同的连接方式)接入互联网,上述无线方式包括但不限于:蓝牙、WIFI等方式,上述另一种方式可以为,LTE或有线方式,通常大部分的情况路由器与网关之间通过有线连接。图1中以有线方式为示例,为了方便表示,这里仅以一根实线表示。
上述无线接入控制器30根据物联网的大小可以是一台个人电脑(英文:Personal computer,PC),当然在实际应用中,也可以是多台PC、服务器或核心网侧设备,本发明具体实施方式并不局限上述无线接入控制器的具体表现形式。
参阅图2,图2为本发明提供的一种物联网基于连接数量的路由器切换方 法,该方法如图2所示,包括如下步骤:
步骤S201、物联网路由器接收物联网终端发送的数据包;
上述步骤S201中接收物联网终端发送的数据包仅限通过无线连接的方式发送数据包,该无线方式包括但不限于:蓝牙、无线保真(英文:Wireless Fidelity,WIFI)或Zigbee等无线方式,其中,上述WIFI需要遵守IEEE802.11b的标准。
需要说明的是,这里的物联网以及物联网路由器仅仅只是针对无线路由器,因为对于物联网来说,其接入的设备数量众多,对于路由器来说,如果通过有线连接,首先路由器的接入数量会有所限制,并且对于家庭来说,均用有线连接,对于家庭用户的布线来说是无法想象的,另外此有线的成本也非常高,所以本发明的技术方案中的中物联网终端与路由器之间的连接仅限无线连接。
上述物联网终端依据不同的场景,可以有不同的表现形式,例如,在家电物联网中,上述物联网终端具体可以为:智能电视、智能空调、智能冰箱等具有通信功能的终端设备,在智能小区中,上述物联网终端具体可以为:智能电灯、智能门、智能门窗控制器、智能窗帘等设备,本发明具体实施方式并不局限上述物联网终端的具体表现形式。
步骤S202、物联网路由器统计已经连接的终端数量,该已经连接的物联网终端为在设定时间内向所述物联网路由器发送数据包或接收物联网路由器发送数据包的终端;
上述步骤S202中的设定时间可以由用户自行设定,当然在实际应用中,也可以由厂家通过默认设置的方式来实现。
上述步骤S202中的统计可以为周期性的统计,上述周期可以由用户自行设定,例如在本发明一个具体的实施方案中,可以在物联网路由器上设置一个外部设置接口,由外部设备连接该物联网路由器来设定上述周期,当然为了方便用户使用,上述周期也可以由厂家来设定,本发明并不局限上述周期的具体值。
步骤S203、判断该已经连接的物联网终端数量是否低于数量阈值,如已经连接的物联网终端数量高于数量阈值,则将物联网终端切换到备用物联网路由器。
上述步骤S203将物联网终端切换到备用物联网路由器的方法可以参见另一实施例的描述,这里不在赘述。
上述将物联网终端切换到备用物联网路由器的具体方法可以为:
物联网路由器接收每个备用物联网路由器的广播消息,该广播消息内包含已连接的物联网终端的数量,物联网路由器提取该广播消息中的已连接的物联网终端的数量,建立备用物联网路由器与已连接的物联网终端的数量的列表,物联网路由器从该列表中提取已连接的终端的数量低于数量阈值的物联网路由器作为物联网终端切换的备用物联网路由器。
上述将物联网终端切换到备用物联网路由器的具体方法还可以为:
物联网路由器统计每个备用物联网路由器的已连接的物联网终端的数量的变化趋势,如该变化趋势为递减,则将该备用物联网路由器的切换优先级调高,物联网终端选择切换优先级最高的物联网路由器作为切换的备用物联网路由器。
设置此方案的目的主要是为了避免接入点切换过于频繁,因为对于主物联网路由器来说,其终端接入数量多,但是对于物联网路由器来说,其终端接入数量是变化的,所以需要获取该终端接入数量在设定时间段的变化趋势,首先,不能是递增的,如果是递增,那么对于很有可能切换到该路由器后该终端数量很快会再次高于数量阈值,这样就会再次切换,甚至是出现空切换,所以需要查找递减的变化趋势的物联网路由器。
可选的,上述方法在步骤S203之后还可以包括:
物联网路由器接收另外物联网路由器发送的切换请求,所述切换请求包括:第二物联网终端的标识以及第二物联网终端发送数据包对应的帧序列号(第二物联网终端对应的帧序列号);
物联网路由器存储所述帧序列号,向所述第二物联网终端发送连接请求,所述连接请求的目的地址为所述第二物联网终端的标识;
物联网路由器接收第二物联网终端发送的连接响应,物联网路由器建立与所述第二物联网终端的连接,向所述另外(即第三)物联网路由器发送切换响应,该切换响应包括:第二物联网终端切换成功的指示。
上述指示可以为一个bit位的值表示,当然也可以是其他的形式表示。
本发明提供的技术方案通过周期性的检测物联网终端的接入终端数量,对该接入终端数量进行判断,当低于数量阈值时,将该物联网终端切换到备用物联网路由器进行通信,从而保证了数据传输的速率,提高了技术的有效性。
根据本发明的另一个方面,提供了一种物联网基于连接数量的路由器切换方法。其中,该方法应用在如图3所示的物联网络中,如图3所示,该物联网络包括:物联网终端39、多个物联网路由器(,为了描述的方便,这里将多个物联网路由器标识为21、22)和无线接入控制器30。上述物联网终端根据不同的情况可以具有不同的表现形式,例如该物联网终端具体可以为:手机、平板电脑、计算机等设备,当然其也可以包含带有联网功能的其他设备,例如智能电视、智能空调、智能水壶或一些物联网的智能设备,上述物联网终端39通过无线方式与路由器21连接,其中路由器22为路由器21的备用物联网路由器,路由器21通过另一种方式(即与无线方式不同的连接方式)接入互联网,参阅图3,这里的正在进行无线通信连接通过实线表示,即将要进行无线通信连接通过虚线连接,上述无线方式包括但不限于:蓝牙、WIFI等方式,上述另一种方式可以为,LTE或有线方式。图3中以有线方式为示例,为了方便表示,这里仅以一根实线表示。
上述无线接入控制器30根据物联网的大小可以是一台个人电脑(英文:Personal computer,PC),当然在实际应用中,也可以是多台PC或服务器,本发明具体实施方式并不局限上述无线接入控制器的具体表现形式。
参阅图4,图4为本发明提供的一种物联网基于连接数量的路由器切换方法,该方法如图4所示,包括如下步骤:
步骤S401、物联网路由器接收物联网终端发送的数据包;
上述步骤S401中接收物联网终端发送的数据包仅限通过无线连接的方式发送数据包,该无线方式包括但不限于:蓝牙、无线保真(英文:Wireless Fidelity,WIFI)或Zigbee等无线方式。
需要说明的是,这里的物联网以及路由器仅仅只是针对无线路由器,因为对于物联网来说,其接入的设备数量众多,对于路由器来说,如果通过有线连接,首先路由器的接入数量会有所限制,并且对于家庭来说,均用有线连接,对于家庭用户的布线来说是无法想象的,另外此有线的成本也非常高,所以本 发明的技术方案中的中物联网终端与路由器之间的连接仅限无线连接。
上述物联网终端依据不同的场景,可以有不同的表现形式,例如,在家电物联网中,上述物联网终端具体可以为:智能电视、智能空调、智能冰箱等具有通信功能的终端设备,在智能小区中,上述物联网终端具体可以为:智能电灯、智能门、智能门窗控制器、智能窗帘等设备,本发明具体实施方式并不局限上述物联网终端的具体表现形式。
步骤S402、物联网路由器统计已经连接的物联网终端数量;
上述步骤S402中的统计的周期可以由用户自行设定,例如在本发明一个具体的实施方案中,可以在物联网路由器上设置一个外部设置接口,由外部设备连接该物联网路由器来设定上述周期,当然为了方便用户使用,上述周期也可以由厂家来设定,本发明并不局限上述周期的具体值。
步骤S403、判断该连接的终端数量是否低于数量阈值,如连接的终端的数量高于数量阈值,则向备用物联网路由器22发送切换请求,该切换请求包括但不限于:物联网终端的标识和帧序列号;
上述步骤S403中的帧可以为:多个媒体接入控制协议数据单元(英文:medium access control protocol data unit,MPDU),上述帧序列号可以为标识该帧发送顺序的编号。物联网终端的标识具体可以为:物联网终端的MAC地址,当然在实际应用中也可以采用其他方式来标识该物联网终端,例如通过IP地址或其他的标识来标识该物联网终端。
步骤S404、物联网路由器接收备用物联网路由器发送的切换响应,该切换响应可以包括该物联网终端是否切换成功的指示,该指示值具体可以为,切换成功或切换不成功,其具体可以在切换响应的包头字段中用一个bit来表示,例如,以1表示切换成功,以0表示切换不成功,当然也可以为以0表示切换成功,以1表示切换不成功。本发明并不限制上述表示的具体形式。
步骤S405、物联网路由器删除该物联网终端的信息,该物联网终端的信息包括但不限于:帧序列号。
对此删除是为了放置该物联网终端从备用物联网路由器22切换回物联网路由器21时出现帧序列号混乱的问题。
本发明提供的方法在进行切换时,将帧序列号携带在切换请求中发送给备 用物联网路由器,这样使得备用物联网路由器中帧序列号与物联网终端的帧序列号完全一致,因为对于切换来说,其需要持续一段时间,如不向该帧序列号发送给备用物联网路由器,那么由于帧序列号的不同,很可能导致丢包的现象出现,这里避免了丢包的情况出现,所以其具有减少包的丢失率的优点。
需要说明的是,上述备用物联网路由器接收到该切换请求以后,可以进行如图5所示的操作步骤,该步骤如图5所示,包括:
步骤S501、备用物联网路由器存储该帧序列号,并向该物联网终端发送连接请求,该连接请求的目的标识可以为该物联网终端的标识。
步骤S502、备用物联网路由器接收物联网终端发送的连接响应;
步骤S503、备用物联网路由器与物联网终端建立无线连接,向物联网路由器发送切换响应。
根据本发明的又一个方面,提供了一种物联网基于连接数量的路由器切换方法。其中,该方法应用在如图3所示的物联网络中,如图3所示,该物联网络包括:物联网终端39、多个物联网路由器(,为了描述的方便,这里将多个物联网路由器标识为21、22)和无线接入控制器30。上述物联网终端根据不同的情况可以具有不同的表现形式,例如该物联网终端具体可以为:手机、平板电脑、计算机等设备,当然其也可以包含带有联网功能的其他设备,例如智能电视、智能空调、智能水壶或一些物联网的智能设备,上述物联网终端39通过无线方式与路由器21连接,其中路由器22为路由器21的被备用物联网路由器,路由器21通过另一种方式(即与无线方式不同的连接方式)接入互联网,参阅图3,这里的正在进行无线通信连接通过实线表示,即将要进行无线通信连接通过虚线连接,上述无线方式包括但不限于:蓝牙、WIFI等方式,上述另一种方式可以为,LTE或有线方式。图3中以有线方式为示例,为了方便表示,这里仅以一根实线表示。
上述无线接入控制器30根据物联网的大小可以是一台个人电脑(英文:Personal computer,PC),当然在实际应用中,也可以是多台PC或服务器,本发明具体实施方式并不局限上述无线接入控制器的具体表现形式。
参阅图6,图6为本发明提供的一种物联网基于连接数量的路由器切换方法,该方法如图6所示,包括如下步骤:
步骤S601、物联网路由器接收物联网终端发送的数据包;
上述步骤S601中接收物联网终端发送的数据包仅限通过无线连接的方式发送数据包,该无线方式包括但不限于:蓝牙、无线保真(英文:Wireless Fidelity,WIFI)或Zigbee等无线方式,其中,上述WIFI需要遵守IEEE802.11b的标准。
需要说明的是,这里的物联网以及AP仅仅只是针对无线AP,因为对于物联网来说,其接入的设备数量众多,对于AP来说,如果通过有线连接,首先AP的接入数量会有所限制,并且对于家庭来说,均用有线连接,对于家庭用户的布线来说是无法想象的,另外此有线的成本也非常高,所以本发明的技术方案中的中物联网终端与AP之间的连接仅限无线连接。
上述物联网终端依据不同的场景,可以有不同的表现形式,例如,在家电物联网中,上述物联网终端具体可以为:智能电视、智能空调、智能冰箱等具有通信功能的终端设备,在智能小区中,上述物联网终端具体可以为:智能电灯、智能门、智能门窗控制器、智能窗帘等设备,本发明具体实施方式并不局限上述物联网终端的具体表现形式。
步骤S602、物联网路由器统计已经连接的终端数量;
上述步骤S602中的统计的周期可以由用户自行设定,例如在本发明一个具体的实施方案中,可以在物联网路由器上设置一个外部设置接口,由外部设备连接该物联网路由器来设定上述周期,当然为了方便用户使用,上述周期也可以由厂家来设定,本发明并不局限上述周期的具体值。
步骤S603、物联网路由器接收每个备用物联网路由器发送的接入终端数量;
上述步骤S603的实现方案具体可以为,通过有线方式来接收每个备用物联网路由器发送的接入终端数量,其具体的实现的方案可以采用心跳消息中携带接入终端数量,因为对于每个物联网路由器来说,其接入终端数量均是实时变化的,那么如何得到最新的接入终端数量就是一个问题,这里采用心跳消息携带接入终端数量,有两个优点,第一,可以通过心跳消息来检测该备用物联网路由器是否正常(如能够接收到该心跳消息,即确定该正常,否则,确定其故障),第二心跳消息本来就是周期的发送,方便物联网路由器实时获取每个 备用物联网路由器发送的接入终端数量。
步骤S604、物联网路由器判断该接入终端数量是否低于数量阈值,如该物联网终端的接入终端数量低于数量阈值,将物联网终端切换到接入终端数量最低的备用物联网路由器。
上述步骤S604选择接入终端数量最低的备用物联网路由器能够有效的分配终端,避免物联网路由器的终端数量过高,超过路由器的负荷,导致备用物联网路由器的负荷过重。
本发明提供的技术方案通过周期性的检测物联网终端的接入终端数量,对该接入终端数量进行判断,当低于数量阈值时,将该物联网终端切换到备用物联网路由器进行通信,从而保证了数据传输的速率,提高了技术的有效性。
参阅图7,图7提供一种物联网基于连接数量的路由器切换装置700,上述物联网基于连接数量的路由器切换装置700具体可以为如图3或图6所示的物联网终端,上述物联网终端装置中的技术术语以及定义可以参见如图2或图6所示的定义,所述装置包括:
接收单元701,用于接收物联网终端发送的数据包;
统计单元702,用于统计已经连接的物联网终端数量,所述已经连接的物联网终端为在设定时间内向所述物联网路由器发送数据包或接收物联网路由器发送数据包的终端;
判断单元703,用于判断所述已经连接的物联网终端数量是否高于数量阈值;
切换单元704,用于如所述已经连接的物联网终端数量高于数量阈值,则将所述第一物联网终端切换到备用物联网路由器。
可选的,切换单元704具体,用于向备用物联网路由器发送切换请求,所述切换请求包括:所述第一物联网终端的标识以及所述数据包对应的帧序列号;
接收单元701,还用于接收备用物联网路由器在切换成功后发送的切换响应,所述切换响应包括:所述第一物联网终端切换成功的指示。
可选的,所述接收单元701,还用于接收第三物联网路由器发送的切换请求,所述切换请求包括:第二物联网终端的标识以及所述第二物联网终端发送 的数据包对应的帧序列号;所述装置还包括:
存储单元705,用于存储所述帧序列号;
发送单元706,用于向所述第二物联网终端发送连接请求,所述连接请求的目的地址为所述第二物联网终端的标识;
物联网路由器接收第二物联网终端发送的连接响应,物联网路由器建立与所述第二物联网终端的连接,向所述第三物联网路由器发送切换响应,所述切换响应包括:所述第二物联网终端切换成功的指示。
可选的,接收单元701,还用于周期性的接收每个备用物联网路由器发送的每个备用物联网路由器的已连接的终端数量。
可选的,切换单元704具体,用于将所述第一物联网终端切换到已经连接的物联网终端数量最低的备用物联网路由器。
本发明提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述第一方面记载的任何一种物联网基于连接数量的路由器切换方法的部分或全部步骤。
参阅图8,图8为本发明提供的一种物联网路由器800,该物联网路由器可以为部署在互联网系统中的一个节点,互联网系统还可以包括:物联网终端和无线接入控制器,该物联网路由器800包括但不限于:计算机、服务器等设备,如图9所示,该物联网路由器800包括:处理器801、存储器802、无线收发器803和总线804。无线收发器803用于与外部设备(例如互联系统中的其他设备,包括但不限于:中继器,核心网设备等)之间收发数据。物联网路由器800中的处理器801的数量可以是一个或多个。本申请的一些实施例中,处理器801、存储器802和无线收发器803可通过总线系统或其他方式连接。关于本实施例涉及的术语的含义以及举例,可以参考图2或图6对应的实施例,此处不再赘述。
其中,存储器802中可以存储程序代码。处理器801用于调用存储器802中存储的程序代码,用于执行以下操作:
无线收发器803,用于接收物联网终端发送的数据包;
处理器801,用于识别所述物联网终端的类型,依据所述类型在预先配置的类型与加密单元映射表中查询出所述类型对应的第一加密单元,调用所述第 一加密单元对所述数据包进行加密处理。
无线收发器803,还用于将加密处理后的数据包发送至无线接入控制器。
可选的,处理器801、无线收发器803,还可以用于执行如图2或如图6所示实施例中的步骤以及步骤的细化方案以及可选方案。
需要说明的是,这里的处理器801可以是一个处理元件,也可以是多个处理元件的统称。例如,该处理元件可以是中央处理器(Central Processing Unit,CPU),也可以是特定集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本申请实施例的一个或多个集成电路,例如:一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)。
存储器803可以是一个存储装置,也可以是多个存储元件的统称,且用于存储可执行程序代码或应用程序运行装置运行所需要参数、数据等。且存储器803可以包括随机存储器(RAM),也可以包括非易失性存储器(non-volatile memory),例如磁盘存储器,闪存(Flash)等。
总线804可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(Peripheral Component,PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
该用户设备还可以包括输入输出装置即外部接口805,连接于总线804,以通过总线与处理器801等其它部分连接。该输入输出装置可以为操作人员提供一输入界面,以便操作人员通过该输入界面选择布控项,还可以是其它接口,可通过该接口外接其它设备。
需要说明的是,对于前述的各个方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某一些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详 细描述的部分,可以参见其他实施例的相关描述。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。
以上对本申请实施例所提供的内容下载方法及相关设备、系统进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (12)

  1. 一种物联网基于连接数量的路由器切换方法,其特征在于,所述方法包括如下步骤:
    物联网路由器接收第一物联网终端发送的数据包;
    物联网路由器统计已经连接的物联网终端数量,所述已经连接的物联网终端为在设定时间内向所述物联网路由器发送数据包或接收物联网路由器发送数据包的终端;
    物联网路由器判断所述已经连接的物联网终端数量是否低于数量阈值,如已经连接的物联网终端的数量高于数量阈值,则将第一物联网终端切换到备用物联网路由器。
  2. 根据权利要求1所述的方法,其特征在于,所述将第一物联网终端切换到备用物联网路由器具体,包括:
    物联网路由器向备用物联网路由器发送切换请求,所述切换请求包括:所述第一物联网终端的标识以及所述数据包对应的帧序列号;
    物联网路由器接收备用物联网路由器在切换成功后发送的切换响应,所述切换响应包括:所述第一物联网终端切换成功的指示。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    物联网路由器接收第三物联网路由器发送的切换请求,所述切换请求包括:第二物联网终端的标识以及所述第二物联网终端发送的数据包对应的帧序列号;
    物联网路由器存储所述帧序列号,向所述第二物联网终端发送连接请求,所述连接请求的目的地址为所述第二物联网终端的标识;
    物联网路由器接收第二物联网终端发送的连接响应,物联网路由器建立与所述第二物联网终端的连接,物联网路由器向所述第三物联网路由器发送切换响应,所述切换响应包括:所述第二物联网终端切换成功的指示。
  4. 根据权利要求1所述的方法,其特征在于,所述方法在统计已经连接的终端数量之后还包括:
    物联网路由器周期性的接收每个备用物联网路由器发送的每个备用物联 网路由器的已连接的终端数量。
  5. 根据权利要求4所述的方法,其特征在于,所述将所述第一物联网终端切换到备用物联网路由器具体,包括:
    将所述第一物联网终端切换到已经连接的物联网终端数量中数量最低的备用物联网路由器。
  6. 一种物联网基于连接数量的路由器切换装置,其特征在于,所述装置包括:
    接收单元,用于接收物联网终端发送的数据包;
    统计单元,用于统计已经连接的物联网终端数量,所述已经连接的物联网终端为在设定时间内向所述物联网路由器发送数据包或接收物联网路由器发送数据包的终端;
    判断单元,用于判断所述已经连接的物联网终端数量是否高于数量阈值;
    切换单元,用于如所述已经连接的物联网终端数量高于数量阈值,则将所述第一物联网终端切换到备用物联网路由器。
  7. 根据权利要求6所述的装置,其特征在于,所述切换单元具体,用于向备用物联网路由器发送切换请求,所述切换请求包括:所述第一物联网终端的标识以及所述数据包对应的帧序列号;
    所述接收单元,还用于接收备用物联网路由器在切换成功后发送的切换响应,所述切换响应包括:所述第一物联网终端切换成功的指示。
  8. 根据权利要求6所述的装置,其特征在于,所述接收单元,还用于接收第三物联网路由器发送的切换请求,所述切换请求包括:第二物联网终端的标识以及所述第二物联网终端发送的数据包对应的帧序列号;所述装置还包括:
    存储单元,用于存储所述帧序列号;
    发送单元,用于向所述第二物联网终端发送连接请求,所述连接请求的目的地址为所述第二物联网终端的标识;
    物联网路由器接收第二物联网终端发送的连接响应,物联网路由器建立与所述第二物联网终端的连接,向所述第三物联网路由器发送切换响应,所述切换响应包括:所述第二物联网终端切换成功的指示。
  9. 根据权利要求6所述的装置,其特征在于,所述接收单元,还用于周期性的接收每个备用物联网路由器发送的每个备用物联网路由器的已连接的终端数量。
  10. 根据权利要求8所述的装置,其特征在于,所述切换单元,用于将所述第一物联网终端切换到已经连接的物联网终端数量中数量最低的备用物联网路由器。
  11. 一种计算机可读存储介质,其特征在于,其存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-5任一项所述的方法。
  12. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如权利要求1-5任一项所述的方法。
PCT/CN2017/100793 2017-08-29 2017-09-06 物联网基于连接数量的路由器切换方法及装置 WO2019041371A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710759325.1A CN107770087A (zh) 2017-08-29 2017-08-29 物联网基于连接数量的路由器切换方法及装置
CN201710759325.1 2017-08-29

Publications (1)

Publication Number Publication Date
WO2019041371A1 true WO2019041371A1 (zh) 2019-03-07

Family

ID=61265794

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/100793 WO2019041371A1 (zh) 2017-08-29 2017-09-06 物联网基于连接数量的路由器切换方法及装置

Country Status (2)

Country Link
CN (1) CN107770087A (zh)
WO (1) WO2019041371A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109041022B (zh) * 2018-08-13 2021-08-27 海尔优家智能科技(北京)有限公司 一种网络管理方法、蓝牙模块、介质及计算机
CN109194757B (zh) * 2018-09-13 2021-05-04 江苏汉峰数控科技有限公司 基于统计分析的智能物联网机床的控制方法及系统
CN109309735B (zh) * 2018-11-27 2022-02-22 深圳市网心科技有限公司 连接处理方法、服务器、系统及存储介质
CN113114667B (zh) * 2021-04-09 2023-06-06 杭州海兴泽科信息技术有限公司 一种终端通讯配置系统、方法、装置及介质
CN113595755A (zh) * 2021-06-10 2021-11-02 山西三友和智慧信息技术股份有限公司 用于通信终端的通信提速设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933185A (zh) * 2016-06-24 2016-09-07 上海连尚网络科技有限公司 一种确定路由器连接异常类型的方法与设备
CN106255180A (zh) * 2016-10-18 2016-12-21 青岛海信宽带多媒体技术有限公司 无线网络接入点的连接方法及装置
CN106304179A (zh) * 2016-08-05 2017-01-04 王楚 具有负载均衡功能的无线网络架构

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651975A (zh) * 2008-08-15 2010-02-17 华为技术有限公司 控制用户设备接入的方法、系统和装置
CN102480796B (zh) * 2010-11-23 2016-03-30 中兴通讯股份有限公司 一种实现无线资源控制协议连接重建的方法和系统
CN105530682B (zh) * 2014-09-30 2019-06-18 华为技术有限公司 一种终端接入方法及相关设备
CN104601682B (zh) * 2014-12-31 2018-05-22 海尔优家智能科技(北京)有限公司 一种切换物联网网关的方法及相关装置和系统
CN105578569B (zh) * 2015-12-26 2020-03-17 小米科技有限责任公司 网络调整方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933185A (zh) * 2016-06-24 2016-09-07 上海连尚网络科技有限公司 一种确定路由器连接异常类型的方法与设备
CN106304179A (zh) * 2016-08-05 2017-01-04 王楚 具有负载均衡功能的无线网络架构
CN106255180A (zh) * 2016-10-18 2016-12-21 青岛海信宽带多媒体技术有限公司 无线网络接入点的连接方法及装置

Also Published As

Publication number Publication date
CN107770087A (zh) 2018-03-06

Similar Documents

Publication Publication Date Title
US20210219221A1 (en) PDU Type Setting Method, UE Policy Setting Method, and Related Entity
WO2019041371A1 (zh) 物联网基于连接数量的路由器切换方法及装置
WO2018053894A1 (zh) 物联网基于传输速率的接入点切换方法及装置
EP3579619A1 (en) Parent node selection method and network node
CN107979534B (zh) 在连接到用户住所装置的设备中实现的方法及相应的装置
JP7118173B2 (ja) サービス品質監視方法、及びシステム、並びに装置
US20220086243A1 (en) Method, device, and system
KR20190047598A (ko) 데이터를 전송하는 방법 및 장치
US20220408332A1 (en) Method for advertising route, network element, system, and device
JP2020521391A (ja) データ分配方法、装置及びシステム
US20140289383A1 (en) Provisioning of network communication parameters based on device type
US11252078B2 (en) Data transmission method and apparatus
WO2017008701A1 (zh) 数据传输方法、装置及用户设备
KR20150045639A (ko) 네트워크를 선택하기 위한 방법 및 그 전자 장치
WO2018053895A1 (zh) 物联网接入点基于类型的上行数据加密控制方法及装置
WO2019019282A1 (zh) 物联网终端数据的按顺序加密方法及装置
WO2019019280A1 (zh) 物联网终端数据的分时段加密方法及装置
WO2020147081A1 (zh) 一种数据传输方法、相关设备及计算机存储介质
US20220286532A1 (en) Method and apparatus for obtaining shared maximum segment size mss
WO2015096734A1 (zh) 一种业务数据的下行传输方法及分组数据网关
WO2019010793A1 (zh) 物联网接入点接收数据的分时段加密方法及装置
CN107493571B (zh) 物联网中继器基于类型的上行数据加密控制方法及装置
WO2019010796A1 (zh) 物联网ap接收数据的分设备加密方法及装置
WO2019019279A1 (zh) 物联网终端基于类型的上行数据加密控制方法及装置
WO2019015039A1 (zh) 一种基于物联网中继器的选择加密方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17923897

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17923897

Country of ref document: EP

Kind code of ref document: A1