CN104579725A - Traversal search method and device for routes - Google Patents

Traversal search method and device for routes Download PDF

Info

Publication number
CN104579725A
CN104579725A CN201310482907.1A CN201310482907A CN104579725A CN 104579725 A CN104579725 A CN 104579725A CN 201310482907 A CN201310482907 A CN 201310482907A CN 104579725 A CN104579725 A CN 104579725A
Authority
CN
China
Prior art keywords
search
starting point
depth
route
degree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310482907.1A
Other languages
Chinese (zh)
Other versions
CN104579725B (en
Inventor
周泉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Group Jiangsu Co Ltd
Original Assignee
China Mobile Group Jiangsu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Group Jiangsu Co Ltd filed Critical China Mobile Group Jiangsu Co Ltd
Priority to CN201310482907.1A priority Critical patent/CN104579725B/en
Publication of CN104579725A publication Critical patent/CN104579725A/en
Application granted granted Critical
Publication of CN104579725B publication Critical patent/CN104579725B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a traversal search method and device for routes. The method comprises steps as follows: searching a first route associated with a starting point and a second route associated with a terminating point; comparing a tail node of the first route associated with the starting point and a tail node of the second route associated with the terminating point; when the tail node of the first route associated with the starting point is identical with the tail node of the second route associated with the terminating point, combining the first route associated with the starting point and the second route associated with the terminating point to form a route from the starting point to the terminating point.

Description

A kind of route traversal search method and device
Technical field
The present invention relates to network management technology field, particularly relate to a kind of route traversal search method and device.
Background technology
When common carrier opens private line service for industry customer, need, for client allocates the path of an optical fiber, to be realized the information communication of client's point-to-point by optical fiber.In the allocation process of optical fibre channel, need the type according to optical fiber, all routes of traversal search must be carried out through the degree of depth in point, path, select wherein one by operator specialized network administrative staff.Current is set out by single-point to the traversal search method of light path route, travels through all routes by the algorithm of breadth First or depth-first.
Existing scheme mainly constructs the non-directed graph of the abstract formation of fiber cable network in internal memory, to this non-directed graph based on the optimum route search algorithm of static state as the search such as dijkstra's algorithm, A* algorithm, Floyd algorithm route, the shortcoming of existing scheme is that the non-directed graph structure when network size is huge in internal memory is also huger, high to request memory, algorithm performance is low, and search speed is slow.
Summary of the invention
In order to solve, route search speed in prior art is slow, the technical problem of degraded performance, and the present invention proposes a kind of route traversal search method and device.
One aspect of the present invention, provides a kind of route traversal search method, comprising:
Search for the first via that associates with starting point by and the secondary route that associates with terminating point;
The relatively described first via associated with starting point by the tail node of tail node and the described secondary route associated with terminating point;
When described with the first via that starting point associates by tail node identical with the tail node of the described secondary route associated with terminating point time, form the route from starting point to terminating point after the described first via associated with starting point being combined by the secondary route associated with terminating point.
Another aspect of the present invention, provides a kind of route traversal search device, comprising:
Search module, for search for the first via that associates with starting point by and the secondary route that associates with terminating point;
Comparison module, for the relatively described first via associated with starting point by the tail node of tail node and the described secondary route associated with terminating point;
Composite module, for when described with the first via that starting point associates by tail node identical with the tail node of the described secondary route associated with terminating point time, form the route from starting point to terminating point after the described first via associated with starting point being combined by the secondary route associated with terminating point.
Route traversal search method of the present invention and device, carry out by starting point and ending point the mode that bidirectional search path remerges, from starting point and ending point simultaneously traversal, the number of plies summation of traversal is n.Then check in two traversing result whether have identical node, the time complexity of route search, for reducing, can travel through all routes faster, improve the response speed of service fulfillment.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of route traversal search embodiment of the method for the present invention;
Fig. 2 is the schematic flow sheet of another embodiment of route traversal search method of the present invention;
Fig. 3 is the structural representation of route traversal search device embodiment of the present invention;
Fig. 4 is the structural representation of search module of the present invention.
Embodiment
The embodiment of the present invention is passed through from starting point and ending point bidirectional research route, then carries out the mode of matched routings, make use of the concurrent processing ability of computer, greatly improves the efficiency of search, reduces the time cost that search needs cost.Below in conjunction with accompanying drawing, the present invention is described in detail.
As shown in Figure 1, the embodiment of the present invention provides a kind of route traversal search method, comprises the following steps:
Step 101, search for the first via that associates with starting point by and the secondary route that associates with terminating point;
Step 102, compare the first via that associates with starting point by tail node and the tail node of secondary route that associates with terminating point;
Step 103, when with the first via that starting point associates by tail node identical with the tail node of secondary route that associates with terminating point time, form the route from starting point to terminating point after the first via associated with starting point being combined by the secondary route associated with terminating point.
In step 101, the first via that search associates with starting point is by comprising:
Search for the first specified circuit by first via initial with starting point all under the degree of depth by, the first specified circuit is by degree of depth i=1, and 2,3... (n+1)/2, wherein, n is the maximum route degree of depth.
Search for the first via that associates with starting point by also comprising: for the first via by the first via initial with starting point under the degree of depth by, search the first via by tail node, search all limits (" limit " refers to the line being connected two nodes, i.e. optical cable segment) associated with tail node; By on limit but not the first via by node join the first via by, obtain the first via by the first via initial with starting point under the degree of depth by.
In step 101, search for the secondary route associated with terminating point and comprise:
Search for the second specified circuit by secondary routes initial with starting point all under the degree of depth, the second specified circuit is by degree of depth j=n, n-1, n-2...n/2, and wherein, n is the maximum route degree of depth.
Search for the secondary route associated with terminating point also to comprise: for the secondary route initial with terminating point under the secondary route degree of depth, search the tail node of secondary route, search all limits associated with tail node; Node on limit but not on secondary route is joined secondary route, secondary route initial with terminating point under obtaining the secondary route degree of depth.
Describe the route traversal search method of the embodiment of the present invention below in detail with concrete example, as shown in Figure 2, the method comprises the following steps:
Step 201, puts into all set of paths startPathss initial with StartNode by starting point startNode;
Step 202, puts into all set of paths endPathss initial with EndNode by terminating point endNode;
Step 203, with the first via by degree of depth i=1,2,3... (n+1)/2 searches for all route Paths initial with StartNode and gathers;
Step 203a, as i=1, takes out startNode from startPaths, otherwise takes out the Path that in startPaths, all i-1 search in turn;
Step 203b, searches the tail node of this Path, searches all limit Edge be associated with this tail node;
Step 203c, searches the head and the tail node be associated with this Edge;
Step 203d, the node by this Edge but not on former Path joins on Path;
Step 203e, is added to this Path in startPaths, thus all Path be associated with startNode under obtaining the current route degree of depth;
Step 204, with secondary route degree of depth j=n, n-1, n-2...n/2 search for all Paths initial with EndNode and gather;
Step 204a, as j=n, takes out endNode from endPaths, otherwise takes out the Path that in endPaths, all j-1 search in turn;
Step 204b, searches last node of this Path, searches all Edge be associated with this node;
Step 204c, searches the head and the tail node be associated with this Edge;
Step 204d, joins on Path by this Edge and the node not on former Path;
Step 204e, is added in endPaths by this Path; Thus all Path be associated with endNode under obtaining current depth;
Step 205, from all startPaths be associated with startNode, takes out a Path1
Step 206, from all endPaths be associated with endNode, takes out a Path2;
Step 207, with last node of above-mentioned taken out Path1 compared with last node in Path2, if two nodes are identical, then think that Path1 and Path2 can form a route, then algorithm terminates;
Step 208, if two nodes are not identical, then takes out next Path, compared with Path1 from endPahts;
Step 209, if all Path and Path1 do not have identical node in endPaths, then takes out next Path from startPaths, repeats step 206-209.
Existing scheme such as adopts dijkstra's algorithm, and travel through from starting point, route extreme saturation n layer as requested, then go to compare in this n layer whether comprise terminating point, time complexity is O(2 n).
In the present embodiment, carry out by starting point and ending point the mode that bidirectional search path remerges, from starting point and ending point simultaneously traversal, starting point traversal adds one deck, and then terminating point traversal adds one deck, and the number of plies summation of traversal is n.Then check in two traversing result whether have identical node, time complexity is O as can be seen here, the routing search method time complexity of the present embodiment greatly reduces.
The method of the present embodiment, by from starting point and ending point bidirectional research route, then carries out the mode of matched routings, make use of the concurrent processing ability of computer, greatly improve the efficiency of search, reduces the time cost that search needs cost.
As shown in Figure 3, the embodiment of the present invention also provides a kind of route traversal search device, comprising:
Search module 31, for search for the first via that associates with starting point by and the secondary route that associates with terminating point;
Comparison module 32, for the relatively described first via associated with starting point by the tail node of tail node and the described secondary route associated with terminating point;
Composite module 33, for when described with the first via that starting point associates by tail node identical with the tail node of the described secondary route associated with terminating point time, form the route from starting point to terminating point after the described first via associated with starting point being combined by the secondary route associated with terminating point.
As shown in Figure 4, search module 31 comprises: first search submodule 311, for search for the first specified circuit by first via initial with starting point all under the degree of depth by, described first specified circuit by degree of depth i=1,2,3... (n+1)/2, wherein, n is the maximum route degree of depth.
First search submodule 311, also for for the first via by the first via initial with starting point under the degree of depth by, search the described first via by tail node, search all limits associated with described tail node; By on described limit but not the described first via by node join the described first via by, obtain the first via by the first via initial with described starting point under the degree of depth by.
As shown in Figure 4, search module 31 comprises: the second search submodule 312, for searching for the second specified circuit by secondary routes initial with starting point all under the degree of depth, described second specified circuit is by degree of depth j=n, n-1, n-2...n/2, and wherein, n is the maximum route degree of depth.
Second search submodule 312, for for the secondary route initial with terminating point under the secondary route degree of depth, searches the tail node of described secondary route, searches all limits associated with described tail node; Node on described limit but not on described secondary route is joined described secondary route, secondary route initial with described terminating point under obtaining the secondary route degree of depth.
The device of the present embodiment, carries out by starting point and ending point the mode that bidirectional search path remerges, from starting point and ending point simultaneously traversal, the number of plies summation of traversal is n.Then check in two traversing result whether have identical node, the time complexity of route search, for reducing, can travel through all routes faster, improve the response speed of service fulfillment.
It is noted that above embodiment is only in order to illustrate the present invention and unrestricted, the present invention is also not limited in above-mentioned citing, and all do not depart from technical scheme and the improvement thereof of the spirit and scope of the present invention, and it all should be encompassed in right of the present invention.

Claims (10)

1. a route traversal search method, is characterized in that, comprising:
Search for the first via that associates with starting point by and the secondary route that associates with terminating point;
The relatively described first via associated with starting point by the tail node of tail node and the described secondary route associated with terminating point;
When described with the first via that starting point associates by tail node identical with the tail node of the described secondary route associated with terminating point time, form the route from starting point to terminating point after the described first via associated with starting point being combined by the secondary route associated with terminating point.
2. method according to claim 1, is characterized in that, the first via that described search associates with starting point is by comprising:
Search for the first specified circuit by first via initial with starting point all under the degree of depth by, described first specified circuit is by degree of depth i=1, and 2,3... (n+1)/2, wherein, n is the maximum route degree of depth.
3. method according to claim 2, is characterized in that, the first via that described search associates with starting point is by also comprising:
For the first via by the first via initial with starting point under the degree of depth by, search the described first via by tail node, search all limits associated with described tail node;
By on described limit but not the described first via by node join the described first via by, obtain the first via by the first via initial with described starting point under the degree of depth by.
4. method according to claim 1, is characterized in that, the secondary route that described search associates with terminating point comprises:
Search for the second specified circuit by secondary routes initial with starting point all under the degree of depth, described second specified circuit is by degree of depth j=n, n-1, n-2...n/2, and wherein, n is the maximum route degree of depth.
5. method according to claim 4, is characterized in that, the secondary route that described search associates with terminating point also comprises:
For the secondary route initial with terminating point under the secondary route degree of depth, search the tail node of described secondary route, search all limits associated with described tail node;
Node on described limit but not on described secondary route is joined described secondary route, secondary route initial with described terminating point under obtaining the secondary route degree of depth.
6. a route traversal search device, is characterized in that, comprising:
Search module, for search for the first via that associates with starting point by and the secondary route that associates with terminating point;
Comparison module, for the relatively described first via associated with starting point by the tail node of tail node and the described secondary route associated with terminating point;
Composite module, for when described with the first via that starting point associates by tail node identical with the tail node of the described secondary route associated with terminating point time, form the route from starting point to terminating point after the described first via associated with starting point being combined by the secondary route associated with terminating point.
7. device according to claim 6, it is characterized in that, described search module comprises: the first search submodule, for search for the first specified circuit by first via initial with starting point all under the degree of depth by, described first specified circuit by degree of depth i=1,2,3... (n+1)/2, wherein, n is the maximum route degree of depth.
8. device according to claim 7, it is characterized in that, described first search submodule, also for for the first via by the first via initial with starting point under the degree of depth by, search the described first via by tail node, search all limits associated with described tail node; By on described limit but not the described first via by node join the described first via by, obtain the first via by the first via initial with described starting point under the degree of depth by.
9. device according to claim 6, it is characterized in that, described search module comprises: the second search submodule, for searching for the second specified circuit by secondary routes initial with starting point all under the degree of depth, described second specified circuit is by degree of depth j=n, n-1, n-2...n/2, wherein, n is the maximum route degree of depth.
10. device according to claim 9, is characterized in that, described second search submodule, for for the secondary route initial with terminating point under the secondary route degree of depth, searches the tail node of described secondary route, search all limits associated with described tail node; Node on described limit but not on described secondary route is joined described secondary route, secondary route initial with described terminating point under obtaining the secondary route degree of depth.
CN201310482907.1A 2013-10-15 2013-10-15 One kind route traversal search method and device Active CN104579725B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310482907.1A CN104579725B (en) 2013-10-15 2013-10-15 One kind route traversal search method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310482907.1A CN104579725B (en) 2013-10-15 2013-10-15 One kind route traversal search method and device

Publications (2)

Publication Number Publication Date
CN104579725A true CN104579725A (en) 2015-04-29
CN104579725B CN104579725B (en) 2018-03-23

Family

ID=53094999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310482907.1A Active CN104579725B (en) 2013-10-15 2013-10-15 One kind route traversal search method and device

Country Status (1)

Country Link
CN (1) CN104579725B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109194578A (en) * 2018-10-29 2019-01-11 中国联合网络通信集团有限公司 A kind of activating method and device of private line service
CN109344208A (en) * 2018-08-14 2019-02-15 北京奇虎科技有限公司 Path query method, apparatus and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1273005A (en) * 1997-09-30 2000-11-08 西门子公司 Method for route searching in telecommunication networks
CN101572647A (en) * 2008-04-30 2009-11-04 华为技术有限公司 Method and device for searching data
CN101924697A (en) * 2010-06-30 2010-12-22 北京科技大学 Two-way startup recovery method based on link back backtracking strategy
US20120230199A1 (en) * 2007-12-26 2012-09-13 Rockstar Bidco Lp Tie-breaking in shortest path determination

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1273005A (en) * 1997-09-30 2000-11-08 西门子公司 Method for route searching in telecommunication networks
US20120230199A1 (en) * 2007-12-26 2012-09-13 Rockstar Bidco Lp Tie-breaking in shortest path determination
CN101572647A (en) * 2008-04-30 2009-11-04 华为技术有限公司 Method and device for searching data
CN101924697A (en) * 2010-06-30 2010-12-22 北京科技大学 Two-way startup recovery method based on link back backtracking strategy

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
戴伏生,刘功亮: "双向搜索多约束路由启发式计算方法", 《哈尔滨工业大学学报》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344208A (en) * 2018-08-14 2019-02-15 北京奇虎科技有限公司 Path query method, apparatus and electronic equipment
CN109194578A (en) * 2018-10-29 2019-01-11 中国联合网络通信集团有限公司 A kind of activating method and device of private line service
CN109194578B (en) * 2018-10-29 2020-12-15 中国联合网络通信集团有限公司 Method and device for opening private line service

Also Published As

Publication number Publication date
CN104579725B (en) 2018-03-23

Similar Documents

Publication Publication Date Title
WO2015058697A1 (en) Sdn packet forwarding
CN100566281C (en) The method and apparatus of virtual private network routing search
CN103344248B (en) Optimal path calculation method for vehicle navigation system
WO2014180228A1 (en) Grooming method and device for packet optical transport network
CN104579725A (en) Traversal search method and device for routes
CN101577844B (en) Wave division multiplexing (WDM) network path search method and system
CN108199893B (en) Configuration method and system for OTN transmission network photoelectric hybrid protection
CN108429681B (en) Source network element is to the multilayer shortest route method for searching and system between egress network element
CN101330344B (en) Method for protecting sub-path when single link is fault in a WDM network
CN106341187A (en) Communication flow request forwarding method in OTN and apparatus thereof
CN106027389A (en) P-cycle protection method based on novel topology
CN104104531B (en) The method and device of L3VPN network sides route is set
CN101466051A (en) Method and apparatus for searching business route
JP2013003876A (en) Program, device and system for cable lying design in consideration of layable route
CN102404235B (en) Packet transfer method and field programmable gate array
WO2014019167A1 (en) Planning method and device for wavelength division multiplexing network
Grigoreva et al. Optical backhaul network planning for DSRC-based public intelligent transportation system: A case study
CN103532848B (en) virtual private local area network service message processing method and system
CN103220223B (en) Network data flow sorting technique and system
CN101754058A (en) Wavelength routing method and system for optical network
CN103236983A (en) Long path first-based joint optimization method for wavelength and cost of optical multicast routing
Mehta et al. Designing an optical island in the core network: From routing to spectrum allocation
CN105187958B (en) The indexing means of OLT system and optical line terminal
Jiang A review of Network Topology
US9351056B2 (en) Planning of optical connections in a WDM optical network

Legal Events

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