WO2016091190A1 - Route switching method and apparatus of device - Google Patents

Route switching method and apparatus of device Download PDF

Info

Publication number
WO2016091190A1
WO2016091190A1 PCT/CN2015/097032 CN2015097032W WO2016091190A1 WO 2016091190 A1 WO2016091190 A1 WO 2016091190A1 CN 2015097032 W CN2015097032 W CN 2015097032W WO 2016091190 A1 WO2016091190 A1 WO 2016091190A1
Authority
WO
WIPO (PCT)
Prior art keywords
routing
network
devices
specified
module
Prior art date
Application number
PCT/CN2015/097032
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 WO2016091190A1 publication Critical patent/WO2016091190A1/en

Links

Images

Definitions

  • the present invention relates to the field of communications, and in particular to a method and device for routing a device.
  • the current wireless communication network is becoming more and more complex, and the number of entries in the routing table of the device is also increasing.
  • the traditional routing protocol is divided into a static routing protocol and a dynamic routing protocol.
  • the dynamic routing protocol can be divided into a distance vector routing protocol (DWRP) and a link state routing protocol (LSRP). Take the distance vector routing protocol as an example. It is a method for determining the optimal route based on the distance vector, for example, the hop number hop.
  • the distance refers to the virtual hop distance instead of the actual physical absolute distance. .
  • the routing protocol in the related art is a software protocol for switching by routing information of a device, and has two major drawbacks.
  • the communication device needs to maintain the routing table information of the entire network, which requires a large amount of resources;
  • the algorithm based on the routing table is complex, which requires high software protocols.
  • the above shortcomings will affect the stability of the network.
  • the main purpose of the embodiments of the present invention is to provide a route switching method and device, and solve the related technologies.
  • the devices in the network system are difficult to effectively recover the communication network in a short time when a routing failure occurs.
  • a method for routing a device including: acquiring physical location information of all devices in a specified network; and establishing the network structure map according to the physical location information, where the network structure diagram is used And reflecting the location relationship between the devices; when detecting that there is a routing fault in the specified device, selecting the target switching device according to the preset rule according to the network structure diagram; performing routing switching of the specified device to the target device .
  • selecting the target switching device according to the preset rule according to the location structure map includes: using, as the target switching device, a device having the shortest physical distance from the designated device according to the location structure map.
  • the physical location information includes: coordinate information
  • acquiring physical location information of all devices in the specified network includes: acquiring the coordinate information from a locally pre-stored history record.
  • the method before acquiring the coordinate information from the locally stored history record, includes: periodically acquiring coordinate information of all devices in the specified network; and updating coordinate information stored in the local history record.
  • the device for periodically acquiring coordinate information of all devices in the specified network includes one of the following: a global positioning system GPS device, and a Beidou navigation system BDNS device.
  • the establishing the network structure diagram according to the physical location information includes: constructing a routing connection relationship of the device according to the coordinate information, where the routing connection relationship is used to indicate a physical distance between the devices And establishing a network structure diagram of the device according to the routing connection relationship.
  • a device routing switching apparatus including: a first acquiring module configured to acquire physical location information of all devices in a specified network; and an establishing module configured to be based on the physical location The information is used to establish the network structure diagram, where the network structure diagram is used to reflect the location relationship between all the devices; and the selection module is configured to: according to the location structure map, according to the preset when detecting that there is a routing fault in the specified device The rule selects a target switching device; the switching module is configured to perform routing switching of the specified device to the target device.
  • the switching module is further configured to use, as the target switching device, a device having the shortest physical distance from the designated device according to the location structure map.
  • the physical location information includes: coordinate information
  • the first acquiring module is further configured to: acquire the coordinate information from a historical record stored in advance locally.
  • the device further includes: a second acquiring module, configured to periodically acquire coordinate information of all devices in the specified network; and an update module configured to update coordinate information stored in the local history record.
  • a second acquiring module configured to periodically acquire coordinate information of all devices in the specified network
  • an update module configured to update coordinate information stored in the local history record.
  • the physical location information of all devices in the specified network is obtained, and the network structure diagram of all the devices is established according to the location information.
  • the specified device is executed according to the preset configuration rule according to the network structure diagram.
  • the route switching mode of the device uses the physical location information of the device to perform route switching of the device. It does not need to maintain a complicated and large routing table.
  • the algorithm of this method is simple, and the device in the network system has a routing fault. When it is difficult to effectively restore the communication network in a short period of time, the routing is switched in a short time, and the communication of the device is guaranteed.
  • FIG. 1 is a flowchart of a method for routing a route of a device according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram of a route switching device of a device according to an embodiment of the present invention.
  • FIG. 3 is a block diagram showing an optional structure of a route switching device of a device according to an embodiment of the present invention.
  • FIG. 4 is a block diagram showing the structure of a route switching device of a communication device according to an alternative embodiment of the present invention.
  • FIG. 5 is a flowchart of an initialized route switching method of a communication device according to an alternative embodiment of the present invention.
  • FIG. 6 is a flow chart 1 of a method for routing a communication device according to an alternative embodiment of the present invention.
  • FIG. 7 is a second flowchart of a route switching method of a communication device according to an alternative embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a routing network according to an alternative embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for routing a route of a device according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
  • Step S102 Acquire physical location information of all devices in the specified network.
  • Step S104 Establish a network structure diagram according to physical location information.
  • the network structure diagram is used to reflect the positional relationship between all devices
  • Step S106 When detecting that there is a routing fault in the designated device, selecting the target switching device according to the preset rule according to the network structure diagram;
  • Step S108 Perform route switching of the specified device to the target device.
  • the physical location information of all the devices in the specified network is obtained, and the network structure diagram of all the devices is established according to the location information.
  • the specified device is executed according to the preset configuration rule to the target device according to the network structure diagram.
  • the routing mode of the device is used to perform route switching of the device through the physical location information of the device. It is not necessary to maintain a complicated and large routing table, and the algorithm of the method is simple, and the device in the network system in the related art is in the event of a routing failure. It is difficult to effectively restore the problem of the communication network in a short period of time, thereby realizing the switching of the route in a short time, and ensuring the normal communication of the device.
  • the method may be implemented as follows: The device with the shortest physical distance is used as the target switching device.
  • the manner of selecting the device with the shortest distance according to the physical location information as the target device is only an optional implementation manner of the present invention.
  • the two The devices are not squatting, and there are multiple routing relationships between the devices.
  • the routing information can be switched according to the physical location information to select the shortest routing relationship between the devices, that is, according to actual needs, the above
  • the method is merely illustrative and does not constitute a limitation of the invention.
  • the physical location information related to the embodiment may include: coordinate information.
  • the manner of acquiring physical location information of all devices in the specified network may be implemented by: pre-storing history from the local Get coordinate information in the record.
  • the method in this embodiment may further include:
  • Step S11 periodically acquire coordinate information of all devices in the specified network.
  • Step S12 Update the coordinate information stored in the local history record.
  • the device that periodically acquires coordinate information of all devices in the specified network may be one of the following: a global positioning system GPS device, and a Beidou navigation system BDNS device.
  • a global positioning system GPS device may be one of the following: a global positioning system GPS device, and a Beidou navigation system BDNS device.
  • the GPS device and the BDNS device are only examples. In the actual application scenario, one of them may be selected, or other devices capable of location positioning may be selected.
  • a method for establishing a network structure diagram according to physical location information is also involved, and the method can be implemented as follows:
  • Step S21 Build a routing connection relationship of the device according to the coordinate information, where the routing connection relationship is used to indicate a physical distance between the devices;
  • Step S22 Establish a network structure diagram of the device according to the routing connection relationship.
  • a method and a device for switching a route are also provided.
  • the device is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • the device includes: a first acquiring module 22 configured to acquire physical location information of all devices in a specified network; The first obtaining module 22 is coupled and configured to establish a network structure diagram according to the physical location information, where the network structure diagram is used to reflect the location relationship between all the devices; the selection module 26 is coupled with the establishing module 24, and is configured to detect When the specified device has a routing fault, the target switching device is selected according to the preset rule according to the location structure map; the switching module 28 is coupled with the selecting module 26, and is configured to perform route switching between the specified device and the target device.
  • the switching module 28 may also be configured to use the device having the shortest physical distance from the designated device as the target switching device according to the location structure map.
  • the physical location information includes: coordinate information
  • the first obtaining module 22 is further configured to obtain coordinate information from a locally stored history record.
  • FIG. 3 is a block diagram showing an optional structure of a device for routing a device according to an embodiment of the present invention.
  • the device further includes: a second acquiring module 32, configured to periodically acquire coordinate information of all devices in the specified network.
  • the update module 34 is coupled to the second acquisition module 32 and the first acquisition module 22 and is configured to update the coordinate information stored in the local history.
  • FIG. 4 is a structural block diagram of a routing switching device for a communication device according to an alternative embodiment of the present invention. As shown in FIG. 4, the device includes: a location locating module 42. The state detecting module 44, the information collecting module 46, and the route switching module 48.
  • a global positioning system is provided in the position locating module to implement the positioning function of the device, that is, the position coordinate of the communication device is obtained by the position locating module; the state detecting module is set to detect The connection state of the communication device, in this embodiment, the detection needs to be performed in real time, so as to effectively and timely discover the routing connection failure of the communication device; the information collection module is configured to collect information of the positioning module and the state detection module, that is, the current device. And the physical coordinates of its peripherals, and The location structure map of the routing network and the port connection status of the communication device are determined to determine whether the route of the device is broken. If the route is interrupted, the route switching module will cut off the existing routing connection and switch to the new routing connection.
  • GPS global positioning system
  • the route switching module is configured to switch according to the location information of the communication device provided by the information collection module and the route connection state provided by the state detection module. Route switching is not a software algorithm based on the routing table to select a new connection, but based on the physical location information of the neighboring communication device, the nearest communication device is selected as the new connection object.
  • the routing switching algorithm in the related art is a software algorithm based on a routing table.
  • the complexity of the software algorithm will lead to a certain delay of the algorithm on the one hand, and increase the uncertainty of the route switching on the other hand.
  • the primary requirement is to establish a new routing connection quickly and efficiently.
  • Software switching algorithms based on routing tables are difficult to meet the needs of emergency systems.
  • the route protection device of the present embodiment has the following effects as compared with the route switching algorithm in the related art: 1.
  • the optional embodiment does not require an additional device; 2.
  • the optional embodiment Only need to maintain simple routing location information, and do not need to maintain a complicated and large routing table.
  • the optional algorithm is simple, based on the routing algorithm with the closest physical location, and does not need to find a complicated routing table. 4.
  • Optional implementation The response is fast, and once the communication device is broken, the device does not need to carry out cumbersome algorithms, and can quickly establish an effective routing connection, thereby satisfying the military and other fields requiring high routing stability and timeliness.
  • the technical solutions of the alternative embodiments will be completely and clearly described in the following with reference to the specific embodiments.
  • the technical solution involved in the optional embodiment is based on the router, and according to the physical location information of each communication device, the routing switch is quickly performed when the routing link is broken.
  • FIG. 5 is a flowchart of a method for initializing route switching of a communication device according to an alternative embodiment of the present invention. As shown in FIG. 5, the method includes:
  • Step S502 The location locating module acquires location coordinates of all communication devices in the routing network according to the GPS device.
  • Step S504 The information collection module forms a network structure diagram by acquiring location coordinates of the communication device.
  • Step S506 The route switching module initializes a routing connection between two communication devices with the closest physical distance according to the location coordinates of the communication device provided by the information collecting module.
  • FIG. 6 is a flowchart 1 of a method for routing a communication device according to an alternative embodiment of the present invention. As shown in FIG. 6, the method includes:
  • Step S602 Obtain location coordinates of the routing device.
  • the location locating module acquires the location coordinates of the communication device in the routing network according to the GPS device;
  • Step S604 detecting the connection state and the location state in real time
  • the status detection module detects the location update status of the communication device in real time, and the status detection module detects the connection status of the communication device at the same time, which is the basis for routing switching in the optional embodiment;
  • Step S606 determining whether the state changes
  • the information acquisition module obtains the network structure map by acquiring the position coordinates of the communication device, and determines whether the switch needs to be switched according to the connection state of the communication device; and if a link is interrupted, step S608 is performed;
  • Step S608 establishing a new connection on the condition that the physical distance is the shortest;
  • the routing switch module starts to work once the routing link is interrupted; the module switches the interrupted route to the communication device with the shortest physical distance from the communication device according to the location coordinates of the communication device provided by the information collection module.
  • FIG. 7 is a second flowchart of a method for routing a communication device according to an alternative embodiment of the present invention. As shown in FIG. 7, the device includes:
  • Step S702 Obtain location coordinates of the routing device.
  • the location locating module acquires the location coordinates of the communication device in the routing network according to the GPS device;
  • Step S704 Establish a new backup connection on the condition that the physical distance is the shortest;
  • the information collection module establishes a link with the physical shortest path of the communication device according to the location coordinates of the communication device provided by the location positioning module;
  • Step S706 determining whether the original link status changes
  • the state detecting module detects the connection state of the link in real time and determines whether switching is needed. Once a link is interrupted, step S708 is performed;
  • Step S708 Enable a backup connection
  • the routing is switched according to the shortest path established in step 2.
  • FIG. 8 is a schematic structural diagram of a routing network according to an alternative embodiment of the present invention, as shown in FIG. A route containing six communication devices, all of which need to communicate with the outside world through root routing. In addition, except for route 5, the remaining 5 devices are all existing devices, and route 5 is a device that is added later. Root routing is the only way for the entire network to communicate externally.
  • Application scenario 1 The establishment of a routing network.
  • a total of 4 devices from route 1 to route 4 establish a routing connection according to the physical location of the network, which is the initialization of the network connection.
  • Route 1, route 2 and the root route are both 2 units, they are directly connected to the root route, so that the device is initialized closest to the physical distance of the root route.
  • Route 3 can select either route 1 or route 2 to establish a connection, so that the physical distance between route 3 and the root route is the shortest, assuming that the final route 3 and route 1 establish a connection.
  • Route 4 establishes a connection with Route 3.
  • Route 4 has the smallest number of hops for connecting the root route through Route 2
  • Route 4 establishes a connection with Route 3 according to the principle of the closest physical distance. It can be seen that the process of initializing the new routing network is a process of continuously expanding from the root route, without complicated software algorithms, and only requires the physical location of the communication device.
  • Application scenario 2 Introduction of new communication device routing.
  • the existing network needs to newly join route 5.
  • route 5 directly establishes an initial connection with route 4.
  • route 5 needs to know the connection status of the remaining routes in the network, and establish a connection with route 1, so that the number of hops of route 5 to the root route is the smallest.
  • This complex software algorithm needs to know the connection status of the entire network.
  • the route 5 can quickly join the existing network by establishing a connection directly with the route 4.
  • Application scenario 3 The routing connection in the network is damaged.
  • the connection between Route 3 and Route 1 is broken.
  • Route 3, Route 4, and Route 5 cannot communicate with the root route, but they can still communicate with each other.
  • the current route 2 is the route closest to them, the established connection between route 3 and route 2, and route 4 and route 5 do not need to do any work to recover the entire network.
  • This routing algorithm based on the shortest physical distance ensures fast and efficient network connectivity.
  • the route switching method in the alternative embodiment can be used to establish a new routing connection quickly and reliably.
  • the resources consumed by the device are greatly reduced, and the algorithm is simple and has certain advantages.
  • the device in the alternative embodiment is used instead of the traditional routing protection device, which can reduce the cost of routing protection and improve the efficiency of routing establishment switching.
  • the foregoing technical solution provided by the embodiment of the present invention is applied to a route switching process, in which physical location information of all devices in a specified network is obtained, and a network structure diagram of all devices is established according to the location information, when a routing fault occurs.
  • the route switching of the specified device to the target device is performed according to the preset rule, and the device routing is performed through the physical location information of the device, and the complicated and large routing table is not required to be maintained, and the algorithm of the method is simple.
  • the invention solves the problem that the device in the network system in the related technology is difficult to effectively restore the communication network in a short time when a routing failure occurs, thereby realizing the switching of the route in a short time and ensuring the normal communication of the device.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Provided is a route switching method and apparatus of a device, the method comprising: obtaining physical location information of all devices in a specified network; creating a network structure diagram according to the physical location information to reflect a location relationship among all devices; when a routing failure is detected at a specified device, selecting a target device to be switched to according to the network structure diagram and a preset rule; conducting the route switching from the specified device to the target device. The present invention addresses the problem that a related technique is incapable of effectively recovering a communication network in a short time period when the routing failure is detected at a device in a network system, thus enabling the route switching in a short time period, and ensuring the normal communication of the device.

