Optical path routing avoidance system, avoidance method, and medium based on graph database
Through the optical path routing evasion system based on the graph database, the search paths in the optical fiber network are converted and avoided, and the problem of slow configuration speed and low efficiency of optical fiber network routing search in the prior art is solved, and fast and efficient fiber routing search is achieved.
Patent Information
- Application Number
- CN202411404678.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-10-10
AI Technical Summary
The prior art is difficult to quickly and efficiently carry out fiber optic route search planning in complex fiber optic networks, resulting in low configuration speed and low efficiency.
The optical path routing evasion system based on graph database is adopted. Through the gallery model conversion module, entity object conversion module and graph database module, the local fiber group and related entity objects are converted into gallery edges and associated nodes, and a search path is established and the nodes that need to be avoided are avoided in the path, thereby outputting the remaining effective search paths.
It realizes fast and efficient fiber-optic routing search, improves configuration efficiency and reduces error rate, and can efficiently handle complex fiber networking.
Smart Images

Figure CN118921286B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of communication optical fiber optical path routing search, and relates to an optical path routing avoidance system, avoidance method, and medium based on a graph database. Background Art
[0002] The network contains a large number of local fiber groups, terminal devices, and entity objects associated with local fiber groups, and there are complex and intertwined relationships between the various components. In the prior art, the following two methods are usually used to search and plan the fiber optical path routing:
[0003] The first method is to manually select the routes in the optical fiber network through a visual interface with the assistance of a computer, which is heavily dependent on the operating experience of the configuration personnel and has a low configuration speed;
[0004] The second method is to write the fiber optic networking data into several different data tables, and retrieve the data in the data tables one by one through several preset conditions for search, avoidance, and exclusion. For complex fiber optic networks, its operation and configuration efficiency is low.
[0005] Therefore, fast and efficient routing search and planning for complex and large optical fiber networks is a technical problem that needs to be solved urgently. Summary of the invention
[0006] The purpose of the present invention is to provide a light path routing avoidance system, avoidance method, and medium based on a graph database to achieve fast and effective resource avoidance of optical fiber light path routing search, thereby achieving efficient and low error rate optical fiber routing search.
[0007] The present invention is achieved through the following technical solutions:
[0008] The optical path routing avoidance system based on a graph database includes a graph database module, a graph library model conversion module, and a physical object conversion module. The graph library model conversion module is used to convert a local optical fiber group into a graph library edge, and convert the accommodation facilities belonging to the equipment at both ends of the local optical fiber group into end nodes at both ends of the graph library edge; the physical object conversion module is used to convert the physical objects associated with the local optical fiber group into associated nodes, and establish an association between the associated nodes and the graph library edge; the graph database module establishes several search paths based on the graph library edge and the end nodes, and searches for the end nodes and associated nodes that need to be avoided in the search paths, excludes the search paths containing the end nodes and associated nodes that need to be avoided, and outputs the remaining search paths as results.
[0009] In order to better implement the present invention, further, the graph database module includes a path query module and an avoidance module. The path query module is used to extract any two end nodes as the starting point and the end point respectively, and search for a search path of a specified length between the starting point and the end point; the avoidance module is used to set the end nodes and associated nodes that need to be avoided, and query on the established search path whether there are end nodes and associated nodes that need to be avoided on the current search path.
[0010] The optical path routing avoidance method based on the graph database includes the following steps:
[0011] Step 1: extract the equipment at both ends of the local optical fiber group through the library model conversion module, then convert the local optical fiber group into a library edge, convert the accommodation facilities to which the equipment at both ends of the local optical fiber group belongs into end nodes, and input the library edge and end nodes into the graph database module;
[0012] Step 2: extracting entity objects associated with both ends of the local optical fiber through the entity object conversion module, and converting the entity objects into associated nodes according to the association between the entity objects and the local optical fiber group, and inputting the associated nodes into the graph database module;
[0013] Step 3: Extract any two end nodes as the starting point and the end point through the graph database module, and search for a search path of a specified length between the starting point and the end point. If there is a search path of the specified length, proceed to step 4.
[0014] Step 4: Set the end nodes and associated nodes that need to be avoided through the graph database module, query whether there are end nodes that need to be avoided in the search path, and query whether the current search path is associated with the associated nodes that need to be avoided, and exclude the search path containing the end nodes and associated nodes that need to be avoided;
[0015] Step 5: Output the remaining search paths.
[0016] In order to better implement the present invention, further, in the step 1, the devices at both ends of the local optical fiber are extracted through the library model conversion module, it is determined whether the devices at both ends of the local optical fiber are the same, and the local optical fibers with the same devices at both ends are merged into a local optical fiber group.
[0017] In order to better implement the present invention, further, in step 2, for the associated entity object and the local fiber group, the ENTITY-ID of the entity object is established, the LINK-ID of the local fiber group is established, and then a mapping between the ENTITY-ID and the LINK-ID is established.
[0018] In order to better implement the present invention, further, when querying whether there is an associated node on the search path, only the ENTITY-ID mapped with the LINK-ID of the current search path is traversed and queried.
[0019] In order to better implement the present invention, further, the graph database module is used to set the maximum length and the minimum length between the starting point and the end point, so that the specified length is between the maximum length and the minimum length. If the search path cannot be obtained according to the specified length, the graph database module selects any length different from the specified length between the maximum length and the minimum length to search again.
[0020] An optical path routing avoidance medium based on a graph database, wherein the medium stores a program for executing an avoidance method.
[0021] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0022] The present invention realizes fast and effective resource avoidance of optical fiber optical path routing search by introducing a graph database, inputs the local optical fiber group as a graph library edge into the graph database, inputs the accommodation facilities of the equipment at both ends of the local optical fiber group as end nodes into the graph database, inputs the entity objects at the ends of the non-local optical fiber group as associated nodes into the graph database, establishes a graph model composed of several search paths, sets the search conditions and the end nodes and associated nodes that need to be avoided through the graph database, and thus realizes efficient and low error rate optical fiber routing search. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flowchart of a method for avoiding optical path routing based on a graph database;
[0024] Figure 2 This is a schematic diagram of the architecture of the optical path routing avoidance system based on the graph database;
[0025] Figure 3 A schematic diagram for establishing a search path;
[0026] Figure 4 A schematic diagram of excluding search paths.
[0027] Among them: 1-graph database module; 2-graph library model conversion module; 3-entity object conversion module; 11-path query module; 12-avoidance module. DETAILED DESCRIPTION
[0028] The following detailed descriptions are all illustrative and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0029] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the present invention explicitly states otherwise, singular forms are also intended to include plural forms. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0030] For the convenience of description, if the words "up", "down", "left" and "right" appear in the present invention, they only indicate that they are consistent with the up, down, left and right directions of the drawings themselves, and do not limit the structure. They are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0031] Terminology explanation section: The terms "install", "connect", "connect", "fixed" and the like in the present invention should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integrated connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be an internal connection between two elements, or an interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0032] Embodiment 1:
[0033] The optical path routing avoidance system based on the graph database of this embodiment is as follows: Figure 2 As shown, it includes a graph database module 1, a graph library model conversion module 2, and an entity object conversion module 3. The graph library model conversion module 2 is used to convert the local optical fiber group into a graph library edge, and convert the equipment-related accommodating facilities at both ends of the local optical fiber group into end nodes at both ends of the graph library edge; the entity object conversion module 3 is used to convert the entity objects associated with the local optical fiber group into associated nodes, and establish an association between the associated nodes and the graph library edge; the graph database module 1 establishes several search paths based on the graph library edge and the end nodes, and searches for the end nodes and associated nodes that need to be avoided in the search paths, excludes the search paths containing the end nodes and associated nodes that need to be avoided, and outputs the remaining search paths as results.
[0034] Furthermore, the graph database module 1 includes a path query module 11 and an avoidance module 12. The path query module 11 is used to extract any two end nodes as the starting point and the end point respectively, and search for a search path of a specified length between the starting point and the end point; the avoidance module 12 is used to set the end nodes and associated nodes that need to be avoided, and query on the established search path whether there are end nodes and associated nodes that need to be avoided on the current search path.
[0035] The graph database module 1 is implemented based on the Neo4j graph database. The graph library model conversion module 2 extracts the local optical fiber group with the same equipment at both ends, and converts the local optical fiber group into a graph library edge. The accommodation facilities to which the equipment at both ends of the local optical fiber group belongs are converted into end nodes. The graph library edge and the end node are input into the Neo4j graph database to obtain a number of search paths, which are combined into a graph model. The entity object conversion module 3 extracts the entity object associated with the local optical fiber group, and converts the entity object into an associated node. The associated node is input into the Neo4j graph database to establish an associated mapping relationship between the associated node and the graph library edge.
[0036] Use the Cypher query module in the Neo4j graph database to set the associated nodes that need to be filtered; use the Cypher query module in the Neo4j graph database to establish the path query command (n)-[r]-(m), where n represents the end node as the starting point, m represents the end node as the end point, and r represents the specified length between the starting point and the end point. At the same time, use the Cypher query module in the Neo4j graph database to set the end nodes and associated nodes that need to be filtered and avoided, and then query the Neo4j graph database for the search path that meets the conditions.
[0037] Embodiment 2:
[0038] Lightpath routing avoidance methods based on graph databases, such as Figure 1 As shown, the following steps are included:
[0039] Step 1, extract the equipment at both ends of the local optical fiber group through the library model conversion module 2, then convert the local optical fiber group into a library edge, convert the accommodation facilities to which the equipment at both ends of the local optical fiber group belongs into end nodes, and input the library edge and end node into the graph database module 1;
[0040] Step 2: extract the entity objects associated with the local optical fiber through the entity object conversion module 3, and convert the entity objects into associated nodes according to the association between the entity objects and the local optical fiber groups, and input the associated nodes into the graph database module 1 to establish Figure 3 The search path shown;
[0041] Step 3: Extract any two end nodes as the starting point and the end point through the graph database module 1, and search for a search path of a specified length between the starting point and the end point. If there is a search path of the specified length, proceed to step 4;
[0042] Step 4: Set the end nodes and associated nodes that need to be avoided through the graph database module 1, query whether there are end nodes that need to be avoided in the search path, and query whether the current search path is associated with the associated nodes that need to be avoided, and exclude the search path containing the end nodes and associated nodes that need to be avoided;
[0043] Step 5: Output the remaining search paths.
[0044] Furthermore, in step 1, the equipment at both ends of the local optical fiber is extracted through the library model conversion module 2, and it is determined whether the equipment at both ends of the local optical fiber is the same, and the local optical fibers with the same equipment at both ends are merged into a local optical fiber group.
[0045] Furthermore, in step 2, for the associated entity object and the local fiber group, an ENTITY-ID of the entity object is established, a LINK-ID of the local fiber group is established, and then a mapping between the ENTITY-ID and the LINK-ID is established.
[0046] Furthermore, when querying whether there is an associated node on the search path, only the ENTITY-ID that is mapped with the LINK-ID of the current search path is traversed and queried.
[0047] like Figure 4 As shown, the ENTITY-ID of the entity object that needs to be filtered and avoided is set through the Cypher query module in the Neo4j graph database. The Cypher query module queries the LINK-ID that has a mapping relationship with the entity object according to the ENTITY-ID of the entity object, and the local fiber group associated with the entity object can be obtained. In the Cypher query module, any two end nodes are set as the starting point and the end point, and the specified length between the starting point and the end point is set. As shown in the figure, the end node A is set as the starting point, the end node B is set as the end point, the specified length between the starting point and the end point is set to 6, and the length between adjacent end nodes is used as the unit length. In the Cypher query module, the NONE function is used to set the end node C that needs to be filtered and avoided, and the ENTITY-ID corresponding to the associated node D that needs to be filtered and avoided is set.
[0048] like Figure 4As shown in the figure, the length of the rightmost search path is 5, which does not meet the specified length, so the rightmost search path is excluded. The leftmost search path meets the specified length condition, but after querying, the leftmost search path has end nodes C and associated nodes D that need to be avoided, so the leftmost search path is excluded. The middle search path meets the conditions of specified length, avoiding end nodes C, and avoiding associated nodes D, so the middle search path is output as the final result.
[0049] The Neo4j graph database is used to search for a search path of a specified length of 6 between end node A and end node B, and all search paths are traversed to see whether the ENTITY-ID of end node C and associated associated node D exists. The search path containing the ENTITY-ID of end node C and associated node D is excluded, and the remaining search paths are output.
[0050] Furthermore, the graph database module 1 is used to set the maximum length and the minimum length between the starting point and the end point, so that the specified length is between the maximum length and the minimum length. If the search path cannot be obtained according to the specified length, the graph database module 1 selects any length different from the specified length between the maximum length and the minimum length to search again. For example, the specified length is set to 6, the minimum length is set to 3, and the maximum length is set to 8. If the search path is not obtained with the specified length, the Cypher query module searches again with a length between the minimum length and the maximum length, for example, searching with a length of 4.
[0051] The other parts of this embodiment are the same as those of Embodiment 1, and thus will not be described in detail.
[0052] Embodiment 3:
[0053] The optical path routing medium based on the graph database is improved on the basis of embodiment 1 or 2, wherein the medium stores a program for executing the avoidance method, for example, the medium is a memory, and the memory is connected to a controller such as a CPU. The CPU calls and executes the program stored in the memory, thereby implementing the avoidance method.
[0054] The other parts of this embodiment are the same as those of Embodiment 1 or 2, and thus will not be described in detail.
[0055] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in any form. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention fall within the protection scope of the present invention.
Claims
1. The optical path routing avoidance system based on graph database is characterized by: The invention comprises a graph database module (1), a graph library model conversion module (2), and an entity object conversion module (3). The graph library model conversion module (2) is used to convert a local optical fiber group into a graph library edge, and to convert the accommodation facilities of the equipment at both ends of the local optical fiber group into the end nodes at both ends of the graph library edge. If the equipment has no accommodation facilities, the accommodation facilities are the equipment itself. The entity object conversion module (3) is used to convert the entity objects associated with the local optical fiber group into associated nodes, and to establish an association between the associated nodes and the graph library edge. The graph database module (1) establishes a plurality of search paths based on the graph library edge and the end nodes, and searches for the required nodes in the search paths. The end nodes and associated nodes to be avoided are excluded from the search path containing the end nodes and associated nodes to be avoided, and the remaining search paths are output as results; the graph database module (1) comprises a path query module (11) and an avoidance module (12), the path query module (11) is used to extract any two end nodes as the starting point and the end point respectively, and search for a search path of a specified length between the starting point and the end point; the avoidance module (12) is used to set the end nodes and associated nodes to be avoided, and query on the established search path whether there are end nodes and associated nodes to be avoided on the current search path.
2. A method for avoiding optical path routing based on a graph database, implemented based on the optical path routing avoidance system based on a graph database according to claim 1, characterized in that: The following steps are involved: Step 1, extracting the equipment and the equipment's accommodation facilities at both ends of the local optical fiber group through the library model conversion module (2), if there is no accommodation facility, setting the equipment itself as the accommodation facility, and then converting the local optical fiber group into a library edge, converting the equipment's accommodation facilities at both ends of the local optical fiber group into end nodes, and inputting the library edge and the end node into the graph database module (1); Step 2: extracting the entity objects associated with the local optical fiber group through the entity object conversion module (3), converting the entity objects into associated nodes according to the association between the entity objects and the local optical fiber group, and inputting the associated nodes into the graph database module (1); Step 3: Extract any two end nodes as the starting point and the end point through the graph database module (1), and search for a search path of a specified length between the starting point and the end point. If a search path of the specified length exists, proceed to step 4. Step 4: Set the end nodes and associated nodes to be avoided through the graph database module (1), query whether there are end nodes to be avoided in the search path, and query whether the current search path is associated with the associated nodes to be avoided, and exclude the search path containing the end nodes and associated nodes to be avoided; Step 5: Output the remaining search paths.
3. The optical path routing avoidance method based on graph database according to claim 2 is characterized in that: In the step 1, the equipment at both ends of the local optical fiber is extracted through the library model conversion module (2), and it is determined whether the equipment at both ends of the local optical fiber is the same, and the local optical fibers with the same equipment at both ends are combined into a local optical fiber group.
4. The optical path routing avoidance method based on graph database according to claim 3 is characterized in that: In step 2, for the associated entity object and the local fiber group, the ENTITY-ID of the entity object is established, the LINK-ID of the local fiber group is established, and then the mapping between the ENTITY-ID and the LINK-ID is established.
5. The optical path routing avoidance method based on graph database according to claim 4 is characterized in that: When querying whether there is an associated node on the search path, only traverse and query the ENTITY-ID that is mapped with the LINK-ID of the current search path.
6. The optical path routing avoidance method based on graph database according to claim 5 is characterized in that: The graph database module (1) is used to set the maximum length and the minimum length between the starting point and the end point so that the specified length is between the maximum length and the minimum length. If the search path cannot be obtained according to the specified length, the graph database module (1) selects any length between the maximum length and the minimum length that is different from the specified length to search again.
7. An optical path routing medium based on a graph database, characterized in that: The medium stores a program for executing the circumvention method described in any one of claims 2 to 6.
Citation Information
Patent Citations
Method for automatic configuration of light path
CN107404675A
Route search method and device, electronic equipment and storage medium
CN117149825A