CN110808883A - Searching method of optical fiber communication transmission path - Google Patents
Searching method of optical fiber communication transmission path Download PDFInfo
- Publication number
- CN110808883A CN110808883A CN201911079430.6A CN201911079430A CN110808883A CN 110808883 A CN110808883 A CN 110808883A CN 201911079430 A CN201911079430 A CN 201911079430A CN 110808883 A CN110808883 A CN 110808883A
- Authority
- CN
- China
- Prior art keywords
- path
- communication
- nodes
- paths
- database
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B10/00—Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
- H04B10/25—Arrangements specific to fibre transmission
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Electromagnetism (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a method for searching an optical fiber communication transmission path, which is characterized by comprising the following steps: (1) a communication path multiplexing process; (2) searching an optimal path; (3) and (3) a physical connectivity detection process of the communication path. The method has the advantages of multiplexing communication paths, reducing communication time delay and energy consumption, improving communication efficiency, ensuring the reliability, connectivity and stability of a communication system and improving communication quality.
Description
Technical Field
The invention relates to an optical fiber communication technology, in particular to a method for searching an optical fiber communication transmission path.
Background
Optical fiber communication is a communication mode in which light waves are used as information carriers and optical fibers are used as transmission media. Since the concept of optical fiber communication proposed by high-roll in 1966, optical fiber communication has been widely researched by many scholars and widely used in real life, and has become the main support of modern communication. With the development of optical fiber communication technology, the relay transmission distance of optical fiber communication is longer and longer, and more devices participate in transmission, which also leads to the inner link structure of the optical fiber communication network to be more and more complex. In an optical transmission network, the search of a communication path is an important basic work, and the quality of the selection of the communication path affects the quality of the overall transmission quality of the whole transmission network and also affects the quality of the user experience. Therefore, how to make the communication path search quickly and well performed in the modern optical fiber communication network is a major research point in the field of optical fiber communication.
With the increasing complexity of optical fiber communication networks, the traditional communication path searching method has exposed many defects. For example, the current communication path searching method has the following disadvantages:
1. the planned path cannot be reused, and the path searching efficiency is reduced: namely, a transmission path between two points is searched when communication is required, and after the communication is finished, namely, the path scheme is destroyed, and when the two points communicate again, the path scheme is re-planned, the planned path scheme cannot be reused, so that the communication path plan cannot be quickly searched, and the communication efficiency is reduced;
2. the searched path is not the optimal path: that is, a transmission path between two points, when there are multiple possible transmission paths, only one connectable path is selected, and the problems of communication distance and communication delay of this path are not considered, so that it cannot be guaranteed that the selected optimal path is used for transmission, and this method will affect communication delay and cost;
3. no pre-test of logic connectivity was performed: that is, the searched logical path is directly communicated without physical connectivity detection in advance, and a new path is reselected until no connectivity is found, which wastes communication resources and affects reliability and stability of communication.
Disclosure of Invention
The invention aims to provide a method for searching an optical fiber communication transmission path, aiming at the defects of the prior art. The method has the advantages of multiplexing communication paths, reducing communication time delay and energy consumption, improving communication efficiency, ensuring the reliability, connectivity and stability of a communication system and improving communication quality.
The technical scheme for realizing the purpose of the invention is as follows:
a method for searching an optical fiber communication transmission path, which is different from the prior art, comprises the following steps:
(1) communication path multiplexing process: the method comprises the following steps:
(1-1) establishing a database table for storing the path scheme: naming a database table by using optical _ path _ sche _ table, wherein the database table comprises data items including id identification, scheme name, starting point, ending point, foreign key id of a path set table, scheme state, planning time and topology name, and the data types and the represented meanings of the data items in the database table are shown in table 1:
table 1 optical _ path _ sche _ table
(1-2) establishing a data table for storing all possible paths, and naming the data table as path _ set _ table, wherein data items of the data table comprise a path set id, a file path url (Uniform resource locator, url) for storing a path information file, and data types and meanings represented by the data items in the data table are as shown in table 2:
table 2 each data item of the path _ set _ table
Data item name | Data type | Means of |
path_set_id | INT | Id identification of path set |
path_set_url | VARchar(128) | File path name storing path set information |
(1-3) Path query: the method comprises the following steps:
(1-3-1) a user sets a communication starting point and a communication end point, and a path inquiry process acquires the communication starting point and the communication end point input by the user;
(1-3-2) splicing the communication starting point and the communication terminal into linksetName in a mode of communication starting point name + "- >" + communication terminal name;
(1-3-3) connecting MySQL database operation: because the method is implemented by using Java programming language, the DataBase is connected by using JDBC (Java DataBase Connectivity, Java DataBase connection, JDBC for short), and the steps of JDBC connecting data are as follows:
(1-3-3-1) carrying out related configuration on the MySQL database, wherein the following codes are shown:
string driver ═ com.mysql.jdbc.driver; // drive path
String url ═ jdbc: mysql:// localhost: 3306/database name; // database address
String user ═ userName; // user name accessing database
String password is "123456"; // user password;
(1-3-3-2) loading a MySQL-connected driver file:
forname (driver); // load the driver;
(1-3-3-3) finally connecting with MySQL database:
Connection con=DriverManager.getConnection(url,user,password);
(1-3-4) after the path query process is successfully connected with the MySQL database, executing an SQL statement by a path query process, namely, querying whether a planned path scheme exists in an optical _ path _ scheme _ table of the MySQL database, namely table 1, by using a selected _ sch _ name from optical _ path _ scheme _ table, if the planned path scheme exists, obtaining a path scheme stored in the database, using the scheme as an input of a path scheme calling step, and jumping to the step (1-4), and if the planned path scheme does not exist, jumping to the step (2);
(1-3-5) closing the MySQL database;
(1-4) path invocation: the method comprises the following steps:
(1-4-1) retrieving an fk _ path _ set _ table _ id foreign key from an optical _ path _ sche _ table, wherein the fk _ path _ set _ table _ id foreign key is used for querying all path sets in the path _ set _ table;
(1-4-2) connecting database operation, the steps are the same as those in (1-3-3), and the description is omitted;
(1-4-3) executing an SQL statement "select path _ set _ url from path _ set _ table where _ update _ set _ id \' + fk _ path _ set _ table _ id to query a path _ set _ table of the MySQL database, namely, table 2, to obtain the url of the storage path set file;
(1-4-4) closing the MySQL database operation;
(1-4-5) reading all communication path information in the document storing the path set through url to obtain a set containing all possible paths, and taking the set as the input of the step (3), namely, detecting the physical connectivity of the paths;
(2) and (3) searching an optimal path: the method comprises the following steps:
(2-1) data processing: the method comprises the following steps:
(2-1-1) according to a communication starting point and a communication end point set by a user, combining topology information of the whole communication network, removing irrelevant nodes, namely communication nodes which cannot reach the end point from the starting point through the nodes, and obtaining communication subnet topology information of nodes which can reach the end point from the starting point through the nodes and are related to two-point communication of the communication starting point and the communication end point set by the user;
(2-1-2) converting the communication subnet topological information into a logic topological graph, and setting corresponding weight information for communication nodes and links of the topological graph, wherein the weight is a communication distance;
(2-1-3) taking the logic topological graph processed in the step (2-1-2) as the input of the process of creating the node adjacency matrix in the step (2-2);
(2-2) creating a node adjacency matrix, comprising:
(2-2-1) acquiring a logic topological graph obtained through the processing in the step (2-1);
(2-2-2) sequentially traversing all nodes in the topological graph by using a for loop, and reading weight information of each node;
(2-2-3) establishing an adjacency matrix corresponding to the topological graph according to the definition of the adjacency matrix and the weight information of the nodes;
(2-3-4) taking the established adjacency matrix as the input of the path searching process in the step (2-3);
(2-3) searching for a path: the method comprises the following steps:
(2-3-1) taking the communication node adjacency matrix created in the step (2-2) as the input of the step;
(2-3-2) according to the adjacency matrix, searching all possible logic links between the communication starting point and the communication terminal point by adopting a breadth-first search algorithm;
(2-3-3) realizing breadth-first search by adopting a queue mode, wherein the specific steps are as follows:
(2-3-3-1) placing the communication starting point set by the user at the tail end of the queue, taking out a node from the head of the queue each time, checking all next-level nodes of the node, placing the nodes at the tail end of the queue, and marking the node as a precursor of the next-level node;
(2-3-3-2) when finding a communication destination set by the user to be found, explaining that a path which can reach the destination is found; when the queue is empty, the search ends. According to the condition of finding the end point, all possible logic path sets between the communication starting point and the communication end point can be counted;
(2-3-3-3) if the end point is not found by traversing all the nodes, the two nodes are not reachable, and the searching process is ended;
(2-4) path ordering: the method comprises the following steps:
(2-4-1) obtaining all existing logic path sets searched out in the step (2-3);
(2-4-2) sequentially traversing all paths in the set, and calculating the communication distance of each path according to the weight;
(2-4-3) sorting all paths in the set from small to large according to the distance by adopting a bubble sorting method principle, wherein the bubble sorting method comprises the following operation processes:
(2-4-3-1) comparing two adjacent paths in the set, and if the communication distance of the first path is greater than that of the second path, exchanging the positions of the two paths;
(2-4-3-2) performing the same operation of the step (2-4-3-1) for each pair of adjacent paths, from the first pair of adjacent paths to the last pair of adjacent paths, and determining that the last path is the path having the largest transmission distance;
(2-4-3-3) repeating the operations of step (2-4-3-1) and step (2-4-3-2) for all paths, except for the last sequenced path;
(2-4-3-4) repeating the operations of the step (2-4-3-1), the step (2-4-3-2) and the step (2-4-3-3) continuously for fewer and fewer unordered paths until no pair of adjacent paths need to be compared, and the final set is a sorted list with transmission distances from small to large;
(2-4-3-5) taking the finally obtained ordered list as the input of the physical connectivity detection process of the communication path in the step (3);
(3) a process for physical connectivity detection of a communication path, comprising the steps of:
(3-1) data processing: the data processing process comprises the following steps:
(3-1-1) taking the ordered list finally obtained in the step (2-4-3-4) as an input: acquiring a list of ordered logic paths;
(3-1-2) selecting a logic path with the shortest transmission distance from the ordered list finally obtained in the step (2-4-3-4), namely a first path of the list;
(3-1-3) converting the logical path with the shortest transmission distance selected in the step (3-1-2) into a physical path by combining topology information and equipment information of the communication network, namely, the logical nodes correspond to the physical equipment one by one;
(3-1-4) collecting the optical fiber communication information and the optical port time slot use information of the physical equipment, and inputting the collected and processed optical fiber communication information and optical port time slot use information into the next step (3-2);
(3-2) optical fiber connection detection: the optical fiber connection detection includes:
(3-2-1) using the optical fiber communication information obtained in the step (3-1-4) as the input of the step;
(3-2-2) traversing all the communication nodes on the path in the step (3-1-3) in sequence, detecting the optical fiber communication state of each pair of adjacent communication nodes, if the optical fibers of the pair of adjacent communication nodes are in the communication state, entering an optical port time slot detection step (3-3), and if the optical fibers of the pair of adjacent communication nodes are not in the communication state, entering a path reselection step (3-4);
(3-3) optical port time slot detection: the optical port time slot detection process comprises the following steps:
(3-3-1) using the optical port time slot using information among the devices obtained in the step (3-1-3) as the input of the step;
(3-3-2) traversing all optical port time slot states of two communication nodes in sequence, if the two communication nodes respectively have available optical port time slots, it is indicated that the two adjacent point communication is transmittable, if the two adjacent communication nodes do not have available optical port time slots, it is indicated that the two adjacent point communication is disconnected, then entering a path reselection step (3-4), and when the optical fiber and optical port time slot states of the first pair of adjacent nodes are all available, continuing to perform an optical fiber connection detection process and an optical port time slot detection process on all adjacent point pairs on the path until all adjacent communication node pairs on the path are detected to pass, it is indicated that the physical equipment on the path is connected, that is, the communication transmission work can be performed, then entering step (3-5); otherwise, if only one pair of paths fails to pass the detection, it indicates that the physical device on the path is not connected and the path set has a path to be detected, the path reselection step (3-4) is entered; if the path set has no path to be detected, indicating that no path capable of performing communication exists between the communication starting point and the communication end point set by the user, and ending;
(3-4) path reselection: the path reselection comprises:
(3-4-1) taking the path which is not communicated in the step (3-3) as the input of the step;
(3-4-2) deleting the path disconnected in the step (3-3) from the path set;
(3-4-3) reselecting the logic path with the shortest communication distance from the path set;
(3-4-4) repeating the step (3-2) and the step (3-3) on the logic path selected in the step (3-4-3) until ① selects the logic path which can be communicated and has the shortest transmission distance, or ② ends the algorithm when the path set has no path to be detected;
(3-5) data storage: and (4) storing the optical fiber and time slot state of the logic path with the shortest transmission distance obtained in the step (3-3-2) into a database.
The first technical scheme is to provide a reusable process of an optical fiber communication path, in an optical fiber communication system, when a communication starting point and a communication end point set by a user are obtained, whether a planned communication path scheme exists in a database can be inquired according to information of the two communication nodes; if the database already has a previously planned path scheme, the scheme is directly called out; if the communication link is not in the database, entering a new path searching process, and finally storing a newly searched path scheme into the database, although the communication link multiplexing scheme is simple in appearance, the communication link multiplexing scheme is necessary, because when two communication nodes carry out repeated communication for many times, the communication link multiplexing scheme can directly call the previously planned communication path without carrying out path planning operation again, so that a lot of operation time is saved, and the transmission efficiency of the whole communication system is improved.
The second technical solution is to provide a search process of an optimal path, in the process of planning a communication path, after a communication starting point and a communication end point are determined due to the complexity of a communication link, multiple transmission paths may exist between the two points, in all possible transmission paths, communication costs of some paths are more, communication costs of some paths are less, and a path with less communication costs is selected, which reduces communication delay and energy consumption, so it is necessary to provide an optimal path search method, thereby reducing communication delay and energy consumption and improving communication efficiency, the search scheme of the optimal path includes a data processing process, a process of creating a node adjacency matrix, a process of searching the path and a process of sorting the path, and the data processing process is responsible for preprocessing the path of the whole device; obtaining the preprocessed data, and creating a connection relation matrix of each node according to the information in the matrix creating process, so as to define a relevant set of each node; according to the obtained matrix relation, a BFS (breadth-first search) algorithm is utilized to search out all possible connection links between the starting point and the end point in the process of searching the path; the path sorting process is responsible for sorting all paths from small to large in cost, and the paths are collected into a list, so that the path management is facilitated.
The third technical scheme is to provide a method for detecting physical connectivity of a communication path, wherein after an ordered list of communication paths is obtained, an optimal logic path is selected from the list, and then whether all physical devices on the optimal logic path are connected or not is judged, and an optical port time slot of each device is available, so that the reliability, connectivity and stability of the communication state of the path can be ensured; according to the obtained connection state information of each device, the optical fiber detection process is responsible for detecting the optical fiber connection state of each device; if the optical fibers among the devices are in a connected state, the optical port time slot detection process continues to detect the use state of each optical port time slot; if only one of the two states is not connected, the path reselection process will invalidate the current path scheme and reselect a new path from the list for detection; and finally, the data storage process stores the obtained optical fiber and time slot states into a database.
The method has the advantages of multiplexing communication paths, reducing communication time delay and energy consumption, improving communication efficiency, ensuring the reliability, connectivity and stability of a communication system and improving communication quality.
Drawings
FIG. 1 is a schematic flow chart of the method in the example;
FIG. 2 is a flow chart of a communication path multiplexing process according to an embodiment;
FIG. 3 is a flowchart illustrating an optimal path searching process in an embodiment;
FIG. 4 is a schematic diagram of a process flow of detecting physical connectivity of a communication path in an embodiment;
FIG. 5 is a schematic diagram illustrating communication between P1 and P2 in the example;
FIG. 6 is a simplified topology diagram of FIG. 5 according to an embodiment;
FIG. 7 is a schematic diagram of an embodiment of a subnet logical topology;
FIG. 8 is a schematic diagram of communication logic path 1 in an embodiment;
FIG. 9 is a schematic diagram of communication logic path 2 in an embodiment;
FIG. 10 is a diagram illustrating an exemplary optimal logic path;
FIG. 11 is a diagram illustrating an optimal physical path in an embodiment;
FIG. 12 is a schematic diagram of the detected adjacent nodes of the 1 st pair in the embodiment;
FIG. 13 is a diagram illustrating an embodiment of a pair of adjacent nodes to be tested 1;
fig. 14 is a schematic diagram of an exemplary pair of neighboring nodes to be tested 2.
Detailed Description
The invention will be further elucidated with reference to the drawings and examples, without however being limited thereto.
Example (b):
referring to fig. 1, a method for searching an optical fiber communication transmission path includes the steps of:
as shown in fig. 5, in a network, an optimal transmission path between two nodes P1 and P2 is found, and a communication starting point P1 and a communication ending point P2 set by a user are obtained as inputs of the method;
(1) communication path multiplexing process: as shown in fig. 2, the method comprises the following steps:
(1-1) establishing a database table for storing the communication path scheme from the P1 node to the P2 node: the database table is named with the optical _ path _ sche _ table, which contains data items, in this example as shown in table 3:
table 3 each data item of the optical _ path _ sche _ table
Data item name | Data type | Data item |
opt_sch_id | INT | 1 |
opt_sch_name | VARchar(32) | P1→P2_sch_name |
start_node | VARchar(32) | P1 |
end_node | VARchar(32) | P2 |
link_set_name | VARchar(32) | P1→P2 |
fk_path_set_table_id | INT | 1 |
edit_state | VARchar(32) | not_edit |
topo_name | VARchar(32) | network1 |
plan_time | TIMESTAMP | 2019-8-21 |
(1-2) establishing a data table for holding all possible paths: this data table is named path _ set _ table, whose data items in this example are shown in table 4:
table 4 each data item of path _ set _ table
Data item name | Data type | Means of |
path_set_id | INT | 1 |
path_set_url | VARchar(128) | P1→P2_sch_url |
(1-3) Path query: the method comprises the following steps:
(1-3-1) the user sets a communication start point P1 and a communication end point P2, and the path query process acquires a communication start point P1 and a communication end point P2 input by the user;
(1-3-2) P1 and P2 are spliced into linksetName by (communication start name + "→" + communication end name), that is:
linksetName=P1+"→"+P2="P1→P2"
(1-3-3) connecting MySQL database operation, which comprises the following steps:
(1-3-3-1) carrying out related configuration on the MySQL database, wherein the following codes are shown:
string driver ═ com.mysql.jdbc.driver; // drive path
String url ═ jdbc: mysql:// localhost: 3306/database name; // database address
String user ═ userName; // user name accessing database
String password is "123456"; // user password;
(1-3-3-2) loading a MySQL-connected driver file:
forname (driver); // load the driver;
(1-3-3-3) finally connecting with MySQL database:
Connection con=DriverManager.getConnection(url,user,password);
(1-3-4) executing the SQL statement:
a select opt _ sch _ name from optical _ path _ sche _ table where link _ set _ name is "P1 → P2" to query the optical _ path _ sche _ table of the MySQL database, i.e. table 3, because the P1 → P2 path is planned for the first time in this example, there is no planned scheme in table 3 at this time, and the process goes to step (2) directly;
(1-3-5) closing the MySQL database;
(1-4) assuming there is a planned P1 → P2 path scenario in Table 3, then a path call is made: the method comprises the following steps:
(1-4-1) acquiring fk _ path _ set _ table _ id as 1 foreign key from the optical _ path _ sche _ table, and querying all path sets in the path _ set _ table;
(1-4-2) connecting database operation, the steps are the same as those in (1-3-3), and the description is omitted;
(1-4-3) executing a SQL statement "select path _ set _ url from path _ set _ table where _ set _ id is 1 to query a path _ set _ table of the MySQL database, namely table 4, and obtaining the url of the storage path set file;
(1-4-4) closing the MySQL database operation;
(1-4-5) reading the document pointed by the url to obtain a path set which comprises all paths from P1 to the P2 node, and taking the set as the input of the step (3), namely, detecting the physical connectivity of the paths;
(2) the optimal path searching process, as shown in fig. 3: the execution steps in this example are as follows:
(2-1) data processing: the method comprises the following steps:
(2-1-1) combining topology information of the whole communication network according to a communication starting point P1 and a communication ending point P2 set by a user, wherein a network topology diagram is shown in FIG. 5, irrelevant nodes are removed, and a obtained communication subnet is shown in FIG. 6;
(2-1-2) converting the communication subnet topology information into a logic topology graph, and taking the communication distance between the nodes as the right of the link, wherein the obtained logic topology graph is shown in FIG. 7;
(2-1-3) taking the logical topology of FIG. 7 as input to step (2-2).
(2-2) creating a node adjacency matrix, comprising:
(2-2-1) taking the logical topology of FIG. 7 as the input to this step;
(2-2-2) reading the weight information of each node in turn by using a for loop, namely the nodes P1, A, B, C, D, E and P2, wherein the pseudo code is as follows:
for(P1 to P2)
{
the weights of all nodes in the logical topology of figure 7 are read in turn,
}
(2-2-3) establishing an adjacency matrix corresponding to fig. 7 according to the weight information of each node and the definition of the adjacency matrix, as follows:
(2-2-4) taking the established adjacency matrix as an input of the step (2-3);
(2-3) searching for a path: the method comprises the following steps:
(2-3-1) taking the adjacency matrix created in the step (2-2-3) as an input of the step;
(2-3-2) according to the adjacency matrix, adopting a breadth-first search algorithm to find out all possible logical links between the nodes P1 and P2;
(2-3-3) implementing breadth-first search algorithm by using a queue mode, wherein the specific steps are as follows:
(2-3-3-1) placing the P1 node at the end of the queue, taking out one node from the head of the queue each time, looking up all the next-level nodes of the node, sequentially pushing the nodes into the queue, and recording the node as a precursor of the next-level node;
(2-3-3-2) when P2 is found, finding a path from P1 to P2; when the queue is empty, it can count all possible logical path sets between the communication start point and the communication end point according to the situation of finding P2, in this example, 2 paths from P1 to P2 are obtained, as shown in fig. 8 and fig. 9, respectively;
(2-3-3-3) if P2 has not been found by traversing all nodes, indicating that the P1 and P2 are unreachable, ending the search process;
(2-4) path ordering: the method comprises the following steps:
(2-4-1) taking the 2 paths shown in FIGS. 8 and 9 as input to this step;
(2-4-2) traversing all paths in sequence, and calculating the communication distance of each path according to the weight; the communication distance of the path 1(P1 → C → D → E → P2) as in fig. 8 is 5+10+5+10 ═ 30, while the communication path of the path 2(P1 → a → B → P2) as in fig. 9 is 5+7+5 ═ 17;
(2-4-3) sequencing the 2 paths from small to large according to the communication distance by adopting the bubble sequencing method principle, wherein the bubble sequencing method comprises the following operation processes:
(2-4-3-1) comparing the communication distances of the adjacent route 1(P1 → C → D → E → P2) and route 2(P1 → a → B → P2) s in the set, the communication distance of the route 1 being 30 and the communication distance of the route 2 being 17, so that the communication distance of the route 2 is the shortest of the two routes;
(2-4-3-2) since there are only 2 paths in this example, there are no other adjacent paths, and this step is automatically completed;
(2-4-3-3) since there are only 2 paths in this example, there are no other adjacent paths, and this step is automatically completed;
(2-4-3-4) after comparing all paths, the final ordered path set table is obtained as follows:
TABLE 5 Path List Structure
id | Concrete logic path | Transmission distance |
1 | P1→A→B→P2 | 5+7+5=17 |
2 | P1→C→D→E→P2 | 5+10+5+10=30 |
(2-4-3-5) listing the ordered logical paths shown in table 5 as inputs to the physical connectivity check process for the communication path of step (3);
(3) as shown in fig. 4, the physical connectivity detection process of the communication path includes the following steps:
(3-1) data processing: the data processing process comprises the following steps:
(3-1-1) obtaining an ordered list of logical paths as shown in table 5;
(3-1-2) taking out the path having the shortest communication distance, i.e., the path P1 → a → B → P2 of the 1 st path in table 5, from table 5, as shown in fig. 10;
(3-1-3) converting the 1 st logical path P1 → a → B → P2 in table 5 into a physical path according to the topology information and the device information of fig. 6, the resulting physical path being as shown in fig. 11;
(3-1-4) reading the physical device optical fiber connection information and the optical port time slot use information on the path of fig. 11, namely the optical fiber connection information and the optical port time slot use information of the device P1, the device a, the device B and the device P2;
(3-2) optical fiber connection detection: the optical fiber connection detection includes:
(3-2-1) using the optical fiber communication information of the equipment P1, the equipment A, the equipment B and the equipment P2 obtained in the step (3-1-4) as the input of the step;
(3-2-2) sequentially traversing all the communication nodes on the path P1 → a → B → P2 in fig. 11, namely, the device P1, the device a, the device B and the device P2, detecting the optical fiber connection state of each pair of adjacent communication nodes, in this case, the first pair of adjacent communication nodes is the device P1 and the device a, as shown in fig. 12, if the optical fibers of the device P1 and the device a are in the connection state, entering the optical port time slot detection step (3-3), and if the optical fibers of the device P1 and the device a are in the disconnection state, entering the path reselection step (3-4);
(3-3) optical port time slot detection: the optical port time slot detection process comprises the following steps:
(3-3-1) using the optical port time slot using information of the equipment P1, the equipment A, the equipment B and the equipment P2 obtained in the step (3-1-4) as the input of the step;
(3-3-2) sequentially traversing all optical port time slot states of two adjacent communication nodes, in this example, the first pair of adjacent communication nodes is P1 equipment and a equipment, as shown in fig. 12, if the P1 equipment and the a equipment each have an available optical port time slot, it is indicated that the communication of the P1 equipment and the a equipment is transmissible, if the P1 equipment and the a equipment have no available optical port time slot, the communication of the P1 equipment and the a equipment is disconnected, a path reselection step (3-4) is entered, and when the optical fiber and optical port time slot states of the P1 equipment and the a equipment are all available, the optical fiber connection detection process and the optical port time slot detection process are continued for all the adjacent pairs of points on the path (in this example, the remaining adjacent pairs of nodes are a equipment and B equipment, B equipment and P2, as shown in fig. 13 and 14, respectively) until all the adjacent pairs of communication nodes on the path are detected to pass, if the physical equipment on the path is connected, that is, the communication transmission work can be carried out, then the step (3-5) is carried out; otherwise, if only one pair of paths fails to pass the detection, it indicates that the physical device on the path is not connected and the path set has a path to be detected, the path reselection step (3-4) is entered;
(3-4) path reselection: the path reselection comprises:
(3-4-1) taking the path which is not communicated in the step (3-3) or the step (3-2) as the input of the step;
(3-4-2) removing the paths that are not connected in step (3-3) or step (3-2) from the path set, in this example, assuming that the logical paths in fig. 10 are not connected, then the logical paths in fig. 10 are removed from the ordered path list, resulting in the table of table 6:
TABLE 6 remaining ordered logical set
id | Concrete logic path | Transmission distance |
1 | P1→C→D→E→P2 | 5+10+5+10=30 |
(3-4-3) reselecting a new path from Table 4, i.e., P1 → C → D → E → P2;
(3-4-4) repeating the step (3-2) and the step (3-3) on the logical path P1 → C → D → E → P2 selected in the step (3-4-3) until the method ① selects the logical path which can be communicated and has the shortest transmission distance, and entering the step (3-5) or ②, when the path set has no path to be detected, the method is ended,
(3-5) data storage: the step (3-3-2), assuming that all the devices of the path in fig. 10, P1 → a → B → P2, are connectable, stores the fiber and slot usage status update of the path in the database.
Claims (1)
1. A method for searching an optical fiber communication transmission path, comprising the steps of:
(1) communication path multiplexing process: the method comprises the following steps:
(1-1) establishing a database table for storing the path scheme: naming a database table by using optical _ path _ sche _ table, wherein the database table comprises data items including id identification, scheme name, starting point, ending point, foreign key id of a path set table, scheme state, planning time and topology name, and the data types and the represented meanings of the data items in the database table are shown in table 1:
table 1 optical _ path _ sche _ table
(1-2) establishing a data table for holding all possible paths: the data table is named as path _ set _ table, the data items of the data table comprise a path set id and a file path url storing a path information file, and the data types and the represented meanings of the data items in the data table are shown in table 2:
table 2 each data item of the path _ set _ table
(1-3) Path query: the method comprises the following steps:
(1-3-1) a user sets a communication starting point and a communication end point, and a path inquiry process acquires the communication starting point and the communication end point input by the user;
(1-3-2) splicing the communication starting point and the communication terminal into linksetName in a mode of communication starting point name + "- >" + communication terminal name;
(1-3-3) connecting MySQL database operation: the database is connected by adopting a JDBC mode, and the steps of JDBC connection data are as follows:
(1-3-3-1) carrying out related configuration on the MySQL database, wherein the following codes are shown:
string driver ═ com.mysql.jdbc.driver; // drive path
String url ═ jdbc: mysql:// localhost: 3306/database name; // database address
String user ═ userName; // user name accessing database
String password is "123456"; // user password;
(1-3-3-2) loading a MySQL-connected driver file:
forname (driver); // load the driver;
(1-3-3-3) finally connecting with MySQL database:
Connection con=DriverManager.getConnection(url,user,password);
(1-3-4) after the path query process is successfully connected with the MySQL database, executing an SQL statement by a path query process, namely querying whether an optical _ path _ sche _ table of the MySQL database, namely whether a planned path scheme exists in table 1, if the planned path scheme exists, obtaining a path scheme stored in the database, taking the scheme as an input of a path scheme calling step, and jumping to the step (1-4), and if the planned path scheme does not exist, jumping to the step (2);
(1-3-5) closing the MySQL database;
(1-4) path invocation: the method comprises the following steps:
(1-4-1) retrieving an fk _ path _ set _ table _ id foreign key from an optical _ path _ sche _ table, wherein the fk _ path _ set _ table _ id foreign key is used for querying all path sets in the path _ set _ table;
(1-4-2) connecting database operation, the steps are the same as (1-3-3);
(1-4-3) executing an SQL statement "select path _ set _ url from path _ set _ table where path _ set _ id \' + fk _ path _ set _ table _ id to query a path _ set _ table of the MySQL database, namely table 2, to obtain the url of the storage path set file;
(1-4-4) closing the MySQL database operation;
(1-4-5) reading all communication path information in the document storing the path set through url to obtain a set containing all possible paths, and taking the set as the input of the step (3), namely, detecting the physical connectivity of the paths;
(2) and (3) searching an optimal path: the method comprises the following steps:
(2-1) data processing: the method comprises the following steps:
(2-1-1) according to a communication starting point and a communication end point set by a user, combining topology information of the whole communication network, removing irrelevant nodes, namely communication nodes which cannot reach the end point from the starting point through the nodes, and obtaining communication subnet topology information of nodes which can reach the end point from the starting point through the nodes and are related to two-point communication of the communication starting point and the communication end point set by the user;
(2-1-2) converting the communication subnet topological information into a logic topological graph, and setting corresponding weight information for communication nodes and links of the topological graph, wherein the weight is a communication distance;
(2-1-3) taking the logic topological graph processed in the step (2-1-2) as the input of the process of creating the node adjacency matrix in the step (2-2);
(2-2) creating a node adjacency matrix, comprising:
(2-2-1) acquiring a logic topological graph obtained through the processing in the step (2-1);
(2-2-2) sequentially traversing all nodes in the topological graph by using a for loop, and reading weight information of each node;
(2-2-3) establishing an adjacency matrix corresponding to the topological graph according to the definition of the adjacency matrix and the weight information of the nodes;
(2-2-4) taking the established adjacency matrix as the input of the path searching process in the step (2-3);
(2-3) searching for a path: the method comprises the following steps:
(2-3-1) acquiring the communication node adjacency matrix created in the step (2-3);
(2-3-2) according to the adjacency matrix, searching all possible logic links between the communication starting point and the communication terminal point by adopting a breadth-first search algorithm;
(2-3-3) realizing breadth-first search by adopting a queue mode, wherein the specific steps are as follows:
(2-3-3-1) placing the communication starting point set by the user at the tail end of the queue, taking out a node from the head of the queue each time, checking all next-level nodes of the node, placing the nodes at the tail end of the queue, and marking the node as a precursor of the next-level node;
(2-3-3-2) when finding a communication destination set by the user to be found, explaining that a path which can reach the destination is found; when the queue is empty, the search ends. According to the condition of finding the end point, all possible logic path sets between the communication starting point and the communication end point can be counted;
(2-3-3-3) if the end point is not found by traversing all the nodes, the two nodes are not reachable, and the searching process is ended;
(2-4) path ordering: the method comprises the following steps:
(2-4-1) obtaining all existing logic path sets searched out in the step (2-3);
(2-4-2) sequentially traversing all paths in the set, and calculating the communication distance of each path according to the weight;
(2-4-3) sorting all paths in the set from small to large according to the distance by adopting a bubble sorting method principle, wherein the bubble sorting method comprises the following operation processes:
(2-4-3-1) comparing two adjacent paths in the set, and if the communication distance of the first path is greater than that of the second path, exchanging the positions of the two paths;
(2-4-3-2) performing the same operation of the step (2-4-3-1) for each pair of adjacent paths, from the first pair of adjacent paths to the last pair of adjacent paths, and determining that the last path is the path having the largest transmission distance;
(2-4-3-3) repeating the operations of step (2-4-3-1) and step (2-4-3-2) for all paths, except for the last sequenced path;
(2-4-3-4) repeating the operations of the step (2-4-3-1), the step (2-4-3-2) and the step (2-4-3-3) continuously for fewer and fewer unordered paths until no pair of adjacent paths need to be compared, and the final set is a sorted list with transmission distances from small to large;
(2-4-3-5) taking the finally obtained ordered list as the input of the physical connectivity detection process of the communication path in the step (3);
(3) a process for physical connectivity detection of a communication path, comprising the steps of:
(3-1) data processing: the data processing process comprises the following steps:
(3-1-1) taking the ordered list finally obtained in the step (2-4-3-4) as an input: acquiring a list of ordered logic paths;
(3-1-2) selecting a logic path with the shortest transmission distance from the ordered list finally obtained in the step (2-4-3-4), namely a first path of the list;
(3-1-3) converting the logical path with the shortest transmission distance selected in the step (3-1-2) into a physical path by combining topology information and equipment information of the communication network, namely, the logical nodes correspond to the physical equipment one by one;
(3-1-4) collecting the optical fiber communication information and the optical port time slot use information of the physical equipment, and inputting the collected and processed optical fiber communication information and optical port time slot use information into the next step (3-2);
(3-2) optical fiber connection detection: the optical fiber connection detection includes:
(3-2-1) using the optical fiber communication information obtained in the step (3-1-4) as the input of the step;
(3-2-2) traversing all the communication nodes on the path in the step (3-1-4) in sequence, detecting the optical fiber communication state of each pair of adjacent communication nodes, if the optical fibers of the pair of adjacent communication nodes are in the communication state, entering an optical port time slot detection step (3-3), and if the optical fibers of the pair of adjacent communication nodes are not in the communication state, entering a path reselection step (3-4);
(3-3) optical port time slot detection: the optical port time slot detection process comprises the following steps:
(3-3-1) using the optical port time slot using information among the devices obtained in the step (3-1-3) as the input of the step;
(3-3-2) traversing all optical port time slot states of two communication nodes in sequence, if the two communication nodes respectively have available optical port time slots, it is indicated that the two adjacent point communication is transmittable, if the two adjacent communication nodes do not have available optical port time slots, it is indicated that the two adjacent point communication is disconnected, then entering a path reselection step (3-4), and when the optical fiber and optical port time slot states of the first pair of adjacent nodes are all available, continuing to perform an optical fiber connection detection process and an optical port time slot detection process on all adjacent point pairs on the path until all adjacent communication node pairs on the path are detected to pass, it is indicated that the physical equipment on the path is connected, that is, the communication transmission work can be performed, then entering step (3-5); otherwise, if only one pair of paths fails to pass the detection, it indicates that the physical device on the path is not connected and the path set has a path to be detected, the path reselection step (3-4) is entered; if the path set has no path to be detected, indicating that no path capable of performing communication exists between the communication starting point and the communication end point set by the user, and ending;
(3-4) path reselection: the path reselection comprises:
(3-4-1) taking the path which is not communicated in the step (3-3) as the input of the step;
(3-4-2) deleting the path disconnected in the step (3-3) from the path set;
(3-4-3) reselecting the logic path with the shortest communication distance from the path set;
(3-4-4) repeating the step (3-2) and the step (3-3) on the logic path selected in the step (3-4-3) until ① selects the logic path which can be communicated and has the shortest transmission distance, or ② ends the algorithm when the path set has no path to be detected;
(3-5) data storage: and (4) storing the optical fiber and time slot state of the logic path with the shortest transmission distance obtained in the step (3-3-2) into a database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911079430.6A CN110808883B (en) | 2019-11-07 | 2019-11-07 | Searching method of optical fiber communication transmission path |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911079430.6A CN110808883B (en) | 2019-11-07 | 2019-11-07 | Searching method of optical fiber communication transmission path |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110808883A true CN110808883A (en) | 2020-02-18 |
CN110808883B CN110808883B (en) | 2020-12-11 |
Family
ID=69502076
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911079430.6A Active CN110808883B (en) | 2019-11-07 | 2019-11-07 | Searching method of optical fiber communication transmission path |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110808883B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111490952A (en) * | 2020-03-27 | 2020-08-04 | 天津大学 | Ray tracing method |
CN111787436A (en) * | 2020-07-02 | 2020-10-16 | 中国电子科技集团公司第三十四研究所 | Method for automatic searching and planning of optical network communication path |
CN111798053A (en) * | 2020-07-03 | 2020-10-20 | 富盛科技股份有限公司 | Optical fiber path planning method |
CN112115567A (en) * | 2020-08-01 | 2020-12-22 | 富盛科技股份有限公司 | Optical fiber minimum consumption path planning method |
CN113344721A (en) * | 2021-06-07 | 2021-09-03 | 北京优全智汇信息技术有限公司 | AI-based intelligent auditing method and system |
CN114417572A (en) * | 2021-12-28 | 2022-04-29 | 中国联合网络通信集团有限公司 | Optical cable route planning method and device, terminal equipment and storage medium |
CN115001579A (en) * | 2022-06-01 | 2022-09-02 | 中国电建集团西北勘测设计研究院有限公司 | Optical fiber path and fiber jumping terminal arranging method based on OTDR |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090010254A1 (en) * | 2007-07-02 | 2009-01-08 | Fujitsu Limited | Packet transfer apparatus and packet transfer method |
CN102137003A (en) * | 2010-12-13 | 2011-07-27 | 华为技术有限公司 | Path searching method and device |
CN104092606A (en) * | 2014-06-24 | 2014-10-08 | 重庆邮电大学 | Energy-saving routing method based on service duration time scheduling in optical network |
CN105306142A (en) * | 2015-09-18 | 2016-02-03 | 国网冀北电力有限公司信息通信分公司 | Device and method for improving optical fiber transmission reliability |
CN107689918A (en) * | 2017-09-12 | 2018-02-13 | 南京南瑞信息通信科技有限公司 | A kind of automatic search method in power telecom network service channel path |
-
2019
- 2019-11-07 CN CN201911079430.6A patent/CN110808883B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090010254A1 (en) * | 2007-07-02 | 2009-01-08 | Fujitsu Limited | Packet transfer apparatus and packet transfer method |
CN102137003A (en) * | 2010-12-13 | 2011-07-27 | 华为技术有限公司 | Path searching method and device |
CN104092606A (en) * | 2014-06-24 | 2014-10-08 | 重庆邮电大学 | Energy-saving routing method based on service duration time scheduling in optical network |
CN105306142A (en) * | 2015-09-18 | 2016-02-03 | 国网冀北电力有限公司信息通信分公司 | Device and method for improving optical fiber transmission reliability |
CN107689918A (en) * | 2017-09-12 | 2018-02-13 | 南京南瑞信息通信科技有限公司 | A kind of automatic search method in power telecom network service channel path |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111490952A (en) * | 2020-03-27 | 2020-08-04 | 天津大学 | Ray tracing method |
CN111490952B (en) * | 2020-03-27 | 2021-08-17 | 陈亮 | Ray tracing method |
CN111787436A (en) * | 2020-07-02 | 2020-10-16 | 中国电子科技集团公司第三十四研究所 | Method for automatic searching and planning of optical network communication path |
CN111798053A (en) * | 2020-07-03 | 2020-10-20 | 富盛科技股份有限公司 | Optical fiber path planning method |
CN112115567A (en) * | 2020-08-01 | 2020-12-22 | 富盛科技股份有限公司 | Optical fiber minimum consumption path planning method |
CN112115567B (en) * | 2020-08-01 | 2024-04-16 | 富盛科技股份有限公司 | Optical fiber minimum consumption path planning method |
CN113344721A (en) * | 2021-06-07 | 2021-09-03 | 北京优全智汇信息技术有限公司 | AI-based intelligent auditing method and system |
CN114417572A (en) * | 2021-12-28 | 2022-04-29 | 中国联合网络通信集团有限公司 | Optical cable route planning method and device, terminal equipment and storage medium |
CN115001579A (en) * | 2022-06-01 | 2022-09-02 | 中国电建集团西北勘测设计研究院有限公司 | Optical fiber path and fiber jumping terminal arranging method based on OTDR |
CN115001579B (en) * | 2022-06-01 | 2024-01-19 | 中国电建集团西北勘测设计研究院有限公司 | Optical fiber path and fiber jumping terminal touch-arranging method based on OTDR |
Also Published As
Publication number | Publication date |
---|---|
CN110808883B (en) | 2020-12-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110808883B (en) | Searching method of optical fiber communication transmission path | |
Fraigniaud et al. | Collective tree exploration | |
CN103107941B (en) | Cable resource autodispatcher and method | |
CN110222143A (en) | Character string matching method, device, storage medium and electronic equipment | |
US5655075A (en) | Protocol method for validating an input protocol specification | |
CN105282123A (en) | Network protocol identification method and device | |
CN105224396A (en) | A kind of business data processing method and device | |
CN103699647A (en) | Character string dictionary indexing method and system | |
CN104917760A (en) | SDN-based global flow chart generating method and apparatus | |
CN116737511A (en) | Graph-based scheduling job monitoring method and device | |
CN108694242A (en) | Node checks method, equipment, storage medium and device based on DOM | |
CN110597194B (en) | Cooperative activity construction method of large-scale flexibly-driven automatic manufacturing system | |
CN108416698A (en) | A method of promoting smart machine data collection rate | |
CN114895885B (en) | Feature-based recalculation method in three-dimensional detection software | |
Asiler et al. | Bb-graph: A subgraph isomorphism algorithm for efficiently querying big graph databases | |
US8649295B2 (en) | Course searching method and node device | |
CN110493058A (en) | The construction method and device of network topology structure, storage medium, terminal | |
CN115098362A (en) | Page testing method and device, electronic equipment and storage medium | |
Ma et al. | Graph pattern matching for dynamic team formation | |
CN111291373B (en) | Method, apparatus and computer-readable storage medium for analyzing data pollution propagation | |
CN110032366A (en) | A kind of Code location method and device | |
CN107015909A (en) | Method of testing and device based on code analysis on altered project | |
CN118092874B (en) | API (application program interface) arrangement method and device based on atlas extension | |
CN112787887B (en) | Automatic copying machine testing method and device for distributed storage system | |
CN115173939B (en) | Method for determining connectivity between machine rooms and terminal equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |