Embodiment
In order to make the purpose, technical solutions and advantages of the present invention more outstanding, the present invention is described in further detail below in conjunction with accompanying drawing.
The present invention is as a kind of method of revealing light path design graph, its main thought is as follows: the data object that obtains the light path routing iinformation relevant with light path, obtain and the corresponding Drawing Object of the data object of described light path routing iinformation, data object and the binding of described Drawing Object with described light path routing iinformation, data type according to the data object of light path routing iinformation, determine the attribute of described Drawing Object, and the information that sets a property, according to the attribute information of the described Drawing Object that obtains, carry out pattern exhibition.
In existing network management system, realized the detailed management of comprehensive network management to the miscellaneous service resource, comprise the related website of light path, port, optical cable, fibre core, annexation etc., the light path routing iinformation that these just are known as relevant with light path, these light path routing iinformations are stored in the corresponding database, can be the database of network management system, also can be light path resource management information database.
The data object of the said light path routing iinformation of the present invention just is meant the data of obtaining from the database of preserving the light path routing iinformation, use concrete these data of object factory in database; The said Drawing Object of the present invention is to be used for describing data presented on the figure.
In order to make those skilled in the art can understand the present invention program better, the present invention is made further detailed description below in conjunction with drawings and Examples.
See also Fig. 1, be the revealing light path design graph method that the present invention proposes, described method comprises the steps:
Step S101: the data object that obtains the light path routing iinformation relevant with light path.
Before carrying out light path design, must obtain the light path routing iinformation, just this light path start-stop website, by way of website, start-stop port, by way of port, route segment information and each port route segment between annexation, and these annexations, all be stored in the related resource storehouse of network management system, it can be the professional webmaster of each producer, it also can be comprehensive network management, can carry out necessary description to these light path routing iinformations in database, these are described and have just formed the data object that we will obtain.
For example:
For the ODF port data, with the ODF data object ODF port data is described, be the ODFport table in the file layout of database.The attribute that the ODF data object comprises has:
ObjectId: the major key in the database is unique in database, is not empty;
Cuid: professional major key is the unique identification of data discrimination object, is not empty;
ClassName; ODFPORT represents the table of this object factory;
ServiceState: running status;
LabelCn: terminal title;
Type: type;
Except above-mentioned attribute, data object can also comprise other service attribute.
For station data, with station data object factory station data, and the form with table is stored in database, also comprises its corresponding attribute, database major key, professional major key (unique identification), running status, type etc.
For other light path routing iinformation data, principle repeats no more once more with above-mentioned.
Obtain the data object of these light path routing iinformations relevant, only need unique identification (Cuid) according to data object from existing network management data storehouse, take out and get final product with light path.
Step S102: obtain and the corresponding Drawing Object of the data object of described light path routing iinformation.
Drawing Object is to be used for being described in data presented on the figure, the type of Drawing Object can be point (node), group (the such Drawing Object of DFGroup is a kind ofly can launch subobject, a kind of can merge the Drawing Object of hiding subobject), connecting line (link) or the like.Drawing Object comprises the attribute that can be used for describing figure, comprises title, position, size, color, relation etc., also can add some other attribute as required, comprises service attribute that Drawing Object has, apply property etc.
For example, the Drawing Object attribute that is used to describe figure has:
Id: the unique identification of Drawing Object, can set, also can generate automatically;
Location: the position, indicate figure residing position when representing;
Pictype: the Drawing Object type, indicate the type of Drawing Object;
Size: size, indicate the size of figure when representing;
Bodycolor: color, indicate the color that figure represents;
Parent: set membership, indicate whether figure is the figure with incidence relation, can be regarded as figure and whether can launch to enter other figures that are arranged in its subrelation, also can be regarded as figure and whether can upwards return and enter other figures that are arranged in his father relation;
Pic: picture, indicate the picture that figure represents;
Drawing Object can also comprise other attributes of describing figure:
BusinessObject: other attributes such as the service attribute that the description Drawing Object is endowed, apply property.
Except above-mentioned attribute, can also comprise the attribute that frame, pattern etc. are described figure in the attribute of Drawing Object, and can add other attributes according to the demand of practical application.
Obtain and the corresponding Drawing Object of light path routing iinformation data object, can be to judge in the attribute information (being the value of attribute) of existing Drawing Object, whether exist with light path routing iinformation data object in corresponding attribute information (being the value of attribute), if exist then represent that this Drawing Object is the corresponding Drawing Object of light path routing iinformation data object, then obtains this Drawing Object.
Obtain and the corresponding Drawing Object of light path routing iinformation data object, also can be to create and the corresponding new Drawing Object of light path routing iinformation data object, the Drawing Object of being created comprises the association attributes of Drawing Object, but attribute information of these attributes (value of each attribute just) or sky, the Drawing Object of being created is the Drawing Object that obtains.
Step S103: with the data object and the described Drawing Object binding of obtaining of described light path routing iinformation.
Step S104:, determine the corresponding attribute information of the described Drawing Object that obtains according to the data type of the data object of light path routing iinformation.
Step S105:, carry out pattern exhibition according to the attribute information of the described Drawing Object that obtains;
The attribute information of Drawing Object is comprising the relevant information that represents figure, how many coordinate, what color, sizes that comprises the position be or the like, therefore when carrying out pattern exhibition, only need read these attribute informations, just can be according to the described content of these attribute informations, with figure intuitively it is shown.
Based on the said method flow process, provide embodiments of the invention 1, as shown in Figure 2, Drawing Object and attribute information thereof can also be preserved in order to explanation, be convenient to use next time.
Step S201: the data object that obtains the light path routing iinformation relevant with light path.
Step S202: obtain and the corresponding Drawing Object of the data object of described light path routing iinformation.
Step S203: with the data object and the described Drawing Object binding of obtaining of described light path routing iinformation.
Step S204:, determine the corresponding attribute information of the described Drawing Object that obtains according to the data type of the data object of light path routing iinformation.
Step S205:, carry out pattern exhibition according to the attribute information of the described Drawing Object that obtains.
Step S206: preserve described Drawing Object and attribute information thereof.
Drawing Object and attribute information thereof can be preserved with mode in a variety of forms, and read with corresponding form and mode and to get final product, for example, preserve in the mode of xml file, form with the Drawing Object tabulation is preserved, and perhaps preserves or the like with the database form.
Preserving type with the xml file is an example below:
<string>TRANS_ELEMENT-8a8082c71c468059011c4fe4b0e801af</string>
</void>
<void property=" x "〉// be the positional information of Drawing Object, the value on the x direction
<int>169</int>
</void>
<void property=" y "〉// be the positional information of Drawing Object, the value on the y direction
<int>51</int>
</void>
</object>
</void>
Based on the said method flow process, provide embodiments of the invention 2, as shown in Figure 3,
Step S301: the data object that obtains the light path routing iinformation relevant with light path.
Step S302: in the Drawing Object of having preserved, search and the corresponding Drawing Object of described data object according to the data object unique identification of the described light path routing iinformation that obtains.
Step S303: with the data object and the described Drawing Object binding of obtaining of described light path routing iinformation.With the data object of described light path routing iinformation and the method for described Drawing Object binding of obtaining, the all properties that the data object of light path routing iinformation is comprised exactly, give Drawing Object, the attribute that has promptly comprised Drawing Object itself like this in Drawing Object has comprised the attribute of the data object of light path routing iinformation again.The all properties of data object all can be placed in the BusinessObject attribute of Drawing Object generally speaking, as shown in table 1:
Table 1
Because the id of Drawing Object is the unique identification of Drawing Object, the cuid of light path routing iinformation data object is the unique identification of this data object, therefore after the binding of finishing Drawing Object and light path routing iinformation data object, both can determine the pairing light path routing iinformation of Drawing Object data object according to id and cuid.
Step S304:, determine the corresponding attribute information of the described Drawing Object that obtains according to the data type of the data object of light path routing iinformation.
After the data object of light path routing iinformation and Drawing Object were bound, Drawing Object had just had the attribute of the data object of light path routing iinformation.
Because in the present embodiment, as step S302, be in the Drawing Object of having preserved, to obtain and the corresponding Drawing Object of the data object of light path routing iinformation, therefore comprised its attribute that has when preserving this Drawing Object originally in the Drawing Object that obtains, do not need the respective attributes information of Drawing Object is made an amendment as this pattern exhibition, and the data type of the data object of light path routing iinformation does not change yet, and can determine directly that then the attribute of this Drawing Object is existing Drawing Object attribute; Change has taken place in the data type as the data object of the light path routing iinformation of this pattern exhibition, also or the respective attributes information of Drawing Object revise, then need to redefine the corresponding attribute information of Drawing Object; More as the needed graphic attribute information of this pattern exhibition than the Drawing Object attribute information of having preserved, also need to determine the corresponding attribute information of Drawing Object.
For example: in the Drawing Object of having preserved, found the port1 Drawing Object by the data object cuid of light path routing iinformation and the id of Drawing Object, can obtain the graphic attribute information of this Drawing Object, also can obtain the data object of the light path routing iinformation bound among the Drawing Object BusinessObject, if the type of light path routing iinformation data object does not change, and do not need information such as picture, color to do change, then can directly represent according to the attribute information of putting down in writing in the existing port1 Drawing Object to Drawing Object; If the type of light path routing iinformation data object changes, then with BusinessObject in the data object type of the light path routing iinformation bound inconsistent, then need to reset the respective attributes of Drawing Object; If the type of light path routing iinformation data object does not change, but light path design person wants that but giving new picture to this Drawing Object represents, and then needs to redefine the picture attribute of Drawing Object, specifies the url address of new picture; Want to change other graphic attributes of Drawing Object for light path design person, principle is the same, just repeats no more here.
Step S305:, carry out pattern exhibition according to the attribute information of the described Drawing Object that obtains.
Pattern exhibition can be finished by special pattern exhibition unit or device, as long as can read basic graphic attribute.
Step S306: preserve described Drawing Object and attribute information thereof.
When preserving Drawing Object and attribute information thereof, the all properties information of Drawing Object all can be preserved, also can only preserve the attribute information that the user is concerned about most, as id, size, position etc., other attribute information, the description according to step S304 next time in the time of can using again redefines.
All attribute informations are all preserved, reset attribute in the time of just can having avoided next use, but along with increasing of Drawing Object can cause the speed of preserving and read Drawing Object slack-off, reduce performance, therefore can only preserve the attribute information that the user is concerned about most, or relatively-stationary attribute information, the problem that so just can avoid performance to reduce.
In order better to set forth the present invention, provide embodiment 3, as shown in Figure 4.
Step S401: the data object that obtains the light path routing iinformation relevant with light path.
Step S402: create the corresponding Drawing Object of data object with described light path routing iinformation.
Create the corresponding Drawing Object of data object with the light path routing iinformation, the unique identification that generates a Drawing Object exactly is id, for this Drawing Object adds corresponding attribute, as size, position, BusinessObject etc., the attribute information of these attributes is empty.
Step S403: with the data object and the described Drawing Object binding of obtaining of described light path routing iinformation.
The attribute information that is about to the data object of light path routing iinformation is all given the BusinessObject attribute of Drawing Object.
Step S404:, determine the corresponding attribute information of the described Drawing Object that obtains according to the data type of the data object of light path routing iinformation.
The new Drawing Object of creating, except having id and BusinessObject attribute information, remaining attribute information is sky, therefore will determine the attribute information of Drawing Object according to the data type of the data object of light path routing iinformation, for example:
parent=new?DFGroup(site.getCuid());
Parent.setImage (getNodeImage (site)); // picture is set
Parent.setBusinessObject (site); // data object is set
Parent.setDisplayName (site.getLabelCn ()); // title that Drawing Object shows is set
Parent.setLocation (50+200*i, 100); // position of Drawing Object is set
Step S405:, carry out pattern exhibition according to the attribute information of the described Drawing Object that obtains.
Step S406: preserve described Drawing Object and attribute information thereof.
This step and step S306 describe similar, repeat no more.
Need to prove, embodiment 2 and embodiment 3 can be combined, form embodiment 4, as shown in Figure 5.
Step S501: the data object that obtains the light path routing iinformation relevant with light path.
Step S502: search in the Drawing Object of having preserved according to the data object unique identification of the described light path routing iinformation that obtains and whether to exist and the corresponding Drawing Object of described data object, then enter step S504 if exist, then do not enter step S503 if do not exist.
Step S503: the corresponding Drawing Object of data object of establishment and described light path routing iinformation enters step S504 then.
Step S504: with the data object and the described Drawing Object binding of obtaining of described light path routing iinformation.
Step S505:, determine the corresponding attribute information of the described Drawing Object that obtains according to the data type of the data object of light path routing iinformation.
Step S506:, carry out pattern exhibition according to the attribute information of the described Drawing Object that obtains.
Step S507: preserve described Drawing Object and attribute information thereof.
Provide embodiment 5 below in conjunction with actual conditions, the present invention is further set forth.
1, generates the website figure
Inquiry is with the data object of all relevant websites of this light path.
The Drawing Object of the website that searching loop is all judges whether exist according to the CUID of website in Drawing Object.Whether the foundation of judging is for existing the CUID of station data object in the Drawing Object attribute.
If there is this Drawing Object, the attribute information of its Drawing Object then is set according to demand, perhaps, directly pattern exhibition is come out according to the attribute information of Drawing Object.
If this Drawing Object needs the new Drawing Object of creating, the type of Drawing Object is DFGroup, and such Drawing Object is a kind ofly can launch subobject, a kind ofly can merge the Drawing Object of hiding subobject.After new Drawing Object is finished in establishment, Drawing Object and corresponding station data object being bound, is exactly all properties with the station data object, puts into the businessObject attribute of Drawing Object.The attribute information of Drawing Object is set, for example:
parent=new?DFGroup(site.getCuid());
Parent.setImage (getNodeImage (site)); // picture is set
Parent.setBusinessObject (site); // data object is set
Parent.setDisplayName (site.getLabelCn ()); // title that Drawing Object shows is set
Parent.setLocation (50+200*i, 100); // position of Drawing Object is set
According to these attribute informations the website figure is shown.At last this Drawing Object is preserved.
2, generate the port figure
Inquiry is with the data object of the relevant all of the port of this light path.
The data object of the port that searching loop is all judges whether exist according to the CUID of port in Drawing Object.
If there is this Drawing Object, the attribute of its Drawing Object then is set according to demand, perhaps, directly pattern exhibition is come out according to the attribute of Drawing Object.
If this Drawing Object does not need the new Drawing Object of creating, the type of Drawing Object is Node, and such Drawing Object is represented a little.Data object is set to the BusinessObject of Drawing Object, and with the child node that the website figure comprises that is set to of port Drawing Object, and the position of port Drawing Object is set to the centre of website Drawing Object.
After new Drawing Object is finished in establishment, Drawing Object and corresponding ports data object being bound, is exactly all properties with the port data object, puts into the businessObject attribute of Drawing Object.The attribute information of Drawing Object is set, the port pattern exhibition is come out according to these attribute informations.At last this Drawing Object is preserved.
Node.setDisplayName (dbo.getAttrString (GenericDO.AttrName.labelCn)); // title that Drawing Object shows is set
Node.setImage (getNodeImage (dbo)); // picture is set
node.setBusinessObject(dbo);
box.addElement(node);
Element?parent=box.getElementByID(origSiteCuid);
if(parent!=null){
node.setLocation(parent.getCenterLocation());
Node.setParent (parent); // position of Node is set
}
3, generate the relevant connection figure
Search all of the port, generate port list.
A),, inquire about all relevant associations respectively as querying condition with first port in the port list and last port.The data structure that checks out is List, and the element among the List is: point, line, point, line, point ...
B) in the list tabulation, find the position of current this port, be starting point with this position, List is traveled through.Find the data object A of current location+1, find the data object B of current location+2
If A is the fibre core object, and the cable system of A under not having, perhaps there is not affiliated optical cable segment, this connection is masked as incorrect link, and interrupts the related loading that connects.
If A is a channel section, but this channel section and this light path do not have incidence relation, and this connection is masked as incorrect link, and interrupt the related loading that connects.
If A is a port object (po), and this port object (po) and light path do not have incidence relation, connection is masked as incorrect link, and interrupts the related loading that connects.
Create the Drawing Object of A.
If A is the ODF terminal
Newly-built Drawing Object Node (point), the CUID of ODF terminal is set to the ID of Drawing Object, data object with the ODF terminal, be set to the BusinessObject of Drawing Object, website CUID under the ODF terminal is taken out, in figure, find corresponding Drawing Object, be set to the Parent of ODF terminal Drawing Object.
If being fibre core, A connects
Newly-built Drawing Object Link (connecting line), according to the starting point of fibre core, stop CUID seeks corresponding N ode in figure, if there is not corresponding N ode, then newly-built.With the Node of starting point, the Node of stop is set to the starting point of Link respectively.
Link?link=new?Link(path.getCuid(),origNode,destNode);
// ID that cuid is a Drawing Object is set,
link.setBusinessObject(path);
link.putLinkWidth(1);
link.putLinkOutlineWidth(1);
if(box.getElementByID(link.getID())==null){
box.addElement(link);
}
If being jumping fiber, A connects
How A is that the processing method that connects of fiber core is identical.
If A is a port
Newly-built Drawing Object Node, the CUID of port is set to the ID of Drawing Object, with the data object of port, be set to the BusinessObject of Drawing Object, website CUID under the port is taken out, in figure, find corresponding Drawing Object, be set to the Parent of port Drawing Object.
In the list tabulation, find the position of current this port, be by point with this position, List is traveled through.Find the data object A of current location-1, find the data object B of current location-2
Repetition b) operating procedure under.
4, generate the route segment figure
Newly-built Drawing Object Link is the ID of Drawing Object with the CUID of route segment, and as starting point, the starting point to route segment generates Drawing Object respectively with the starting point of route segment, and method does not repeat them here with above-mentioned generation relevant connection figure.
The present invention also discloses a kind of device of revealing light path design graph, be used to carry out above method step, please refer to Fig. 6, be the structural representation of revealing light path design graph device of the present invention.
This device comprises data object acquiring unit 101, Drawing Object acquiring unit 102, Drawing Object operating unit 103, Drawing Object attribute determining unit 104, pattern exhibition unit 105.
The course of work of this device is as follows:
Described data object acquiring unit 101 obtains the data object of the light path routing iinformation relevant with light path, can obtain from the network management system database also and can obtain from the database of other management systems.
Drawing Object acquiring unit 102 is used to obtain the corresponding Drawing Object of data object of the light path routing iinformation that obtains with described data object acquiring unit 101;
Obtain and the corresponding Drawing Object of light path routing iinformation data object, can be to judge in the attribute information (being the value of attribute) of existing Drawing Object, whether exist with light path routing iinformation data object in corresponding attribute information (being the value of attribute), if exist then represent that this Drawing Object is the corresponding Drawing Object of light path routing iinformation data object, then obtains this Drawing Object.
Obtain and the corresponding Drawing Object of light path routing iinformation data object, also can be to create and the corresponding new Drawing Object of light path routing iinformation data object, the Drawing Object of being created comprises the association attributes of Drawing Object, but attribute information of these attributes (value of each attribute just) or sky, the Drawing Object of being created is the Drawing Object that obtains.
Drawing Object operating unit 103 is used for the data object of light path routing iinformation that described data object acquiring unit 101 is obtained and Drawing Object binding that described Drawing Object acquiring unit 102 obtains;
The method of its binding is to give described Drawing Object with the attribute information of the data object of described light path routing iinformation.
Drawing Object attribute determining unit 104 is used for the data type of the light path routing iinformation data object that obtains according to described data object acquiring unit 101, determines the Drawing Object attribute information that described Drawing Object acquiring unit 102 obtains.
Pattern exhibition unit 105 is used for the Drawing Object attribute information determined according to described Drawing Object attribute determining unit 104, carries out pattern exhibition.
The pattern exhibition unit is the attribute according to Drawing Object, Drawing Object is converted to intuitive image, the pattern exhibition unit can be independent software, also can be the software in the system of being integrated into, as long as it has the function that the attribute of Drawing Object is converted to visual image.
Preferably, based on said apparatus,, also comprise for Drawing Object and attribute information thereof are preserved:
Database 106 is used to preserve described Drawing Object and attribute information thereof.
Drawing Object and attribute information thereof can be preserved with mode in a variety of forms, and read with corresponding form and mode and to get final product, mode with the xml file is preserved, and preserves with the form of Drawing Object tabulation, perhaps preserves or the like with the database form.
Preferably, when preserving Drawing Object and attribute information thereof, all properties information of Drawing Object all can be preserved, also can only preserve the attribute information that the user is concerned about most, as id, size, position etc., other attribute information redefines in the time of can using next time again.
All attribute informations are all preserved, reset attribute in the time of just can having avoided next use, but along with increasing of Drawing Object can cause the speed of preserving and read Drawing Object slack-off, reduce performance, therefore can only preserve the attribute information that the user is concerned about most, or relatively-stationary attribute information, the problem that so just can avoid performance to reduce.Existing associated description in the superincumbent method explanation repeats no more.
According to said structure, provide embodiments of the invention 5, in order to explanation the present invention, as shown in Figure 7.
This device comprises data object acquiring unit 701, and Drawing Object is searched acquiring unit 702, Drawing Object operating unit 703, Drawing Object attribute determining unit 704, pattern exhibition unit 705, database 706.
Drawing Object is searched acquiring unit 702, and the data object unique identification that is used for the light path routing iinformation that obtains according to described data object acquiring unit is searched at database and obtained and the corresponding Drawing Object of described data object.
Provide embodiments of the invention 6 according to said structure, in order to explanation the present invention, as shown in Figure 8.
This device comprises data object acquiring unit 801, Drawing Object creating unit 802, Drawing Object operating unit 803, Drawing Object attribute determining unit 804, pattern exhibition unit 805, database 806.
Data object acquiring unit 801 obtains the data object of the light path routing iinformation relevant with light path, can obtain from the network management system database also and can obtain from the database of other management systems.
Drawing Object creating unit 802 is used to create and the corresponding Drawing Object of the data object of described light path routing iinformation.
The corresponding Drawing Object of data object of establishment and light path routing iinformation, the unique identification that generates a Drawing Object exactly is id, for this Drawing Object adds corresponding attribute, as size, position, BusinessObject etc.
Drawing Object operating unit 803 is used for the data object of light path routing iinformation that described data object acquiring unit 801 is obtained and the Drawing Object binding that described Drawing Object creating unit 802 is created.
The attribute information that is about to the data object of light path routing iinformation is all given the BusinessObject attribute of Drawing Object.
Drawing Object attribute determining unit 804 according to the data type of the data object of light path routing iinformation, is determined the new corresponding attribute information of creating of Drawing Object.
The new Drawing Object of creating, except having id and BusinessObject attribute information, remaining attribute information is sky, therefore will determine the attribute information of Drawing Object according to the data type of the data object of light path routing iinformation.
Pattern exhibition unit 805 is used for the attribute of the Drawing Object determined according to Drawing Object attribute determining unit 804, and Drawing Object is represented.
Database 806 is used to preserve Drawing Object and attribute thereof.
More than the method and apparatus of a kind of revealing light path design graph provided by the present invention is described in detail, for one of ordinary skill in the art, thought according to the embodiment of the invention, part in specific embodiments and applications all can change, in sum, this description should not be construed as limitation of the present invention.