WO2019011140A1 - Internet of things, routing and identification allocation method, apparatus and device for same, and medium - Google Patents

Internet of things, routing and identification allocation method, apparatus and device for same, and medium Download PDF

Info

Publication number
WO2019011140A1
WO2019011140A1 PCT/CN2018/093950 CN2018093950W WO2019011140A1 WO 2019011140 A1 WO2019011140 A1 WO 2019011140A1 CN 2018093950 W CN2018093950 W CN 2018093950W WO 2019011140 A1 WO2019011140 A1 WO 2019011140A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
level network
data packet
identification information
information
Prior art date
Application number
PCT/CN2018/093950
Other languages
French (fr)
Chinese (zh)
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 WO2019011140A1 publication Critical patent/WO2019011140A1/en

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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present application relates to the field of communications technologies, and in particular, to an Internet of Things, a method, apparatus, device, and medium for the same.
  • the Internet of Things Internet of Things, Internet of Things, IoT
  • IoT Internet of Things
  • Battery-powered devices are classified into mobile devices and non-mobile devices.
  • Power-operated devices such as TVs, refrigerators, air conditioners, etc., which have large data storage capacity and high data processing capability, can use Wifi (Wireless Fidelity, wireless LAN based on IEEE802.11 standard) medium communication; battery Powered non-mobile devices such as door and window alarms, smart door locks, human body sensors, etc.
  • Wifi Wireless Fidelity, wireless LAN based on IEEE802.11 standard
  • the data storage and data processing capabilities of such devices are lower than those of high-powered devices, and can be communicated using Zigbee media; battery-powered mobile Devices such as smart bracelets, such devices have very small data storage, very weak data processing capabilities, and can use BLE (Bluetooth Low Energy) media communication.
  • BLE Bluetooth Low Energy
  • the communication media used by each device are not identical, and the routing protocols applicable to different communication media are different. Different routing protocols have different performance requirements for various devices. Therefore, when routing is required, devices in the entire Internet of Things are difficult to follow.
  • a unified routing protocol for routing for example, the RPL (Routing Protocol for Low-Power and Lossy Networks) routing protocol used by Zigbee, which requires high data storage capacity and data processing capability of the device, and battery-powered mobile devices. This requirement cannot be met, and it is difficult to perform routing according to the RPL routing protocol. Therefore, the current routing protocols are difficult to implement in a variety of devices with different performances.
  • the Internet of Things will inevitably involve multiple routing protocols when routing, which leads to poor interoperability between devices in the Internet of Things.
  • the present application provides an Internet of Things, a method, an apparatus, a device, and a medium for routing, assigning an identifier.
  • an Internet of Things including: a first level network and at least one second level network; a root node of the second level network is a node in the first level network;
  • the packet of the data packet constructed by the node in the first-level network and the node in the second-level network carries the identification information of the frame structure, and the identifier information carried by the data packet includes the destination node. Identification information;
  • the nodes in the first network and the second network store routing information, and the routing information includes at least identifier information of the node itself; the routing information is used by the node that receives the data packet based on the received data packet.
  • the identification information is calculated by routing.
  • a method for routing an Internet of Things comprising a first level network and at least one second level network, nodes in the first level network and the second
  • the packet of the data packet constructed by the node in the level network carries the identification information of the frame structure adaptation, and the identifier information carried by the node includes the identification information of the destination node.
  • the routing method includes the following steps:
  • the node After the node receives the data packet, the identifier information carried in the data packet is read, and the node stores routing information, where the routing information includes at least the identity information of the node itself;
  • the data packet is forwarded based on the identification information in the data packet, the stored routing information, and a predetermined routing rule.
  • a method for assigning an identifier in an Internet of Things comprising a first level network and at least one second level network, nodes in the first level network and the
  • the packet of the data packet constructed by the node in the second-level network carries the identifier information of the frame structure adaptation, and the identifier information carried by the data packet includes the identifier information of the destination node; the identifier information is allocated by the following steps:
  • the management node determines whether the access node is a node in the first-level network; the management node is a node in the first-level network or a higher-level node of the node in the first-level network;
  • the management node assigns identification information to the access node.
  • an electronic device in an Internet of Things includes a first-level network and at least one second-level network, and nodes in the first-level network and the first
  • the packet of the data packet constructed by the node in the secondary network carries the identifier information of the frame structure adaptation, and the identifier information carried by the node includes the identifier information of the destination node
  • the electronic device includes:
  • a memory storing instructions executable by the processor; the memory storing routing information of each node in the first level network, the routing information including identification information of nodes involved in each routing;
  • the processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
  • the data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
  • an electronic device in an Internet of Things includes a first-level network and at least one second-level network, and nodes in the first-level network and the first
  • the packet of the data packet constructed by the node in the secondary network carries the identification information of the frame structure adaptation, and the identifier information carried by the node includes the identification information of the destination node, and the electronic device is the root node of the second-level network.
  • a memory storing instructions executable by the processor; the memory storing routing information of each node in the first level network, the routing information including identification information of nodes involved in each routing;
  • the processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
  • the data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
  • an electronic device in an Internet of Things includes a first-level network and at least one second-level network, and nodes in the first-level network and the first
  • the packet of the data packet constructed by the node in the secondary network carries the identifier information of the frame structure adaptation, and the identifier information carried by the node includes the identifier information of the destination node, where the electronic device is a node in the second-level network.
  • a memory that stores a processor executable instruction; the memory stores identification information of the electronic device;
  • the processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
  • the data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
  • an electronic device in an Internet of Things includes a first-level network and at least one second-level network, and nodes in the first-level network and the first
  • the packet of the data packet constructed by the node in the secondary network carries the identification information of the frame structure adaptation, and the identifier information carried by the node includes the identification information of the destination node, and the electronic device is the mobile in the second-level network.
  • Nodes including:
  • a memory storing instructions executable by the processor; the memory storing routing information of the electronic device, the routing information including identification information of the mobile node, and identification information of a parent node thereof, the parent node being the first level network a node in ;
  • the processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
  • the data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
  • an Internet of Things routing apparatus comprising a first level network and at least one second level network, nodes in the first level network and the second
  • the packet of the data packet constructed by the node in the level network carries the identifier information of the frame structure adaptation, and the identifier information carried by the node includes the identifier information of the destination node.
  • the routing device includes:
  • the identifier reading module is configured to: after the node receives the data packet, read the identifier information carried in the data packet, where the node stores routing information, where the routing information includes at least the identifier information of the node itself;
  • a data forwarding module configured to forward the data packet based on the identifier information in the data packet, the stored routing information, and a predetermined routing rule.
  • one or more machine readable medium having stored thereon instructions that, when executed by one or more processors, cause the terminal device to perform the method described above.
  • the unified identification information of the nodes in the first-level network and the second-level network in the Internet of Things may be allocated in advance, and updated to the routing information stored in each node, and then the nodes in the network are based on
  • the identification information of the frame structure adaptation is added in the package body of the constructed data packet, so that in the process of transmitting the data packet, after receiving the data packet, the node can identify the data packet.
  • the carried identification information is then calculated according to the identification information in the data packet, the stored routing information, and the predetermined routing rule. Therefore, the data packet can be routed to the destination node based on the calculated route, and the Internet of Things can be implemented quickly and effectively. Interoperability between devices in the Internet, in the Internet of Things, can access more devices with different performances and improve the scalability of the Internet of Things.
  • FIG. 1A is an architectural diagram of an Internet of Things according to an exemplary embodiment of the present application.
  • FIG. 1B is a flowchart of a method for allocating an identifier in an Internet of Things according to an exemplary embodiment of the present application
  • FIG. 2 is a flowchart of a method for routing an Internet of Things according to an exemplary embodiment of the present application
  • FIG. 3 is a hardware structural diagram of an electronic device in an Internet of Things according to an exemplary embodiment of the present application
  • FIG. 4 is a hardware structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application.
  • FIG. 5 is a structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application.
  • FIG. 6 is a hardware structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application.
  • FIG. 7 is a block diagram of a routing device of an Internet of Things according to an exemplary embodiment of the present application.
  • FIG. 8 is a hardware structural diagram of an electronic device for implementing routing of an Internet of Things, according to an exemplary embodiment of the present application.
  • first, second, third, etc. may be used to describe various information in this application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information without departing from the scope of the present application.
  • second information may also be referred to as the first information.
  • word "if” as used herein may be interpreted as "when” or "when” or "in response to determination.”
  • the Internet of Things referred to in this application refers to the Internet connected to objects, which is a network that extends and expands on the Internet.
  • the Internet of Things can be applied to many fields such as industrial automation, environmental monitoring, water system monitoring, intelligent transportation, intelligent fire protection, smart grid, smart home, lighting control, and food traceability. Almost any item and item can communicate through the Internet of Things. Therefore, the number of terminal devices involved in the Internet of Things is huge, various types, and different in performance.
  • the terminal equipment involved includes a strong power supply device, a battery-powered mobile device, and a battery-powered non-mobile device.
  • the equipment powered by strong electric power is powered by a strong electric system.
  • the strong electric power supply may have the performance of large data storage and high data processing capability. It can communicate with Wifi or IEEE802.15.4; and the data storage of non-mobile equipment powered by battery And data processing capabilities, generally lower than the power supply equipment, can use low-power communication media to communicate, such as Zigbee; battery-powered mobile devices, with small data storage capacity, low data processing capabilities, It can communicate using ultra-low power communication media such as BLE (Bluetooth Low Energy).
  • BLE Bluetooth Low Energy
  • the routing will be performed according to the routing protocol of different metrics. Since the current routing protocol is difficult to implement in a device with different performances, the Internet of Things will inevitably involve multiple routing protocols when routing, which results in poor interoperability between devices in the Internet of Things. How to improve the interoperability between devices in the Internet of Things to propose solutions.
  • the solution of the present application may first divide the Internet of Things into a multi-level network based on the performance of each device when the performance of various devices involved in the Internet of Things is large.
  • a level network consists of devices with similar performance. Different levels of networks are interconnected by some high-performance devices. Then, based on the unified distribution principle, all nodes in the object network are assigned uniform identification information.
  • the frame structure-adaptive identification information is added in the packet body of the data packet.
  • the frame structure adaptation mentioned here may refer to an adaptation condition in which the frame structure is the same or the frame structure is approximated.
  • each device in the Internet of Things can route data based on the identification information carried by the data packet when receiving the data packet, and transmit the data packet to different performance devices. It can realize interworking between devices in the Internet of Things and improve communication efficiency.
  • the Internet of Things can be divided, and all devices form a level network.
  • the network architecture of the Internet of Things referred to in this application can be seen in FIG. 1A.
  • FIG. 1A is an architectural diagram of an Internet of Things 100, which may include a first level network 110 and at least one second level network (as an example, the second level is shown as an example).
  • the network 120 and the second level network 130), the root nodes of the second level network 120 or 130 are all nodes in the first level network 110.
  • the first-level network 110 may include multiple nodes (node 111, node 112, node 113, node 114, node 115, ...), and the nodes in the network 110 may be powerfully powered devices, and have strong data processing capabilities.
  • the characteristics of large data storage can determine the communication medium and network transmission protocol used according to specific application scenarios and service requirements.
  • the nodes can be desktop computers, televisions, refrigerators, air conditioners, washing machines, etc., and nodes can communicate using wifi or 802.15.4.
  • the node 112 and the node 114 in the first-level network 110 are the root nodes of the second-level network 120 and the second-level network 130 respectively, and the Internet of Things 100 can pass the second-level network 120 and the second through the two root nodes.
  • the level network 130 is connected. Therefore, when the number of devices involved in the Internet of Things is large and the performance is different, the device with higher performance can be connected to the first-level network 110 as a node in the first-level network 110, and then selected.
  • a part of the nodes in the first-level network 110 serves as the root nodes of the second-level networks 120 and 130, and the lower-performance devices as the descendant nodes of the root nodes constitute the second-level networks 120 and 130.
  • the nodes in the first-level network 110 are replaced with the super-strong routing devices in the current network, and the nodes in the second-level networks 120, 130 are managed in parallel.
  • the second level network 120 may include a plurality of nodes (node 121, node 122, node 123, node 124, node 125, ...), the root node of which is the node 112 in the first level network 110; the second level network 130 may A plurality of nodes (node 131, node 132, node 133, node 134, ...) are included, the root node of which is the node 114 in the first level network 110.
  • the node of the second-level network 120 may be a battery-powered non-mobile device, which has the characteristics of weak data processing capability and small data storage capacity, and can determine the communication medium and network transmission protocol used according to specific application scenarios and service requirements. .
  • nodes can be battery-powered non-mobile devices such as door and window alarms, smart door locks, etc., and Zigbee or BLE can be used for communication between nodes.
  • the first-level network 110 contains a large number of nodes. If a device with strong power supply requests to access the first-level network 110, the request may be made in consideration of the number of nodes in the first-level network 110.
  • the accessed device accesses the second-level network 120 or the second-level network 130, or forms a second-level network with the device requesting access and the device that is subsequently requested to access, and the root of the newly-formed second-level network
  • the nodes are nodes in the first level network 110. After the networking, at least some of the nodes in the second-level network 120 or the second-level network 130 are powerfully powered devices, and have the characteristics of strong data processing capability and large data storage capacity, and wifi or 802.15 can be used between the nodes. 4 communicate.
  • the designers of the present application can allocate each device as a different type of node according to the performance of the device involved before networking, such as: a management node, a node in the first-level network 110, and a second level. Nodes in the network 120, 130. And the device with different node types can be assigned different responsibilities. For example, the device as the management node can allocate the identification information to the nodes in the first-level network 110, and serve as the root node of the second-level network 120 and 130. All nodes in the network can be assigned identification information.
  • the device When the device in question has the performance that the corresponding type of node should have, when the device requests to access the Internet of Things 100, the device can add its own performance parameters and the desired node type in the access request.
  • the performance parameters mentioned here may be data storage amount, data processing rate, etc., before the device leaves the factory, the device manufacturer may indicate the performance parameters in the device.
  • the device with the performance parameter higher than the first threshold is allocated to the first-level network 110 according to the performance parameter carried in the access request, and after the device is connected to the first-level network 110, Among the devices that can be accessed, the device with the best performance is selected as the management node. For a device whose performance parameter is not higher than the first threshold, it can be accessed to the second-level network 120, 130, and after the device is connected to the second-level network 120, 130, for a device with very low performance, for example, data storage A very small device with very low data processing capability can be used as a leaf node in a second-level network and only a parent node is assigned to it.
  • FIG. 1B is a flowchart of a method for assigning an identifier in the Internet of Things according to an exemplary embodiment of the present application. The embodiment includes the following steps S101-S102:
  • Step S101 The management node determines whether the access node is a node in the first-level network; the management node is a node in the first-level network or a higher-level node of the node in the first-level network.
  • Step S102 If the access node is a node in the first-level network, the management node allocates identification information to the access node.
  • the device name of the node or other label of the device may be corresponding to the network storage of the access, and the management node
  • the network accessed by the node may be searched according to the device name or other label of the node. If the found network is the first-level network 110, the access node is determined. It is a node in the first level network 110, and if the found network is the second level network 120 or 130, it is determined that the access node is a node in the second level network 120 or 130.
  • the management node may directly assign an identifier to the access node, or may be assigned a node by the root node of the network accessed by the access node.
  • the management node may determine the root node and the location of the access node based on the network accessed by the access node, the routing information stored by itself, and a predetermined routing rule. The routing of the management node to the root node sends an identifier allocation notification to the root node by using the determined route, where the identifier allocation notification is used to notify the root node to allocate identifier information to the access node.
  • the routing rule mentioned here is related to the routing information and the identification information stored by the node. If the assigned identification information is allocated according to the structure, it can reflect the location of the node in the network and the connection between the node and other nodes. For the relationship, the routing rule may be a rule for categorizing the categorization information, and the node in the second-level network 120 or 130 with limited storage capacity may only store its own identification information and structured allocation identification information.
  • the node in the second-level network 120 or 130 with limited storage capacity may store its own identification information and identification information of its parent node, and the routing rule may
  • the rule that selects the parent node as the next hop node, the node in the first-level network 110 with high storage capacity can store the routing table of all the nodes that can reach, and the routing rule can be the rule for selecting the path from the routing table. , such as the shortest path rule, the lowest consumption rule, and so on.
  • the management node or the root node may construct a data packet, where the data packet carries the identifier information allocated to the access node, and sends the data packet to the access node, so that The access node stores its own identification information, and the management node may also broadcast the constructed data packet in the network, so that other nodes in the first-level network 110 update the identification information of the access node to the stored routing information. in.
  • the type of each node needs to be considered when assigning the identifier information.
  • the frame structure of the identifier information may be divided into two parts, where the first part may be used to describe the first level network. The address of the node. The second part can be used to describe the address of each node in the second level network.
  • the first part of the frame structure of the identification information may also be used to describe the type of the node, considering the management nodes that may exist in the IoT network and the manner in which the data packets are sent when the types of the nodes are different; A management node and a non-management node are included; an address of the non-management node is allocated by the management node, and an address of each node in the second-level network is allocated by the root node.
  • the manner in which the data packets mentioned here are sent may be multicast, unicast or anycast.
  • the management node may not be one.
  • DHCP Server referring to a computer that manages DHCP standards in the network
  • Service Server in order to distinguish different types of management.
  • the second part of the frame structure of the node, the identification information of the management node, can be used to indicate the management node type.
  • the service providing server mentioned here may be a server that joins a network to provide a certain service according to business requirements, and data related to the service is routed to the server.
  • the running time and frequency of the management node are much higher than that of the non-management node, which is more prone to failure.
  • the other nodes are switched to the management node.
  • the new node can be assigned identification information in time to ensure the interworking between the new node and other nodes.
  • the identification information of the new management node can also be updated to the identification information of the management node in the fault state. Without changing the identification information of the management node, there is no need to broadcast the change of the management node in the network.
  • the identification information of the management node may be used to describe that the manner in which the data packet arriving at the management node is sent is anycast.
  • the definition of anycast in the RFC2373 standard is that when a unicast address is allocated to more than one interface. At the time, the message sent to the interface is routed by the network to the "nearest" target interface measured by the routing protocol.
  • the identification information of the management node describes that the data packet arriving at it is sent as anycast, no matter which node is switched to the management node, the data packet can be guaranteed to be routed to the new management node.
  • the neighbor node of the management node may determine whether the management node is faulty according to the neighbor information updated by its periodicity. If it is determined that the management node is faulty, the neighbor node broadcasts the message that the management node is faulty, and then acquires the first level. The size of the network where other nodes in the network 110 are located and the average network communication quality of the network where the node is located select a new management node.
  • the management nodes mentioned in the above example the nodes in the first-level network 110, and the nodes in the second-level network 120, 130 have fixed physical positions, and the connection relationship with other nodes after accessing the network is also generally It does not change frequently, and the frequency of routing updates is low.
  • the Internet of Things will also involve battery-powered mobile devices with mobile features, such as smart wristbands in smart homes, smart phones, etc., after they access the network, as their physical location changes, they need to constantly Transform the routing information of the nodes it connects to and related nodes.
  • the designer of the present application can designate the type of the mobile device in the Internet of Things as a mobile node, and the other nodes as non-mobile nodes.
  • the mobile device can be connected to the second-level network 120, 130 as a leaf node.
  • the mobile node often moves, which causes the nodes in the first-level network 110 to reach the mobile node to change frequently, and generates a large amount of routing update information.
  • only one parent node may be assigned to the mobile node, and the node in the first-level network 110 may be selected as the father node, so that after the mobile node moves, even if the parent node is changed, it can be effective. Reduce the number of nodes that change routing information.
  • the change father node generally occurs in the moving process of the mobile node.
  • the mobile node can construct a data packet and send the data packet in a broadcast manner, and the identifier information carried in the data packet includes the identification information of the mobile node. And identification information of its parent node, in addition to carrying information indicating that the mobile node is seeking a new father node.
  • the mobile node can obtain the communication quality parameter of the mobile node itself and each node in the first-level network 110 according to the feedback of the other node to the data packet. If the communication quality parameter of the mobile node and its parent node is lower than the quality threshold, the mobile node can request management.
  • the node selects one node from the first-level network 110 to be updated into a parent node, and the communication quality parameter of the updated parent node and the mobile node is higher than the quality threshold. After updating the parent node, the mobile node sends the original father node to the new father node.
  • the new father node sends the data packet carrying the identification information of the mobile node and the identification information of the own node to the management node, and the management node broadcasts the data packet, and after receiving the data packet, the other nodes update according to the The identification information of the subsequent parent node updates the stored routing information, and after receiving the data packet, the original parent node notifies the other node that it is no longer the parent node of the mobile node by broadcasting, and cache information associated with the mobile node. Send to the new father node.
  • the mobile node when it does not move, it may also construct a data packet including the identification information of the mobile node and the identification information of the parent node, and broadcast the data packet at a lower frequency, which may be every half hour.
  • the specific frequency value can be adjusted according to the hardware conditions and service requirements of the mobile node.
  • the mobile node can speed up the broadcast frequency. The frequency value in this situation can be determined by the service requirement, if the service requirement is in the second level. Complete, then the frequency of the broadcast will be in milliseconds.
  • the management node may select one node with the highest communication quality parameter from among the multiple nodes.
  • the parent node of the mobile node is higher than the quality threshold.
  • the mobile node may send the data packet in any manner, and the identification information may describe the anycast address of the mobile node, so that after the mobile node moves, It is not necessary to transform the identification information of the mobile node, so that the data packet of the destination node for the mobile node is conveniently routed to the mobile node.
  • each node may adopt a communication medium, such as 802.15.4 or BLE.
  • a communication medium such as 802.15.4 or BLE.
  • the identification information can be set to 16 bits, where the first 6 bits describe the nodes in the first level network 110 and the last 10 bits describe the nodes in the second level network 120, 130. After being thus allocated, the length of the first portion of the identification information is set to 6 bits, and the length of the second portion is 10 bits.
  • the solution of the present application can update the identification information of the node to the routing information of the node after assigning the identification information of the structural adaptation (such as the unified format) to the node in the access network, and the node is based on the corresponding network transmission protocol.
  • the frame structure-adapted identification information may be added in the body of the constructed data packet, and the identification information in the data packet includes at least the identification information of the destination node, so that the node that receives the data packet is based on the data.
  • the identification information in the package and the stored routing information are used to calculate the route.
  • the identifier information added in the package body of the constructed data packet may include: identifier information of the source node and identifier information of the destination node.
  • the identification information of the parent node of the mobile node may be added to the packet body of the data packet, so that the node in the object network 100 can facilitate the data.
  • the packet is routed to the parent node, which then routes the packet to the mobile node.
  • the data packet may be first routed to the root node of the level network, and then the root node routes the data packet to the parent node.
  • FIG. 2 is a schematic flowchart of a method for routing the Internet of Things according to an exemplary embodiment of the present application.
  • the routing method may include steps S201 to S203:
  • Step S201 After the node receives the data packet, the identifier information carried in the data packet is read, and the node stores routing information, where the routing information includes at least the identity information of the node itself.
  • Step S202 Forward the data packet based on the identification information in the data packet, the stored routing information, and a predetermined routing rule.
  • the specific implementation process of the route is also different.
  • the topology of the first-level network 110 is a mesh structure
  • the routing information stored by each node in the first-level network 110 is a routing table of the entire network, and the routing table includes node identification information involved in each path, and After the node in the first-level network 110 receives the data packet, the node in the first-level network 110 reads the identification information of the destination node from the data packet.
  • the routing rule queries the route to the destination node from the stored routing table, obtains the identifier information of the next hop node from the queried route, and then forwards the data to the next hop node based on the obtained identification information. package.
  • the identifier information of the parent node of the destination node is read from the data packet, and the route to the parent node is queried from the stored routing table based on the identifier information and the routing rule. Obtaining the identifier information of the next hop node from the queried route, and then forwarding the data packet to the next hop node based on the obtained identifier information, and the node receiving the data packet in the first-level network repeats the foregoing routing process After the parent node receives the data packet, the data packet is sent to the mobile node.
  • the nodes in the network can construct a data packet, and the data packet carries the node.
  • the stored routing information is periodically broadcasted. After the routing information of any node in the network is updated, the node can construct a data packet including the updated routing information, and broadcast the data packet so that other nodes in the network can quickly learn the updated routing information.
  • the network topology of the second-level network 120, 130 is a tree structure. If the identification information of each node is allocated, according to the principle of structurally assigning identifiers, the identifier information is allocated according to the topological position of the nodes in the network.
  • the topology relationship between the node and other nodes is solidified in the identification information, so that the assigned identification information may be referred to as a structured identifier, which may describe the topological relationship between the nodes, and the unique father node may be inferred by the identification information of one node. Therefore, in storing the routing information, only the identification information of the node itself and the strange allocation of the structured allocation identifier can be stored.
  • the routing information For the node directly connected to the root node in the second-level network 120, 130, when storing the routing information, it is also required to store the identification information of the root node.
  • the structured identifier can reduce the amount of data stored by the node, but the unique father node can be inferred by the identification information of one node, and the node is difficult to obtain the identification information of other father nodes. If the inferred father node is the next hop node, However, if the father node fails, the node will have difficulty routing the packet to the parent node. In order to solve this problem, the node stores the identification information of the candidate parent node, and when the parent node fails, routes the data packet to the candidate father node.
  • the management node of the first-level network 110 is the node 111
  • the topology of the second-level network 120 is a tree structure
  • the root node is the node 112
  • the child nodes of the root node 112 are the node 121 and the mobile node 125, respectively.
  • the child node of the node 121 is the node 122 and the node 124
  • the child node of the node 122 is the node 123.
  • the byte length of the identification information is 16 bits, and the first 6 bits are used to describe the node of the first-level network 110, the type of the node, and the manner in which the data packet is described; the type includes the management node.
  • the non-management node and the mobile node, the last 10 bits are used to describe the nodes of the second-level network 120, 130, and the topological relationship between the nodes.
  • the identification information of the nodes in the first-level network 110 and the second-level network 120, 130 after allocation are as follows:
  • the identification information of the management node 111 is 0000010000000000;
  • the identification information of the mobile node 125 is 0000020000000000;
  • the identification information of the node 112 to the node 115 are respectively: 0000110000000000 to 0000140000000000;
  • the identification information of the node 121 is: 0000111000000000;
  • the identification information of the node 122 and the node 124 are: 0000111100000000 and 0000111200000000, respectively;
  • the identification information of the node 123 is: 0000111110000000.
  • the manner in which the data packets described by the identification information 0000010000000000 and 0000020000000000 are transmitted is anycast
  • the manner in which the data packet described by the identification information 1111111111111111 is transmitted is multicast
  • the manner in which the data packets described by other identification information are sent is Unicast.
  • the identifier information assigned to the nodes in the second-level network 120, 130 is referenced by the foregoing allocation manner, after the node in the network in the level receives the data packet, the identifier information of the destination node may be read from the data packet. If the destination node is not a mobile node, it is determined whether the destination node is a descendant node of the node by comparing the identification information with the identification information of the node itself.
  • the father node of the node may be determined as the next hop node, and the father of the node
  • the identity information of the parent node of the local node may be determined according to the rule of the structurally assigned identification information and the identification information of the local node, and then the next hop node (father node) is determined based on the determined identification information. Forward the packet.
  • the parent node of the node is the root node
  • the stored root node identification information is read from the stored routing information, and then the data packet is forwarded to the next hop node (root node) based on the read identification information.
  • the identifier information of the child node of the node may be determined according to the rule of the structurally assigned identification information and the identification information of the node, and then the next hop node (child) based on the determined identification information Node) forwards the packet.
  • the destination node of the data packet is a mobile node, it may be determined that the parent node of the node is a next hop node, and when the parent node of the node is not the root node, the rule for assigning the identifier information according to the structure and the identifier of the node may be configured according to the structure.
  • the information determines the identification information of the parent node of the node, and then forwards the data packet to the next hop node (parent node) based on the determined identification information.
  • the parent node of the node is the root node
  • the stored root node identification information is read from the stored routing information, and then the data packet is forwarded to the next hop node (root node) based on the read identification information, and is repeated.
  • the root node of the node receives the data packet, routes the data packet to the parent node of the mobile node, and sends the data packet to the mobile node by the parent node of the mobile node.
  • the identification information of the node may be randomly allocated, and the identification information of each node is an unstructured identifier.
  • the routing information is stored. It is possible to store only the identification information of the node itself, the identification information of its parent node, and the identification information of its child node. If the node in the network receives the data packet sent by the parent node, the identifier information of the child node is read from the stored routing information. If the identity information of the destination node of the data packet is the same as the identification information of a child node, The child node is determined to be the next hop node, and the data packet is sent to the child node. If the identification information of the destination node of the data packet is different from the identification information of all the child nodes, all the child nodes may be determined as the next hop node. The packet is sent to all child nodes.
  • the routing method of the solution of the present application can be applied to various fields involved in the physical network.
  • each node in each network of the Internet of Things may use different electronic devices as various types of nodes.
  • the working principle of the different devices and the functions of the different devices are described below with reference to FIG. 3 to FIG.
  • FIG. 3 is a structural diagram of an electronic device in an Internet of Things according to an exemplary embodiment of the present application.
  • the Internet of Things of the present embodiment corresponds to the Internet of Things described in the above example, and the electronic device is in the Internet of Things.
  • the type of the node in the first-level network, in addition to the processor 310, the memory 320, the network interface 330, and the non-volatile memory 340 shown in FIG. 3, may further include other according to the actual function of the electronic device. Hardware, no longer elaborate on this.
  • the memory 320 of the electronic device may store program instructions executable by the processor 310, and may also store routing information of each node in the first-level network, where the routing information includes identification information of nodes involved in each route; the processor 310 may The coupling memory 320 is configured to read the program instructions stored in the memory 320, and in response, perform the following operations: after receiving the data packet, reading the identification information carried in the data packet; based on the stored routing information, The identification information and the predetermined routing rule are forwarded, and the data packet is forwarded.
  • a first portion of the frame structure of the identification information is used to describe the address of a node in the first level network.
  • the first portion of the frame structure of the identification information is also used for the type of node; the type includes a management node and a non-management node.
  • the second portion of the identification information of the management node is used to represent the management node type.
  • the management node is a non-mobile node.
  • the second portion of the frame structure of the identification information is used to describe the address of each node in the second level network.
  • processor 310 can also be configured to:
  • the electronic device is a management node of the first-level network, and may assign identification information to devices accessing the first-level network.
  • processor 310 can also be configured to perform the following operations:
  • FIG. 4 is a structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application.
  • the Internet of Things of the present embodiment corresponds to the Internet of Things described in the above example, and the electronic device is in the Internet of Things.
  • the type of the root node of the second-level network, in addition to the processor 410, the memory 420, the network interface 430, and the non-volatile memory 440 shown in FIG. 4, may further include according to the actual functions of the electronic device. Other hardware, no longer elaborate on this.
  • the memory 420 of the electronic device may store program instructions executable by the processor 410, and may also store routing information of each node in the first-level network, where the routing information includes identification information of nodes involved in each route; the processor 410 may The coupling memory 420 is configured to read the program instructions stored in the memory 420, and in response, perform the following operations: after receiving the data packet, the node reads the identification information carried in the data packet; after receiving the data packet, Reading the identification information carried in the data packet; forwarding the data packet based on the stored routing information, the identification information, and a predetermined routing rule.
  • processor 410 can also be configured to perform the following operations:
  • a node accesses the second-level network, assigning identification information to the access node; constructing a data packet, where the data packet carries identification information allocated for the access node; and sending the data packet to the access node.
  • processor 410 can also be configured to perform the following operations:
  • the data packet Upon receiving the data packet of the destination node as the mobile node, the data packet is routed to the parent node of the mobile node.
  • processor 410 can also be configured to perform the following operations:
  • the identification information of the mobile node and the identification information of the own node are broadcasted.
  • FIG. 5 is a structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application.
  • the Internet of Things of the present embodiment corresponds to the Internet of Things described in the above example, and the electronic device is in the Internet of Things.
  • the type in the second-level network, in addition to the processor 510, the memory 520, the network interface 530, and the non-volatile memory 540 shown in FIG. 5, may further include according to the actual functions of the electronic device. Other hardware, no longer elaborate on this.
  • the memory 520 of the electronic device may store program instructions executable by the processor 510, and may also store identification information of the electronic device; the processor 510 may be coupled to the memory 520 for reading program instructions stored in the memory 520 and executing in response
  • the following operations are: after receiving the data packet, reading the identification information carried in the data packet; forwarding the data packet based on the stored routing information, the identification information, and a predetermined routing rule.
  • processor 510 can also be configured to perform the following operations:
  • the data packet When receiving the data packet of the destination node as the mobile node, the data packet is routed to the root node of the second-level network.
  • the topology of the second-level network is a tree structure
  • the identifier information is a structured identifier, which is used to describe a topological relationship between nodes
  • the routing rule is structured to assign identifier information. the rule of.
  • the topology of the second-level network is a tree structure
  • the identifier information is an unstructured identifier
  • the stored routing information further includes identifier information of the parent node and identifier information of the child node.
  • the routing rule describes the parent node as a next hop node.
  • FIG. 6 is a structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application.
  • the Internet of Things of the present embodiment corresponds to the Internet of Things described in the above example, and the electronic device is in the Internet of Things.
  • the type in the second-level network is a mobile node in the second-level network.
  • the memory 620 of the electronic device may store program instructions executable by the processor 610, and may also store routing information of the electronic device, the routing information including identification information of the mobile node, and identification information of the parent node thereof, where the parent node is a node in the first level network; the processor 610 can be coupled to the memory 620 for reading the program instructions stored in the memory 620, and in response, performing the following operations: after receiving the data packet, reading the data packet to carry Identification information; forwarding the data packet based on the stored routing information, the identification information, and a predetermined routing rule.
  • a first portion of the frame structure of the identification information is used to describe the type of node and to describe the manner in which the data packet is transmitted; the type includes a mobile node and a non-mobile node.
  • the manner in which the destination node sends the data packet of the electronic device is anycast.
  • the identifier information carried by the received data packet further includes identifier information of the father node of the mobile node.
  • the mobile node is a leaf node in the second level network, and there is only one father node, and the father node is a node in the first level network.
  • processor 610 can also be configured to perform the following operations:
  • the data packet is constructed and transmitted in anycast mode, and the identifier information carried in the constructed data packet includes the identification information of the mobile node and the identification information of the parent node.
  • the present application also provides an embodiment of the routing device of the Internet of Things.
  • FIG. 7 is a logic block diagram of a routing device of the Internet of Things according to an exemplary embodiment of the present application.
  • the Internet of Things corresponding to the foregoing embodiment of the present invention may include a first-level network and at least a second-level network, where the data packet of the node in the first-level network and the node in the second-level network carries the identification information of the frame structure, and the identifier information carried by the Identification information of the destination node; the routing device includes: an identifier reading module 710 and a data forwarding module 720:
  • the identifier reading module 710 is configured to: after the node receives the data packet, read the identifier information carried in the data packet, where the node stores the routing information, where the routing information includes at least the identifier information of the node itself.
  • the data forwarding module 720 is configured to forward the data packet based on the identification information in the data packet, the stored routing information, and a predetermined routing selection rule.
  • the device embodiment since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units or modules described as separate components may or may not be physically separate, and the components displayed as units or modules may or may not be physical units. Or modules, which can be located in one place, or distributed to multiple network units or modules. Some or all of the modules may be selected according to actual needs to achieve the objectives of the present application. Those of ordinary skill in the art can understand and implement without any creative effort.
  • Embodiments of the routing device of the Internet of Things of the present application can be applied to an electronic device.
  • This can be implemented by a computer chip or an entity, or by a product having a certain function.
  • the electronic device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, an email transceiver, and a game control.
  • the device embodiment may be implemented by software, or may be implemented by hardware or a combination of hardware and software.
  • a processor of the electronic device in which it is located reads a corresponding computer program instruction in a readable medium such as a non-volatile memory into a memory.
  • a hardware level as shown in FIG. 8, a hardware structure diagram of an electronic device in which the routing device of the Internet of Things is located, except for the processor, the memory, the network interface, and the non-volatile memory shown in FIG.
  • the electronic device in which the device is located in the embodiment may also include other hardware according to the actual function of the electronic device, and details are not described herein.
  • the memory of the electronic device may store program instructions executable by the processor; the processor may couple the memory for reading the program instructions stored by the memory, and in response, perform the following operations: after the node receives the data packet, the read The identifier information carried in the data packet, the node stores routing information, where the routing information includes at least identifier information of the node itself; based on the identifier information in the data packet, the stored routing information, and a predetermined routing rule, Forward the packet.
  • the operations performed by the processor may be referred to the related description in the foregoing method embodiments, and details are not described herein.