Description

设备的路由切换方法及装置Device routing switching method and device 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种设备的路由切换方法及装置。The present invention relates to the field of communications, and in particular to a method and device for routing a device.
背景技术Background technique
近年来,随着手机等无线终端设备的持续性发展,社会对于无线网络的依赖性越来越大。尤其在军用和电力领域,无线通信设备的路由稳定性至关重要,因此各种路由协议应运而生。In recent years, with the continuous development of wireless terminal devices such as mobile phones, society has become more and more dependent on wireless networks. Especially in the military and power fields, the routing stability of wireless communication devices is crucial, so various routing protocols have emerged.
在地震,泥石流等灾害发生后,往往出现电力设备破环,通讯系统中断等问题,这样对救援工作产生严重影响,会造成人员和财产的二次损失。因此,能够快速的恢复路由通讯成为当务之急。在军事领域,如果无法通讯,战术无法传达,人员之间无法交流,稳定的通讯设备是战争取胜的保证。然而,军事领域的情况往往瞬息万变,在新的军事区域,军事人员往往需要快速建立完善的通讯网络,提供可靠的通讯环境。同时,通讯设备受到破坏的几率很大,保证通讯畅通尤为重要。在如今的通讯网络中,应急系统的作用至关重要,在遇到故障时,需要其能够及时建立有效且稳定的新路由。After disasters such as earthquakes and mudslides, problems such as the breakdown of power equipment and the interruption of communication systems often occur, which will seriously affect the rescue work and cause secondary losses of personnel and property. Therefore, the ability to quickly restore routing communications has become a top priority. In the military field, if communication is impossible, tactics cannot be communicated, personnel cannot communicate, and stable communication equipment is a guarantee for war to win. However, the situation in the military field is often changing rapidly. In the new military region, military personnel often need to quickly establish a perfect communication network to provide a reliable communication environment. At the same time, the probability of communication equipment being damaged is high, and it is especially important to ensure smooth communication. In today's communication networks, the role of an emergency system is critical, and in the event of a failure, it is necessary to establish an efficient and stable new route in time.
目前的无线通讯网络越来越复杂,设备的路由表的条目数也日益庞大。按相关技术中的方式,当路由连接中断以后,软件需要更新路由表,根据某一种路由算法,建立新的连接。传统的路由协议分为静态路由协议和动态路由协议,动态路由协议可分为距离向量路由协议(Distance Vector Routing Protocol简称为DVRP)和链路状态路由协议(Link State Routing Protocol简称为LSRP)。以距离向量路由协议为例,它是根据距离矢量,例如:跳数hop,来进行路由选择的一个确定最佳路由的方法,此距离是指虚拟的跳数距离,而不是实际的物理绝对距离。相关技术中的路由协议是通过设备的路由信息进行切换的软件协议,其存在两大弊端。一是通讯设备需要维护整个网络的路由表信息,这需要消耗大量资源;二是基于路由表的算法复杂,这对软件协议的要求高。上述不足都会影响网络的稳定性。The current wireless communication network is becoming more and more complex, and the number of entries in the routing table of the device is also increasing. According to the related art, after the routing connection is interrupted, the software needs to update the routing table to establish a new connection according to a certain routing algorithm. The traditional routing protocol is divided into a static routing protocol and a dynamic routing protocol. The dynamic routing protocol can be divided into a distance vector routing protocol (DWRP) and a link state routing protocol (LSRP). Take the distance vector routing protocol as an example. It is a method for determining the optimal route based on the distance vector, for example, the hop number hop. The distance refers to the virtual hop distance instead of the actual physical absolute distance. . The routing protocol in the related art is a software protocol for switching by routing information of a device, and has two major drawbacks. First, the communication device needs to maintain the routing table information of the entire network, which requires a large amount of resources; second, the algorithm based on the routing table is complex, which requires high software protocols. The above shortcomings will affect the stability of the network.
针对相关技术中网络系统中的设备在出现路由故障时,难以在较短时间里有效地恢复通讯网络的问题,目前尚未提出有效的解决方案。In view of the routing failure in the network system of the related art, it is difficult to effectively restore the communication network in a short time, and no effective solution has been proposed yet.
发明内容Summary of the invention
本发明实施例的主要目的在于提供一种路由的切换方法及装置,解决了相关技术 中相关技术中网络系统中的设备在出现路由故障时,难以在较短时间里有效地恢复通讯网络的问题。The main purpose of the embodiments of the present invention is to provide a route switching method and device, and solve the related technologies. In the related art, the devices in the network system are difficult to effectively recover the communication network in a short time when a routing failure occurs.
根据本发明实施例的方面,提供了一种设备的路由切换方法,包括:获取指定网络中所有设备的物理位置信息;依据所述物理位置信息建立所述网络结构图,其中该网络结构图用于反映所述所有设备之间的位置关系;在检测到指定设备存在路由故障时,依据所述网络结构图按照预设规则选择目标切换设备;执行所述指定设备到所述目标设备的路由切换。According to an aspect of the embodiments of the present invention, a method for routing a device is provided, including: acquiring physical location information of all devices in a specified network; and establishing the network structure map according to the physical location information, where the network structure diagram is used And reflecting the location relationship between the devices; when detecting that there is a routing fault in the specified device, selecting the target switching device according to the preset rule according to the network structure diagram; performing routing switching of the specified device to the target device .
可选地,依据所述位置结构图按照预设规则选择目标切换设备包括:依据所述位置结构图将与所述指定设备物理距离最短的设备作为所述目标切换设备。Optionally, selecting the target switching device according to the preset rule according to the location structure map includes: using, as the target switching device, a device having the shortest physical distance from the designated device according to the location structure map.
可选地,所述物理位置信息包括:坐标信息,获取指定网络中所有设备的物理位置信息包括:从本地预先存储的历史记录中获取所述坐标信息。Optionally, the physical location information includes: coordinate information, and acquiring physical location information of all devices in the specified network includes: acquiring the coordinate information from a locally pre-stored history record.
可选地,在从本地预先存储的历史记录中获取所述坐标信息之前包括:周期性获取所述指定网络中所有设备的坐标信息;更新本地历史记录中存储的坐标信息。Optionally, before acquiring the coordinate information from the locally stored history record, the method includes: periodically acquiring coordinate information of all devices in the specified network; and updating coordinate information stored in the local history record.
可选地,周期性获取所述指定网络中所有设备的坐标信息的设备包括以下之一:全球定位系统GPS设备、北斗导航系统BDNS设备。Optionally, the device for periodically acquiring coordinate information of all devices in the specified network includes one of the following: a global positioning system GPS device, and a Beidou navigation system BDNS device.
可选地,依据所述物理位置信息建立所述网络结构图包括:根据所述坐标信息构建所述设备的路由连接关系,其中,所述路由连接关系用于指示所述设备之间的物理距离;依据所述路由连接关系建立所述设备的网络结构图。Optionally, the establishing the network structure diagram according to the physical location information includes: constructing a routing connection relationship of the device according to the coordinate information, where the routing connection relationship is used to indicate a physical distance between the devices And establishing a network structure diagram of the device according to the routing connection relationship.
根据本发明实施例的另一方面,提供了一种设备的路由切换装置,包括:第一获取模块,设置为获取指定网络中所有设备的物理位置信息;建立模块,设置为依据所述物理位置信息建立所述网络结构图,其中该网络结构图用于反映所述所有设备之间的位置关系;选择模块,设置为在检测到指定设备存在路由故障时,依据所述位置结构图按照预设规则选择目标切换设备;切换模块,设置为执行所述指定设备到所述目标设备的路由切换。According to another aspect of the embodiments of the present invention, a device routing switching apparatus is provided, including: a first acquiring module configured to acquire physical location information of all devices in a specified network; and an establishing module configured to be based on the physical location The information is used to establish the network structure diagram, where the network structure diagram is used to reflect the location relationship between all the devices; and the selection module is configured to: according to the location structure map, according to the preset when detecting that there is a routing fault in the specified device The rule selects a target switching device; the switching module is configured to perform routing switching of the specified device to the target device.
可选地,所述切换模块还设置为,依据所述位置结构图将与所述指定设备物理距离最短的设备作为所述目标切换设备。Optionally, the switching module is further configured to use, as the target switching device, a device having the shortest physical distance from the designated device according to the location structure map.
可选地,所述物理位置信息包括:坐标信息,所述第一获取模块还设置为,从本地预先存储的历史记录中获取所述坐标信息。Optionally, the physical location information includes: coordinate information, and the first acquiring module is further configured to: acquire the coordinate information from a historical record stored in advance locally.
可选地,所述装置还包括:第二获取模块,设置为周期性获取所述指定网络中所有设备的坐标信息;更新模块,设置为更新本地历史记录中存储的坐标信息。 Optionally, the device further includes: a second acquiring module, configured to periodically acquire coordinate information of all devices in the specified network; and an update module configured to update coordinate information stored in the local history record.
通过本发明实施例,采用获取指定网络中所有设备的物理位置信息,依据该位置信息建立所有设备的网络结构图,当出现路由故障时,依据该网络结构图按照预设规则执行指定设备到目标设备的路由切换的方式,通过设备的物理位置信息来进行设备的路由切换,不需要维护复杂庞大的路由表,而且该方式的算法简单,解决了相关技术中网络系统中的设备在出现路由故障时,难以在较短时间里有效地恢复通讯网络的问题,从而在短时间内实现了路由的切换,保证了设备的通讯正常。According to the embodiment of the present invention, the physical location information of all devices in the specified network is obtained, and the network structure diagram of all the devices is established according to the location information. When a routing fault occurs, the specified device is executed according to the preset configuration rule according to the network structure diagram. The route switching mode of the device uses the physical location information of the device to perform route switching of the device. It does not need to maintain a complicated and large routing table. The algorithm of this method is simple, and the device in the network system has a routing fault. When it is difficult to effectively restore the communication network in a short period of time, the routing is switched in a short time, and the communication of the device is guaranteed.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的设备的路由切换方法流程图;1 is a flowchart of a method for routing a route of a device according to an embodiment of the present invention;
图2是根据本发明实施例的设备的路由切换装置结构框图;2 is a structural block diagram of a route switching device of a device according to an embodiment of the present invention;
图3是根据本发明实施例的设备的路由切换装置的可选结构框图;3 is a block diagram showing an optional structure of a route switching device of a device according to an embodiment of the present invention;
图4是根据本发明可选实施例的通讯设备的路由切换装置结构框图;4 is a block diagram showing the structure of a route switching device of a communication device according to an alternative embodiment of the present invention;
图5是根据本发明可选实施例的通讯设备的初始化路由切换方法流程图;5 is a flowchart of an initialized route switching method of a communication device according to an alternative embodiment of the present invention;
图6是根据本发明可选实施例的通讯设备的路由切换方法流程图一;6 is a flow chart 1 of a method for routing a communication device according to an alternative embodiment of the present invention;
图7是根据本发明可选实施例的通讯设备的路由切换方法流程图二;7 is a second flowchart of a route switching method of a communication device according to an alternative embodiment of the present invention;
图8是根据本发明可选实施例的路由网络的结构示意图。FIG. 8 is a schematic structural diagram of a routing network according to an alternative embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种路由的切换方法,图1是根据本发明实施例的设备的路由切换方法流程图,如图1所示,该流程包括如下步骤:A method for switching a route is provided in this embodiment. FIG. 1 is a flowchart of a method for routing a route of a device according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
步骤S102:获取指定网络中所有设备的物理位置信息;Step S102: Acquire physical location information of all devices in the specified network.
步骤S104:依据物理位置信息建立网络结构图;Step S104: Establish a network structure diagram according to physical location information.
其中该网络结构图用于反映所有设备之间的位置关系; The network structure diagram is used to reflect the positional relationship between all devices;
步骤S106:在检测到指定设备存在路由故障时,依据网络结构图按照预设规则选择目标切换设备;Step S106: When detecting that there is a routing fault in the designated device, selecting the target switching device according to the preset rule according to the network structure diagram;
步骤S108:执行指定设备到目标设备的路由切换。Step S108: Perform route switching of the specified device to the target device.
通过本实施例,采用获取指定网络中所有设备的物理位置信息,依据该位置信息建立所有设备的网络结构图,当出现路由故障时,依据该网络结构图按照预设规则执行指定设备到目标设备的路由切换的方式,通过设备的物理位置信息来进行设备的路由切换,不需要维护复杂庞大的路由表,而且该方式的算法简单,解决了相关技术中网络系统中的设备在出现路由故障时,难以在较短时间里有效地恢复通讯网络的问题,从而在短时间内实现了路由的切换,保证了设备的通讯正常。In this embodiment, the physical location information of all the devices in the specified network is obtained, and the network structure diagram of all the devices is established according to the location information. When a route fault occurs, the specified device is executed according to the preset configuration rule to the target device according to the network structure diagram. The routing mode of the device is used to perform route switching of the device through the physical location information of the device. It is not necessary to maintain a complicated and large routing table, and the algorithm of the method is simple, and the device in the network system in the related art is in the event of a routing failure. It is difficult to effectively restore the problem of the communication network in a short period of time, thereby realizing the switching of the route in a short time, and ensuring the normal communication of the device.
在本实施例中,依据位置结构图按照预设规则选择目标切换设备的方式有多种,在本实施例的一个可选实施方式中可以通过如下方式来实现:依据位置结构图将与指定设备物理距离最短的设备作为目标切换设备。In this embodiment, there are multiple ways to select a target switching device according to a preset rule according to a preset structure. In an optional implementation manner of this embodiment, the method may be implemented as follows: The device with the shortest physical distance is used as the target switching device.
需要说明的是,上述根据物理位置信息选择距离最短的设备作为目标设备的方式只是本发明的一个可选实施方式,在实际情况中,如果需要切换两个设备之间的路由关系,但这两个设备之间并不是挨着,而且量设备之间的路由关系有多种,可以根据物理位置信息选择这个设备之间距离最短的路由关系进行路由的切换,也就是说可以根据实际需要,上述方式仅仅只是用来进行举例说明,并不构成本发明的限定。It should be noted that the manner of selecting the device with the shortest distance according to the physical location information as the target device is only an optional implementation manner of the present invention. In actual situations, if the routing relationship between the two devices needs to be switched, the two The devices are not squatting, and there are multiple routing relationships between the devices. The routing information can be switched according to the physical location information to select the shortest routing relationship between the devices, that is, according to actual needs, the above The method is merely illustrative and does not constitute a limitation of the invention.
对于本实施例涉及到的物理位置信息可以包括:坐标信息,当该物理位置信息为坐标信息时,获取指定网络中所有设备的物理位置信息的方式可以通过如下方式实现:从本地预先存储的历史记录中获取坐标信息。The physical location information related to the embodiment may include: coordinate information. When the physical location information is coordinate information, the manner of acquiring physical location information of all devices in the specified network may be implemented by: pre-storing history from the local Get coordinate information in the record.
而在本实施例的另一个可选实施方式中,在上述从本地预先存储的历史记录中获取坐标信息之前,本实施例的方法还可以包括:In another optional implementation manner of this embodiment, before the obtaining the coordinate information from the locally stored history record, the method in this embodiment may further include:
步骤S11:周期性获取指定网络中所有设备的坐标信息;Step S11: periodically acquire coordinate information of all devices in the specified network.
步骤S12:更新本地历史记录中存储的坐标信息。Step S12: Update the coordinate information stored in the local history record.
而在本实施例中,可选地,周期性获取指定网络中所有设备的坐标信息的设备可以是以下之一:全球定位系统GPS设备、北斗导航系统BDNS设备。当然该GPS设备和BDNS设备也只是举例说明,在实际的应用场景中可以选择其中之一,也可以选择其他能够进行位置定位的设备。In this embodiment, optionally, the device that periodically acquires coordinate information of all devices in the specified network may be one of the following: a global positioning system GPS device, and a Beidou navigation system BDNS device. Of course, the GPS device and the BDNS device are only examples. In the actual application scenario, one of them may be selected, or other devices capable of location positioning may be selected.
此外,在本实施例中还涉及到依据物理位置信息建立网络结构图的方法,该方法可以通过如下方式实现: In addition, in this embodiment, a method for establishing a network structure diagram according to physical location information is also involved, and the method can be implemented as follows:
步骤S21:根据坐标信息构建设备的路由连接关系,其中,路由连接关系用于指示设备之间的物理距离;Step S21: Build a routing connection relationship of the device according to the coordinate information, where the routing connection relationship is used to indicate a physical distance between the devices;
步骤S22:依据路由连接关系建立设备的网络结构图。Step S22: Establish a network structure diagram of the device according to the routing connection relationship.
在本实施例中还提供了一种路由的切换方法及装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a method and a device for switching a route are also provided. The device is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的设备的路由切换装置结构框图,如图2所示,该装置包括:第一获取模块22,设置为获取指定网络中所有设备的物理位置信息;建立模块24与第一获取模块22耦合连接,设置为依据物理位置信息建立网络结构图,其中该网络结构图用于反映所有设备之间的位置关系;选择模块26与建立模块24耦合连接,设置为在检测到指定设备存在路由故障时,依据位置结构图按照预设规则选择目标切换设备;切换模块28与选择模块26耦合连接,设置为执行指定设备到目标设备的路由切换。2 is a structural block diagram of a device for routing a device according to an embodiment of the present invention. As shown in FIG. 2, the device includes: a first acquiring module 22 configured to acquire physical location information of all devices in a specified network; The first obtaining module 22 is coupled and configured to establish a network structure diagram according to the physical location information, where the network structure diagram is used to reflect the location relationship between all the devices; the selection module 26 is coupled with the establishing module 24, and is configured to detect When the specified device has a routing fault, the target switching device is selected according to the preset rule according to the location structure map; the switching module 28 is coupled with the selecting module 26, and is configured to perform route switching between the specified device and the target device.
可选地,切换模块28还可以设置为依据位置结构图将与指定设备物理距离最短的设备作为目标切换设备。Optionally, the switching module 28 may also be configured to use the device having the shortest physical distance from the designated device as the target switching device according to the location structure map.
可选地,物理位置信息包括:坐标信息,第一获取模块22还设置为从本地预先存储的历史记录中获取坐标信息。Optionally, the physical location information includes: coordinate information, and the first obtaining module 22 is further configured to obtain coordinate information from a locally stored history record.
图3是根据本发明实施例的设备的路由切换装置的可选结构框图,如图3所示,该装置还包括:第二获取模块32,设置为周期性获取指定网络中所有设备的坐标信息;更新模块34与第二获取模块32和第一获取模块22耦合连接,设置为更新本地历史记录中存储的坐标信息。FIG. 3 is a block diagram showing an optional structure of a device for routing a device according to an embodiment of the present invention. As shown in FIG. 3, the device further includes: a second acquiring module 32, configured to periodically acquire coordinate information of all devices in the specified network. The update module 34 is coupled to the second acquisition module 32 and the first acquisition module 22 and is configured to update the coordinate information stored in the local history.
为了更好的对本发明进行说明,下面结合本发明的可选实施进行举例说明。In order to better illustrate the invention, the following description is exemplified in connection with alternative embodiments of the invention.
本可选实施例提供了一种通讯设备的路由切换装置,图4是根据本发明可选实施例的通讯设备的路由切换装置结构框图,如图4所示,该装置包括:位置定位模块42、状态检测模块44、信息采集模块46、路由切换模块48。The optional embodiment provides a routing switching device for a communication device. FIG. 4 is a structural block diagram of a routing switching device for a communication device according to an alternative embodiment of the present invention. As shown in FIG. 4, the device includes: a location locating module 42. The state detecting module 44, the information collecting module 46, and the route switching module 48.
在本可选实施例中在位置定位模块中设置有全球定位系统(Global Positioning System简称为GPS)来实现设备的定位功能,即通过位置定位模块获取通讯设备的位置坐标;状态检测模块设置为检测通讯设备的连接状态,在本实施例中该检测需要实时进行,才能有效及时地发现通讯设备的路由连接故障;信息采集模块设置为收集定位模块和状态检测模块两方面的信息,也就是当前设备和其周边设备的物理坐标,并 由此形成路由网络的位置结构图,以及通讯设备的端口连接状态,判断设备的路由是否被破环;一旦路由中断,路由切换模块将切断现有的路由连接,切换至新的路由连接上去;路由切换模块设置为依据信息采集模块提供的通讯设备位置信息和状态检测模块提供的路由连接状态进行切换。路由切换并不是运行基于路由表的软件算法而选择新的连接,而是根据相邻通讯设备的物理位置信息,选择最近通讯设备作为新的连接对象。In the optional embodiment, a global positioning system (GPS) is provided in the position locating module to implement the positioning function of the device, that is, the position coordinate of the communication device is obtained by the position locating module; the state detecting module is set to detect The connection state of the communication device, in this embodiment, the detection needs to be performed in real time, so as to effectively and timely discover the routing connection failure of the communication device; the information collection module is configured to collect information of the positioning module and the state detection module, that is, the current device. And the physical coordinates of its peripherals, and The location structure map of the routing network and the port connection status of the communication device are determined to determine whether the route of the device is broken. If the route is interrupted, the route switching module will cut off the existing routing connection and switch to the new routing connection. The route switching module is configured to switch according to the location information of the communication device provided by the information collection module and the route connection state provided by the state detection module. Route switching is not a software algorithm based on the routing table to select a new connection, but based on the physical location information of the neighboring communication device, the nearest communication device is selected as the new connection object.
现在随着网络结构日益复杂,路由表的条目数呈几何级数增加,这对路由切换的算法要求也越来越高。相关技术中的路由切换算法,是基于路由表的软件算法。软件算法的复杂程度的提高,一方面会导致算法存在一定的延迟,另一方面增加了路由切换的不确定性。尤其是在军事等应急系统中,当路由链路受到破环时,首要的需求就是快速有效地建立新的路由连接。基于路由表的软件切换算法难以满足应急系统中的需求。Now with the increasing complexity of the network structure, the number of entries in the routing table increases geometrically, which is increasingly required for routing switching algorithms. The routing switching algorithm in the related art is a software algorithm based on a routing table. The complexity of the software algorithm will lead to a certain delay of the algorithm on the one hand, and increase the uncertainty of the route switching on the other hand. Especially in military and other emergency systems, when the routing link is broken, the primary requirement is to establish a new routing connection quickly and efficiently. Software switching algorithms based on routing tables are difficult to meet the needs of emergency systems.
由上面的描述可见,本可选实施例的路由保护装置与相关技术中路由切换算法相比,具有如下的效果:1.本可选实施例不需要额外的设备;2.本可选实施例只需要维护简单的路由位置信息,不需要维护复杂庞大的路由表;3.本可选实施例算法简单,基于物理位置最近的路由算法,不需要查找复杂的路由表;4.本可选实施例响应快速,一旦通讯设备遭到破环,装置不需要进行繁琐的算法,就可以快速建立有效路由连接,从而满足了军事等对于路由稳定性和及时性要求较高的领域。As can be seen from the above description, the route protection device of the present embodiment has the following effects as compared with the route switching algorithm in the related art: 1. The optional embodiment does not require an additional device; 2. The optional embodiment Only need to maintain simple routing location information, and do not need to maintain a complicated and large routing table. 3. The optional algorithm is simple, based on the routing algorithm with the closest physical location, and does not need to find a complicated routing table. 4. Optional implementation The response is fast, and once the communication device is broken, the device does not need to carry out cumbersome algorithms, and can quickly establish an effective routing connection, thereby satisfying the military and other fields requiring high routing stability and timeliness.
下面将结合附图依据具体实施例对本可选实施例的技术方案进行完整、清楚的描述。本可选实施例所涉及的技术方案以路由器为主体,依据各通讯设备的物理位置信息,在路由链路遭到破环的情况下,快速进行路由切换。The technical solutions of the alternative embodiments will be completely and clearly described in the following with reference to the specific embodiments. The technical solution involved in the optional embodiment is based on the router, and according to the physical location information of each communication device, the routing switch is quickly performed when the routing link is broken.
实施例一 Embodiment 1
图5是根据本发明可选实施例的通讯设备的初始化路由切换方法流程图,如图5所示,该方法包括:FIG. 5 is a flowchart of a method for initializing route switching of a communication device according to an alternative embodiment of the present invention. As shown in FIG. 5, the method includes:
步骤S502:位置定位模块依据GPS设备,获取本路由网路中所有通讯设备的位置坐标;Step S502: The location locating module acquires location coordinates of all communication devices in the routing network according to the GPS device.
步骤S504:信息采集模块通过获取通讯设备的位置坐标,形成网络结构图;Step S504: The information collection module forms a network structure diagram by acquiring location coordinates of the communication device.
步骤S506:路由切换模块根据信息采集模块提供的通讯设备位置坐标,在物理距离最近的两个通讯设备之间初始化路由连接。Step S506: The route switching module initializes a routing connection between two communication devices with the closest physical distance according to the location coordinates of the communication device provided by the information collecting module.
图6是根据本发明可选实施例的通讯设备的路由切换方法流程图一,如图6所示,该方法包括: FIG. 6 is a flowchart 1 of a method for routing a communication device according to an alternative embodiment of the present invention. As shown in FIG. 6, the method includes:
步骤S602:获取路由设备的位置坐标;Step S602: Obtain location coordinates of the routing device.
其中,位置定位模块依据GPS设备,获取本路由网路中通讯设备的位置坐标;Wherein, the location locating module acquires the location coordinates of the communication device in the routing network according to the GPS device;
步骤S604:实时检测连接状态和位置状态;Step S604: detecting the connection state and the location state in real time;
其中状态检测模块实时检测通讯设备的位置更新情况,状态检测模块同时检测通讯设备的连接状态,这是本可选实施例中进行路由切换的依据;The status detection module detects the location update status of the communication device in real time, and the status detection module detects the connection status of the communication device at the same time, which is the basis for routing switching in the optional embodiment;
步骤S606:判断状态是否有变化;Step S606: determining whether the state changes;
信息采集模块一方面通过获取通讯设备的位置坐标,形成网络结构图,一方面根据通讯设备的连接状态,判断是否需要进行切换;一旦某一条链路发生中断,则执行步骤S608;On the one hand, the information acquisition module obtains the network structure map by acquiring the position coordinates of the communication device, and determines whether the switch needs to be switched according to the connection state of the communication device; and if a link is interrupted, step S608 is performed;
步骤S608:以物理距离最短为条件建立新的连接;Step S608: establishing a new connection on the condition that the physical distance is the shortest;
其中,一旦路由链路发生中断,路由切换模块开始工作;该模块根据信息采集模块提供的通讯设备位置坐标,将中断的路由切换至与本通讯设备物理距离最短的通讯设备。The routing switch module starts to work once the routing link is interrupted; the module switches the interrupted route to the communication device with the shortest physical distance from the communication device according to the location coordinates of the communication device provided by the information collection module.
图7是根据本发明可选实施例的通讯设备的路由切换方法流程图二,如图7所示,该装置,该方法包括:FIG. 7 is a second flowchart of a method for routing a communication device according to an alternative embodiment of the present invention. As shown in FIG. 7, the device includes:
步骤S702:获取路由设备的位置坐标;Step S702: Obtain location coordinates of the routing device.
其中,位置定位模块依据GPS设备,获取本路由网路中通讯设备的位置坐标;Wherein, the location locating module acquires the location coordinates of the communication device in the routing network according to the GPS device;
步骤S704:以物理距离最短为条件建立新的备份连接;Step S704: Establish a new backup connection on the condition that the physical distance is the shortest;
其中,信息采集模块根据位置定位模块提供的通讯设备位置坐标,建立与本通讯设备物理最短路径的链路;The information collection module establishes a link with the physical shortest path of the communication device according to the location coordinates of the communication device provided by the location positioning module;
步骤S706:判断原来链路状态是否有变化;Step S706: determining whether the original link status changes;
其中,状态检测模块实时检测链路的连接状态,判断是否需要进行切换。一旦某一条链路发生中断,则执行步骤S708;The state detecting module detects the connection state of the link in real time and determines whether switching is needed. Once a link is interrupted, step S708 is performed;
步骤S708:启用备份连接;Step S708: Enable a backup connection;
其中,根据步骤2中建立的最短路由进行路由切换。Wherein, the routing is switched according to the shortest path established in step 2.
实施例二 Embodiment 2
图8是根据本发明可选实施例的路由网络的结构示意图,如图8所示,整个网络 含有六台通讯设备的路由,所有的设备都需要通过根路由和外界通信。此外,除了路由5以外,其余5台设备都是原存在的设备,路由5是后期加入的设备。根路由是整个网络对外通信的唯一途径。FIG. 8 is a schematic structural diagram of a routing network according to an alternative embodiment of the present invention, as shown in FIG. A route containing six communication devices, all of which need to communicate with the outside world through root routing. In addition, except for route 5, the remaining 5 devices are all existing devices, and route 5 is a device that is added later. Root routing is the only way for the entire network to communicate externally.
应用场景一:路由网络的建立。在应急系统中,当设备遭到破坏,需要迅速地引入新的通讯设备路由并建立通讯连接,路由1至路由4一共4台设备根据网络物理位置建立路由连接,这就是网络连接的初始化。路由1,路由2与根路由的距离都为2个单元,它们直接与根路由连接,这样与根路由物理距离最近设备完成了初始化。路由3可以选择路由1或路由2任意一个建立连接,这样路由3和根路由的物理距离最短,假设最终路由3和路由1建立连接。路由4建立与路由3的连接,虽然路由4通过路由2连接根路由的跳数最小,但是根据物理距离最近的原则,路由4建立与路由3的连接。由此可以看出,新的路由网络初始化的过程也就是从根路由出发不断向外扩张的过程,不需要复杂的软件算法,只需要通讯设备的物理位置。Application scenario 1: The establishment of a routing network. In the emergency system, when the device is damaged, it is necessary to quickly introduce a new communication device route and establish a communication connection. A total of 4 devices from route 1 to route 4 establish a routing connection according to the physical location of the network, which is the initialization of the network connection. Route 1, route 2 and the root route are both 2 units, they are directly connected to the root route, so that the device is initialized closest to the physical distance of the root route. Route 3 can select either route 1 or route 2 to establish a connection, so that the physical distance between route 3 and the root route is the shortest, assuming that the final route 3 and route 1 establish a connection. Route 4 establishes a connection with Route 3. Although Route 4 has the smallest number of hops for connecting the root route through Route 2, Route 4 establishes a connection with Route 3 according to the principle of the closest physical distance. It can be seen that the process of initializing the new routing network is a process of continuously expanding from the root route, without complicated software algorithms, and only requires the physical location of the communication device.
应用场景二:新的通讯设备路由的引入。现有的网络需要新加入路由5,按照最短距离算法,路由5直接与路由4建立初始连接。如果按照通常软件算法中的路由最小跳数原则,路由5需要知道网络中其余路由的连接情况,建立与路由1的连接,这样路由5至根路由的跳数最小。这种复杂的软件算法,需要知道整个网络的连接状况。而运用本可选实施例涉及的方法,路由5通过直接与路由4建立连接,就可以快速地加入现有网络。Application scenario 2: Introduction of new communication device routing. The existing network needs to newly join route 5. According to the shortest distance algorithm, route 5 directly establishes an initial connection with route 4. According to the principle of minimum hops of routes in the usual software algorithm, route 5 needs to know the connection status of the remaining routes in the network, and establish a connection with route 1, so that the number of hops of route 5 to the root route is the smallest. This complex software algorithm needs to know the connection status of the entire network. With the method involved in the alternative embodiment, the route 5 can quickly join the existing network by establishing a connection directly with the route 4.
应用场景三:网络中路由连接遭到破坏。路由3与路由1之间的连接中断。路由3、路由4、路由5无法和根路由通讯,但是它们之间仍可以相互通讯。当前路由2是离它们最近的路由,路由3和路由2之间的建立连接,路由4和路由5不需要做任何工作,即可恢复整个网络。这种以最短物理距离为依据的路由算法,快速有效地保证网络的通畅。Application scenario 3: The routing connection in the network is damaged. The connection between Route 3 and Route 1 is broken. Route 3, Route 4, and Route 5 cannot communicate with the root route, but they can still communicate with each other. The current route 2 is the route closest to them, the established connection between route 3 and route 2, and route 4 and route 5 do not need to do any work to recover the entire network. This routing algorithm based on the shortest physical distance ensures fast and efficient network connectivity.
在军事等对于路由切换时间要求较高的领域,采用本可选实施例中的路由切换方法,可以快速可靠地建立新的路由连接。与相关技术中的基于路由表的设备相比,本设备消耗的资源大大减少,同时算法简单,具有一定的优越性。在构建路由网络时,采用本可选实施例中的装置,取代传统的路由保护装置,可以降低路由保护成本,提高路由建立切换的效率。In the field where the military and the like have high requirements on the route switching time, the route switching method in the alternative embodiment can be used to establish a new routing connection quickly and reliably. Compared with the routing table-based device in the related art, the resources consumed by the device are greatly reduced, and the algorithm is simple and has certain advantages. When the routing network is constructed, the device in the alternative embodiment is used instead of the traditional routing protection device, which can reduce the cost of routing protection and improve the efficiency of routing establishment switching.
以上仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above is only an alternative embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
本发明实施例提供的上述技术方案,应用于路由切换过程中,在该过程中采用获取指定网络中所有设备的物理位置信息,依据该位置信息建立所有设备的网络结构图,当出现路由故障时,依据该网络结构图按照预设规则执行指定设备到目标设备的路由切换的方式,通过设备的物理位置信息来进行设备的路由切换,不需要维护复杂庞大的路由表,而且该方式的算法简单,解决了相关技术中网络系统中的设备在出现路由故障时,难以在较短时间里有效地恢复通讯网络的问题,从而在短时间内实现了路由的切换,保证了设备的通讯正常。 The foregoing technical solution provided by the embodiment of the present invention is applied to a route switching process, in which physical location information of all devices in a specified network is obtained, and a network structure diagram of all devices is established according to the location information, when a routing fault occurs. According to the network structure diagram, the route switching of the specified device to the target device is performed according to the preset rule, and the device routing is performed through the physical location information of the device, and the complicated and large routing table is not required to be maintained, and the algorithm of the method is simple. The invention solves the problem that the device in the network system in the related technology is difficult to effectively restore the communication network in a short time when a routing failure occurs, thereby realizing the switching of the route in a short time and ensuring the normal communication of the device.

