A kind of mark distributing method of management object
Technical field
The present invention relates to the administrative skill of communication network, be specifically related to a kind of mark distributing method of management object.
Background technology
A lot of communication equipments is arranged, in order to support the operate as normal of whole network in the present communication network.Network management for convenience, hardware device in the network is segmented with providing resource or standards such as the function that realizes, thereby make whole network be divided into relatively independent one by one management object (MO), by these MO are analyzed respectively, the management of mode such as design, to realize effective management to whole network.Like this, MO just can be divided into dissimilar, as: network element, veneer, circuit, sub-frame etc.
Webmaster is responsible for the management work of above-mentioned MO usually, and said here webmaster is meant the network management device that plays control and management role in whole network, is generally computer; Below as " webmaster " appears, then refer to equally in whole network, rise and control and the computer of management role.
Want above-mentioned MO is managed, that webmaster at first will be done and be that most important operation is exactly to be the sign of unique distribution of each MO in the network (ID), make a MO only have corresponding relation with an ID.Like this, webmaster just can identify the pairing different MO of this ID according to different ID, and then respectively these MO be managed when control and supervising the network.
Existing webmaster is that MO distributes the operation of ID to carry out between webmaster and database, this database is to be used for the hardware device of data such as store M O information, network topological information and network service information and/or information, database can also be realized certain data/information Recognition, function such as mutual except storage capacity is arranged.Database can be mounted on the relatively independent computer, also can with webmaster at same computer.
Need generally have two kinds for MO distributes the situation of ID, a kind of situation is will be each MO distribution ID of whole network when networking at first; Another kind of situation is dynamically to have increased new MO when the network operation, at this moment also will distribute ID for this new MO.
In addition, provide MO record sheet and ID table in the database.
Wherein, the MO record sheet in the database has a plurality of, different tables and stores dissimilar MO records respectively; The MO record that then storage class is identical in the same MO record sheet, each MO record generally includes: the ID that information such as the title of this MO, version number, model, manufacturer and position and this MO are assigned with.
Usually only have an ID table in the database, this table generally has two row, and row are deposited the table sign of all MO record sheets, and corresponding with it other row are deposited the current ID maximum that has been assigned with of each MO record sheet.Certainly, if the MO in certain MO record sheet also is not assigned with ID, this MO record sheet pairing ID maximum in the ID table then is generally 0 so.
Referring to Fig. 1, Fig. 1 is the management object sign allocation flow figure of prior art, and this flow process may further comprise the steps:
Step 101: when webmaster will distribute ID for certain MO, according to the sign of the pairing MO record sheet of the type of this MO, send an ID maximum querying command to database, this order comprises the sign of described MO record sheet; After database is received mentioned order, search for and the corresponding ID maximum of described sign according to being identified in the ID table of self storing of MO record sheet that this order comprises, and the described ID maximum that searches is carried out incremental update.Described incremental update is meant: for this ID maximum adds a positive numerical value increment, and cover above-mentioned ID maximum with the new ID value that adds this increment, the ID maximum of being distributed as the MO record sheet with described sign with this new ID value.
Step 102: after finishing above-mentioned incremental update operation, database reads the described ID maximum of finishing incremental update, and this ID maximum is sent to webmaster.After webmaster is received this ID maximum, just determine that this ID maximum is to distribute to the ID of described MO.
Step 103: webmaster will be distributed to the ID of described MO and the relevant information of this MO is stored in the database jointly, so that follow-up to operations such as this MO manage.
So far, just to have finished be the operation that MO distributes ID to webmaster.After webmaster is finished current ID batch operation, can judge whether that other MO is not assigned with ID in addition, if all MO all have been assigned with ID, webmaster then finishes the ID batch operation; If also have MO not to be assigned with ID, webmaster then continues as the MO that does not distribute ID and distributes ID.
When webmaster distributed ID for other MO, concrete operation was identical with the aforesaid operations principle.
By the above as seen, when webmaster distributes ID for MO at every turn, all to send ID maximum querying command to database, after database is finished the peaked incremental update operation of described ID, also to be sent completely the ID maximum of incremental update to webmaster, that is: when webmaster distributes ID for MO at every turn, all will carry out the peaked data interaction of relevant ID with database, this interactive operation meeting consumes the regular hour.
Therefore, above-mentioned this data interaction operates in and has major defect in the current communication network: the current MO that communication network comprised counts usually in 100,000 even 1,000,000, webmaster is that so many MO is when distributing ID, above-mentioned data interaction number of operations also can be in 100,000 even 1,000,000, make a large amount of time be consumed by above-mentioned interactive operation, cause the ID batch operation of webmaster to produce more serious time delay, influenced the speed of distributing ID.In addition, too much interactive operation meeting influences the system works performance, produces the ID assignment error, and then has reduced the correctness that ID distributes.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of mark distributing method of management object, to improve the sign dispensing rate and the correctness of management object.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention discloses a kind of mark distributing method of management object, this method may further comprise the steps:
A. webmaster obtain preserve in the database with the corresponding allocation identification of each type management object maximum, and preserve the above-mentioned sign maximum obtain;
B. webmaster search self the described sign maximum of preserving and should identify maximum and carry out incremental update, with the sign of finishing incremental update as sign for the management object distribution, with the information common storage of this management object in database;
C. webmaster judges whether not to be assigned with in addition the management object of sign, if having, then returns step b; Otherwise, process ends.
Step a comprises:
A11. webmaster sends sign maximum querying command to database, database receives that each the management object record sheet that reads in the label table of self storing behind the above-mentioned querying command identifies, and inquiry identifies maximum in the corresponding management object record sheet of each management object record sheet sign, and all sign maximums that again inquiry obtained and the management object record sheet sign that respectively identifies the maximum correspondence send to webmaster;
A12. the management object record sheet sign that webmaster will be received respectively identifies maximum and respectively identify the maximum correspondence is stored in self, and sets up corresponding relation between sign maximum and corresponding management object record sheet sign thereof;
Among the step b, webmaster is searched for the peaked method of described sign and is comprised:
Webmaster is searched in self with above-mentioned management object record table and is identified corresponding sign maximum.
Step a comprises:
A21. webmaster sends sign maximum querying command to database, database is received the pairing maximum that respectively identifies of each management object record sheet sign in the label table that reads self storage behind the above-mentioned querying command, and all sign maximums and the management object record sheet sign that respectively identifies the maximum correspondence are sent to webmaster;
A22. the management object record sheet sign that webmaster will be received respectively identifies maximum and respectively identify the maximum correspondence is stored in self, and sets up corresponding relation between sign maximum and corresponding management object record sheet sign thereof;
Among the step b, webmaster is searched for the peaked method of described sign and is comprised:
Webmaster is searched in self with above-mentioned management object record table and is identified corresponding sign maximum.
Among the step b, the method that webmaster carries out described incremental update comprises:
The sign maximum that webmaster will search adds a numerical value increment, and covers the above-mentioned sign that does not add the numerical value increment with the sign that adds this numerical value increment.
The method that webmaster is preserved the described sign maximum received and the management object record sheet sign that respectively identifies the maximum correspondence is:
Described sign maximum that webmaster will be received and the management object record sheet that respectively identifies maximum correspondence sign are kept in the internal memory of self;
Webmaster self searching for the peaked method of described sign is:
Webmaster is searched in the internal memory of self with described management object record sheet and is identified corresponding sign maximum.
After webmaster was preserved the described sign maximum of obtaining from database, database was further deleted this sign maximum of storing in the self identification table.
Among the step b, sign and the method for described management object information common storage in database that webmaster will be finished incremental update are:
Webmaster with the described sign of finishing incremental update and described management object information common storage in database with the corresponding management object record sheet of this management object type in.
Compared with prior art, in the mark distributing method of management object provided by the present invention, webmaster obtain preserve in the database with the corresponding allocation identification of each type management object maximum, and preserve the above-mentioned sign maximum obtain; During each allocation identification, the described sign maximum that the webmaster search self is preserved, and carrying out distributing to management object behind the incremental update, improved the sign dispensing rate and the correctness of management object.
Description of drawings
Fig. 1 is the management object sign allocation flow figure of prior art;
Fig. 2 is management object sign allocation flow figure of the present invention.
Embodiment
Below in conjunction with drawings and the specific embodiments to the detailed description of the invention.
In the mark distributing method of management object provided by the present invention, webmaster obtain preserve in the database with the corresponding allocation identification of each type management object maximum, and preserve the above-mentioned sign maximum obtain; During each allocation identification, the described sign maximum that the webmaster search self is preserved also should identify maximum and carried out incremental update, with the sign of finishing incremental update as sign for the management object distribution, with the information common storage of this management object in database.
Referring to Fig. 2, Fig. 2 is management object sign allocation flow figure of the present invention, and this flow process may further comprise the steps:
Step 201: webmaster will obtain the ID maximum that all types of MO in the database have been assigned with earlier before distributing ID for MO.This acquisition methods mainly contains two kinds, and wherein a kind of acquisition methods is: webmaster sends ID maximum querying command to database, and database travels through the ID table of self storing after receiving above-mentioned querying command.Described traversal ID table is exactly that ID is shown to carry out following processing: read each the MO record sheet sign in the ID table, and inquire about the ID maximum in the corresponding MO record sheet of this sign.After database had traveled through ID table, all the ID maximums that inquiry is obtained and the MO record sheet sign of each ID maximum correspondence sent to webmaster.Like this, can not have the ID maximum in the ID table, only preserve each MO record sheet sign and get final product.
The peaked acquisition methods of ID that another kind of all types of MO have been assigned with is: webmaster sends ID maximum querying command to database.After database was received above-mentioned querying command, each MO record sheet of inquiry identified and corresponding ID maximum in the ID table of self, and MO record sheet sign and the corresponding ID maximum thereof that inquiry obtains sent to webmaster.
Each ID maximum that webmaster will be received and the MO record sheet of each ID maximum correspondence sign are stored in the particular address range of self EMS memory, and between the MO record sheet sign of ID maximum and correspondence thereof, set up corresponding relation, make webmaster know that certain ID maximum of self storing is the current ID value that is assigned to of MO in which MO record sheet.As: ID maximum MO record sheet pairing with it identified common storage in the same address realm of internal memory.
In this step, database can be after sending the MO record sheet sign of described ID maximum and correspondence thereof to webmaster, all ID maximums during further the ID of deletion self storage shows, make in the database ID maximum of being distributed in each MO record sheet of storage and uniform no longer, and only by the ID maximum of being distributed in each MO record sheet of the final storage and uniform of webmaster.Can reduce like this when many places all store above-mentioned ID maximum is the error rate that MO distributes ID.
Step 202: when webmaster will distribute ID for certain MO, sign according to the pairing MO record sheet of the type of this MO, in the appropriate address scope of self EMS memory, search for and the corresponding ID maximum of described sign, and the described ID maximum that searches is carried out incremental update.Described incremental update is meant: for this ID maximum adds a positive numerical value increment, and cover above-mentioned ID maximum with the new ID value that adds this increment, the ID maximum of being distributed as the MO record sheet with described sign with this new ID value.
Step 203: webmaster reads the described ID maximum of finishing incremental update after finishing above-mentioned incremental update operation, and determines that this ID maximum is to distribute to the ID of described MO.
Step 204: webmaster will be distributed to the described ID of described MO and the relevant information of this MO is stored in the database jointly, so that follow-up to operations such as this MO manage.
Concrete ID and MO information are preserved and is operating as: webmaster will determine to distribute to the ID of described MO and the information of this MO sends to database, the ID of the described MO that database will be received and the information of this MO, be saved in jointly in the database with the corresponding MO record sheet of this MO type in.
Above-mentioned MO information can be write direct in the above-mentioned MO record sheet by manual operation by operating personnel.In addition, because webmaster stores the information of each MO,, this MO information is stored in the above-mentioned MO record sheet by database so webmaster also can send to database with above-mentioned MO information.
So far, it is the operation that a MO distributes ID that webmaster has just been finished, and can be known by the above, and step 201 is that webmaster is the preparatory operation that all MO in the network distribute ID, only need carry out this operation when webmaster distributes ID for MO for the first time usually.
Webmaster can judge whether that other MO is not assigned with ID in addition after having finished an above-mentioned ID distribution, if all MO all have been assigned with ID, webmaster then finishes the ID batch operation; If also have MO not to be assigned with ID, webmaster then continues as the MO that does not distribute ID and distributes ID.Webmaster is usually at the sum that self stores all types of MO, whether the ID maximum that sum and the type MO of webmaster by more all types of MO has been assigned with coincide, judge whether that other MO is not assigned with ID in addition, as: if the sum of a certain type MO is identical with the ID maximum that the type MO has been assigned with, webmaster determines that the type MO all has been assigned with ID; Otherwise webmaster then determines to also have MO not to be assigned with ID, and then continues as the MO distribution ID of other unallocated ID.
When webmaster distributes ID at every turn, because it has been known the ID maximum that current all types of MO is assigned with and this ID maximum has been stored in the internal memory of self, thereby no longer need by knowing the ID maximum that current all types of MO is assigned with alternately with database, and only need carry out data interaction with the internal memory of self and carry out corresponding ID batch operation, concrete ID batch operation is identical to the described operating principle of step 204 with above-mentioned steps 202.
If newly added a MO in the network, and this MO has the type that is different from other MO, before the MO that is this new adding network distributes ID, at first in database, set up and preserve a new MO record sheet so, and be that this MO record sheet distributes a new sign; Simultaneously, new sign is saved in the ID table, send a message that increases the MO record sheet newly to webmaster again, comprised in the message and increased MO record sheet sign newly, after webmaster receives message, in the internal memory of preserving MO record sheet sign and ID maximum corresponding relation, add a corresponding informance again, MO record sheet sign and corresponding ID maximum that this information record increases newly.Because the MO record sheet that increases newly is not also for MO distributes ID, so corresponding ID maximum is initialized as 0.
After this, just can carry out corresponding ID batch operation, concrete ID batch operation is identical to step 204 principle with above-mentioned steps 202.
Certainly, when distributing ID, guarantee that webmaster is current not simultaneously for other MO with same type distributes ID, otherwise webmaster is that the ID that the different MO of same type distribute will be identical simultaneously for certain MO.In order to accomplish this point, webmaster can be when distributing ID for certain MO, forbid other is had the operation of the MO distribution ID of same type, as: webmaster writes the type identification of this MO in the information of each MO, when webmaster is the MO distribution ID of A for certain type identification, if it is the current ID that also is not assigned with of MO of A that other type identification is arranged, after webmaster then will wait the described MO that is distributing ID to distribute ID, certain MO that is A for above-mentioned other type identification distributed ID again.
As seen, when webmaster is MO distribution ID at the application said method, usually only before distributing ID for MO for the first time, carry out data interaction with database, obtaining the ID maximum that current all types of MO is assigned with, rather than at every turn for all carrying out data interaction with database before the MO distribution ID.This speed when webmaster is MO distribution ID that makes is significantly improved; And, because carrying out the number of times of data interaction, webmaster and database reduce in a large number, make the probability reduction that makes mistakes of data when webmaster distributes ID, and then improved the distribution correctness of ID.
By the above as can be seen, the mark distributing method of management object provided by the present invention has improved the sign dispensing rate and the correctness of management object.The above only is process of the present invention and method embodiment, in order to restriction the present invention, all any modifications of being made within the spirit and principles in the present invention, is not equal to replacement, improvement etc., all should be included within protection scope of the present invention.