Landscapes

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

Abstract

Provided are an Internet of Things, a routing and identification allocation method, apparatus and device for same, and a medium, wherein the Internet of Things comprises: a network of a first level and at least one network of a second level, wherein identification information adapted to a frame structure is carried in a packet body of a data packet constructed by a node in the network of the first level and a node in the network of the second level, and the identification information carried in the data packet comprises identification information about a target node; routing information is stored in a node in a network, and the routing information at least comprises identification information about the node itself; and the routing information is used by a node having received the data packet to calculate a route according to the identification information in the received data packet. By means of implementing the present application, the interconnectivity between various devices in the Internet of Things can be improved, and then, more devices with different performance can access the Internet of Things, and the scalability of the Internet of Things is improved.

Description

物联网、及其路由、分配标识的方法、装置及设备、介质Method, device and device, and medium for internet of things, and its routing and distribution identification
本申请要求2017年07月12日递交的申请号为201710567301.6、发明名称为“物联网、及其路由、分配标识的方法、装置及设备、介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on July 12, 2017, the application number is 201710567301.6, and the invention is entitled "IoT, its routing, distribution method, device and equipment, medium", the entire contents of which are The citations are incorporated herein by reference.
技术领域Technical field
本申请涉及通信技术领域,尤其涉及物联网、及其路由、分配标识的方法、装置及设备、介质。The present application relates to the field of communications technologies, and in particular, to an Internet of Things, a method, apparatus, device, and medium for the same.
背景技术Background technique
随着物联网时代的到来,物联网(物物相连的互联网,英文为Internet of things,简称IoT)的应用范围越来越广,涉及的设备也越来越多样化,例如:物联网在智能家居环境中应用时,既涉及到强电供电的设备也涉及到电池供电的设备,电池供电的设备又分为移动型设备和非移动型设备。强电供电的设备如电视机、冰箱、空调等,这类设备具有数据存储量大、数据处理能力高的性能,可以采用Wifi(Wireless Fidelity,基于IEEE802.11标准的无线局域网)介质通信;电池供电的非移动型设备如门窗报警器、智能门锁、人体传感器等,这类设备的数据存储量和数据处理能力均低于强电供电的设备,可以采用Zigbee介质通信;电池供电的移动型设备如智能手环等,这类设备具有数据存储量非常小、数据处理能力非常弱,可以采用BLE(蓝牙低能耗)介质通信。With the advent of the Internet of Things era, the Internet of Things (Internet of Things, Internet of Things, IoT) has become more and more widely used, and the devices involved are becoming more diverse. For example, the Internet of Things is in smart homes. When applied in an environment, both high-powered devices and battery-powered devices are involved. Battery-powered devices are classified into mobile devices and non-mobile devices. Power-operated devices such as TVs, refrigerators, air conditioners, etc., which have large data storage capacity and high data processing capability, can use Wifi (Wireless Fidelity, wireless LAN based on IEEE802.11 standard) medium communication; battery Powered non-mobile devices such as door and window alarms, smart door locks, human body sensors, etc. The data storage and data processing capabilities of such devices are lower than those of high-powered devices, and can be communicated using Zigbee media; battery-powered mobile Devices such as smart bracelets, such devices have very small data storage, very weak data processing capabilities, and can use BLE (Bluetooth Low Energy) media communication.
各设备采用的通信介质不完全同,而不同通信介质适用的路由协议不同,不同路由协议对各类设备的性能要求也不完全相同,所以在需要选路时,整个物联网内的设备难以按照统一的路由协议进行选路,例如:Zigbee采用的RPL(Routing Protocol for Low-Power and Lossy Networks)路由协议,对设备的备数据存储量和数据处理能力的要求较高,电池供电的移动型设备无法满足该要求,难以按照RPL路由协议进行选路。因此,目前的路由协议难以在性能各异的设备中实现通用,物联网在路由时不可避免的会涉及多种路由协议,进而导致物联网中各设备间的互通性很差。The communication media used by each device are not identical, and the routing protocols applicable to different communication media are different. Different routing protocols have different performance requirements for various devices. Therefore, when routing is required, devices in the entire Internet of Things are difficult to follow. A unified routing protocol for routing, for example, the RPL (Routing Protocol for Low-Power and Lossy Networks) routing protocol used by Zigbee, which requires high data storage capacity and data processing capability of the device, and battery-powered mobile devices. This requirement cannot be met, and it is difficult to perform routing according to the RPL routing protocol. Therefore, the current routing protocols are difficult to implement in a variety of devices with different performances. The Internet of Things will inevitably involve multiple routing protocols when routing, which leads to poor interoperability between devices in the Internet of Things.
发明内容Summary of the invention
有鉴于此,本申请提供一种物联网、及其路由、分配标识的方法、装置及设备、介质。In view of this, the present application provides an Internet of Things, a method, an apparatus, a device, and a medium for routing, assigning an identifier.
根据本申请实施例的第一方面,提供一种物联网,包括:第一级网络和至少一个第二级网络;所述第二级网络的根节点为所述第一级网络中的节点;According to a first aspect of the embodiments of the present application, an Internet of Things is provided, including: a first level network and at least one second level network; a root node of the second level network is a node in the first level network;
所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所述数据包携带的标识信息包括目的节点的标识信息;The packet of the data packet constructed by the node in the first-level network and the node in the second-level network carries the identification information of the frame structure, and the identifier information carried by the data packet includes the destination node. Identification information;
所述第一网络和所述第二网络中的节点存储有路由信息,所述路由信息至少包括节点自身的标识信息;所述路由信息用于接收到数据包的节点基于接收到的数据包中的标识信息计算路由。The nodes in the first network and the second network store routing information, and the routing information includes at least identifier information of the node itself; the routing information is used by the node that receives the data packet based on the received data packet. The identification information is calculated by routing.
根据本申请实施例的第二方面,提供一种物联网的路由方法,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息;所述路由方法包括以下步骤:According to a second aspect of the embodiments of the present application, there is provided a method for routing an Internet of Things, the Internet of Things comprising a first level network and at least one second level network, nodes in the first level network and the second The packet of the data packet constructed by the node in the level network carries the identification information of the frame structure adaptation, and the identifier information carried by the node includes the identification information of the destination node. The routing method includes the following steps:
在节点接收到数据包后,读取所述数据包中携带的标识信息,该节点存储有路由信息,所述路由信息中至少包括节点自身的标识信息;After the node receives the data packet, the identifier information carried in the data packet is read, and the node stores routing information, where the routing information includes at least the identity information of the node itself;
基于数据包中的标识信息、所存储的路由信息和预定的路由选择规则,转发所述数据包。The data packet is forwarded based on the identification information in the data packet, the stored routing information, and a predetermined routing rule.
根据本申请实施例的第三方面,提供一种物联网中分配标识的方法,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所述数据包携带的标识信息包括目的节点的标识信息;所述标识信息通过以下步骤分配:According to a third aspect of the embodiments of the present application, there is provided a method for assigning an identifier in an Internet of Things, the Internet of Things comprising a first level network and at least one second level network, nodes in the first level network and the The packet of the data packet constructed by the node in the second-level network carries the identifier information of the frame structure adaptation, and the identifier information carried by the data packet includes the identifier information of the destination node; the identifier information is allocated by the following steps:
管理节点判断接入节点是否为第一级网络中的节点;所述管理节点为第一级网络中的节点或第一级网络中的节点的上一级节点;The management node determines whether the access node is a node in the first-level network; the management node is a node in the first-level network or a higher-level node of the node in the first-level network;
如果是,所述管理节点为所述接入节点分配标识信息。If yes, the management node assigns identification information to the access node.
根据本申请实施例的第四方面,提供一种物联网中的电子设备,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息,该电子设备包括:According to a fourth aspect of the embodiments of the present application, an electronic device in an Internet of Things is provided, where the Internet of Things includes a first-level network and at least one second-level network, and nodes in the first-level network and the first The packet of the data packet constructed by the node in the secondary network carries the identifier information of the frame structure adaptation, and the identifier information carried by the node includes the identifier information of the destination node, and the electronic device includes:
处理器;processor;
存储处理器可执行指令的存储器;存储器存有所述第一级网络中各节点的路由信息,所述路由信息包括每条路由所涉及的节点的标识信息;a memory storing instructions executable by the processor; the memory storing routing information of each node in the first level network, the routing information including identification information of nodes involved in each routing;
其中,所述处理器耦合于所述存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:The processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
在接收到数据包后,读取所述数据包中携带的标识信息;After receiving the data packet, reading the identification information carried in the data packet;
基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。The data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
根据本申请实施例的第五方面,提供一种物联网中的电子设备,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息,该电子设备为所述第二级网络的根节点,包括:According to a fifth aspect of the embodiments of the present application, an electronic device in an Internet of Things is provided, where the Internet of Things includes a first-level network and at least one second-level network, and nodes in the first-level network and the first The packet of the data packet constructed by the node in the secondary network carries the identification information of the frame structure adaptation, and the identifier information carried by the node includes the identification information of the destination node, and the electronic device is the root node of the second-level network. ,include:
处理器;processor;
存储处理器可执行指令的存储器;存储器存有所述第一级网络中各节点的路由信息,所述路由信息包括每条路由所涉及的节点的标识信息;a memory storing instructions executable by the processor; the memory storing routing information of each node in the first level network, the routing information including identification information of nodes involved in each routing;
其中,所述处理器耦合于所述存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:The processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
在接收到数据包后,读取所述数据包中携带的标识信息;After receiving the data packet, reading the identification information carried in the data packet;
基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。The data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
根据本申请实施例的第六方面,提供一种物联网中的电子设备,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息,该电子设备为所述第二级网络中的节点,包括:According to a sixth aspect of the embodiments of the present application, an electronic device in an Internet of Things is provided, where the Internet of Things includes a first-level network and at least one second-level network, and nodes in the first-level network and the first The packet of the data packet constructed by the node in the secondary network carries the identifier information of the frame structure adaptation, and the identifier information carried by the node includes the identifier information of the destination node, where the electronic device is a node in the second-level network. ,include:
处理器;processor;
存储处理器可执行指令的存储器;存储器存有该电子设备的标识信息;a memory that stores a processor executable instruction; the memory stores identification information of the electronic device;
其中,所述处理器耦合于所述存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:The processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
在接收到数据包后,读取所述数据包中携带的标识信息;After receiving the data packet, reading the identification information carried in the data packet;
基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。The data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
根据本申请实施例的第七方面,提供一种物联网中的电子设备,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息,该电子设备为所述第二级网络中的移动节点,包括:According to a seventh aspect of the embodiments of the present application, an electronic device in an Internet of Things is provided, where the Internet of Things includes a first-level network and at least one second-level network, and nodes in the first-level network and the first The packet of the data packet constructed by the node in the secondary network carries the identification information of the frame structure adaptation, and the identifier information carried by the node includes the identification information of the destination node, and the electronic device is the mobile in the second-level network. Nodes, including:
处理器;processor;
存储处理器可执行指令的存储器;存储器存有该电子设备的路由信息,所述路由信息包括该移动节点的标识信息、以及其父节点的标识信息,所述父节点为所述第一级网络中的节点;a memory storing instructions executable by the processor; the memory storing routing information of the electronic device, the routing information including identification information of the mobile node, and identification information of a parent node thereof, the parent node being the first level network a node in ;
其中,所述处理器耦合于所述存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:The processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
在接收到数据包后,读取所述数据包中携带的标识信息;After receiving the data packet, reading the identification information carried in the data packet;
基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。The data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
根据本申请实施例的第八方面,提供一种物联网的路由装置,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息;所述路由装置包括:According to an eighth aspect of the embodiments of the present application, there is provided an Internet of Things routing apparatus, the Internet of Things comprising a first level network and at least one second level network, nodes in the first level network and the second The packet of the data packet constructed by the node in the level network carries the identifier information of the frame structure adaptation, and the identifier information carried by the node includes the identifier information of the destination node. The routing device includes:
标识读取模块,用于在节点接收到数据包后,读取所述数据包中携带的标识信息,该节点存储有路由信息,所述路由信息中至少包括节点自身的标识信息;The identifier reading module is configured to: after the node receives the data packet, read the identifier information carried in the data packet, where the node stores routing information, where the routing information includes at least the identifier information of the node itself;
数据转发模块,用于基于数据包中的标识信息、所存储的路由信息和预定的路由选择规则,转发所述数据包。And a data forwarding module, configured to forward the data packet based on the identifier information in the data packet, the stored routing information, and a predetermined routing rule.
根据本申请实施例的第九方面,提供一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得终端设备执行以上所述的方法。According to a ninth aspect of embodiments of the present application, there is provided one or more machine readable medium having stored thereon instructions that, when executed by one or more processors, cause the terminal device to perform the method described above.
实施本申请提供的实施例,可以预先为物联网内第一级网络和第二级网络中的节点分配格式统一的标识信息,并更新到各节点存储的路由信息中,然后网络中的节点基于相应网络传输协议构造数据包时,在所构造的数据包的包体中添加帧结构适配的标识信息,这样在传输数据包的过程中,节点接收到该数据包后,可以识别出数据包携带的标识信息,然后根据数据包中的标识信息、所存储的路由信息以及预定的路由选择规则计 算路由,因此,可以基于计算所得的路由将数据包路由至目的节点,快速有效地实现物联网中各设备间的互通,进而物联网中能接入更多性能各异的设备、提高物联网的可扩展性。By implementing the embodiments provided by the present application, the unified identification information of the nodes in the first-level network and the second-level network in the Internet of Things may be allocated in advance, and updated to the routing information stored in each node, and then the nodes in the network are based on When the corresponding network transmission protocol constructs the data packet, the identification information of the frame structure adaptation is added in the package body of the constructed data packet, so that in the process of transmitting the data packet, after receiving the data packet, the node can identify the data packet. The carried identification information is then calculated according to the identification information in the data packet, the stored routing information, and the predetermined routing rule. Therefore, the data packet can be routed to the destination node based on the calculated route, and the Internet of Things can be implemented quickly and effectively. Interoperability between devices in the Internet, in the Internet of Things, can access more devices with different performances and improve the scalability of the Internet of Things.
附图说明DRAWINGS
图1A是本申请一示例性实施例示出的物联网的架构图;FIG. 1A is an architectural diagram of an Internet of Things according to an exemplary embodiment of the present application; FIG.
图1B是本申请一示例性实施例示出的物联网中分配标识的方法的流程图;FIG. 1B is a flowchart of a method for allocating an identifier in an Internet of Things according to an exemplary embodiment of the present application; FIG.
图2是本申请一示例性实施例示出的物联网的路由方法的流程图;2 is a flowchart of a method for routing an Internet of Things according to an exemplary embodiment of the present application;
图3是本申请一示例性实施例示出的物联网中的电子设备硬件结构图;3 is a hardware structural diagram of an electronic device in an Internet of Things according to an exemplary embodiment of the present application;
图4是本申请另一示例性实施例示出的物联网中的电子设备硬件结构图;4 is a hardware structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application;
图5是本申请另一示例性实施例示出的物联网中的电子设备硬件结构图;FIG. 5 is a structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application; FIG.
图6是本申请另一示例性实施例示出的物联网中的电子设备硬件结构图;6 is a hardware structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application;
图7是本申请一示例性实施例示出的物联网的路由装置的框图;FIG. 7 is a block diagram of a routing device of an Internet of Things according to an exemplary embodiment of the present application; FIG.
图8是本申请一示例性实施例示出的用于实现物联网的路由的电子设备的硬件结构图。FIG. 8 is a hardware structural diagram of an electronic device for implementing routing of an Internet of Things, according to an exemplary embodiment of the present application.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. The following description refers to the same or similar elements in the different figures unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with aspects of the present application as detailed in the appended claims.
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in the present application is for the purpose of describing particular embodiments, and is not intended to be limiting. The singular forms "a", "the" and "the" It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used to describe various information in this application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, the first information may also be referred to as the second information without departing from the scope of the present application. Similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to determination."
本申请所涉及的物联网,指物物相连的互联网,是在互联网基础上延伸和扩展的网络。物联网可以应用于工业自动化、环境监测、水系监测、智能交通、智能消防、智能电网、智能家居、照明管控、食品溯源等多个领域。几乎任何物品与物品之间均可通过物联网通信,因此,物联网涉及的终端设备的数量庞大、类型繁多、性能各异。The Internet of Things referred to in this application refers to the Internet connected to objects, which is a network that extends and expands on the Internet. The Internet of Things can be applied to many fields such as industrial automation, environmental monitoring, water system monitoring, intelligent transportation, intelligent fire protection, smart grid, smart home, lighting control, and food traceability. Almost any item and item can communicate through the Internet of Things. Therefore, the number of terminal devices involved in the Internet of Things is huge, various types, and different in performance.
以智能家居为例,所涉及的终端设备包括强电供电设备、电池供电的移动型设备和电池供电的非移动型设备。强电供电的设备由强电系统供电,强电供电可能具有数据存储量大、数据处理能力高的性能,可采用Wifi或IEEE802.15.4进行通信;而电池供电的非移动型设备的数据存储量和数据处理能力,一般均低于强电供电的设备,可以采用较低功耗的通信介质进行通信,如Zigbee;电池供电的移动型设备,具有数据存储量小、数据处理能力低的性能,可以采用超低功耗的通信介质进行通信,如BLE(蓝牙低能耗)。通常情况下,如果设备采用的的通信介质不同,在需要传输数据包时,会按照不同度量标准的路由协议进行选路。而由于目前的路由协议难以在性能各异的设备中实现通用,物联网在路由时不可避免的会涉及多种路由协议,这样就导致物联网中各设备间的互通性很差,本申请针对如何提高物联网中各设备间的互通性提出解决方案。Taking smart home as an example, the terminal equipment involved includes a strong power supply device, a battery-powered mobile device, and a battery-powered non-mobile device. The equipment powered by strong electric power is powered by a strong electric system. The strong electric power supply may have the performance of large data storage and high data processing capability. It can communicate with Wifi or IEEE802.15.4; and the data storage of non-mobile equipment powered by battery And data processing capabilities, generally lower than the power supply equipment, can use low-power communication media to communicate, such as Zigbee; battery-powered mobile devices, with small data storage capacity, low data processing capabilities, It can communicate using ultra-low power communication media such as BLE (Bluetooth Low Energy). Usually, if the communication medium used by the device is different, when the data packet needs to be transmitted, the routing will be performed according to the routing protocol of different metrics. Since the current routing protocol is difficult to implement in a device with different performances, the Internet of Things will inevitably involve multiple routing protocols when routing, which results in poor interoperability between devices in the Internet of Things. How to improve the interoperability between devices in the Internet of Things to propose solutions.
本申请的方案,为了解决物联网中各设备间互通性差这个问题,在物联网涉及的各种设备的性能差异较大时,可以先基于各设备的性能将物联网划分为多级网络,每级网络由性能类似的设备组成,不同级别的网络通过部分性能较高的设备互通。然后基于统一的分配原则为物联网络中所有节点分配统一格式的标识信息,各级网络中的设备基于相应的协议构造数据包时,在数据包的包体中添加帧结构适配的标识信息,这里提到的帧结构适配可以指帧结构相同或帧结构近似的适配状况。由于该标识信息在整个物联网中格式统一,因此,物联网中的各设备在接收到数据包时,都能基于数据包所携带的标识信息进行路由,将数据包传输给不同性能的设备,即可实现物联网中各设备间的互通,提高通信效率。当然,如果物联网涉及的各种设备的性能都很高,也可以不对物联网进行划分,所有设备构成一个级别的网络。本申请所涉及的物联网的网络架构可以参见图1A。In order to solve the problem of poor interoperability between devices in the Internet of Things, the solution of the present application may first divide the Internet of Things into a multi-level network based on the performance of each device when the performance of various devices involved in the Internet of Things is large. A level network consists of devices with similar performance. Different levels of networks are interconnected by some high-performance devices. Then, based on the unified distribution principle, all nodes in the object network are assigned uniform identification information. When devices in each network construct a data packet based on the corresponding protocol, the frame structure-adaptive identification information is added in the packet body of the data packet. The frame structure adaptation mentioned here may refer to an adaptation condition in which the frame structure is the same or the frame structure is approximated. Since the identification information is unified in the entire Internet of Things, each device in the Internet of Things can route data based on the identification information carried by the data packet when receiving the data packet, and transmit the data packet to different performance devices. It can realize interworking between devices in the Internet of Things and improve communication efficiency. Of course, if the various devices involved in the Internet of Things have high performance, the Internet of Things can be divided, and all devices form a level network. The network architecture of the Internet of Things referred to in this application can be seen in FIG. 1A.
图1A是本申请一示例性实施例示出的物联网100的架构图,该物联网100可以包括:第一级网络110和至少一个第二级网络(作为例子,图中示出了第二级网络120和第二级网络130),第二级网络120或130的根节点均为第一级网络110中的节点。FIG. 1A is an architectural diagram of an Internet of Things 100, which may include a first level network 110 and at least one second level network (as an example, the second level is shown as an example). The network 120 and the second level network 130), the root nodes of the second level network 120 or 130 are all nodes in the first level network 110.
其中,第一级网络110可以包括多个节点(节点111、节点112、节点113、节点114、节点115…),该网络110中的节点可以是强电供电的设备,具有数据处理能力强、数 据存储量大的特性,可以根据具体应用场景和业务需求确定所采用的通信介质、网络传输协议。例如,在智能家居领域,节点可以是台式计算机、电视、冰箱、空调、洗衣机等设备,节点间可以采用wifi或802.15.4进行通信。The first-level network 110 may include multiple nodes (node 111, node 112, node 113, node 114, node 115, ...), and the nodes in the network 110 may be powerfully powered devices, and have strong data processing capabilities. The characteristics of large data storage can determine the communication medium and network transmission protocol used according to specific application scenarios and service requirements. For example, in the smart home field, the nodes can be desktop computers, televisions, refrigerators, air conditioners, washing machines, etc., and nodes can communicate using wifi or 802.15.4.
第一级网络110中的节点112和节点114,分别为第二级网络120和第二级网络130的根节点,物联网100通过这两个根节点即可将第二级网络120和第二级网络130联通,因此,当物联网涉及的设备数量较多、性能各异时,可以将性能较高的设备接入第一级网络110,作为第一级网络110中的节点,然后在选取第一级网络110内的部分节点作为第二级网络120、130的根节点,将性能较低的设备作为根节点的子孙节点构成第二级网络120、130。用第一级网络110内各节点替代目前网络中的性能超强的路由设备,管理并联通第二级网络120、130中的节点。The node 112 and the node 114 in the first-level network 110 are the root nodes of the second-level network 120 and the second-level network 130 respectively, and the Internet of Things 100 can pass the second-level network 120 and the second through the two root nodes. The level network 130 is connected. Therefore, when the number of devices involved in the Internet of Things is large and the performance is different, the device with higher performance can be connected to the first-level network 110 as a node in the first-level network 110, and then selected. A part of the nodes in the first-level network 110 serves as the root nodes of the second- level networks 120 and 130, and the lower-performance devices as the descendant nodes of the root nodes constitute the second- level networks 120 and 130. The nodes in the first-level network 110 are replaced with the super-strong routing devices in the current network, and the nodes in the second- level networks 120, 130 are managed in parallel.
第二级网络120可以包括多个节点(节点121、节点122、节点123、节点124、节点125…),其节点的根节点为第一级网络110中的节点112;第二级网络130可以包括多个节点(节点131、节点132、节点133、节点134…),其节点的根节点为第一级网络110中的节点114。第二级网络120的节点可以是电池供电的非移动型设备,具有数据处理能力较弱、数据存储量较小的特性,可以根据具体应用场景和业务需求确定所采用的通信介质、网络传输协议。例如,在智能家居领域,节点可以是门窗报警器、智能门锁等电池供电的非移动型设备,节点间可以采用Zigbee或BLE进行通信。The second level network 120 may include a plurality of nodes (node 121, node 122, node 123, node 124, node 125, ...), the root node of which is the node 112 in the first level network 110; the second level network 130 may A plurality of nodes (node 131, node 132, node 133, node 134, ...) are included, the root node of which is the node 114 in the first level network 110. The node of the second-level network 120 may be a battery-powered non-mobile device, which has the characteristics of weak data processing capability and small data storage capacity, and can determine the communication medium and network transmission protocol used according to specific application scenarios and service requirements. . For example, in the smart home field, nodes can be battery-powered non-mobile devices such as door and window alarms, smart door locks, etc., and Zigbee or BLE can be used for communication between nodes.
在某些场景,第一级网络110内含有数量较多的节点,如有强电供电的设备请求接入第一级网络110,考虑到第一级网络110的节点数量较多,可以将请求接入的设备接入第二级网络120或第二级网络130,或者将请求接入的设备与后续请求接入的设备组成另一个第二级网络,该新组成的第二级网络的根节点为第一级网络110中的节点。这样组网后,第二级网络120或第二级网络130中的至少有部分节点是强电供电的设备,具有数据处理能力强、数据存储量大的特性,节点间可以采用wifi或802.15.4进行通信。In some scenarios, the first-level network 110 contains a large number of nodes. If a device with strong power supply requests to access the first-level network 110, the request may be made in consideration of the number of nodes in the first-level network 110. The accessed device accesses the second-level network 120 or the second-level network 130, or forms a second-level network with the device requesting access and the device that is subsequently requested to access, and the root of the newly-formed second-level network The nodes are nodes in the first level network 110. After the networking, at least some of the nodes in the second-level network 120 or the second-level network 130 are powerfully powered devices, and have the characteristics of strong data processing capability and large data storage capacity, and wifi or 802.15 can be used between the nodes. 4 communicate.
实际应用中,本申请的设计人员在组网前,可以根据所涉及的设备性能,将各设备分配为不同的类型的节点,如:管理节点、第一级网络110中的节点、第二级网络120、130中的节点。并且还可以为节点类型不同的设备分配不同的职责,比如:作为管理节点的设备,可以为第一级网络110中的节点分配标识信息,作为第二级网络120、130的根节点的设备,可以为该级网络中的所有节点分配标识信息。In practical applications, the designers of the present application can allocate each device as a different type of node according to the performance of the device involved before networking, such as: a management node, a node in the first-level network 110, and a second level. Nodes in the network 120, 130. And the device with different node types can be assigned different responsibilities. For example, the device as the management node can allocate the identification information to the nodes in the first-level network 110, and serve as the root node of the second- level network 120 and 130. All nodes in the network can be assigned identification information.
当所涉及的设备具有相应类型的节点应具备的性能后,在设备请求接入物联网100的时候,设备可以在接入请求内添加自身的各项性能参数、以及期望成为的节点类型。 这里提到的各项性能参数可以是数据存储量、数据处理速率等,在设备出厂前,可以由设备制造人员将性能参数标明在设备内。When the device in question has the performance that the corresponding type of node should have, when the device requests to access the Internet of Things 100, the device can add its own performance parameters and the desired node type in the access request. The performance parameters mentioned here may be data storage amount, data processing rate, etc., before the device leaves the factory, the device manufacturer may indicate the performance parameters in the device.
在将设备接入网络时,可以根据接入请求所携带的性能参数,将性能参数高于第一阈值的设备分配到第一级网络110中,将设备接入第一级网络110后,还可以接入的设备中选取性能最好的设备单独作为管理节点。对于性能参数不高于第一阈值的设备,可以接入到第二级网络120、130中,将设备接入第二级网络120、130后,对于性能非常低的设备,例如:数据存储量非常小、数据处理能力非常低的设备,可以将其作第二级网络中的叶子节点,并且仅为其分配一个父亲节点。When the device is connected to the network, the device with the performance parameter higher than the first threshold is allocated to the first-level network 110 according to the performance parameter carried in the access request, and after the device is connected to the first-level network 110, Among the devices that can be accessed, the device with the best performance is selected as the management node. For a device whose performance parameter is not higher than the first threshold, it can be accessed to the second- level network 120, 130, and after the device is connected to the second- level network 120, 130, for a device with very low performance, for example, data storage A very small device with very low data processing capability can be used as a leaf node in a second-level network and only a parent node is assigned to it.
在设备接入物联网100成为对应类型的节点后,管理节点可以按照统一的分配原则,为第一级网络110中的接入节点(接入的设备)分配唯一的标识信息,来描述各节点的地址。以下结合附图1B说明下分配标识的过程,图1B是本申请一示例性实施例示出的物联网中分配标识的方法的流程图,该实施例包括以下步骤S101-S102:After the device accesses the Internet of Things 100 to become a corresponding type of node, the management node may assign unique identification information to the access node (accessed device) in the first-level network 110 according to a unified allocation principle, and describe each node. the address of. The process of assigning an identifier is described below with reference to FIG. 1B. FIG. 1B is a flowchart of a method for assigning an identifier in the Internet of Things according to an exemplary embodiment of the present application. The embodiment includes the following steps S101-S102:
步骤S101:管理节点判断接入节点是否为第一级网络中的节点;所述管理节点为第一级网络中的节点或第一级网络中的节点的上一级节点。Step S101: The management node determines whether the access node is a node in the first-level network; the management node is a node in the first-level network or a higher-level node of the node in the first-level network.
步骤S102:如果接入节点是第一级网络中的节点,所述管理节点为所述接入节点分配标识信息。Step S102: If the access node is a node in the first-level network, the management node allocates identification information to the access node.
本实施例中,对于接入第一级网络110或第二级网络120、130的节点,在接入后可以将该节点的设备名称或设备的其他标号对应其接入的网络存储,管理节点在判断接入节点是否为第一级网络110中的节点时,可以依据节点的设备名称或其他标号查找其接入的网络,如果查找到的网络是第一级网络110,则确定接入节点是第一级网络110中的节点,如果查找到的网络是第二级网络120或130,则确定接入节点是第二级网络120或130中的节点。In this embodiment, for a node that accesses the first-level network 110 or the second- level network 120, 130, after accessing, the device name of the node or other label of the device may be corresponding to the network storage of the access, and the management node When determining whether the access node is a node in the first-level network 110, the network accessed by the node may be searched according to the device name or other label of the node. If the found network is the first-level network 110, the access node is determined. It is a node in the first level network 110, and if the found network is the second level network 120 or 130, it is determined that the access node is a node in the second level network 120 or 130.
在接入节点是第二级网络120或130中的节点时,管理节点可以直接为接入节点分配标识,也可以由接入节点所接入的网络的根节点为其分配节点。为了通知根节点为接入节点分配标识,管理节点可以基于所述接入节点接入的网络、自身所存储的路由信息和预定的路由选择规则,确定所述接入节点的根节点以及由所述管理节点到所述根节点的路由,通过所确定的路由向所述根节点发送标识分配通知,所述标识分配通知用于通知所述根节点为所述接入节点分配标识信息。When the access node is a node in the second- level network 120 or 130, the management node may directly assign an identifier to the access node, or may be assigned a node by the root node of the network accessed by the access node. In order to notify the root node to assign an identifier to the access node, the management node may determine the root node and the location of the access node based on the network accessed by the access node, the routing information stored by itself, and a predetermined routing rule. The routing of the management node to the root node sends an identifier allocation notification to the root node by using the determined route, where the identifier allocation notification is used to notify the root node to allocate identifier information to the access node.
这里提到的所述路由选择规则与节点存储的路由信息和标识信息有关,如果分配的标识信息是按结构化分配的,能反映出节点在网络中的位置以及节点与其他节点之间的 连接关系,所述路由选择规则可以是结构化分类标识信息的规则,存储能力有限的第二级网络120或130中的节点,可以仅存储自身的标识信息以及结构化分配标识信息。The routing rule mentioned here is related to the routing information and the identification information stored by the node. If the assigned identification information is allocated according to the structure, it can reflect the location of the node in the network and the connection between the node and other nodes. For the relationship, the routing rule may be a rule for categorizing the categorization information, and the node in the second- level network 120 or 130 with limited storage capacity may only store its own identification information and structured allocation identification information.
如果分配的标识信息是随机分配(非结构化)的,存储能力有限的第二级网络120或130中的节点,可以存储自身的标识信息以及其父节点的标识信息,所述路由选择规则可以是选择父节点为下一跳节点的规则,存储能力高的第一级网络110中的节点可以存储其能到达的所有节点的路由表,所述路由选择规则可以是从路由表中选路径的规则,如最短路径规则,最低消耗规则等等。If the assigned identification information is randomly allocated (unstructured), the node in the second- level network 120 or 130 with limited storage capacity may store its own identification information and identification information of its parent node, and the routing rule may The rule that selects the parent node as the next hop node, the node in the first-level network 110 with high storage capacity can store the routing table of all the nodes that can reach, and the routing rule can be the rule for selecting the path from the routing table. , such as the shortest path rule, the lowest consumption rule, and so on.
在为所述节点分配标识信息后,管理节点或根节点可以构建数据包,所述数据包携带有为所述接入节点分配的标识信息,向所述接入节点发送所述数据包,以便所述接入节点存储自身的标识信息,管理节点还可以将构建的数据包在网络中广播,以便第一级网络110中的其他节点将该接入节点的标识信息更新到所存储的路由信息中。After the identifier information is allocated to the node, the management node or the root node may construct a data packet, where the data packet carries the identifier information allocated to the access node, and sends the data packet to the access node, so that The access node stores its own identification information, and the management node may also broadcast the constructed data packet in the network, so that other nodes in the first-level network 110 update the identification information of the access node to the stored routing information. in.
此外,在分配标识信息时需要考虑各节点的类型,如果各节点的物理位置固定不变,可以将标识信息的帧结构划分为两部分,其中第一部分可以用于描述所述第一级网络中的节点的地址。而第二部分可以用于描述所述第二级网络中的各节点的地址。In addition, the type of each node needs to be considered when assigning the identifier information. If the physical location of each node is fixed, the frame structure of the identifier information may be divided into two parts, where the first part may be used to describe the first level network. The address of the node. The second part can be used to describe the address of each node in the second level network.
其他例子中,考虑到物联网络中可能存在的管理节点、以及节点的类型不同时数据包被发送的方式不同,标识信息的帧结构的第一部分还可以用于描述节点的类型;所述类型包括管理节点和非管理节点;所述非管理节点的地址由所述管理节点分配,所述第二级网络中的各节点的地址由所述根节点分配。这里提到的数据包被发送的方式可以是多播、单播或任播。In other examples, the first part of the frame structure of the identification information may also be used to describe the type of the node, considering the management nodes that may exist in the IoT network and the manner in which the data packets are sent when the types of the nodes are different; A management node and a non-management node are included; an address of the non-management node is allocated by the management node, and an address of each node in the second-level network is allocated by the root node. The manner in which the data packets mentioned here are sent may be multicast, unicast or anycast.
在某些场景,起管理作用的节点可能并非一个,例如:网络中可能同时存在DHCP Server(指网络中管理DHCP标准的一台计算机)和Service Server这两类管理节点,为了区分不同类型的管理节点,管理节点的标识信息的帧结构的第二部分可以用于表示管理节点类型。这里提到服务提供服务器,可以是根据业务需求加入网络提供某种服务的服务器,与该服务相关的数据会路由到该服务器。In some scenarios, the management node may not be one. For example, there may be two types of management nodes, DHCP Server (referring to a computer that manages DHCP standards in the network) and Service Server, in order to distinguish different types of management. The second part of the frame structure of the node, the identification information of the management node, can be used to indicate the management node type. The service providing server mentioned here may be a server that joins a network to provide a certain service according to business requirements, and data related to the service is routed to the server.
实际应用中,管理节点的运行时间和频率远高于非管理节点,比较容易出现故障,可以在管理节点处于故障状态后,将其他节点切换为管理节点。以便有新节点接入第一级网络110,能及时为新节点分配标识信息,保证新节点与其他节点的互通。切换管理节点后,新的管理节点的标识信息也可以更新成处于故障状态的管理节点的标识信息,不改变管理节点的标识信息便无需在网络中广播管理节点的变更。此外,还可以用管理节点的标识信息描述到达该管理节点的数据包被发送的方式定为任播,RFC2373标准对 任播的定义是,当一个单播地址被分配到多于一个的接口上时,发到该接口的报文被网络路由到由路由协议度量的“最近”的目标接口上。当管理节点的标识信息描述到达其的数据包被发送的方式定为任播时,无论哪个节点被切换成管理节点,均可以保证数据包路由到新管理节点。In practical applications, the running time and frequency of the management node are much higher than that of the non-management node, which is more prone to failure. After the management node is in a fault state, the other nodes are switched to the management node. In order to have a new node accessing the first-level network 110, the new node can be assigned identification information in time to ensure the interworking between the new node and other nodes. After the management node is switched, the identification information of the new management node can also be updated to the identification information of the management node in the fault state. Without changing the identification information of the management node, there is no need to broadcast the change of the management node in the network. In addition, the identification information of the management node may be used to describe that the manner in which the data packet arriving at the management node is sent is anycast. The definition of anycast in the RFC2373 standard is that when a unicast address is allocated to more than one interface. At the time, the message sent to the interface is routed by the network to the "nearest" target interface measured by the routing protocol. When the identification information of the management node describes that the data packet arriving at it is sent as anycast, no matter which node is switched to the management node, the data packet can be guaranteed to be routed to the new management node.
在一个例子中,管理节点的邻居节点可以根据其周期更新的邻居信息,确定管理节点是否出现故障,如果确定管理节点出现故障,邻居节点将管理节点故障这一消息进行广播,然后获取第一级网络110内的其他节点所在网络的规模、节点所在网络的平均网络通信质量选取新的管理节点。In an example, the neighbor node of the management node may determine whether the management node is faulty according to the neighbor information updated by its periodicity. If it is determined that the management node is faulty, the neighbor node broadcasts the message that the management node is faulty, and then acquires the first level. The size of the network where other nodes in the network 110 are located and the average network communication quality of the network where the node is located select a new management node.
以上例子中提到的管理节点、第一级网络110中的节点、以及第二级网络120、130中的节点,物理位置均固定不变,接入网络后与其他节点间的连接关系一般也不会频繁变更,路由更新的频率较低。但是,物联网还会涉及到具有移动特性的电池供电的移动型设备,例如智能家居领域的智能手环、智能手机等,在其接入网络后,随着其物理位置的不断变化,需要不断变换其所连接的节点、以及相关节点的路由信息。考虑到移动型设备的移动特性,本申请的设计人员可以将移动型设备在物联网中的类型定为移动节点,其他节点定为非移动节点。The management nodes mentioned in the above example, the nodes in the first-level network 110, and the nodes in the second- level network 120, 130 have fixed physical positions, and the connection relationship with other nodes after accessing the network is also generally It does not change frequently, and the frequency of routing updates is low. However, the Internet of Things will also involve battery-powered mobile devices with mobile features, such as smart wristbands in smart homes, smart phones, etc., after they access the network, as their physical location changes, they need to constantly Transform the routing information of the nodes it connects to and related nodes. Considering the mobile characteristics of the mobile device, the designer of the present application can designate the type of the mobile device in the Internet of Things as a mobile node, and the other nodes as non-mobile nodes.
此外,考虑到移动型设备的处理能力低、数据存储量小,可以将移动型设备作为叶子节点接入第二级网络120、130中。而且移动节点经常移动,会导致第一级网络110中可到达移动节点的节点经常变化,产生大量的路由更新信息。为了减少节点的路由更新量,可以只为移动节点分配一个父亲节点,并且选取第一级网络110中的节点为其所述父亲节点,这样在移动节点移动后,即使变更父亲节点,也可以有效减少变更路由信息的节点的数量。In addition, considering that the mobile device has low processing capability and small amount of data storage, the mobile device can be connected to the second- level network 120, 130 as a leaf node. Moreover, the mobile node often moves, which causes the nodes in the first-level network 110 to reach the mobile node to change frequently, and generates a large amount of routing update information. In order to reduce the amount of route update of the node, only one parent node may be assigned to the mobile node, and the node in the first-level network 110 may be selected as the father node, so that after the mobile node moves, even if the parent node is changed, it can be effective. Reduce the number of nodes that change routing information.
变更父亲节点一般发生在移动节点的移动过程中,移动节点在移动过程中,可以构造数据包,并以广播的方式发送该数据包,所述数据包中携带的标识信息包括移动节点的标识信息以及其父亲节点的标识信息,此外还可以携带用于表示移动节点正在寻求新的父亲节点的信息。然后移动节点根据其他节点对该数据包的反馈,可以获得移动节点自身与第一级网络110中各节点的通信质量参数,如果移动节点与其父亲节点的通信质量参数低于质量阈值,可以请求管理节点从第一级网络110中选取一个节点更新成父亲节点,该更新后的父亲节点与移动节点的通信质量参数高于质量阈值,更新父亲节点后,移动节点向新的父亲节点发送原父亲节点的标识信息,新的父亲节点将携带移动节点的标识信息以及自身节点的标识信息的数据包发送到管理节点,由管理节点对该数据包进 行广播,其他节点接收到该数据包后,根据更新后的父节点的标识信息更新所存储的路由信息,原父亲节点接收到该数据包后,会向通过广播告知其他节点其不再是移动节点的父亲节点,并将与移动节点关联的缓存信息发送到新的父亲节点。The change father node generally occurs in the moving process of the mobile node. During the mobile process, the mobile node can construct a data packet and send the data packet in a broadcast manner, and the identifier information carried in the data packet includes the identification information of the mobile node. And identification information of its parent node, in addition to carrying information indicating that the mobile node is seeking a new father node. Then, the mobile node can obtain the communication quality parameter of the mobile node itself and each node in the first-level network 110 according to the feedback of the other node to the data packet. If the communication quality parameter of the mobile node and its parent node is lower than the quality threshold, the mobile node can request management. The node selects one node from the first-level network 110 to be updated into a parent node, and the communication quality parameter of the updated parent node and the mobile node is higher than the quality threshold. After updating the parent node, the mobile node sends the original father node to the new father node. Identification information, the new father node sends the data packet carrying the identification information of the mobile node and the identification information of the own node to the management node, and the management node broadcasts the data packet, and after receiving the data packet, the other nodes update according to the The identification information of the subsequent parent node updates the stored routing information, and after receiving the data packet, the original parent node notifies the other node that it is no longer the parent node of the mobile node by broadcasting, and cache information associated with the mobile node. Send to the new father node.
在一个例子中,移动节点不移动时,也可以构造包括移动节点的标识信息、以及其父亲节点的标识信息的数据包,并以较低的频率广播该数据包,该频率可以为每半小时一次,具体的频率值可以根据移动节点的硬件条件和业务需求进行调整,在移动过程中,移动节点可以加快广播的频率,该状况下的频率值可以由业务要求决定,如果业务要求在秒级完成,那么广播的频率就要以毫秒为单位。In an example, when the mobile node does not move, it may also construct a data packet including the identification information of the mobile node and the identification information of the parent node, and broadcast the data packet at a lower frequency, which may be every half hour. Once, the specific frequency value can be adjusted according to the hardware conditions and service requirements of the mobile node. During the mobile process, the mobile node can speed up the broadcast frequency. The frequency value in this situation can be determined by the service requirement, if the service requirement is in the second level. Complete, then the frequency of the broadcast will be in milliseconds.
移动节点在从第一级网络110中选取新的父亲节点时,如果多个节点与移动节点的通信质量均高于质量阈值,管理节点可以从多个节点中选取一个通信质量参数最高的节点作为移动节点的父亲节点。When the mobile node selects a new parent node from the first-level network 110, if the communication quality of the multiple nodes and the mobile node is higher than the quality threshold, the management node may select one node with the highest communication quality parameter from among the multiple nodes. The parent node of the mobile node.
在为移动节点分配标识信息时,考虑到移动节点经常移动,可以将移动节点发送所述数据包的方式为任播,其标识信息可以描述移动节点的任播地址,这样在移动节点移动后,无需变换移动节点的标识信信息,便于将目的节点为移动节点的数据包路由到移动节点。When assigning the identification information to the mobile node, considering that the mobile node frequently moves, the mobile node may send the data packet in any manner, and the identification information may describe the anycast address of the mobile node, so that after the mobile node moves, It is not necessary to transform the identification information of the mobile node, so that the data packet of the destination node for the mobile node is conveniently routed to the mobile node.
实际应用中,在为接入的设备分配标识信息时,除考虑设备的性能和移动特性外,还需要各节点可能采用通信介质这一因素,例如:802.15.4或BLE,这两种通信介质对数据包的大小有限制,如果标识信息的字节长度太大,加大对数据包的消耗。在一个例子中,可以将标识信息设置为16比特,其中,前6比特描述第一级网络110中的节点,后10比特描述第二级网络120、130中的节点。如此分配后,标识信息的第一部分的长度定为6比特,第二部分的长度为10比特。In practical applications, when assigning identification information to an access device, in addition to considering the performance and mobility characteristics of the device, it is also required that each node may adopt a communication medium, such as 802.15.4 or BLE. There is a limit on the size of the data packet. If the byte length of the identification information is too large, the consumption of the data packet is increased. In one example, the identification information can be set to 16 bits, where the first 6 bits describe the nodes in the first level network 110 and the last 10 bits describe the nodes in the second level network 120, 130. After being thus allocated, the length of the first portion of the identification information is set to 6 bits, and the length of the second portion is 10 bits.
本申请的方案,在为接入网络中的节点分配结构适配(如统一格式)的标识信息后,可以将节点的标识信息更新到该节点的路由信息中,当节点基于对应的网络传输协议构造数据包时,可以在所构造的数据包的包体中添加帧结构适配的标识信息,所述数据包中的标识信息至少包括目的节点的标识信息,以便接收到数据包的节点基于数据包中的标识信息以及所存储的路由信息计算路由。The solution of the present application can update the identification information of the node to the routing information of the node after assigning the identification information of the structural adaptation (such as the unified format) to the node in the access network, and the node is based on the corresponding network transmission protocol. When the data packet is constructed, the frame structure-adapted identification information may be added in the body of the constructed data packet, and the identification information in the data packet includes at least the identification information of the destination node, so that the node that receives the data packet is based on the data. The identification information in the package and the stored routing information are used to calculate the route.
一般情况下,所构造的数据包的包体中添加的标识信息可以包括:源节点的标识信息和目的节点的标识信息。但是对于移动节点,考虑到其移动特性,在数据包的目的节点为移动节点时,可以在数据包的包体中添加移动节点的父亲节点的标识信息,便于物联网络100中的节点将数据包路由到该父亲节点,该父亲节点再将数据包路由到移动节 点。对于第二级网络120、130中的节点,可以先将数据包路由至该级网络的根节点,然后由根节点将数据包路由到该父亲节点。In general, the identifier information added in the package body of the constructed data packet may include: identifier information of the source node and identifier information of the destination node. However, for the mobile node, considering the mobility characteristics, when the destination node of the data packet is the mobile node, the identification information of the parent node of the mobile node may be added to the packet body of the data packet, so that the node in the object network 100 can facilitate the data. The packet is routed to the parent node, which then routes the packet to the mobile node. For nodes in the second level network 120, 130, the data packet may be first routed to the root node of the level network, and then the root node routes the data packet to the parent node.
构造好数据包后,即可基于图1A所示的物联网100的架构,在第一级网络110、第二级网络120、130中开始对数据包进行路由,物联网100的各节点在接收到数据包后,可以基于数据包中的标识信息以及所存储的路由信息计算路由。具体的路由过程可以参见图2,图2是本申请一示例性实施例示出的物联网的路由方法的流程示意图,该路由方法可以包括步骤S201至S203:After the data packet is constructed, the data packet can be started in the first-level network 110 and the second- level network 120, 130 based on the architecture of the Internet of Things 100 shown in FIG. 1A, and the nodes of the Internet of Things 100 are receiving. After the data packet, the route can be calculated based on the identification information in the data packet and the stored routing information. For a specific routing process, refer to FIG. 2. FIG. 2 is a schematic flowchart of a method for routing the Internet of Things according to an exemplary embodiment of the present application. The routing method may include steps S201 to S203:
步骤S201:在节点接收到数据包后,读取所述数据包中携带的标识信息,该节点存储有路由信息,所述路由信息中至少包括节点自身的标识信息。Step S201: After the node receives the data packet, the identifier information carried in the data packet is read, and the node stores routing information, where the routing information includes at least the identity information of the node itself.
步骤S202:基于数据包中的标识信息、所存储的路由信息和预定的路由选择规则,转发所述数据包。Step S202: Forward the data packet based on the identification information in the data packet, the stored routing information, and a predetermined routing rule.
本申请实施例中,第一级网络110和第二级网络120、130的网络拓扑结构不同时,路由的具体实现过程也不同。例如:第一级网络110的拓扑结构为网状结构,第一级网络110中的每个节点存储的路由信息为整个网络的路由表,路由表中包括每条路径涉及的节点标识信息、以及节点跳数、路径开销等,在第一级网络110中的节点接收到数据包后,从所述数据包中读取目的节点的标识信息,如果目的节点不是移动节点,基于该标识信息以及所述路由选择规则从所存储的路由表中查询到达该目的节点的路由,从查询到的路由中获取下一跳节点的标识信息,然后基于获取的标识信息,向下一跳节点转发所述数据包。In the embodiment of the present application, when the network topology of the first-level network 110 and the second- level network 120, 130 are different, the specific implementation process of the route is also different. For example, the topology of the first-level network 110 is a mesh structure, and the routing information stored by each node in the first-level network 110 is a routing table of the entire network, and the routing table includes node identification information involved in each path, and After the node in the first-level network 110 receives the data packet, the node in the first-level network 110 reads the identification information of the destination node from the data packet. If the destination node is not the mobile node, based on the identifier information and the location The routing rule queries the route to the destination node from the stored routing table, obtains the identifier information of the next hop node from the queried route, and then forwards the data to the next hop node based on the obtained identification information. package.
如果目的节点是移动节点,则从所述数据包中读取目的节点的父亲节点的标识信息,基于该标识信息以及所述路由选择规则从所存储的路由表中查询到达该父亲节点的路由,从查询到的路由中获取下一跳节点的标识信息,然后基于获取的标识信息,向下一跳节点转发所述数据包,第一级网络中接收到数据包的节点,重复上述选路过程,直至该父亲节点接收到该数据包后,将该数据包发送给移动节点。If the destination node is a mobile node, the identifier information of the parent node of the destination node is read from the data packet, and the route to the parent node is queried from the stored routing table based on the identifier information and the routing rule. Obtaining the identifier information of the next hop node from the queried route, and then forwarding the data packet to the next hop node based on the obtained identifier information, and the node receiving the data packet in the first-level network repeats the foregoing routing process After the parent node receives the data packet, the data packet is sent to the mobile node.
此外,对于网状结构的第一级网络110,为了让该级网络中的节点或者整个网络的节点的路由信息,该级网络中的节点可以构建数据包,所述数据包中携带该节点所存储的路由信息,将该数据包进行周期性广播。在该级网络中任一节点的路由信息更新后,该节点可以构造包括更新的路由信息的数据包,并广播该数据包,以便该级网络中其他节点能快速获知更新的路由信息。In addition, for the first-level network 110 of the mesh structure, in order to let the nodes in the network or the nodes of the entire network have routing information, the nodes in the network can construct a data packet, and the data packet carries the node. The stored routing information is periodically broadcasted. After the routing information of any node in the network is updated, the node can construct a data packet including the updated routing information, and broadcast the data packet so that other nodes in the network can quickly learn the updated routing information.
一个例子中,第二级网络120、130的网络拓扑结构为树形结构,如果在分配各节点 的标识信息时,按结构化分配标识的原则,根据节点在网络中的拓扑位置分配标识信息,把节点与其他节点的拓扑关系固化在标识信息中,这样分配的标识信息可以称为结构化的标识,可以描述节点之间的拓扑关系,通过一个节点的标识信息可以推测出唯一的父亲节点。因此,在存储路由信息可以仅存储节点自身的标识信息、以及结构化分配标识的怪责。对于第二级网络120、130中直接与根节点连接的节点,存储路由信息时还需要存储根节点的标识信息。In an example, the network topology of the second- level network 120, 130 is a tree structure. If the identification information of each node is allocated, according to the principle of structurally assigning identifiers, the identifier information is allocated according to the topological position of the nodes in the network. The topology relationship between the node and other nodes is solidified in the identification information, so that the assigned identification information may be referred to as a structured identifier, which may describe the topological relationship between the nodes, and the unique father node may be inferred by the identification information of one node. Therefore, in storing the routing information, only the identification information of the node itself and the strange allocation of the structured allocation identifier can be stored. For the node directly connected to the root node in the second- level network 120, 130, when storing the routing information, it is also required to store the identification information of the root node.
结构化的标识可以减少节点所存储的数据量,但是通过一个节点的标识信息可以推测出唯一的父亲节点,节点难以获得其他父亲节点的标识信息,如果推测出的父亲节点为下一跳节点,但是该父亲节点故障,节点将难以将数据包路由至父亲节点。为了解决这个问题,节点会存储备选父亲节点的标识信息,在其父亲节点故障时,将数据包路由至备选父亲节点。The structured identifier can reduce the amount of data stored by the node, but the unique father node can be inferred by the identification information of one node, and the node is difficult to obtain the identification information of other father nodes. If the inferred father node is the next hop node, However, if the father node fails, the node will have difficulty routing the packet to the parent node. In order to solve this problem, the node stores the identification information of the candidate parent node, and when the parent node fails, routes the data packet to the candidate father node.
以下例举标识信息的一种分配方式:The following is an example of how to assign identification information:
在本例子中,第一级网络110的管理节点为节点111,第二级网络120的拓扑结构为树形结构,根节点为节点112,根节点112的孩子节点分别为节点121和移动节点125,节点121的孩子节点为节点122和节点124,节点122的孩子节点为节点123。In this example, the management node of the first-level network 110 is the node 111, the topology of the second-level network 120 is a tree structure, the root node is the node 112, and the child nodes of the root node 112 are the node 121 and the mobile node 125, respectively. The child node of the node 121 is the node 122 and the node 124, and the child node of the node 122 is the node 123.
在分配节点的标识信息时,标识信息的字节长度为16比特,前6比特用于描述第一级网络110的节点、节点的类型以及描述数据包被发送的方式;所述类型包括管理节点、非管理节点和移动节点,后10比特用于描述第二级网络120、130的节点、以及节点之间的拓扑关系。When the identification information of the node is allocated, the byte length of the identification information is 16 bits, and the first 6 bits are used to describe the node of the first-level network 110, the type of the node, and the manner in which the data packet is described; the type includes the management node. The non-management node and the mobile node, the last 10 bits are used to describe the nodes of the second- level network 120, 130, and the topological relationship between the nodes.
分配后的第一级网络110和第二级网络120、130中的节点的标识信息分别如下:The identification information of the nodes in the first-level network 110 and the second- level network 120, 130 after allocation are as follows:
管理节点111的标识信息为0000010000000000;The identification information of the management node 111 is 0000010000000000;
移动节点125的标识信息为0000020000000000;The identification information of the mobile node 125 is 0000020000000000;
节点112至节点115的标识信息分别为:0000110000000000至0000140000000000;The identification information of the node 112 to the node 115 are respectively: 0000110000000000 to 0000140000000000;
节点121的标识信息为:0000111000000000;The identification information of the node 121 is: 0000111000000000;
节点122和节点124的标识信息分别为:0000111100000000和0000111200000000;The identification information of the node 122 and the node 124 are: 0000111100000000 and 0000111200000000, respectively;
节点123的标识信息为:0000111110000000。The identification information of the node 123 is: 0000111110000000.
在本例子中,标识信息0000010000000000和0000020000000000描述的数据包被发送的方式为任播,标识信息1111111111111111描述的数据包被发送的方式为多播,其他标识信息描述的数据包被发送的方式均为单播。In this example, the manner in which the data packets described by the identification information 0000010000000000 and 0000020000000000 are transmitted is anycast, the manner in which the data packet described by the identification information 1111111111111111 is transmitted is multicast, and the manner in which the data packets described by other identification information are sent is Unicast.
如果参照上述分配方式为第二级网络120、130中的节点分配的标识信息后,在该级 网络中的节点接收到数据包后,可以从所述数据包中读取目的节点的标识信息,如果目的节点不是移动节点,通过比较该标识信息与节点本身的标识信息确定目的节点是否为本节点子孙节点,如果不是子孙节点,可以确定本节点的父亲节点为下一跳节点,本节点的父亲节点不是根节点时,可以根据结构化分配标识信息的规则和本节点的标识信息,确定出本节点的父亲节点的标识信息,然后基于所确定的标识信息,向下一跳节点(父亲节点)转发所述数据包。本节点的父亲节点是根节点时,从存储的路由信息中读取存储的根节点的标识信息,然后基于读取的标识信息,向下一跳节点(根节点)转发所述数据包。After the identifier information assigned to the nodes in the second- level network 120, 130 is referenced by the foregoing allocation manner, after the node in the network in the level receives the data packet, the identifier information of the destination node may be read from the data packet. If the destination node is not a mobile node, it is determined whether the destination node is a descendant node of the node by comparing the identification information with the identification information of the node itself. If it is not a descendant node, the father node of the node may be determined as the next hop node, and the father of the node When the node is not the root node, the identity information of the parent node of the local node may be determined according to the rule of the structurally assigned identification information and the identification information of the local node, and then the next hop node (father node) is determined based on the determined identification information. Forward the packet. When the parent node of the node is the root node, the stored root node identification information is read from the stored routing information, and then the data packet is forwarded to the next hop node (root node) based on the read identification information.
如果是本节点的子孙节点,可以根据结构化分配标识信息的规则和本节点的标识信息,确定出本节点的孩子节点的标识信息,然后基于所确定的标识信息,向下一跳节点(孩子节点)转发所述数据包。If it is a descendant node of the node, the identifier information of the child node of the node may be determined according to the rule of the structurally assigned identification information and the identification information of the node, and then the next hop node (child) based on the determined identification information Node) forwards the packet.
如果所述数据包的目的节点是移动节点,则可以确定本节点的父亲节点为下一跳节点,本节点的父亲节点不是根节点时,可以根据结构化分配标识信息的规则和本节点的标识信息,确定出本节点的父亲节点的标识信息,然后基于所确定的标识信息,向下一跳节点(父亲节点)转发所述数据包。本节点的父亲节点是根节点时,从存储的路由信息中读取存储的根节点的标识信息,然后基于读取的标识信息,向下一跳节点(根节点)转发所述数据包,重复上述过程,直至本节点的根节点接收到该数据包,将该数据包路由至移动节点的父亲节点,由移动节点的父亲节点将该数据包发送给移动节点。If the destination node of the data packet is a mobile node, it may be determined that the parent node of the node is a next hop node, and when the parent node of the node is not the root node, the rule for assigning the identifier information according to the structure and the identifier of the node may be configured according to the structure. The information determines the identification information of the parent node of the node, and then forwards the data packet to the next hop node (parent node) based on the determined identification information. When the parent node of the node is the root node, the stored root node identification information is read from the stored routing information, and then the data packet is forwarded to the next hop node (root node) based on the read identification information, and is repeated. The above process, until the root node of the node receives the data packet, routes the data packet to the parent node of the mobile node, and sends the data packet to the mobile node by the parent node of the mobile node.
在其他例子中,第二级网络120、130的拓扑结构是树形结构时,也可以随机分配节点的标识信息,各节点的标识信息为非结构化的标识,该情况下,存储路由信息时可以仅存储节点自身的标识信息、其父亲节点的标识信息、以及其孩子节点的标识信息。如果网络中的节点接收到父亲节点发送的数据包,则从存储的路由信息中读取孩子节点的标识信息,如果数据包的目的节点的标识信息与某个孩子节点的标识信息相同,则将该孩子节点确定为下一跳节点,向该孩子节点发送该数据包,如果数据包的目的节点的标识信息与所有孩子节点的标识信息均不同,可以将所有孩子节点确定为下一跳节点,向所有孩子节点发送该数据包。In other examples, when the topology of the second- level network 120, 130 is a tree structure, the identification information of the node may be randomly allocated, and the identification information of each node is an unstructured identifier. In this case, when the routing information is stored. It is possible to store only the identification information of the node itself, the identification information of its parent node, and the identification information of its child node. If the node in the network receives the data packet sent by the parent node, the identifier information of the child node is read from the stored routing information. If the identity information of the destination node of the data packet is the same as the identification information of a child node, The child node is determined to be the next hop node, and the data packet is sent to the child node. If the identification information of the destination node of the data packet is different from the identification information of all the child nodes, all the child nodes may be determined as the next hop node. The packet is sent to all child nodes.
本申请方案的路由方法可以应用在物理网涉及的各个领域,在各领域应用本申请的路由方法时,物联网的各级网络中的各个节点可能将不同的电子设备作为各种类型的节点,以下结合图3至图6介绍不同设备的工作原理、以及其所具备的功能。The routing method of the solution of the present application can be applied to various fields involved in the physical network. When the routing method of the present application is applied in various fields, each node in each network of the Internet of Things may use different electronic devices as various types of nodes. The working principle of the different devices and the functions of the different devices are described below with reference to FIG. 3 to FIG.
请参阅图3,图3本申请一示例性实施例示出的物联网中的电子设备硬件结构图, 本实施例的物联网与以上例子中所描述的物联网相应,该电子设备在物联网中的类型为第一级网络中的节点,除了图3所示的处理器310、存储器320、网络接口330、以及非易失性存储器340之外,根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。电子设备的存储器320可以存储处理器310可执行的程序指令,还可以存储第一级网络中各节点的路由信息,所述路由信息包括每条路由所涉及的节点的标识信息;处理器310可以耦合存储器320,用于读取存储器320存储的程序指令,并作为响应,执行如下操作:在接收到数据包后,读取所述数据包中携带的标识信息;基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。Referring to FIG. 3, FIG. 3 is a structural diagram of an electronic device in an Internet of Things according to an exemplary embodiment of the present application. The Internet of Things of the present embodiment corresponds to the Internet of Things described in the above example, and the electronic device is in the Internet of Things. The type of the node in the first-level network, in addition to the processor 310, the memory 320, the network interface 330, and the non-volatile memory 340 shown in FIG. 3, may further include other according to the actual function of the electronic device. Hardware, no longer elaborate on this. The memory 320 of the electronic device may store program instructions executable by the processor 310, and may also store routing information of each node in the first-level network, where the routing information includes identification information of nodes involved in each route; the processor 310 may The coupling memory 320 is configured to read the program instructions stored in the memory 320, and in response, perform the following operations: after receiving the data packet, reading the identification information carried in the data packet; based on the stored routing information, The identification information and the predetermined routing rule are forwarded, and the data packet is forwarded.
一个例子中,标识信息的帧结构的第一部分用于描述所述第一级网络中的节点的地址。In one example, a first portion of the frame structure of the identification information is used to describe the address of a node in the first level network.
另一例子中,标识信息的帧结构的第一部分还用于节点的类型;所述类型包括管理节点和非管理节点。In another example, the first portion of the frame structure of the identification information is also used for the type of node; the type includes a management node and a non-management node.
作为例子,所述管理节点的标识信息的第二部分用于表示管理节点类型。As an example, the second portion of the identification information of the management node is used to represent the management node type.
作为例子,所述管理节点为非移动节点。As an example, the management node is a non-mobile node.
另一例子中,标识信息的帧结构的第二部分用于描述所述第二级网络中的各节点的地址。In another example, the second portion of the frame structure of the identification information is used to describe the address of each node in the second level network.
另一个例子中,处理器310还可以被配置为:In another example, processor 310 can also be configured to:
构建数据包,所述数据包携带为接入节点分配的标识信息;向所述接入节点发送所述数据包。Constructing a data packet carrying identification information assigned to the access node; transmitting the data packet to the access node.
本例子中,电子设备为第一级网络的管理节点,可以为接入第一级网络的设备分配标识信息。In this example, the electronic device is a management node of the first-level network, and may assign identification information to devices accessing the first-level network.
另一个例子中,处理器310还可以被配置为执行如下操作:In another example, processor 310 can also be configured to perform the following operations:
在移动节点移动时,获取所述移动节点与所述第一级网络中各节点的通信质量参数,并根据通信质量参数更新所述父亲节点;根据更新后的父节点的标识信息更新所存储的路由信息。And acquiring a communication quality parameter of the mobile node and each node in the first-level network, and updating the father node according to the communication quality parameter; and updating the stored information according to the updated identification information of the parent node. Routing information.
请参阅图4,图4本申请另一示例性实施例示出的物联网中的电子设备硬件结构图,本实施例的物联网与以上例子中所描述的物联网相应,该电子设备在物联网中的类型为第二级网络的根节点,除了图4所示的处理器410、存储器420、网络接口430、以及非易失性存储器440之外,根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。电子设备的存储器420可以存储处理器410可执行的程序指令,还可以存储第一 级网络中各节点的路由信息,所述路由信息包括每条路由所涉及的节点的标识信息;处理器410可以耦合存储器420,用于读取存储器420存储的程序指令,并作为响应,执行如下操作:在节点接收到数据包后,读取所述数据包中携带的标识信息;在接收到数据包后,读取所述数据包中携带的标识信息;基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。Referring to FIG. 4, FIG. 4 is a structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application. The Internet of Things of the present embodiment corresponds to the Internet of Things described in the above example, and the electronic device is in the Internet of Things. The type of the root node of the second-level network, in addition to the processor 410, the memory 420, the network interface 430, and the non-volatile memory 440 shown in FIG. 4, may further include according to the actual functions of the electronic device. Other hardware, no longer elaborate on this. The memory 420 of the electronic device may store program instructions executable by the processor 410, and may also store routing information of each node in the first-level network, where the routing information includes identification information of nodes involved in each route; the processor 410 may The coupling memory 420 is configured to read the program instructions stored in the memory 420, and in response, perform the following operations: after receiving the data packet, the node reads the identification information carried in the data packet; after receiving the data packet, Reading the identification information carried in the data packet; forwarding the data packet based on the stored routing information, the identification information, and a predetermined routing rule.
在一个例子中,处理器410还可以被配置为执行如下操作:In one example, processor 410 can also be configured to perform the following operations:
在有节点接入所述第二级网络时,为接入节点分配标识信息;构建数据包,所述数据包携带为接入节点分配的标识信息;将所述数据包发给所述接入节点。When a node accesses the second-level network, assigning identification information to the access node; constructing a data packet, where the data packet carries identification information allocated for the access node; and sending the data packet to the access node.
在另一个例子中,处理器410还可以被配置为执行如下操作:In another example, processor 410 can also be configured to perform the following operations:
在接收到目的节点为移动节点的数据包时,将所述数据包路由至所述移动节点的父亲节点。Upon receiving the data packet of the destination node as the mobile node, the data packet is routed to the parent node of the mobile node.
在另一个例子中,处理器410还可以被配置为执行如下操作:In another example, processor 410 can also be configured to perform the following operations:
该电子设备更新为移动节点的父节点时,将携带移动节点的标识信息以及自身节点的标识信息进行广播。When the electronic device is updated as the parent node of the mobile node, the identification information of the mobile node and the identification information of the own node are broadcasted.
请参阅图5,图5本申请另一示例性实施例示出的物联网中的电子设备硬件结构图,本实施例的物联网与以上例子中所描述的物联网相应,该电子设备在物联网中的类型为第二级网络中的节点,除了图5所示的处理器510、存储器520、网络接口530、以及非易失性存储器540之外,根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。电子设备的存储器520可以存储处理器510可执行的程序指令,还可以存储该电子设备的标识信息;处理器510可以耦合存储器520,用于读取存储器520存储的程序指令,并作为响应,执行如下操作:在接收到数据包后,读取所述数据包中携带的标识信息;基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。Referring to FIG. 5, FIG. 5 is a structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application. The Internet of Things of the present embodiment corresponds to the Internet of Things described in the above example, and the electronic device is in the Internet of Things. The type in the second-level network, in addition to the processor 510, the memory 520, the network interface 530, and the non-volatile memory 540 shown in FIG. 5, may further include according to the actual functions of the electronic device. Other hardware, no longer elaborate on this. The memory 520 of the electronic device may store program instructions executable by the processor 510, and may also store identification information of the electronic device; the processor 510 may be coupled to the memory 520 for reading program instructions stored in the memory 520 and executing in response The following operations are: after receiving the data packet, reading the identification information carried in the data packet; forwarding the data packet based on the stored routing information, the identification information, and a predetermined routing rule.
一个例子中,处理器510还可以被配置为执行如下操作:In one example, processor 510 can also be configured to perform the following operations:
在接收到目的节点为移动节点的数据包时,将所述数据包路由至该第二级网络的根节点。When receiving the data packet of the destination node as the mobile node, the data packet is routed to the root node of the second-level network.
另一个例子中,所述第二级网络的拓扑结构为树形结构,所述标识信息为结构化的标识,用于描述节点之间的拓扑关系,所述路由选择规则为结构化分配标识信息的规则。In another example, the topology of the second-level network is a tree structure, and the identifier information is a structured identifier, which is used to describe a topological relationship between nodes, and the routing rule is structured to assign identifier information. the rule of.
在另一个例子中,所述第二级网络的拓扑结构为树形结构,所述标识信息为非结构化的标识,所存储的路由信息还包括父亲节点的标识信息、以及孩子节点的标识信息,所述路由选择规则将父亲节点描述为下一跳节点。In another example, the topology of the second-level network is a tree structure, the identifier information is an unstructured identifier, and the stored routing information further includes identifier information of the parent node and identifier information of the child node. The routing rule describes the parent node as a next hop node.
请参阅图6,图6本申请另一示例性实施例示出的物联网中的电子设备硬件结构图,本实施例的物联网与以上例子中所描述的物联网相应,该电子设备在物联网中的类型为第二级网络中的移动节点,除了图6所示的处理器610、存储器620、网络接口630、以及非易失性存储器640之外,根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。电子设备的存储器620可以存储处理器610可执行的程序指令,还可以存储该电子设备的路由信息,所述路由信息包括移动节点的标识信息、以及其父节点的标识信息,所述父节点为第一级网络中的节点;处理器610可以耦合存储器620,用于读取存储器620存储的程序指令,并作为响应,执行如下操作:在接收到数据包后,读取所述数据包中携带的标识信息;基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。Please refer to FIG. 6. FIG. 6 is a structural diagram of an electronic device in an Internet of Things according to another exemplary embodiment of the present application. The Internet of Things of the present embodiment corresponds to the Internet of Things described in the above example, and the electronic device is in the Internet of Things. The type in the second-level network is a mobile node in the second-level network. In addition to the processor 610, the memory 620, the network interface 630, and the non-volatile memory 640 shown in FIG. 6, according to the actual functions of the electronic device, Including other hardware, we will not go into details here. The memory 620 of the electronic device may store program instructions executable by the processor 610, and may also store routing information of the electronic device, the routing information including identification information of the mobile node, and identification information of the parent node thereof, where the parent node is a node in the first level network; the processor 610 can be coupled to the memory 620 for reading the program instructions stored in the memory 620, and in response, performing the following operations: after receiving the data packet, reading the data packet to carry Identification information; forwarding the data packet based on the stored routing information, the identification information, and a predetermined routing rule.
一个例子中,标识信息的帧结构的第一部分用于描述节点的类型以及描述所述数据包被发送的方式;所述类型包括移动节点和非移动节点。In one example, a first portion of the frame structure of the identification information is used to describe the type of node and to describe the manner in which the data packet is transmitted; the type includes a mobile node and a non-mobile node.
作为例子,目的节点为该电子设备的数据包被发送的方式为任播。As an example, the manner in which the destination node sends the data packet of the electronic device is anycast.
作为例子,所述目的节点为所述移动节点时,接收的数据包所携带的标识信息还包括所述移动节点的父亲节点的标识信息。As an example, when the destination node is the mobile node, the identifier information carried by the received data packet further includes identifier information of the father node of the mobile node.
作为例子,所述移动节点为所述第二级网络中的叶子节点,且只有一个父亲节点,所述父亲节点为所述第一级网络中的节点。As an example, the mobile node is a leaf node in the second level network, and there is only one father node, and the father node is a node in the first level network.
另一个例子中,处理器610还可以被配置为执行如下操作:In another example, processor 610 can also be configured to perform the following operations:
在所述移动节点移动时,构造数据包并以任播的方式发送该数据包,构造的数据包中携带的标识信息包括移动节点的标识信息以及父节点的标识信息。When the mobile node moves, the data packet is constructed and transmitted in anycast mode, and the identifier information carried in the constructed data packet includes the identification information of the mobile node and the identification information of the parent node.
与前述物联网的路由方法的实施例相对应,本申请还提供了物联网的路由装置的实施例。Corresponding to the foregoing embodiment of the routing method of the Internet of Things, the present application also provides an embodiment of the routing device of the Internet of Things.
参见图7,图7是本申请一示例性实施例示出的物联网的路由装置的逻辑框图,本实施例的物联网与前述实施例所述的物联网相应,可以包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息;该路由装置包括:标识读取模块710和数据转发模块720:Referring to FIG. 7, FIG. 7 is a logic block diagram of a routing device of the Internet of Things according to an exemplary embodiment of the present application. The Internet of Things corresponding to the foregoing embodiment of the present invention may include a first-level network and at least a second-level network, where the data packet of the node in the first-level network and the node in the second-level network carries the identification information of the frame structure, and the identifier information carried by the Identification information of the destination node; the routing device includes: an identifier reading module 710 and a data forwarding module 720:
其中,标识读取模块710,用于在节点接收到数据包后,读取所述数据包中携带的标识信息,该节点存储有路由信息,所述路由信息中至少包括节点自身的标识信息。The identifier reading module 710 is configured to: after the node receives the data packet, read the identifier information carried in the data packet, where the node stores the routing information, where the routing information includes at least the identifier information of the node itself.
数据转发模块720,用于基于数据包中的标识信息、所存储的路由信息和预定的路 由选择规则,转发所述数据包。The data forwarding module 720 is configured to forward the data packet based on the identification information in the data packet, the stored routing information, and a predetermined routing selection rule.
上述装置中各个单元(或模块)的功能和作用的实现过程具体详见上述实施例中所述的物联网、以及物联网的路由方法中对应步骤的实现过程,在此不再赘述。For details, refer to the implementation process of the corresponding steps in the Internet of Things and the Internet of Things routing method described in the foregoing embodiments, and details are not described herein again.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元或模块可以是或者也可以不是物理上分开的,作为单元或模块显示的部件可以是或者也可以不是物理单元或模块,即可以位于一个地方,或者也可以分布到多个网络单元或模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment. The device embodiments described above are merely illustrative, wherein the units or modules described as separate components may or may not be physically separate, and the components displayed as units or modules may or may not be physical units. Or modules, which can be located in one place, or distributed to multiple network units or modules. Some or all of the modules may be selected according to actual needs to achieve the objectives of the present application. Those of ordinary skill in the art can understand and implement without any creative effort.
本申请物联网的路由装置的实施例可以应用在电子设备上。具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现中,电子设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备、互联网电视、智能机车、智能家居设备、工业自动化设备、环境监测设备、水系监测设备、智能交通设备、智能消防设备、智能电网设备、照明管控设备、食品溯源设备或者这些设备中的任意几种设备的组合。Embodiments of the routing device of the Internet of Things of the present application can be applied to an electronic device. This can be implemented by a computer chip or an entity, or by a product having a certain function. In a typical implementation, the electronic device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, an email transceiver, and a game control. Taiwan, tablet computer, wearable device, Internet TV, smart locomotive, smart home equipment, industrial automation equipment, environmental monitoring equipment, water monitoring equipment, intelligent transportation equipment, intelligent fire fighting equipment, smart grid equipment, lighting control equipment, food traceability equipment Or a combination of any of these devices.
装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器等可读介质中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图8所示,为本申请物联网的路由装置所在电子设备的一种硬件结构图,除了图8所示的处理器、存储器、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。电子设备的存储器可以存储处理器可执行的程序指令;处理器可以耦合存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:在节点接收到数据包后,读取所述数据包中携带的标识信息,该节点存储有路由信息,所述路由信息中至少包括节点自身的标识信息;基于数据包中的标识信息、所存储的路由信息和预定的路由选择规则,转发所述数据包。The device embodiment may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking the software implementation as an example, as a logical device, a processor of the electronic device in which it is located reads a corresponding computer program instruction in a readable medium such as a non-volatile memory into a memory. From a hardware level, as shown in FIG. 8, a hardware structure diagram of an electronic device in which the routing device of the Internet of Things is located, except for the processor, the memory, the network interface, and the non-volatile memory shown in FIG. In addition, the electronic device in which the device is located in the embodiment may also include other hardware according to the actual function of the electronic device, and details are not described herein. The memory of the electronic device may store program instructions executable by the processor; the processor may couple the memory for reading the program instructions stored by the memory, and in response, perform the following operations: after the node receives the data packet, the read The identifier information carried in the data packet, the node stores routing information, where the routing information includes at least identifier information of the node itself; based on the identifier information in the data packet, the stored routing information, and a predetermined routing rule, Forward the packet.
在其他实施例中,处理器所执行的操作可以参考上文方法实施例中相关的描述,在此不予赘述。In other embodiments, the operations performed by the processor may be referred to the related description in the foregoing method embodiments, and details are not described herein.
上述对本申请定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一 些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing description of the embodiments of the present application has been made. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and the desired results can still be achieved. In addition, the processes depicted in the figures are not necessarily in a particular order or in a sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., which are made within the spirit and principles of the present application, should be included in the present application. Within the scope of protection.

