CN112685865B - Multi-topology model merging method, device, equipment and storage medium - Google Patents

Multi-topology model merging method, device, equipment and storage medium Download PDF

Info

Publication number
CN112685865B
CN112685865B CN202110012969.0A CN202110012969A CN112685865B CN 112685865 B CN112685865 B CN 112685865B CN 202110012969 A CN202110012969 A CN 202110012969A CN 112685865 B CN112685865 B CN 112685865B
Authority
CN
China
Prior art keywords
topology
model
merging
svg
information
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.)
Active
Application number
CN202110012969.0A
Other languages
Chinese (zh)
Other versions
CN112685865A (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202110012969.0A priority Critical patent/CN112685865B/en
Publication of CN112685865A publication Critical patent/CN112685865A/en
Application granted granted Critical
Publication of CN112685865B publication Critical patent/CN112685865B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for merging multiple topological models, wherein the method comprises the steps of converting a plurality of network topological models to be merged into Scalable Vector Graphics (SVG) models in SVG format; inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files; the SVG models are combined according to the topology files, complex site position placing operation can be avoided, multi-topology model combination can be achieved rapidly, accurately and manually and controllably, vector topologies with proper sizes can be generated, cross-domain site information can be automatically identified, cross-domain sites can be combined, uniqueness and accuracy of the cross-domain sites are guaranteed, workload of combining the topology models is reduced, and speed and efficiency of combining the multi-topology models are improved.

Description

Multi-topology model merging method, device, equipment and storage medium
Technical Field
The present invention relates to the field of optical transmission network technologies, and in particular, to a method, an apparatus, a device, and a storage medium for merging multiple topology models.
Background
In the current industry, products related to communication and data systems mostly need to use a network topology model to make visual display; the network topology is a vector graph, which calculates and draws the sizes and positions of elements in the topology in a mode of object management and plane coordinate system management, thereby forming a relational network; the network topology can conveniently manage and maintain each communication station; the communication sites of the local area network cannot be changed frequently, and in order to restore the local area network topology model more quickly, the local area network topology model can be stored and backed up regularly, and the backed-up topology model is directly led into a drawing plane for displaying when the local area network topology model is needed to be used.
With the popularization of network topology application, local network topology models need to be combined among different local area networks to achieve the effects of common management and intensification; the network topology combination is to combine different topology models into one model, and the positions of the local area network sub-topology models in the model are relatively independent and are responsible for the local area network sub-topology models; if the models among the local area networks are all combined according to the original size, the vector topology after combination is large, and the manageability is poor; therefore, in order to make the vector diagram size manually controllable and convenient to manage, each submodel of the vector topology needs to be operated in a specific mode and then combined, partial tools for vector diagram can be combined, but the ideal effect can be achieved only by manually controlling the station position arrangement, and the method has the advantages of large workload, time consumption and labor consumption; meanwhile, considering the problem that the local area network directly crosses the domain sites, the rule calculation is necessarily required when the network topologies are combined, and the rule calculation cannot be realized through a network tool.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for merging multiple topological models, and aims to solve the technical problems that in the prior art, the workload for merging topological models of local area network sites is huge, time and labor are consumed, regular calculation is needed when cross-domain sites are involved, and the realization is difficult only through a network tool.
In a first aspect, the present invention provides a multi-topology model merging method, including the following steps:
converting a plurality of network topology models to be merged into an SVG model in a Scalable Vector Graphics (SVG) format;
inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files;
and merging the SVG models according to the topology file.
Optionally, the inserting a preset zoom object into each SVG model, obtaining preset zoom object information corresponding to the preset zoom object, obtaining site information of all network topology sites in each SVG model, and saving the preset zoom object information and the site information as topology files includes:
inserting a preset zooming object into each SVG model;
acquiring merging sequence information, merging direction information, zooming enabling information and zooming ratio information of the preset zooming object;
generating preset zooming object information according to the merging sequence information, the merging direction information, the zooming enabling information and the zooming proportion information;
and acquiring site information of all network topology sites in each SVG model, and storing the preset zoom object information and the site information as topology files.
Optionally, the obtaining of the site information of all network topology sites in each SVG model, and saving the preset zoom object information and the site information as topology files includes:
acquiring coordinate information and boundary information of all network topology sites in each SVG model, and generating site information according to the coordinate information and the boundary information;
and storing the preset zooming object information and the site information as a topology file.
Optionally, the merging the SVG models according to the topology file includes:
judging whether each SVG model has a target SVG model needing to be zoomed;
when the target SVG model does not exist, determining a merging sequence according to preset zooming object information in the topology file, and sequencing the topological graph of each SVG model according to the merging sequence to obtain a sequencing result;
determining a root topology and a topology to be merged according to the sequencing result, merging the site data of the topology to be merged into a site set of the root topology to form a target root topology;
and determining a final topological site boundary according to the target root topology, and merging the SVG models according to the final topological site boundary.
Optionally, after determining whether each SVG model has a target SVG model that needs to be scaled, the multi-topology model merging method further includes:
when the target SVG model exists, determining a horizontal and vertical scaling ratio according to preset scaling object information in the topology file;
zooming the site coordinates of the target SVG model according to the horizontal and vertical zooming proportion;
and sequencing the topological graphs of the SVG models according to the topological files to obtain sequencing results.
Optionally, the determining a root topology and a topology to be merged according to the sorting result, and merging the site data of the topology to be merged into a site set of the root topology to form a target root topology includes:
taking the topology with the minimum merging sequence in the sequencing result as a root topology, and taking the topology with the second minimum merging sequence as a topology to be merged;
acquiring root topology sets of all sites of the root topology and integral boundary coordinates corresponding to the root topology sets;
traversing the sequencing result, deleting the topology to be merged which is not matched with the root topology set in the sequencing result, re-determining the topology to be merged, and taking the topology to be merged which is matched with the root topology set as the target topology to be merged until the topologies in the sequencing result are matched;
and performing coordinate offset on all the sites of the target topology to be merged according to the overall boundary coordinates, and merging the site data of the topology to be merged after the offset into a site set of the root topology to form a target root topology.
Optionally, traversing the sorting result, deleting the topology to be merged in the sorting result, which is not matched with the root topology set, and re-determining the topology to be merged, taking the topology to be merged, which is matched with the root topology set, as a target topology to be merged until the topologies in the sorting result are all matched, including:
traversing the sequencing result, and matching the unique identifier of the topology to be merged with the unique identifier of the root topology set;
deleting the topology to be merged with the unmatched unique identifier, re-determining the topology to be merged, and repeating the identifier matching operation until the topologies in the sequencing result are all matched;
and taking the topology to be merged matched with the unique identifier as a target topology to be merged.
In a second aspect, to achieve the above object, the present invention further provides a multi-topology model merging device, including:
the conversion module is used for converting the plurality of network topology models to be combined into the Scalable Vector Graphics (SVG) model in the SVG format;
the system comprises an information acquisition module, a topology file generation module and a topology file generation module, wherein the information acquisition module is used for inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files;
and the merging module is used for merging the SVG models according to the topology file.
In a third aspect, to achieve the above object, the present invention further provides a multi-topology model merging device, including: a memory, a processor, and a multi-topology model merging program stored on the memory and executable on the processor, the multi-topology model merging program configured to implement the steps of the multi-topology model merging method as recited in the claims above.
In a fourth aspect, to achieve the above object, the present invention further provides a storage medium, on which a multi-topology model merging program is stored, and the multi-topology model merging program, when executed by a processor, implements the steps of the multi-topology model merging method as described above.
The multi-topology model merging method provided by the invention converts a plurality of network topology models to be merged into an SVG model in a Scalable Vector Graphics (SVG) format; inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files; according to the method, the SVG models are combined according to the topology files, complex site position placing operation can be avoided, multi-topology model combination can be achieved rapidly, accurately and manually and controllably, vector topologies with proper sizes can be generated, cross-domain site information can be automatically identified, cross-domain sites can be combined, uniqueness and accuracy of the cross-domain sites are guaranteed, workload of combining the topology models is reduced, and speed and efficiency of combining the multi-topology models are improved.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a multi-topology model merging method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a multi-topology model merging method according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a multi-topology model merging method according to a third embodiment of the present invention;
FIG. 5 is a flowchart illustrating a fourth embodiment of a multi-topology model merging method according to the present invention;
FIG. 6 is a flowchart illustrating a fifth embodiment of a multi-topology model merging method according to the present invention;
FIG. 7 is a flowchart illustrating a multi-topology model merging method according to a sixth embodiment of the present invention;
fig. 8 is a functional block diagram of a multi-topology model merging apparatus according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The solution of the embodiment of the invention is mainly as follows: converting a plurality of network topology models to be merged into a Scalable Vector Graphics (SVG) model in SVG format; inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files; according to the method, the SVG models are combined according to the topology files, complex site position placing operation can be carried out without manual operation, multi-topology model combination can be achieved quickly, accurately and manually and controllably, vector topologies with proper sizes are generated, cross-domain site information can be automatically identified, cross-domain sites are combined, uniqueness and accuracy of the cross-domain sites are guaranteed, workload of combining the topology models is reduced, speed and efficiency of combining the multi-topology models are improved, the problems that in the prior art, the workload of combining the local area network site topology models is huge, time and labor are consumed, regular calculation is needed when the cross-domain sites are involved, and difficulty is realized only through a network tool are solved.
Referring to fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a Wi-Fi interface). The Memory 1005 may be a high-speed RAM Memory or a Non-Volatile Memory (Non-Volatile Memory), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 is not intended to be limiting of the apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a multi-topology model merging program.
The apparatus of the present invention calls, through the processor 1001, the multi-topology model merging program stored in the memory 1005, and performs the following operations:
converting a plurality of network topology models to be merged into an SVG model in a Scalable Vector Graphics (SVG) format;
inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files;
and merging the SVG models according to the topology file.
Further, the processor 1001 may call the multi-topology model merging program stored in the memory 1005, and further perform the following operations:
inserting a preset zooming object into each SVG model;
acquiring merging sequence information, merging direction information, zooming enabling information and zooming ratio information of the preset zooming object;
generating preset zooming object information according to the merging sequence information, the merging direction information, the zooming enabling information and the zooming proportion information;
and acquiring site information of all network topology sites in each SVG model, and storing the preset zoom object information and the site information as topology files.
Further, the processor 1001 may call the multi-topology model merging program stored in the memory 1005, and further perform the following operations:
acquiring coordinate information and boundary information of all network topology sites in each SVG model, and generating site information according to the coordinate information and the boundary information;
and storing the preset zooming object information and the site information as a topology file.
Further, the processor 1001 may call the multi-topology model merging program stored in the memory 1005, and further perform the following operations:
judging whether each SVG model has a target SVG model needing to be zoomed;
when the target SVG model does not exist, determining a merging sequence according to preset zooming object information in the topology file, and sequencing the topological graph of each SVG model according to the merging sequence to obtain a sequencing result;
determining a root topology and a topology to be merged according to the sequencing result, merging the site data of the topology to be merged into a site set of the root topology to form a target root topology;
and determining a final topological site boundary according to the target root topology, and merging the SVG models according to the final topological site boundary.
Further, the processor 1001 may call the multi-topology model merging program stored in the memory 1005, and further perform the following operations:
when the target SVG model exists, determining a horizontal and vertical scaling ratio according to preset scaling object information in the topology file;
zooming the site coordinates of the target SVG model according to the horizontal and vertical zooming proportion;
and sequencing the topological graphs of the SVG models according to the topological files to obtain sequencing results.
Further, the processor 1001 may call the multi-topology model merging program stored in the memory 1005, and further perform the following operations:
taking the topology with the minimum merging sequence in the sequencing result as a root topology, and taking the topology with the second minimum merging sequence as a topology to be merged;
acquiring root topology sets of all sites of the root topology and integral boundary coordinates corresponding to the root topology sets;
traversing the sequencing result, deleting the topology to be merged which is not matched with the root topology set in the sequencing result, re-determining the topology to be merged, and taking the topology to be merged which is matched with the root topology set as the target topology to be merged until the topologies in the sequencing result are matched;
and performing coordinate offset on all the sites of the target topology to be merged according to the overall boundary coordinates, and merging the site data of the topology to be merged after the offset into a site set of the root topology to form a target root topology.
Further, the processor 1001 may call the multi-topology model merging program stored in the memory 1005, and further perform the following operations:
traversing the sequencing result, and matching the unique identifier of the topology to be merged with the unique identifier of the root topology set;
deleting the topology to be merged with the unmatched unique identifier, re-determining the topology to be merged, and repeating the identifier matching operation until the topologies in the sequencing result are all matched;
and taking the topology to be merged matched with the unique identifier as a target topology to be merged.
According to the scheme, a plurality of network topology models to be merged are converted into Scalable Vector Graphics (SVG) models in SVG format; inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files; combining the SVG models according to the topology file, so that complicated site position placing operation can be avoided, multi-topology model combination can be achieved quickly, accurately and manually and controllably, vector topologies with proper sizes can be generated, cross-domain site information can be automatically identified, cross-domain sites can be combined, uniqueness and accuracy of the cross-domain sites are guaranteed, workload of combining topology models is reduced, and speed and efficiency of combining the multi-topology models are improved; and the topological layout can be controlled, and the merging direction of each topological model can be adjusted.
Based on the hardware structure, the embodiment of the multi-topology model merging method is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a multi-topology model merging method according to a first embodiment of the present invention.
In a first embodiment, the multi-topology model merging method includes the following steps:
and step S10, converting the network topology models to be merged into Scalable Vector Graphics (SVG) models in SVG format.
It should be noted that the network topology models to be merged are network topology models that need to be merged, and a plurality of network topology models to be merged are subjected to Scalable Vector Graphics (SVG) format conversion, and can be converted into an SVG model in an SVG format.
Step S20, inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files.
It should be noted that the preset scaling object is a virtual scaling object which is preset and used for carrying out comparison scaling on each SVG model, meets various preset scaling parameters, corresponds to corresponding scaling parameters, namely preset scaling object information, is site related information of a network topology site, includes coordinate information of a site belonging coordinate of the network topology site and boundary information of a corresponding topology boundary of the site, and can generate a topology file through the preset scaling object information and the site information.
And step S30, merging the SVG models according to the topology file.
It can be understood that, according to preset zoom object information and site information in the topology file, a preset merging algorithm flow is combined to perform merging operation on each SVG model, so as to complete rapid merging of multiple topology models.
In the specific implementation, the merged SVG model is restored to a complete network topology, namely, a network topology graph, and a plurality of cross-domain sites may exist in a scene of actual application of the local area network topology, and the cross-domain sites between the topologies are all captured and managed and merged in a cross-domain group mode, so that the uniqueness and the accuracy of the cross-domain sites can be ensured.
According to the scheme, a plurality of network topology models to be merged are converted into Scalable Vector Graphics (SVG) models in SVG format; inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files; combining the SVG models according to the topology file, so that complicated site position placing operation can be avoided, multi-topology model combination can be achieved quickly, accurately and manually and controllably, vector topologies with proper sizes can be generated, cross-domain site information can be automatically identified, cross-domain sites can be combined, uniqueness and accuracy of the cross-domain sites are guaranteed, workload of combining topology models is reduced, and speed and efficiency of combining the multi-topology models are improved; and the topological layout can be controlled, and the merging direction of each topological model can be adjusted.
Further, fig. 3 is a schematic flowchart of a second embodiment of the multi-topology model merging method of the present invention, and as shown in fig. 3, the second embodiment of the multi-topology model merging method of the present invention is provided based on the first embodiment, and in this embodiment, the step S20 specifically includes the following steps:
and step S21, inserting a preset zooming object into each SVG model.
It should be noted that, after a preset scaling object is obtained, the preset scaling object may be inserted into the network topology of each SVG model.
And step S22, acquiring merging sequence information, merging direction information, zooming enabling information and zooming ratio information of the preset zooming object.
It can be understood that the merging order information is the merging order of the preset zooming object, that is, the merging order is marked from 1 to N, the merging order is sorted from small to large in sequence number, and the merging priority information is agreed; the merging direction information is diffusion direction information of a single topology, such as right boundary diffusion and lower boundary diffusion; the zooming enabling information is information whether the site coordinate zooming is needed or not; the scaling information is a scale for scaling the topology object horizontally and/or vertically, and a default value is generally 1, that is, no scaling is performed, or other parameters may be used, which is not limited in this embodiment.
Step S23, generating preset zooming object information according to the merging sequence information, the merging direction information, the zooming enabling information and the zooming ratio information.
It should be understood that preset zoom object information can be generated according to the merging sequence information, the merging direction information, the zoom enabling information, and the zoom ratio information, and of course, information in the preset zoom object information may also include other types of zoom parameter information, which is not limited in this embodiment.
And step S24, acquiring site information of all network topology sites in each SVG model, and saving the preset zoom object information and the site information as topology files.
It can be understood that each network topology site in each SVG model has corresponding site information, the relationship between sites can be determined to be the same domain or cross-domain through the site information, and the topology file is generated by integrating and storing the preset scaling object information and the site information.
According to the scheme, the preset zooming objects are inserted into the SVG models; acquiring merging sequence information, merging direction information, zooming enabling information and zooming ratio information of the preset zooming object; generating preset zooming object information according to the merging sequence information, the merging direction information, the zooming enabling information and the zooming proportion information; the method comprises the steps of obtaining site information of all network topology sites in each SVG model, storing preset zoom object information and the site information as topology files, achieving multi-topology model combination rapidly, accurately and manually and controllably, generating vector topology with proper size, automatically identifying cross-domain site information, combining cross-domain sites, guaranteeing uniqueness and accuracy of the cross-domain sites, reducing workload of combining topology models, and improving speed and efficiency of combining the multi-topology models.
Further, fig. 4 is a schematic flowchart of a third embodiment of the multi-topology model merging method of the present invention, and as shown in fig. 4, the third embodiment of the multi-topology model merging method of the present invention is proposed based on the second embodiment, and in this embodiment, the step S24 specifically includes the following steps:
step S241, coordinate information and boundary information of all network topology sites in each SVG model are obtained, and site information is generated according to the coordinate information and the boundary information.
It should be noted that the coordinate information is station coordinate related information of each network topology station in the SVG model, the boundary information is boundary related information of a topology boundary of each network topology station in the SVG model, and station information can be generated through the coordinate information and the boundary information.
Step S242, saving the preset zoom object information and the site information as a topology file.
It can be understood that the topology file can be generated after the preset zoom object information and the site information are sorted and stored.
According to the scheme, the method comprises the steps that coordinate information and boundary information of all network topology sites in each SVG model are obtained, and site information is generated according to the coordinate information and the boundary information; storing the preset zooming object information and the site information as a topology file; the method can automatically identify cross-domain site information, merge cross-domain sites, ensure the uniqueness and accuracy of the cross-domain sites, reduce the workload of merging topology models, and improve the speed and efficiency of merging multiple topology models.
Further, fig. 5 is a schematic flowchart of a fourth embodiment of the multi-topology model merging method according to the present invention, and as shown in fig. 5, the fourth embodiment of the multi-topology model merging method according to the present invention is provided based on the first embodiment, in this embodiment, the step S30 specifically includes the following steps:
and step S31, judging whether each SVG model has a target SVG model needing to be scaled.
It should be understood that, before merging the SVG models, it is first determined whether scaling processing needs to be performed on each SVG model, whether scaling is performed on an SVG model can be generally determined through scaling enabling information in the preset scaling object information, and if scaling is required, it is determined that the corresponding SVG model is the target SVG model.
And step S32, when the target SVG model does not exist, determining a merging sequence according to preset zooming object information in the topology file, and sequencing the topological graph of each SVG model according to the merging sequence to obtain a sequencing result.
It can be understood that, when the target SVG model does not exist, that is, scaling processing is not required, a merging order, that is, a priority order for merging each SVG model, may be determined according to preset scaling object information in the topology file, so that the topology maps corresponding to each SVG model may be sorted according to the merging order to obtain a corresponding sorting result.
Step S33, determining a root topology and a topology to be merged according to the sorting result, merging the site data of the topology to be merged into a site set of the root topology to form a target root topology.
It should be understood that the topological graph of each SVG model can be divided into a root topology and a topology to be merged according to the sorting result, so that the site data of the topology to be merged can be merged into the site set of the root topology to form a new root topology, i.e. a target root topology.
It can be understood that, generally, one topology to be merged is performed, and after one topology is merged, the merging operation of the next topology to be merged is performed, and certainly, the merging process may also be performed on multiple topologies to be merged at the same time, which is not limited in this embodiment.
And step S34, determining a final topological site boundary according to the target root topology, and merging the SVG models according to the final topological site boundary.
It should be understood that after all the topologies to be merged are merged, the overall topology site boundary, that is, the final topology site boundary, may be calculated according to the finally obtained target root topology, and the SVG models may be merged according to the final topology site boundary.
According to the scheme, whether the target SVG model needing to be zoomed exists in each SVG model is judged; when the target SVG model does not exist, determining a merging sequence according to preset zooming object information in the topology file, and sequencing the topological graph of each SVG model according to the merging sequence to obtain a sequencing result; determining a root topology and a topology to be merged according to the sequencing result, merging the site data of the topology to be merged into a site set of the root topology to form a target root topology; determining a final topological site boundary according to the target root topology, and merging the SVG models according to the final topological site boundary; the method can achieve multi-topology model combination quickly, accurately and artificially and controllably, generate vector topology with proper size, automatically identify cross-domain site information, combine cross-domain sites, ensure the uniqueness and accuracy of the cross-domain sites, reduce the workload of combining topology models, and improve the speed and efficiency of multi-topology model combination.
Further, fig. 6 is a schematic flowchart of a fifth embodiment of the multi-topology model merging method according to the present invention, and as shown in fig. 6, the fifth embodiment of the multi-topology model merging method according to the present invention is proposed based on the fourth embodiment, in this embodiment, after step S31, the multi-topology model merging method further includes the following steps:
and S311, when the target SVG model exists, determining the horizontal and vertical scaling ratio according to preset scaling object information in the topology file.
It should be noted that scaling information exists in the preset scaling object information of the topology file, the horizontal and vertical scaling can be obtained through the scaling information, the horizontal and vertical scaling is the horizontal scaling and the vertical scaling of the target SVG model, and a common default value is 1, that is, no scaling is performed; of course, other default values are also possible, and the embodiment is not limited thereto.
And S312, scaling the site coordinates of the target SVG model according to the horizontal and vertical scaling proportion.
It is understood that the site coordinates of the target SVG model are scaled horizontally and/or vertically by the horizontal-vertical scaling.
And step S313, sequencing the topological graphs of the SVG models according to the topological files to obtain sequencing results.
It should be understood that after scaling the site coordinates of the target SVG model, a subsequent merging operation may be performed, that is, a step of sorting the topology maps of the SVG models according to the topology file to obtain a sorting result is performed.
According to the scheme, when the target SVG model exists, the horizontal and vertical scaling proportion is determined according to preset scaling object information in the topology file; zooming the site coordinates of the target SVG model according to the horizontal and vertical zooming proportion; and executing the step of sequencing the topological graphs of the SVG models according to the topological files to obtain sequencing results, so that the multi-topological model combination can be achieved quickly, accurately and manually and controllably, the vector topology with proper size is generated, and the speed and efficiency of the multi-topological model combination are improved.
Further, fig. 7 is a schematic flowchart of a sixth embodiment of the multi-topology model merging method according to the present invention, and as shown in fig. 7, the sixth embodiment of the multi-topology model merging method according to the present invention is proposed based on the fourth embodiment, in this embodiment, the step S33 specifically includes the following steps:
and step S331, taking the topology with the minimum merging sequence in the sequencing result as a root topology, and taking the topology with the second minimum merging sequence as a topology to be merged.
It should be noted that, according to the sorting result, the topology with the smallest merging order in all the topologies to be merged can be used as the root topology, and the topology with the second smallest merging order can be used as the topology to be merged.
Step S332, acquiring root topology sets of all sites of the root topology and integral boundary coordinates corresponding to the root topology sets.
It is to be understood that all the sites in the root topology correspond to a root topology set, which corresponds to overall boundary coordinates.
Step S333, traversing the sequencing result, deleting the topology to be merged in the sequencing result, which is not matched with the root topology set, re-determining the topology to be merged, and taking the topology to be merged, which is matched with the root topology set, as a target topology to be merged until the topologies in the sequencing result are all matched.
It should be understood that, the sorting result is traversed, the topology to be merged that is not matched with the site in the root topology set is deleted, so that the next topology to be merged is merged, and the topology to be merged that is matched with the root topology set can be used as the target topology to be merged until the end of matching the topologies in the sorting result.
Further, the step S333 specifically includes the following steps:
traversing the sequencing result, and matching the unique identifier of the topology to be merged with the unique identifier of the root topology set;
deleting the topology to be merged with the unmatched unique identifier, re-determining the topology to be merged, and repeating the identifier matching operation until the topologies in the sequencing result are all matched;
and taking the topology to be merged matched with the unique identifier as a target topology to be merged.
It should be understood that, the matching of the root topology set circulation and the sites in the topology to be merged may generally be performed by matching unique identifiers such as site IP addresses and site names, so that the topology to be merged with the unique identifiers matched, that is, the sites with the same identifier may be recorded and form a cross-domain site object group, that is, the topology to be merged is taken as a target topology to be merged, and the topology to be merged with the unique identifiers that are not matched is deleted until the topologies in the sorting result are all matched, and in an actual operation, it is determined whether the cross-domain site object group generally takes the cross-domain site information in the root topology as the standard.
Step S334, performing coordinate offset on all the sites of the target topology to be merged according to the overall boundary coordinates, and merging the site data of the topology to be merged after the offset into the site set of the root topology to form a target root topology.
It can be understood that, through the overall boundary coordinates, coordinate shifting may be performed on all stations of the target topology to be merged, for example, if the merging direction is a horizontal direction, only X-axis shifting is performed on the coordinates of all stations of the target topology to be merged, and if the merging direction is a vertical direction, only Y-axis shifting is performed on the coordinates of all stations of the target topology to be merged; and merging the shifted site data of the topology to be merged into the site set of the root topology, namely, all the site information data of the topology to be merged are plugged into the site set of the root topology, and the merging sequence of the root topology after data merging is set to be 1, so as to form a new root topology, namely a target root topology.
According to the scheme, the topology with the minimum merging sequence in the sequencing result is used as the root topology, and the topology with the second minimum merging sequence is used as the topology to be merged; acquiring root topology sets of all sites of the root topology and integral boundary coordinates corresponding to the root topology sets; traversing the sequencing result, deleting the topology to be merged which is not matched with the root topology set in the sequencing result, re-determining the topology to be merged, and taking the topology to be merged which is matched with the root topology set as the target topology to be merged until the topologies in the sequencing result are matched; performing coordinate offset on all the sites of the target topology to be merged according to the overall boundary coordinates, and merging the site data of the topology to be merged after the offset into a site set of the root topology to form a target root topology; the method has the advantages that the multi-topology model combination can be achieved quickly, accurately and manually in a controllable mode, vector topologies with proper sizes are generated, cross-domain site information can be automatically identified, cross-domain sites can be combined, the uniqueness and accuracy of the cross-domain sites are guaranteed, the workload of the combined topology model is reduced, and the speed and efficiency of the multi-topology model combination are improved; and the topological layout can be controlled, and the merging direction of each topological model can be adjusted.
Correspondingly, the invention further provides a multi-topology model merging device.
Referring to fig. 8, fig. 8 is a functional block diagram of a multi-topology model merging apparatus according to a first embodiment of the present invention.
In a first embodiment of the multi-topology model merging device according to the present invention, the multi-topology model merging device includes:
and the conversion module 10 is used for converting the plurality of network topology models to be merged into the Scalable Vector Graphics (SVG) model in the SVG format.
The information obtaining module 20 is configured to insert a preset zoom object into each SVG model, obtain preset zoom object information corresponding to the preset zoom object, obtain site information of all network topology sites in each SVG model, and store the preset zoom object information and the site information as topology files.
And the merging module 30 is configured to merge the SVG models according to the topology file.
The steps implemented by each functional module of the multi-topology model merging device may refer to each embodiment of the multi-topology model merging method of the present invention, and are not described herein again.
In addition, an embodiment of the present invention further provides a storage medium, where a multi-topology model merging program is stored on the storage medium, and when executed by a processor, the multi-topology model merging program implements the following operations:
converting a plurality of network topology models to be merged into an SVG model in a Scalable Vector Graphics (SVG) format;
inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files;
and merging the SVG models according to the topology file.
Further, the multi-topology model merging program when executed by the processor further implements the following operations:
inserting a preset zooming object into each SVG model;
acquiring merging sequence information, merging direction information, zooming enabling information and zooming ratio information of the preset zooming object;
generating preset zooming object information according to the merging sequence information, the merging direction information, the zooming enabling information and the zooming proportion information;
and acquiring site information of all network topology sites in each SVG model, and storing the preset zoom object information and the site information as topology files.
Further, the multi-topology model merging program when executed by the processor further implements the following operations:
acquiring coordinate information and boundary information of all network topology sites in each SVG model, and generating site information according to the coordinate information and the boundary information;
and storing the preset zooming object information and the site information as a topology file.
Further, the multi-topology model merging program when executed by the processor further implements the following operations:
judging whether each SVG model has a target SVG model needing to be zoomed;
when the target SVG model does not exist, determining a merging sequence according to preset zooming object information in the topology file, and sequencing the topological graph of each SVG model according to the merging sequence to obtain a sequencing result;
determining a root topology and a topology to be merged according to the sequencing result, merging the site data of the topology to be merged into a site set of the root topology to form a target root topology;
and determining a final topological site boundary according to the target root topology, and merging the SVG models according to the final topological site boundary.
Further, the multi-topology model merging program when executed by the processor further implements the following operations:
when the target SVG model exists, determining a horizontal and vertical scaling ratio according to preset scaling object information in the topology file;
zooming the site coordinates of the target SVG model according to the horizontal and vertical zooming proportion;
and sequencing the topological graphs of the SVG models according to the topological files to obtain sequencing results.
Further, the multi-topology model merging program when executed by the processor further implements the following operations:
taking the topology with the minimum merging sequence in the sequencing result as a root topology, and taking the topology with the second minimum merging sequence as a topology to be merged;
acquiring root topology sets of all sites of the root topology and integral boundary coordinates corresponding to the root topology sets;
traversing the sequencing result, deleting the topology to be merged which is not matched with the root topology set in the sequencing result, re-determining the topology to be merged, and taking the topology to be merged which is matched with the root topology set as the target topology to be merged until the topologies in the sequencing result are matched;
and performing coordinate offset on all the sites of the target topology to be merged according to the overall boundary coordinates, and merging the site data of the topology to be merged after the offset into a site set of the root topology to form a target root topology.
Further, the multi-topology model merging program when executed by the processor further implements the following operations:
traversing the sequencing result, and matching the unique identifier of the topology to be merged with the unique identifier of the root topology set;
deleting the topology to be merged with the unmatched unique identifier, re-determining the topology to be merged, and repeating the identifier matching operation until the topologies in the sequencing result are all matched;
and taking the topology to be merged matched with the unique identifier as a target topology to be merged.
According to the scheme, a plurality of network topology models to be merged are converted into Scalable Vector Graphics (SVG) models in SVG format; inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files; combining the SVG models according to the topology file, so that complicated site position placing operation can be avoided, multi-topology model combination can be achieved quickly, accurately and manually and controllably, vector topologies with proper sizes can be generated, cross-domain site information can be automatically identified, cross-domain sites can be combined, uniqueness and accuracy of the cross-domain sites are guaranteed, workload of combining topology models is reduced, and speed and efficiency of combining the multi-topology models are improved; and the topological layout can be controlled, and the merging direction of each topological model can be adjusted.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A multi-topology model merging method is characterized by comprising the following steps:
converting a plurality of network topology models to be merged into an SVG model in a Scalable Vector Graphics (SVG) format;
inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files;
merging the SVG models according to the topology file;
wherein, the merging of the SVG models according to the topology file comprises:
judging whether each SVG model has a target SVG model needing to be zoomed;
when the target SVG model does not exist, determining a merging sequence according to preset zooming object information in the topology file, and sequencing the topological graph of each SVG model according to the merging sequence to obtain a sequencing result;
determining a root topology and a topology to be merged according to the sequencing result, merging the site data of the topology to be merged into a site set of the root topology to form a target root topology;
and determining a final topological site boundary according to the target root topology, and merging the SVG models according to the final topological site boundary.
2. The multi-topology model merging method according to claim 1, wherein the inserting a preset zoom object into each SVG model, obtaining preset zoom object information corresponding to the preset zoom object, obtaining site information of all network topology sites in each SVG model, and saving the preset zoom object information and the site information as topology files comprises:
inserting a preset zooming object into each SVG model;
acquiring merging sequence information, merging direction information, zooming enabling information and zooming ratio information of the preset zooming object;
generating preset zooming object information according to the merging sequence information, the merging direction information, the zooming enabling information and the zooming proportion information;
and acquiring site information of all network topology sites in each SVG model, and storing the preset zoom object information and the site information as topology files.
3. The multi-topology model merging method according to claim 2, wherein the obtaining of site information of all network topology sites in each SVG model, and saving the preset scaling object information and the site information as topology files comprises:
acquiring coordinate information and boundary information of all network topology sites in each SVG model, and generating site information according to the coordinate information and the boundary information;
and storing the preset zooming object information and the site information as a topology file.
4. The multi-topology model merging method according to claim 1, wherein after said determining whether there is a target SVG model requiring scaling for each SVG model, the multi-topology model merging method further comprises:
when the target SVG model exists, determining a horizontal and vertical scaling ratio according to preset scaling object information in the topology file;
zooming the site coordinates of the target SVG model according to the horizontal and vertical zooming proportion;
and sequencing the topological graphs of the SVG models according to the topological files to obtain sequencing results.
5. The method for merging multiple topology models according to claim 1, wherein the determining a root topology and a topology to be merged according to the sorting result, merging the site data of the topology to be merged into a site set of the root topology to form a target root topology, comprises:
taking the topology with the minimum merging sequence in the sequencing result as a root topology, and taking the topology with the second minimum merging sequence as a topology to be merged;
acquiring root topology sets of all sites of the root topology and integral boundary coordinates corresponding to the root topology sets;
traversing the sequencing result, deleting the topology to be merged which is not matched with the root topology set in the sequencing result, re-determining the topology to be merged, and taking the topology to be merged which is matched with the root topology set as the target topology to be merged until the topologies in the sequencing result are matched;
and performing coordinate offset on all the sites of the target topology to be merged according to the overall boundary coordinates, and merging the site data of the topology to be merged after the offset into a site set of the root topology to form a target root topology.
6. The multi-topology model merging method according to claim 5, wherein the traversing the sorted results, deleting the topology to be merged in the sorted results that does not match the root topology set, and re-determining the topology to be merged, and taking the topology to be merged that matches the root topology set as a target topology to be merged until the end of matching the topologies in the sorted results comprises:
traversing the sequencing result, and matching the unique identifier of the topology to be merged with the unique identifier of the root topology set;
deleting the topology to be merged with the unmatched unique identifier, re-determining the topology to be merged, and repeating the identifier matching operation until the topologies in the sequencing result are all matched;
and taking the topology to be merged matched with the unique identifier as a target topology to be merged.
7. A multi-topology model merging apparatus, comprising:
the conversion module is used for converting the plurality of network topology models to be combined into the Scalable Vector Graphics (SVG) model in the SVG format;
the system comprises an information acquisition module, a topology file generation module and a topology file generation module, wherein the information acquisition module is used for inserting a preset zooming object into each SVG model, acquiring preset zooming object information corresponding to the preset zooming object, acquiring site information of all network topology sites in each SVG model, and storing the preset zooming object information and the site information as topology files;
the merging module is used for merging the SVG models according to the topology file;
the merging module is also used for judging whether each SVG model has a target SVG model needing to be zoomed; when the target SVG model does not exist, determining a merging sequence according to preset zooming object information in the topology file, and sequencing the topological graph of each SVG model according to the merging sequence to obtain a sequencing result; determining a root topology and a topology to be merged according to the sequencing result, merging the site data of the topology to be merged into a site set of the root topology to form a target root topology; and determining a final topological site boundary according to the target root topology, and merging the SVG models according to the final topological site boundary.
8. A multi-topology model merging device, characterized by comprising: memory, a processor and a multi-topology model merging program stored on the memory and executable on the processor, the multi-topology model merging program being configured to implement the steps of the multi-topology model merging method as defined in any one of claims 1 to 6.
9. A storage medium, characterized in that the storage medium has stored thereon a multi-topology model merging program, which when executed by a processor implements the steps of the multi-topology model merging method according to any one of claims 1 to 6.
CN202110012969.0A 2021-01-06 2021-01-06 Multi-topology model merging method, device, equipment and storage medium Active CN112685865B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110012969.0A CN112685865B (en) 2021-01-06 2021-01-06 Multi-topology model merging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110012969.0A CN112685865B (en) 2021-01-06 2021-01-06 Multi-topology model merging method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112685865A CN112685865A (en) 2021-04-20
CN112685865B true CN112685865B (en) 2022-04-29