Claims (10)

  1. 一种设备的路由切换方法,包括:A method for routing a device, including:
    获取指定网络中所有设备的物理位置信息;Get physical location information of all devices in the specified network;
    依据所述物理位置信息建立所述网络结构图,其中该网络结构图用于反映所述所有设备之间的位置关系;Establishing, according to the physical location information, the network structure diagram, where the network structure diagram is used to reflect a location relationship between all the devices;
    在检测到指定设备存在路由故障时,依据所述网络结构图按照预设规则选择目标切换设备;When detecting that there is a routing fault in the specified device, selecting the target switching device according to the preset rule according to the network structure diagram;
    执行所述指定设备到所述目标设备的路由切换。Performing a route switch of the specified device to the target device.
  2. 根据权利要求1所述的方法,其中,依据所述位置结构图按照预设规则选择目标切换设备包括:The method according to claim 1, wherein selecting the target switching device according to the preset rule according to the location structure map comprises:
    依据所述位置结构图将与所述指定设备物理距离最短的设备作为所述目标切换设备。A device having the shortest physical distance from the specified device is used as the target switching device according to the location structure map.
  3. 根据权利要求1所述的方法,其中,所述物理位置信息包括:坐标信息,获取指定网络中所有设备的物理位置信息包括:The method according to claim 1, wherein the physical location information comprises: coordinate information, and acquiring physical location information of all devices in the specified network includes:
    从本地预先存储的历史记录中获取所述坐标信息。The coordinate information is obtained from a locally pre-stored history record.
  4. 根据权利要求3所述的方法,其中,在从本地预先存储的历史记录中获取所述坐标信息之前包括:The method of claim 3, wherein before obtaining the coordinate information from a locally stored history record, comprises:
    周期性获取所述指定网络中所有设备的坐标信息;Periodically obtaining coordinate information of all devices in the specified network;
    更新本地历史记录中存储的坐标信息。Update the coordinate information stored in the local history.
  5. 根据权利要求4所述的方法,其中,周期性获取所述指定网络中所有设备的坐标信息的设备包括以下之一:The method according to claim 4, wherein the means for periodically acquiring the coordinate information of all devices in the specified network comprises one of the following:
    全球定位系统GPS设备、北斗导航系统BDNS设备。Global Positioning System GPS equipment, Beidou navigation system BDNS equipment.
  6. 根据权利要求3所述的方法,其中,依据所述物理位置信息建立所述网络结构图包括:The method according to claim 3, wherein the establishing the network structure map according to the physical location information comprises:
    根据所述坐标信息构建所述设备的路由连接关系,其中,所述路由连接关系用于指示所述设备之间的物理距离;Establishing a routing connection relationship of the device according to the coordinate information, where the routing connection relationship is used to indicate a physical distance between the devices;
    依据所述路由连接关系建立所述设备的网络结构图。Establishing a network structure diagram of the device according to the routing connection relationship.
  7. 一种设备的路由切换装置,包括: A device routing switching device includes:
    第一获取模块,设置为获取指定网络中所有设备的物理位置信息;a first acquiring module, configured to acquire physical location information of all devices in the specified network;
    建立模块,设置为依据所述物理位置信息建立所述网络结构图,其中该网络结构图设置为反映所述所有设备之间的位置关系;Establishing a module, configured to establish the network structure diagram according to the physical location information, where the network structure diagram is set to reflect a location relationship between all the devices;
    选择模块,设置为在检测到指定设备存在路由故障时,依据所述位置结构图按照预设规则选择目标切换设备;Selecting a module, configured to select a target switching device according to the preset rule according to the location structure diagram when detecting that there is a routing fault in the specified device;
    切换模块,设置为执行所述指定设备到所述目标设备的路由切换。And a switching module configured to perform routing switching of the specified device to the target device.
  8. 根据权利要求7所述的装置,其中,所述切换模块还设置为,依据所述位置结构图将与所述指定设备物理距离最短的设备作为所述目标切换设备。The apparatus according to claim 7, wherein the switching module is further configured to use, as the target switching device, a device having the shortest physical distance from the designated device according to the location structure map.
  9. 根据权利要求7所述的装置,其中,所述物理位置信息包括:坐标信息,所述第一获取模块还设置为,从本地预先存储的历史记录中获取所述坐标信息。The apparatus according to claim 7, wherein the physical location information comprises: coordinate information, and the first obtaining module is further configured to acquire the coordinate information from a locally pre-stored history record.
  10. 根据权利要求9所述的装置,其中,所述装置还包括:The apparatus of claim 9 wherein said apparatus further comprises:
    第二获取模块,设置为周期性获取所述指定网络中所有设备的坐标信息;a second acquiring module, configured to periodically acquire coordinate information of all devices in the specified network;
    更新模块,设置为更新本地历史记录中存储的坐标信息。 Update module, set to update the coordinate information stored in the local history.