Claims (69)

  1. 一种物联网,其特征在于,包括:第一级网络和至少一个第二级网络;所述第二级网络的根节点为所述第一级网络中的节点;An Internet of Things, comprising: a first level network and at least one second level network; a root node of the second level network is a node in the first level network;
    所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所述数据包携带的标识信息包括目的节点的标识信息;The packet of the data packet constructed by the node in the first-level network and the node in the second-level network carries the identification information of the frame structure, and the identifier information carried by the data packet includes the destination node. Identification information;
    所述第一级网络和所述第二级网络中的节点存储有路由信息,所述路由信息至少包括节点自身的标识信息;所述路由信息用于接收到数据包的节点基于接收到的数据包中的标识信息计算路由。The nodes in the first-level network and the second-level network store routing information, and the routing information includes at least identifier information of the node itself; the routing information is used by the node that receives the data packet based on the received data. The identification information in the package calculates the route.
  2. 根据权利要求1所述的物联网,其特征在于,标识信息的帧结构的第一部分用于定义所述第一级网络中的节点的地址。The Internet of Things according to claim 1, wherein the first portion of the frame structure of the identification information is used to define an address of a node in the first level network.
  3. 根据权利要求2所述的物联网,其特征在于,标识信息的帧结构的第二部分用于定义所述第二级网络中的节点的地址。The Internet of Things according to claim 2, wherein the second portion of the frame structure of the identification information is used to define an address of a node in the second level network.
  4. 根据权利要求2所述的物联网,其特征在于,标识信息的帧结构的第一部分还用于定义节点的类型;所述类型包括管理节点和第一级网络的非管理节点。The Internet of Things according to claim 2, wherein the first portion of the frame structure of the identification information is further used to define a type of the node; the type includes a management node and a non-management node of the first-level network.
  5. 根据权利要求4所述的物联网,其特征在于,所述第一级网络的非管理节点的地址由所述管理节点分配,所述第二级网络中的节点的地址由该节点的根节点分配,该根节点为第一级网络中的节点。The Internet of Things according to claim 4, wherein the address of the non-management node of the first-level network is allocated by the management node, and the address of the node in the second-level network is determined by the root node of the node Assigned, the root node is a node in the first level network.
  6. 根据权利要求4所述的物联网,其特征在于,所述管理节点的标识信息的帧结构的第二部分用于表示管理节点类型。The Internet of Things according to claim 4, wherein the second portion of the frame structure of the identification information of the management node is used to indicate the management node type.
  7. 根据权利要求4所述的物联网,其特征在于,所述管理节点处于故障状态后,所述第一级网络中的一个非管理节点被切换为管理节点,切换后的管理节点的标识信息更新为切换前的管理节点的标识信息。The Internet of Things according to claim 4, wherein after the management node is in a fault state, one non-management node in the first-level network is switched to a management node, and the identification information of the switched management node is updated. The identification information of the management node before the switch.
  8. 根据权利要求4所述的物联网,其特征在于,所述管理节点和所述第一级网络的非管理节点为非移动节点。The Internet of Things according to claim 4, wherein the management node and the non-management node of the first-level network are non-mobile nodes.
  9. 根据权利要求4所述的物联网,其特征在于,所述类型还包括移动节点,所述移动节点为所述第二级网络中的叶子节点,且只有一个父亲节点,所述父亲节点为所述第一级网络中的节点。The Internet of Things according to claim 4, wherein said type further comprises a mobile node, said mobile node being a leaf node in said second level network, and having only one father node, said father node being A node in a first-level network.
  10. 根据权利要求9所述的物联网,其特征在于,所述移动节点处于移动状态时,检测自身与所述第一级网络中各节点的通信质量,根据通信质量更新父亲节点,并向更新后的父亲节点发送更新前的父亲节点的标识信息。The Internet of Things according to claim 9, wherein when the mobile node is in a mobile state, detecting the communication quality between itself and each node in the first-level network, updating the father node according to the communication quality, and updating the The parent node sends the identification information of the parent node before the update.
  11. 根据权利要求9所述的物联网,其特征在于,所述移动节点和所述管理节点的标识信息描述所述数据包被发送的方式为任播。The Internet of Things according to claim 9, wherein the identification information of the mobile node and the management node describes that the manner in which the data packet is transmitted is anycast.
  12. 根据权利要求11所述的物联网,其特征在于,所述数据包携带的标识信息还包括源节点的标识信息。The Internet of Things according to claim 11, wherein the identification information carried by the data packet further includes identification information of the source node.
  13. 根据权利要求12所述的物联网,其特征在于,所述目的节点为所述移动节点时,所述数据包所携带的标识信息还包括所述移动节点的父亲节点的标识信息。The Internet of Things according to claim 12, wherein when the destination node is the mobile node, the identifier information carried by the data packet further includes identification information of a father node of the mobile node.
  14. 根据权利要求12所述的物联网,其特征在于,所述第二级网络的节点接收到目的节点为移动节点的数据包时,将所述数据包路由至该第二级网络节点的根节点,所述根节点将所述数据包路由至所述移动节点的父亲节点。The Internet of Things according to claim 12, wherein the node of the second-level network routes the data packet to the root node of the second-level network node when receiving the data packet of the destination node as the mobile node The root node routes the data packet to a parent node of the mobile node.
  15. 根据权利要求3所述的物联网,其特征在于,所述标识信息的长度为16比特,所述第一部分的长度为6比特,所述第二部分的长度为10比特。The Internet of Things according to claim 3, wherein said identification information has a length of 16 bits, said first portion has a length of 6 bits, and said second portion has a length of 10 bits.
  16. 根据权利要求1所述的物联网,其特征在于,所述第二级网络的拓扑结构为树形结构,所述标识信息为结构化的标识,用于描述节点之间的拓扑关系。The Internet of Things of claim 1, wherein the topology of the second-level network is a tree structure, and the identification information is a structured identifier for describing a topological relationship between nodes.
  17. 根据权利要求1所述的物联网,其特征在于,所述第二级网络的拓扑结构为树形结构,所述标识信息为非结构化的标识,所述第二级网络中的节点所存储的路由信息还包括本节点的父亲节点的标识信息、以及本节点的孩子节点的标识信息。The Internet of Things according to claim 1, wherein the topology of the second-level network is a tree structure, and the identification information is an unstructured identifier, and the nodes in the second-level network are stored. The routing information also includes the identification information of the parent node of the node and the identification information of the child node of the node.
  18. 根据权利要求1所述的物联网,其特征在于,所述第一级网络中的节点所存储的路由信息还包括除本节点外其他节点的标识信息。The Internet of Things according to claim 1, wherein the routing information stored by the nodes in the first-level network further includes identification information of other nodes except the local node.
  19. 一种物联网的路由方法,其特征在于,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息;所述路由方法包括以下步骤:An Internet of Things routing method, characterized in that the Internet of Things comprises a first level network and at least one second level network, the nodes in the first level network and the nodes in the second level network are constructed The packet of the data packet carries the identifier information of the frame structure adaptation, and the identifier information carried by the packet includes the identifier information of the destination node. The routing method includes the following steps:
    在节点接收到数据包后,读取所述数据包中携带的标识信息,该节点存储有路由信息,所述路由信息中至少包括节点自身的标识信息;After the node receives the data packet, the identifier information carried in the data packet is read, and the node stores routing information, where the routing information includes at least the identity information of the node itself;
    基于数据包中的标识信息、所存储的路由信息和预定的路由选择规则,转发所述数据包。The data packet is forwarded based on the identification information in the data packet, the stored routing information, and a predetermined routing rule.
  20. 根据权利要求19所述的方法,其特征在于,标识信息的帧结构的第一部分用于定义所述第一级网络中的节点的地址。The method of claim 19 wherein the first portion of the frame structure of the identification information is used to define an address of a node in the first level network.
  21. 根据权利要求20所述的方法,其特征在于,标识信息的帧结构的第二部分用于 定义所述第二级网络中的节点的地址。The method of claim 20 wherein the second portion of the frame structure of the identification information is used to define an address of a node in the second level network.
  22. 根据权利要求20所述的方法,其特征在于,所述标识信息的帧结构的第一部分还用于描述节点的类型;所述类型包括管理节点和第一级网络的非管理节点。The method according to claim 20, wherein the first part of the frame structure of the identification information is further used to describe a type of a node; the type comprises a management node and a non-management node of the first-level network.
  23. 根据权利要求22所述的方法,其特征在于,所述第一级网络的非管理节点的地址由所述管理节点分配,所述第二级网络中的各节点的地址由该节点的根节点分配,该根节点为第一级网络中的节点。The method according to claim 22, wherein the address of the non-management node of the first-level network is allocated by the management node, and the address of each node in the second-level network is determined by the root node of the node Assigned, the root node is a node in the first level network.
  24. 根据权利要求22所述的方法,其特征在于,所述管理节点的标识信息的帧结构第二部分用于表示管理节点类型。The method according to claim 22, wherein the second part of the frame structure of the identification information of the management node is used to indicate the management node type.
  25. 根据权利要求22所述的方法,其特征在于,所述管理节点和所述第一级网络的非管理节点为非移动节点。The method of claim 22 wherein the management node and the non-management node of the first level network are non-mobile nodes.
  26. 根据权利要求22所述的方法,其特征在于,所述方法还包括:The method of claim 22, wherein the method further comprises:
    所述管理节点处于故障状态后,所述第一级网络中的一个非管理节点被切换为管理节点,切换后的管理节点的标识信息更新为切换前的管理节点的标识信息。After the management node is in the fault state, one non-management node in the first-level network is switched to the management node, and the identifier information of the switched management node is updated to the identifier information of the management node before the handover.
  27. 根据权利要求22所述的方法,其特征在于,所述类型还包括移动节点,所述移动节点为所述第二级网络中的叶子节点,且只有一个父亲节点,所述父亲节点为所述第一级网络中的节点。The method according to claim 22, wherein said type further comprises a mobile node, said mobile node being a leaf node in said second level network, and having only one father node, said father node being said The node in the first level network.
  28. 根据权利要求27所述的方法,其特征在于,所述方法还包括:The method of claim 27, wherein the method further comprises:
    所述移动节点移动时,所述移动节点构造数据包并以广播的方式发送该数据包,所述数据包中携带的标识信息包括移动节点的标识信息以及其父亲节点的标识信息。When the mobile node moves, the mobile node constructs a data packet and sends the data packet in a broadcast manner, and the identifier information carried in the data packet includes identifier information of the mobile node and identifier information of the parent node.
  29. 根据权利要求27所述的方法,其特征在于,所述方法还包括步骤:The method of claim 27, wherein the method further comprises the step of:
    所述移动节点移动时,获取所述移动节点与所述第一级网络中各节点的通信质量参数,并根据通信质量参数更新所述父亲节点。And when the mobile node moves, acquiring communication quality parameters of the mobile node and each node in the first-level network, and updating the father node according to the communication quality parameter.
  30. 根据权利要求27所述的方法,其特征在于,所述移动节点和所述管理节点发送数据包的方式为任播。The method according to claim 27, wherein the manner in which the mobile node and the management node send data packets is anycast.
  31. 根据权利要求27所述的方法,其特征在于,所述方法还包括:The method of claim 27, wherein the method further comprises:
    如果目的节点为移动节点,则第二级网络中的节点收到数据包时,将所述数据包路由至该第二级网络的根节点。If the destination node is a mobile node, the node in the second level network routes the data packet to the root node of the second level network when receiving the data packet.
  32. 根据权利要求27所述的方法,其特征在于,所述方法还包括:The method of claim 27, wherein the method further comprises:
    如果目的节点为移动节点,则第二级网络的根节点接收到数据包时,将所述数据包路由至所述移动节点的父亲节点。If the destination node is a mobile node, the root node of the second level network routes the data packet to the parent node of the mobile node when receiving the data packet.
  33. 根据权利要求21所述的方法,其特征在于,所述标识信息的长度为16比特,所述第一部分的长度为6比特,所述第二部分的长度为10比特。The method according to claim 21, wherein said identification information has a length of 16 bits, said first portion has a length of 6 bits, and said second portion has a length of 10 bits.
  34. 根据权利要求19所述的方法,其特征在于,所述第二级网络的拓扑结构为树形结构,所述标识信息为结构化的标识,用于描述节点之间的拓扑关系,所述第二级网络中的节点所存储的路由信息包括节点自身的标识信息、以及所述结构化分配标识信息的规则。The method according to claim 19, wherein the topology of the second-level network is a tree structure, and the identifier information is a structured identifier for describing a topological relationship between nodes, where The routing information stored by the nodes in the secondary network includes the identification information of the node itself and the rules for the structured allocation identification information.
  35. 根据权利要求19所述的方法,其特征在于,所述第二级网络的拓扑结构为树形结构,所述标识信息为非结构化的标识,所述第二级网络中的节点所存储的路由信息包括节点自身的标识信息、其父亲节点的标识信息、以及其孩子节点的标识信息。The method according to claim 19, wherein the topology of the second-level network is a tree structure, and the identification information is an unstructured identifier, which is stored by nodes in the second-level network. The routing information includes the identification information of the node itself, the identification information of its parent node, and the identification information of its child node.
  36. 根据权利要求19所述的方法,其特征在于,所述方法还包括:The method of claim 19, wherein the method further comprises:
    所述第一级网络中的节点构建数据包,所述数据包中携带该节点所存储的路由信息,将该数据包进行周期性广播。The node in the first-level network constructs a data packet, where the data packet carries routing information stored by the node, and the data packet is periodically broadcasted.
  37. 根据权利要求19所述的方法,其特征在于,第一级网络中的节点和/或所述第二级网络中的节点为物联网设备。The method according to claim 19, wherein the nodes in the first level network and/or the nodes in the second level network are Internet of Things devices.
  38. 一种物联网中分配标识的方法,其特征在于,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所述数据包携带的标识信息包括目的节点的标识信息;所述标识信息通过以下步骤分配:A method for distributing an identifier in an Internet of Things, characterized in that the Internet of Things comprises a first level network and at least one second level network, nodes in the first level network and nodes in the second level network The packet of the constructed data packet carries the identifier information of the frame structure adaptation, and the identifier information carried by the data packet includes the identifier information of the destination node; the identifier information is allocated by the following steps:
    管理节点判断接入节点是否为第一级网络中的节点;所述管理节点为第一级网络中的节点或第一级网络中的节点的上一级节点;The management node determines whether the access node is a node in the first-level network; the management node is a node in the first-level network or a higher-level node of the node in the first-level network;
    如果是,则所述管理节点为所述接入节点分配标识信息。If yes, the management node assigns identification information to the access node.
  39. 根据权利要求38所述的方法,其特征在于,如果所述接入节点是第二级网络中的节点,所述方法包括以下步骤:The method of claim 38, wherein if the access node is a node in a second level network, the method comprises the steps of:
    基于所述接入节点接入的网络、所述管理节点所存储的路由信息和预定的路由选择规则,确定所述接入节点的根节点以及由所述管理节点到所述根节点的路由;第二级网络中的节点的根节点为第一级网络中的节点;Determining, according to the network accessed by the access node, the routing information stored by the management node, and a predetermined routing rule, a root node of the access node and a route from the management node to the root node; The root node of the node in the second level network is a node in the first level network;
    通过所确定的路由向所述根节点发送标识分配通知,所述标识分配通知用于通知所述根节点为所述接入节点分配标识信息。And sending, by the determined route, an identifier allocation notification to the root node, where the identifier allocation notification is used to notify the root node to allocate identifier information to the access node.
  40. 根据权利要求38所述的方法,其特征在于,在为所述节点分配标识信息后,所 述方法还包括以下步骤:The method according to claim 38, wherein after assigning the identification information to the node, the method further comprises the steps of:
    构建数据包,所述数据包携带有为所述接入节点分配的标识信息;Constructing a data packet, the data packet carrying identification information allocated for the access node;
    向所述接入节点发送所述数据包。Transmitting the data packet to the access node.
  41. 根据权利要求38所述的方法,其特征在于,标识信息的帧结构第一部分用于定义所述第一级网络中的节点的地址。The method of claim 38 wherein the first portion of the frame structure of the identification information is used to define an address of a node in the first level network.
  42. 根据权利要求38所述的方法,其特征在于,标识信息的帧结构第二部分用于定义所述第二级网络中的节点的地址。The method of claim 38 wherein the second portion of the frame structure of the identification information is used to define an address of a node in the second level network.
  43. 根据权利要求41所述的方法,其特征在于,标识信息的帧结构的第一部分还用于定义节点的类型;所述类型包括管理节点和第一级网络的非管理节点。The method of claim 41 wherein the first portion of the frame structure of the identification information is further for defining a type of node; the type comprising a management node and a non-management node of the first level network.
  44. 根据权利要求43所述的方法,其特征在于,管理节点的标识信息的帧结构的第二部分用于表示管理节点类型。The method according to claim 43, wherein the second portion of the frame structure of the identification information of the management node is used to indicate the management node type.
  45. 根据权利要求43所述的方法,其特征在于,所述管理节点处于故障状态后,第一级网络中的一个非管理节点被切换为管理节点,切换后的管理节点的标识信息更新为切换前的管理节点的标识信息。The method according to claim 43, wherein after the management node is in a fault state, one non-management node in the first-level network is switched to the management node, and the identifier information of the switched management node is updated before the handover. Identification information of the management node.
  46. 一种物联网中的电子设备,其特征在于,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息,该电子设备包括:An electronic device in an Internet of Things, characterized in that the Internet of Things comprises a first level network and at least one second level network, nodes in the first level network and nodes in the second level network The packet of the constructed data packet carries the identifier information of the frame structure adaptation, and the identifier information carried by the identifier includes the identifier information of the destination node, and the electronic device includes:
    处理器;processor;
    存储处理器可执行指令的存储器;存储器存有所述第一级网络中各节点的路由信息,所述路由信息包括每条路由所涉及的节点的标识信息;a memory storing instructions executable by the processor; the memory storing routing information of each node in the first level network, the routing information including identification information of nodes involved in each routing;
    其中,所述处理器耦合于所述存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:The processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
    在接收到数据包后,读取所述数据包中携带的标识信息;After receiving the data packet, reading the identification information carried in the data packet;
    基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。The data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
  47. 根据权利要求46所述的电子设备,其特征在于,标识信息的帧结构的第一部分用于描述所述第一级网络中的节点的地址。The electronic device of claim 46, wherein the first portion of the frame structure of the identification information is for describing an address of a node in the first level network.
  48. 根据权利要求47所述的电子设备,其特征在于,标识信息的帧结构的第一部分还用于节点的类型;所述类型包括管理节点和非管理节点。The electronic device of claim 47, wherein the first portion of the frame structure of the identification information is further for a type of node; the type comprising a management node and a non-management node.
  49. 根据权利要求48所述的电子设备,其特征在于,所述管理节点的标识信息的帧结构的第二部分用于表示管理节点类型。The electronic device according to claim 48, wherein the second portion of the frame structure of the identification information of the management node is used to indicate a management node type.
  50. 根据权利要求48所述的电子设备,其特征在于,所述管理节点为非移动节点。The electronic device of claim 48, wherein the management node is a non-mobile node.
  51. 根据权利要求46所述的电子设备,其特征在于,标识信息的帧结构的第二部分用于描述所述第二级网络中的各节点的地址。The electronic device of claim 46, wherein the second portion of the frame structure of the identification information is for describing an address of each node in the second level network.
  52. 根据权利要求46所述的电子设备,其特征在于,所述处理器还被配置为:构建数据包,所述数据包携带有为接入节点分配的标识信息;The electronic device according to claim 46, wherein the processor is further configured to: construct a data packet, the data packet carrying identification information allocated for the access node;
    向所述接入节点发送所述数据包。Transmitting the data packet to the access node.
  53. 根据权利要求46所述的电子设备,其特征在于,所述处理器被配置为执行如下操作:The electronic device of claim 46, wherein the processor is configured to perform the following operations:
    在移动节点移动时,获取所述移动节点与所述第一级网络中各节点的通信质量参数,并根据通信质量参数更新父亲节点;根据更新后的父亲节点的标识信息更新所存储的路由信息。And acquiring a communication quality parameter of the mobile node and each node in the first-level network, and updating the parent node according to the communication quality parameter; and updating the stored routing information according to the updated identification information of the parent node. .
  54. 一种物联网中的电子设备,其特征在于,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息,该电子设备为所述第二级网络的根节点,包括:An electronic device in an Internet of Things, characterized in that the Internet of Things comprises a first level network and at least one second level network, nodes in the first level network and nodes in the second level network The packet of the constructed data packet carries the identifier information of the frame structure adaptation, and the identifier information carried by the data packet includes the identifier information of the destination node, where the electronic device is the root node of the second-level network, and includes:
    处理器;processor;
    存储处理器可执行指令的存储器;存储器存有所述第一级网络中各节点的路由信息,所述路由信息包括每条路由所涉及的节点的标识信息;a memory storing instructions executable by the processor; the memory storing routing information of each node in the first level network, the routing information including identification information of nodes involved in each routing;
    其中,所述处理器耦合于所述存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:The processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
    在接收到数据包后,读取所述数据包中携带的标识信息;After receiving the data packet, reading the identification information carried in the data packet;
    基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。The data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
  55. 根据权利要求54所述的电子设备,其特征在于,所述处理器还被配置为执行如下操作:The electronic device of claim 54, wherein the processor is further configured to perform the following operations:
    在有节点接入所述第二级网络时,为接入节点分配标识信息;Assigning identification information to the access node when a node accesses the second-level network;
    构建数据包,所述数据包携带有为所述接入节点分配的标识信息;Constructing a data packet, the data packet carrying identification information allocated for the access node;
    将所述数据包发给所述接入节点。Sending the data packet to the access node.
  56. 根据权利要求54所述的电子设备,其特征在于,所述处理器还被配置为执行如下操作:The electronic device of claim 54, wherein the processor is further configured to perform the following operations:
    在接收到目的节点为移动节点的数据包时,将所述数据包路由至所述移动节点的父亲节点。Upon receiving the data packet of the destination node as the mobile node, the data packet is routed to the parent node of the mobile node.
  57. 根据权利要求56所述的电子设备,其特征在于,所述处理器还被配置为执行如下操作:The electronic device of claim 56, wherein the processor is further configured to perform the following operations:
    所述电子设备更新为移动节点的父亲节点时,将携带移动节点的标识信息以及自身节点的标识信息进行广播。When the electronic device is updated to the parent node of the mobile node, the identification information of the mobile node and the identification information of the own node are broadcasted.
  58. 一种物联网中的电子设备,其特征在于,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息,该电子设备为所述第二级网络中的节点,包括:An electronic device in an Internet of Things, characterized in that the Internet of Things comprises a first level network and at least one second level network, nodes in the first level network and nodes in the second level network The packet of the constructed data packet carries the identifier information of the frame structure adaptation, and the identifier information carried by the packet includes the identifier information of the destination node, where the electronic device is a node in the second-level network, including:
    处理器;processor;
    存储处理器可执行指令的存储器;存储器存有该电子设备的标识信息;a memory that stores a processor executable instruction; the memory stores identification information of the electronic device;
    其中,所述处理器耦合于所述存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:The processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
    在接收到数据包后,读取所述数据包中携带的标识信息;After receiving the data packet, reading the identification information carried in the data packet;
    基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。The data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
  59. 根据权利要求58所述的电子设备,其特征在于,所述处理器还被配置为执行如下操作:The electronic device of claim 58, wherein the processor is further configured to perform the following operations:
    在接收到目的节点为移动节点的数据包时,将所述数据包路由至该第二级网络的根节点。When receiving the data packet of the destination node as the mobile node, the data packet is routed to the root node of the second-level network.
  60. 根据权利要求58所述的电子设备,其特征在于,所述第二级网络的拓扑结构为树形结构,所述标识信息为结构化的标识,用于描述节点之间的拓扑关系,所述路由选择规则为结构化分配标识信息的规则。The electronic device according to claim 58, wherein the topology of the second-level network is a tree structure, and the identifier information is a structured identifier for describing a topological relationship between nodes, A routing rule is a rule that assigns identification information to a structure.
  61. 根据权利要求58所述的电子设备,其特征在于,所述第二级网络的拓扑结构为树形结构,所述标识信息为非结构化的标识,所存储的路由信息还包括父亲节点的标识信息、以及孩子节点的标识信息,所述路由选择规则将父亲节点描述为下一跳节点。The electronic device according to claim 58, wherein the topology of the second-level network is a tree structure, the identifier information is an unstructured identifier, and the stored routing information further includes an identifier of the father node. Information, and identification information of the child node, the routing rule describing the parent node as a next hop node.
  62. 一种物联网中的电子设备,其特征在于,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息,该电子设备为所述第二级网络中的移动节点,包括:An electronic device in an Internet of Things, characterized in that the Internet of Things comprises a first level network and at least one second level network, nodes in the first level network and nodes in the second level network The packet of the constructed data packet carries the identifier information of the frame structure adaptation, and the identifier information carried by the data packet includes the identifier information of the destination node, where the electronic device is a mobile node in the second-level network, including:
    处理器;processor;
    存储处理器可执行指令的存储器;存储器存有该电子设备的路由信息,所述路由信息包括该移动节点的标识信息、以及其父亲节点的标识信息,所述父亲节点为所述第一级网络中的节点;a memory storing instructions executable by the processor; the memory storing routing information of the electronic device, the routing information including identification information of the mobile node, and identification information of a parent node thereof, the father node being the first level network a node in ;
    其中,所述处理器耦合于所述存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:The processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
    在接收到数据包后,读取所述数据包中携带的标识信息;After receiving the data packet, reading the identification information carried in the data packet;
    基于所存储的路由信息、所述标识信息和预定的路由选择规则,转发所述数据包。The data packet is forwarded based on the stored routing information, the identification information, and a predetermined routing rule.
  63. 根据权利要求62所述的电子设备,其特征在于,标识信息的帧结构的第一部分用于描述节点的类型;所述类型包括移动节点和非移动节点。The electronic device of claim 62, wherein the first portion of the frame structure of the identification information is for describing a type of node; the type comprising a mobile node and a non-mobile node.
  64. 根据权利要求62所述的电子设备,其特征在于,目的节点为该电子设备的数据包被发送的方式为任播。The electronic device according to claim 62, wherein the manner in which the destination node transmits the data packet of the electronic device is anycast.
  65. 根据权利要求62所述的电子设备,其特征在于,所述移动节点为所述第二级网络中的叶子节点,且只有一个父亲节点,所述父亲节点为所述第一级网络中的节点。The electronic device according to claim 62, wherein said mobile node is a leaf node in said second level network, and there is only one father node, said father node being a node in said first level network .
  66. 根据权利要求62所述的电子设备,其特征在于,所述处理器还被配置为执行如下操作:The electronic device of claim 62, wherein the processor is further configured to perform the following operations:
    在所述移动节点移动时,构造数据包并以任播的方式发送该数据包,所构造的数据包中携带的标识信息还包括移动节点的标识信息以及父亲节点的标识信息。When the mobile node moves, the data packet is constructed and transmitted in an arbitrary manner, and the identifier information carried in the constructed data packet further includes identification information of the mobile node and identification information of the parent node.
  67. 根据权利要求62所述的电子设备,其特征在于,所述目的节点为所述移动节点时,接收的数据包所携带的标识信息还包括所述移动节点的父亲节点的标识信息。The electronic device according to claim 62, wherein when the destination node is the mobile node, the identifier information carried by the received data packet further includes identifier information of the father node of the mobile node.
  68. 一种物联网的路由装置,其特征在于,所述物联网包括第一级网络和至少一个第二级网络,所述第一级网络中的节点与所述第二级网络中的节点所构造的数据包的包体中携带有帧结构适配的标识信息,所携带的标识信息包括目的节点的标识信息;所述路由装置包括:An Internet of Things routing device, characterized in that the Internet of Things comprises a first level network and at least one second level network, the nodes in the first level network and the nodes in the second level network are constructed The packet of the data packet carries the identifier information of the frame structure, and the identifier information carried by the packet includes the identifier information of the destination node. The routing device includes:
    标识读取模块,用于在节点接收到数据包后,读取所述数据包中携带的标识信息, 该节点存储有路由信息,所述路由信息中至少包括节点自身的标识信息;The identifier reading module is configured to: after the node receives the data packet, read the identifier information carried in the data packet, where the node stores routing information, where the routing information includes at least the identifier information of the node itself;
    数据转发模块,用于基于数据包中的标识信息、所存储的路由信息和预定的路由选择规则,转发所述数据包。And a data forwarding module, configured to forward the data packet based on the identifier information in the data packet, the stored routing information, and a predetermined routing rule.
  69. 一个或多个机器可读介质,其特征在于,其上存储有指令,当由一个或多个处理器执行时,使得终端设备执行如权利要求19-45中任一项所述的方法。One or more machine readable mediums having stored thereon instructions that, when executed by one or more processors, cause the terminal device to perform the method of any of claims 19-45.