Family

ID=75456070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110012969.0A Active CN112685865B (en) 2021-01-06 2021-01-06 Multi-topology model merging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112685865B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559355A (en) * 2013-11-11 2014-02-05 国家电网公司 SVG (Scalable Vector Graphics) technology-based distribution network modeling system
CN107026508A (en) * 2017-06-06 2017-08-08 国网山东省电力公司济南市章丘区供电公司 A kind of Dispatching Management System of Distribution Network
WO2020159812A1 (en) * 2019-01-29 2020-08-06 Siemens Aktiengesellschaft Topology optimization of thermoelastic structures for an additive manufacturing process
CN111695223A (en) * 2020-06-11 2020-09-22 Ut斯达康通讯有限公司 Network topology layout method and system
CN112182819A (en) * 2020-09-29 2021-01-05 中南大学 Structure topology optimization method and system based on weighted graph and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559355A (en) * 2013-11-11 2014-02-05 国家电网公司 SVG (Scalable Vector Graphics) technology-based distribution network modeling system
CN107026508A (en) * 2017-06-06 2017-08-08 国网山东省电力公司济南市章丘区供电公司 A kind of Dispatching Management System of Distribution Network
WO2020159812A1 (en) * 2019-01-29 2020-08-06 Siemens Aktiengesellschaft Topology optimization of thermoelastic structures for an additive manufacturing process
CN111695223A (en) * 2020-06-11 2020-09-22 Ut斯达康通讯有限公司 Network topology layout method and system
CN112182819A (en) * 2020-09-29 2021-01-05 中南大学 Structure topology optimization method and system based on weighted graph and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于分布式技术的配电网全网数据建模研究;王宁;《中国硕士学位论文全文数据库 工程科技Ⅱ辑》;20200131;正文第33-43页 *