PCT/CN2015/097032 2014-12-12 2015-12-10 Route switching method and apparatus of device WO2016091190A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410767944.1 2014-12-12
CN201410767944.1A CN105743785B (en) 2014-12-12 2014-12-12 The route switching method and device of equipment

Publications (1)

Publication Number Publication Date
WO2016091190A1 true WO2016091190A1 (en) 2016-06-16

Family

ID=56106733

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/097032 WO2016091190A1 (en) 2014-12-12 2015-12-10 Route switching method and apparatus of device

Country Status (2)

Country Link
CN (1) CN105743785B (en)
WO (1) WO2016091190A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070047436A1 (en) * 2005-08-24 2007-03-01 Masaya Arai Network relay device and control method
CN101197591A (en) * 2008-01-02 2008-06-11 中兴通讯股份有限公司 Protection recovery method and apparatus for ASON
CN103179032A (en) * 2011-12-20 2013-06-26 华为技术有限公司 Method and device for route backup
WO2014149600A1 (en) * 2013-03-15 2014-09-25 Cisco Technology, Inc. Providing a backup network topology without serviece disruption
CN104093166A (en) * 2014-07-08 2014-10-08 南京信息工程大学 Wireless sensor network connection recovery method based on minimum movement of nodes

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6937569B1 (en) * 2001-05-21 2005-08-30 Cisco Technology, Inc. Method and system for determining a relative position of a device on a network
DE10147748A1 (en) * 2001-09-27 2003-04-17 Siemens Ag Method and device for adapting label-switched paths in packet networks
CN1738286B (en) * 2004-08-18 2011-06-22 华为技术有限公司 Method for realizing heavy route in IP network
KR100693052B1 (en) * 2005-01-14 2007-03-12 삼성전자주식회사 Apparatus and method of fast reroute for mpls multicast
KR100765320B1 (en) * 2005-09-14 2007-10-09 삼성전자주식회사 MPLS Network and Method for Applying Mobile IP to MPLS Network
JP6217138B2 (en) * 2013-05-22 2017-10-25 富士通株式会社 Packet transfer apparatus and packet transfer method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070047436A1 (en) * 2005-08-24 2007-03-01 Masaya Arai Network relay device and control method
CN101197591A (en) * 2008-01-02 2008-06-11 中兴通讯股份有限公司 Protection recovery method and apparatus for ASON
CN103179032A (en) * 2011-12-20 2013-06-26 华为技术有限公司 Method and device for route backup
WO2014149600A1 (en) * 2013-03-15 2014-09-25 Cisco Technology, Inc. Providing a backup network topology without serviece disruption
CN104093166A (en) * 2014-07-08 2014-10-08 南京信息工程大学 Wireless sensor network connection recovery method based on minimum movement of nodes