PCT/CN2018/093950 2017-07-12 2018-07-02 Internet of things, routing and identification allocation method, apparatus and device for same, and medium WO2019011140A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710567301.6A CN109257319B (en) 2017-07-12 2017-07-12 Internet of things, and routing and identifier distribution method, device, equipment and medium thereof
CN201710567301.6 2017-07-12

Publications (1)

Publication Number Publication Date
WO2019011140A1 true WO2019011140A1 (en) 2019-01-17

Family

ID=65001265

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/093950 WO2019011140A1 (en) 2017-07-12 2018-07-02 Internet of things, routing and identification allocation method, apparatus and device for same, and medium

Country Status (2)

Country Link
CN (1) CN109257319B (en)
WO (1) WO2019011140A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115442277A (en) * 2022-08-28 2022-12-06 厦门市美亚柏科信息股份有限公司 Method and system for improving 5G traceability association correctness

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11171859B2 (en) * 2019-05-01 2021-11-09 Sony Corporation Large-scale node configuration management for MAAS platform
CN110505096B (en) * 2019-08-27 2022-07-19 西安闻泰电子科技有限公司 Internet of things equipment management method, device, equipment and medium
CN113708946B (en) * 2020-05-20 2024-01-05 平头哥(杭州)半导体有限公司 Computing system and message routing method
CN114697206B (en) * 2020-12-31 2024-04-19 新智云数据服务有限公司 Method, device, equipment and computer readable medium for managing nodes of Internet of things
CN113032401B (en) * 2021-03-31 2023-09-08 合安科技技术有限公司 Big data processing method and device based on special-shaped structure tree and related equipment
CN113342370A (en) * 2021-05-25 2021-09-03 北京小米移动软件有限公司 Configuration updating method and device, electronic equipment and storage medium
CN113905066B (en) * 2021-09-15 2024-04-09 中电科新型智慧城市研究院有限公司 Networking method of Internet of things, networking device of Internet of things and electronic equipment
CN114567585B (en) * 2022-02-28 2024-05-03 上海掌门科技有限公司 Method and device for determining routing level information of routing device
CN115001760B (en) * 2022-05-20 2024-05-28 中国船级社 Industrial Internet converged code sending service system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685467A (en) * 2013-11-15 2014-03-26 伏治军 Interconnection and internetworking platform of Internet of things, and communication method thereof
US8934366B2 (en) * 2012-04-20 2015-01-13 Cisco Technology, Inc. Distributed node migration between routing domains
CN106357305A (en) * 2016-11-04 2017-01-25 重庆邮电大学 Self-networking method, device and system of tree structure network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800692B (en) * 2009-12-10 2012-03-21 浙江工业大学 Wireless sensor network geographic location route addressing method based on Hull tree
CN102833803B (en) * 2012-08-20 2015-10-28 北京交通大学 A kind of wireless sensor network structure based on IPv6 and subnet switching method inside
CN103476084B (en) * 2013-09-26 2016-06-22 常熟理工学院 What a kind of wireless sensor network route based on cross-layer communicated realizes method
CN103476082B (en) * 2013-09-26 2016-01-06 常熟理工学院 The implementation method that a kind of wireless sensor network of future generation builds
CN103957162B (en) * 2014-05-14 2017-02-15 常熟理工学院 Routing communication realization method of wireless network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8934366B2 (en) * 2012-04-20 2015-01-13 Cisco Technology, Inc. Distributed node migration between routing domains
CN103685467A (en) * 2013-11-15 2014-03-26 伏治军 Interconnection and internetworking platform of Internet of things, and communication method thereof
CN106357305A (en) * 2016-11-04 2017-01-25 重庆邮电大学 Self-networking method, device and system of tree structure network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115442277A (en) * 2022-08-28 2022-12-06 厦门市美亚柏科信息股份有限公司 Method and system for improving 5G traceability association correctness
CN115442277B (en) * 2022-08-28 2023-10-20 厦门市美亚柏科信息股份有限公司 Method and system for improving correctness of 5G traceability association

