Summary of the invention
The invention provides and a kind ofly realize the method and system of universal network management,, cause system loading pressure big and influence the problem of system running speed to solve data parsing complexity in the prior art based on configuration describing document; Further, solve prior art because of data not being verified the break down problem of probability increase of system that makes in running.
The inventive method technical scheme is as follows:
A kind of method based on configuration describing document realization universal network management comprises the steps:
The configuration data of application in user's solicit operation network;
Obtain and resolve the configuration describing document of described application, wherein this configuration describing document is set up according to the configuration requirement of such application, and comprises the configuration item of application and the corresponding relation of database table, the specific descriptions of each configuration item;
Extract the configuration data of described application from the database of creating according to described configuration describing document and be used for preserving configuration data, and generate comprise this configuration data configuration interface for user's operation.
According to said method:
The user is during by the configuration data behind the described configuration interface submit operation, this configuration data can be saved in SQL SQL statement in the database according to the automatic generation of configuration describing document, and carry out this SQL statement to preserve described configuration data.
According to the checking item in the described configuration describing document configuration data of submitting to is verified before generating SQL statement, and generated described SQL statement by the back in checking.
Further generate corresponding configuration messages when preserving the configuration data of submitting to and be handed down to corresponding application.
Preserve that configuration data takes a step forward more former configuration data and the configuration data that needs to preserve between difference, generate dissimilar configuration messages according to difference.
Described application disposes and return results according to the configuration messages change that receives, and presents to the user by described configuration interface.
Described configuration data be a class when using common data to the application broadcast configuration message.
Described configuration describing document adopts the expandable mark language XML form.
A kind of universal network management system comprises:
First storage device is used for preserving the configuration describing document of setting up respectively according to the configuration requirement of network types of applications, and this configuration describing document comprises the configuration item of application and the corresponding relation of database table, the specific descriptions of each configuration item;
Second storage device is used to preserve the database of creating according to described configuration describing document, and this database is used to store the configuration data of application;
Network management platform is used for issuing configuration messages and receiving the message that application sends to each application of network;
Database engine, be used for creating described database and preservation according to described configuration describing document, from database, extract configuration data according to described configuration describing document and generate unified configuration interface, and will be saved in described database and issue configuration messages by the configuration data that this configuration interface is submitted to network management platform;
Operating means is used to present the configuration interface of database engine generation and accepts user's operation, and submits configuration data to database engine.
Described system also comprises:
Demo plant is used for according to the checking item of described configuration describing document the configuration data of submitting to being verified.
The present invention has following beneficial effect:
1, the configuration requirement that the present invention is directed to each class application is set up corresponding configuration file, only need be when data parsing by the format analysis configuration describing document, need not to know its particular configuration data, its processing is simpler, can reduce the load of system significantly and improve the speed of service.
2, owing to resolve and need not understand concrete configuration data, realized separating of data and code, reduced the coupling between the module, strengthened the extensibility of system.
3, the configuration data of using is carried out centralized and unified management, the keeper can directly revise configuration data by the WEB page, thereby has alleviated keeper's operation burden.
Embodiment
In network management system,, cause system loading pressure big and influence problem such as system running speed for data parsing complexity in the prior art of determining; The present invention sets up the configuration describing document of consolidation form according to the configuration requirement of types of applications object, set up the database of application in the storage networking according to this configuration describing document, and come configuration data operation in the operating database with application in the supervising the network by resolving configuration describing document.
Consult shown in Figure 1ly, the network management system in the present embodiment comprises: first storage device 100, second storage device 110, database engine 120, network management platform 130 and operating means 140.First storage device 100 is used for preserving the configuration describing document of setting up respectively according to the configuration requirement of network types of applications; Second storage device 110 is used to preserve the database of creating according to described configuration describing document, and this database is used to store the configuration data of application; Network management platform 130 is used to manage a plurality of applications that move on this platform; Database engine 120 and first storage device 100, second storage device 110 and network management platform 130 have and communicate to connect, create database and be saved in second storage device 110 according to the configuration describing document in first storage device 100, from database, extract configuration data according to described configuration describing document and generate unified configuration interface, and will be saved in described database and issue configuration messages by the configuration data that this configuration interface is submitted to network management platform; Operating means 140 has with database engine 120 and communicates to connect, and presents the configuration interface that database engine generates and accepts user's operation, and submit configuration data to database engine.
Further,, also comprise a demo plant 1200 in the database engine 120, be used for the configuration data of submitting to being verified according to the checking item of described configuration describing document in order to improve the correctness of configuration data.Certainly, this demo plant 1200 also can be independent of database engine 120.
In the present embodiment, concentrated being stored in the relational database of configuration data can be provided convenience and the inconsistency that reduces data as far as possible for the administration configuration data.When application started, database engine 120 can generate configuration messages to all configurations of this application automatically and issue.When having revised the configuration item in the configuration describing document, database engine 120 can compare the content of modification and the content of database, can be only the configuration data of the part that changes be sent to application, application is revised configuration data according to this, can reduce Internet traffic as much as possible like this.When the configuration item of revising is an a certain class when using common data, network management platform 130 is revised message to all these type of application broadcast configuration.Between network management platform and each application, all use unified configuration messages interface between network management platform and cgi script, the WEB client-side program.
In the present embodiment, the configuration describing document of using for a certain class comprises at least:
1, the corresponding relation of the configuration item of application and database
Described corresponding relation shows the needed database table of configuration item that each class is used, the data that comprise in each database table.
As: for the Crawler in the search system (reptile, the program of extracting webpage) application, it has configuration item domain name server (DNS) Server, comprises IP and port numbers two parts of DNS Server.Therefore, definition database table T DNS is used for storing DNS information, and it has App_ID, IP, and three territories of Port are used for storing application identities respectively, DSN IP and DNS port numbers, wherein APP ID is used to distinguish different Crawler applications.
2, to the specific descriptions of each configuration item
For each configuration item, a name (Name) all should be arranged, data type (DataType), length (Length), look ﹠ feel (Interface), whether whether concrete constraint (Constrain) allows many records (IsMultiple), be common data contents such as (IsGlobal).
For example, the DNS IP that mentions in the last example is done as giving a definition:<Field Name=" DNS IP " DataType=" string " Length=" 15 " Interface=" text " constrain=" d+. d+. d+. d+ " IsMultiple=" true " IsGobal=" true "/〉.Wherein, what constrain used is canonical formula grammer, and it is used to retrain the user must import correct IP address.
For the ease of resolve configuration describing document and the comparison of being convenient to the configuration data content between dissimilar application, preferable mode is that configuration describing document adopts the expandable mark language XML plain text format.
(Simple Network Management Protocol provides four generic operation Get, Set, Trap and Get-Next to MIB (MIB) in SNMP) in Simple Network Management Protocol.Use for reference this kind mode, in the present embodiment configuration messages being encapsulated as increases configuration item Add, deletion configuration item Delete, revises configuration item Modify and four kinds of operations of query configuration item Get.Database engine 120 is specified contents such as action type, configuration item and value in configuration messages when issuing configuration messages; Accordingly, the application in the network resolves and carries out corresponding operation to it after receiving configuration messages.For example, the Add of DSN Server operation, it is expressed as the Crawler that receives this message increases by two dns servers, and its fragments of messages is as follows:
<Operation?subtype=″add″group=″DNS?Server″>
<Item?ID=″21″IP=″192.168.1.1″Port=″8080″/>
<Item?ID=″22″IP=″192.168.1.2″Port=″9000″/>
</Operation>
Consult shown in Figure 2ly, the concrete handling process of creating a new configuration describing document is as follows:
Step 200, the configuration needs of extract using are represented method according to the configuration data of unified Definition, for this application is set up the configuration describing document of an XML form and is saved in first storage device 100 through operating means 140.This document comprises the corresponding relation of the configuration item of application and database and to the specific descriptions of each configuration item.
Step 201, configuration describing document is passed to database engine 120 as input.
Step 202, database engine 120 are resolved configuration describing document, create the database table that store configuration data needs in second storage device 110.
Step 203, database engine 120 import the configuration data that defines in the configuration describing document in the corresponding database table.
Step 204, database engine 120 generate configuration messages, and it is handed down to network management platform 130.
Step 205, network management platform 130 issue configuration messages to application.
Step 206, application are configured and return configuration result.
Consult shown in Figure 3ly, the idiographic flow of revising a configuration describing document is as follows:
Step 300, keeper's control operation device 140 are revised the configuration data of application by the request of WEB mode.
Step 301, database engine 120 are derived original configuration data according to the configuration file of resolving application from database.
Step 302, database engine 120 generate unified configuration interface, comprise original configuration data on this interface, and offer operating means 140.
Step 303, operating means 140 present configuration interface, and accept the keeper and revise configuration data.
Step 304: operating means 140 confirms that with the keeper amended configuration data is submitted to database engine 120.
Step 305, database engine 120 are verified configuration data according to the configuration item in the configuration describing document.
After step 306, checking were passed through, database engine 120 generated corresponding SQL statement automatically configuration data is saved in (to verify by being example) in the database.
If authentication failed then abandons these data, further can on operating means 140, point out error message.
Step 307, database engine 120 compare configuration data and the database Central Plains configuration data of revising, and generate corresponding configuration messages according to the configuration data of changing unit and are handed down to network management platform 130.Action type in this configuration messages is a retouching operation.
When the configuration item of revising is an a certain class when using common data, indicating this configuration messages is broadcast.
Step 308, network management platform 130 are handed down to the application corresponding object with configuration messages.If broadcast is then broadcasted to all applications of management.
Step 309, application are resolved configuration messages, and the configuration data of self is made amendment and return results.
Step 310, the result that the display application object returns on operating means 140.
In the present embodiment, configuration describing document uses the plaintext message form of XML form to have the following advantages:
1, is convenient to resolve between the dissimilar application
Adopt JavaScript to write the WEB client-side program, write server program with C++, they can be resolved the message of XML form by means of DOM (DOM Document Object Model) tree of standard.The C++ storehouse TinyXPath that use is increased income, it supports the XPath grammer, can locate fast and computing the element among the XML.
2, be convenient to the comparison of configuration data content
As keeper during at client change configuration data, may do the just unified preservation of a lot of operations, these operations have insertion, deletion and revise, before preserving, need to compare the difference before and after revising, generate dissimilar configuration messages, adopt the Message Processing of XML form to get up easy relatively for these operations.
From the above, the invention provides the method for expressing of configuration data and the configuration management interface of application, unified the definition mode of the form and the configuration management interface of configuration describing document; By database engine configuration file is resolved, generate unified configuration interface for keeper's operation, simplified the modification process of configuration file, and original old configuration file is made contrast in amended configuration file that will receive and the database, only changing unit is handed down to application, can reduces Internet traffic.When the configuration item of revising is an a certain class when using common data, network system can be to all this type of applying broadcasting configuration modification message, and the consistent configuration messages interface that defines is all used in these communications.So just, alleviate keeper's burden, thereby improved consistency, the centrality of network applications management greatly.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.