Also Published As

Publication number Publication date
CN105743785A (en) 2016-07-06
CN105743785B (en) 2019-09-10

Similar Documents

Publication Publication Date Title
KR102118687B1 (en) A method operating of a controller and a switch to resolve network error, and the controller and the switch therefor
US9049131B2 (en) Network system and load balancing method
US8897141B2 (en) Network system and routing method
CN103782544B (en) Method and device for notifying network operator when virtual addresses do not match on network elements configured for interchassis redundancy
US20120057518A1 (en) Bluetooth networking
US10630592B2 (en) Routing method, related device, and system
EP2696542A1 (en) Method, ToR switch, and system for implementing protection switchover based on TRILL network
KR20150051107A (en) Method for fast flow path setup and failure recovery
US9288075B2 (en) Method and system for auto-configuration, and network node
CN105472049B (en) CGN backup protection method and device for carrier-grade network address conversion
CN104869057A (en) OpeFlow switch graceful restart processing method, device and OpeFlow controller
US9313090B2 (en) Tunnel fault detection method and traffic engineering node
JP6508051B2 (en) Communication control apparatus, communication control system, communication control method and communication control program
CN101989953A (en) Method and equipment for sending bidirectional forwarding detection message
CN104486214B (en) The method and apparatus for realizing the quick heavy-routes of RIP
CN105530115A (en) Method and device for realizing operation management and maintenance function
CN104539462A (en) Method and device for switching disaster recovery application example
CN104602285B (en) A kind of disaster recovery method and equipment
CN103312579B (en) Circuit switching method and device
WO2014048126A1 (en) Service traffic protection method and apparatus
CN104717143A (en) Method and equipment for many-one reducibility scene multicast data transmission
WO2016091190A1 (en) Route switching method and apparatus of device
CN102316029B (en) Fast rerouting method and routing equipment
CN102065512A (en) Method for controlling regional boundary, and method and system for establishing connection in multilayer network
CN110213069B (en) Data forwarding method and device, disaster recovery system and storage medium

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

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

Country of ref document: EP

Kind code of ref document: A1