Also Published As

Publication number Publication date
CN112685865A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN106354976B (en) A kind of power distribution network line chart automatic drafting method based on improvement gravitation repulsion model
CN110717088A (en) Electronic document-based device management method, apparatus, device and storage medium
Yousefian et al. Self-tuned stochastic approximation schemes for non-Lipschitzian stochastic multi-user optimization and Nash games
CN109493400A (en) Handwriting samples generation method, device, computer equipment and storage medium
CN109871567B (en) Automatic generation method of photovoltaic module arrangement drawing
CN111711677A (en) Virtual and real loop visualization method, system and medium for process layer switch of intelligent substation
CN112287773A (en) Primary wiring diagram primitive identification method based on convolutional neural network
CN113079273A (en) Watermark processing method, device, electronic equipment and medium
CN110222403B (en) Electrical design system and method based on application scene
CN112685865B (en) Multi-topology model merging method, device, equipment and storage medium
CN114239237A (en) Power distribution network simulation scene generation system and method supporting digital twinning
CN101145336A (en) Image processing method and scaling system
CN106200541B (en) Method for converting function block diagram into AOV structure
KR20120075626A (en) Apparatus and method for processing electric navigational chart in web-based service
CN115378864B (en) Routing table management generation method for three-dimensional internet, electronic equipment and storage medium
CN113378069B (en) Main and distribution network automatic drawing method based on intelligent recommendation algorithm
CN115935493A (en) Method and system for converting two-dimensional CAD drawing into BIM model
CN112464040B (en) Graph structure recognition, visual display and display operation method and device
CN113269538A (en) Method, device and equipment for forwarding parallel approval nodes and storage medium
CN1499364A (en) Automatic method for converting graphic display
CN113359693A (en) Robot working method, device, equipment and storage medium
CN113627118B (en) Method, device, equipment and storage medium for automatically extracting coordinates of lamp
CN115328751B (en) Method for dynamically constructing observation page for chaos engineering experiment
CN117056994B (en) Data processing system for big data modeling
CN112987654B (en) Artificial stone numerical control machining programming method

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