Also Published As

Publication number Publication date
CN109257319B (en) 2022-04-26
CN109257319A (en) 2019-01-22

Similar Documents

Publication Publication Date Title
WO2019011140A1 (en) Internet of things, routing and identification allocation method, apparatus and device for same, and medium
US10581932B2 (en) Network-based dynamic data management
CN105553680B (en) System, method and storage medium for creating virtual interface based on network characteristics
Chakraborty et al. GSD: A novel group-based service discovery protocol for MANETS
WO2018161735A1 (en) Parent node selection method and network node
US20170272326A1 (en) Determining service group based network topologies
US20130235774A1 (en) Energy-saving mobile node control method using wireless multi-interfaces
US9379979B2 (en) Method and apparatus for establishing a virtual interface for a set of mutual-listener devices
CN104092614A (en) Method and device for updating address resolution information
Alahari et al. A survey on network routing protocols in internet of things (IOT)
WO2019100794A1 (en) Message processing method and apparatus
US10425485B2 (en) Integrating information centric networking (ICN) over low power and lossy networks (LLNs)
Sengul et al. A survey of adaptive services to cope with dynamics in wireless self-organizing networks
TW202110266A (en) Directed forwarding information sharing between devices in a mesh network
KR101663994B1 (en) METHOD FOR PROVIDING AN LIGHT-WEIGHT ROUTING PROTOCOL IN A IoT CAPABLE INFRA-LESS WIRELESS NETWORKS, RECORDING MEDIUM AND DEVICE FOR PERFORMING THE METHOD
Rahman et al. A QoS-aware hybrid data aggregation scheme for Internet of Things
JP6493945B2 (en) Green Power for high-density, large-scale networks (proxy table scaling)
CN107736002B (en) Proximity-based service information distributed caching method and device and communication network
Park et al. Distributed borrowing addressing scheme for ZigBee/IEEE 802.15. 4 wireless sensor networks
Sajjadian Amiri et al. Memory efficient routing using bloom filters in large scale sensor networks
Singh et al. Energy efficient fixed-cluster architecture for wireless sensor networks
Sharma et al. Performance analysis of flooding and spin in wireless sensor networks
Pathak et al. A comparative analysis of routing protocols in IoT
JP2006171917A (en) Protocol for radio multi-hop ad hoc network
Karthikeyan et al. EFFICIENT MULTICAST DATA REPLICATION APPROACH FOR POWER CONSUMPTION IN MANET.

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: 18832378

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18832378

Country of ref document: EP

Kind code of ref document: A1