Summary of the invention
According to the above-mentioned problems in the prior art, a kind of method of operative configuration object and the technical scheme of optical line terminal are now provided, be intended to the generic definition configuration of the different operating of the different parameters value realized the different configuration object of optical line terminal, avoid manually writing the trouble that configuration script causes.
Technique scheme specifically comprises:
A method for operative configuration object, is applicable to optical line terminal; Wherein, comprising:
Step S1, resolves system file pre-configured in described optical line terminal, obtains corresponding analysis result;
Step S2, according to described analysis result, extracts the specific object information being associated with and configuring object accordingly and preserves in described system file;
Step S3, for the described specific object information that each described configuration object is corresponding, generates corresponding standard operation content and preserves;
To be generated and the described standard operation content of preserving is called for being supplied to user and performing, to operate accordingly corresponding described configuration object.
Preferably, the method for this operative configuration object, wherein, in described step S1, described system file pre-configured in described optical line terminal is the file of xml form.
Preferably, the method for this operative configuration object, wherein, in described step S2, adopts the operation script of perl language generation, extracts corresponding described specific object information and preserve from described system file.
Preferably, the method for this operative configuration object, wherein, described specific object information comprises:
Be associated with the object oriented of described configuration object.
Preferably, the method for this operative configuration object, wherein, described specific object information comprises:
Be associated with the title of described configuration object's property value; And/or
Be associated with the cue mark whether described configuration object's property value is index value; And/or
Be associated with the length of described configuration object's property value; And/or
Be associated with the action type that described configuration object's property value is supported; And/or
Be associated with the interval of described configuration object's property value; And/or
Be associated with the default value of described configuration object's property value.
Preferably, the method for this operative configuration object, wherein, described step S3 specifically comprises:
Step S31a, according to the order extracted from described system file, extracts the different described specific object information being associated with described configuration object be saved successively;
Step S32a, calls corresponding data record and generates instruction, generate the data record corresponding to described configuration object and preserve according to corresponding described specific object information in database.
Preferably, the method of this operative configuration object, wherein, calls corresponding described database and generates instruction, generate corresponding query sentence of database according to described specific object information, thus create the described data record being associated with described configuration object in the database.
Preferably, the method for this operative configuration object, wherein, described step S3 specifically comprises:
Step S31b, according to the order extracted from described system file, extracts the different described specific object information being associated with described configuration object be saved successively;
Step S32b, calls corresponding data record and generates instruction, generate the data record corresponding to described configuration object and preserve according to corresponding described specific object information in database.
Step S33b, calls corresponding data recording operation and generates instruction, generate corresponding operation tool and preserve for described data record.
Preferably, the method for this operative configuration object, wherein, described operation tool comprises:
Be associated with the structure function of described data record; And/or
Be associated with the macrodefinition function of described data record; And/or
Be associated with the enumeration function of described data record.
Preferably, the method for this operative configuration object, wherein, described step S3 specifically comprises:
Step S31c, according to the order extracted from described system file, extracts the different described specific object information being associated with described configuration object be saved successively;
Step S32c, calls corresponding data record and generates instruction, generate the data record corresponding to described configuration object and preserve according to corresponding described specific object information in database;
Step S33c, calls corresponding macro generation instruction, generates for the data form comprising all described data record the grand function being associated with the table name of described data form.
Preferably, the method for this operative configuration object, wherein, described step S3 specifically comprises:
Step S31d, according to the order extracted from described system file, extracts the different described specific object information being associated with described configuration object be saved successively;
Step S32d, calls corresponding initialization directive, for all described configuration objects, generates corresponding initialization function and preserves.
Preferably, the method for this operative configuration object, wherein, described step S3 specifically comprises:
Step S31e, according to the order extracted from described system file, extracts the different described specific object information being associated with described configuration object be saved successively;
Step S32e, calls corresponding data record and generates instruction, generate the data record corresponding to described configuration object and preserve according to corresponding described specific object information in database;
Step S33e, call corresponding global operation and generate instruction, the data form comprising all described data record for described database generates corresponding global operation function and preserves.
Preferably, the method for this operative configuration object, wherein, in described step S33e, described global operation function is called and operation based on optical network management control interface agreement.
Preferably, the method for this operative configuration object, is characterized in that, in described step S33e, described global operation function can be the handling function corresponding to forwarding data library structure generated for all described configuration objects.
Preferably, the method for this operative configuration object, is characterized in that, described handling function comprises:
Be associated with the increase handling function of described forwarding data library structure; And/or
Be associated with the deletion action function of described forwarding data library structure; And/or
Be associated with the retouching operation function of described forwarding data library structure.
Preferably, the method for this operative configuration object, wherein, described optical line terminal is based on GPON network or the work of EPON network.
A kind of optical line terminal, wherein, adopts the method for above-mentioned operative configuration object.
The beneficial effect of technique scheme is: a kind of method providing operative configuration object, the generic definition configuration of the different operating of the different parameters value to the different configuration object of optical line terminal can be realized, avoid manually writing that configuration script causes is consuming time and produce the trouble of various mistakes etc.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under the prerequisite of not making creative work, all belongs to the scope of protection of the invention.
It should be noted that, when not conflicting, the embodiment in the present invention and the feature in embodiment can combine mutually.
Below in conjunction with the drawings and specific embodiments, the invention will be further described, but not as limiting to the invention.
In preferred embodiment of the present invention, based on the above-mentioned problems in the prior art, a kind of method of operative configuration object is now provided, is applicable in the application item of OLT platform.Further, in preferred embodiment of the present invention, the method for aforesaid operations configuration object is applicable in the application item of GPON/EPON OLT platform.
In preferred embodiment of the present invention, as shown in Figure 1, the method for aforesaid operations configuration object specifically comprises:
Step S1, resolves system file pre-configured in optical line terminal, obtains corresponding analysis result;
In preferred embodiment of the present invention, system file pre-configured in OLT can for having the xml file of special format.
In a preferred embodiment of the present invention, the xml file with special format can be as described hereinafter:
In preferred embodiment of the present invention, said system file also can be the file of other user-defined formats, then hereinafter described operation script also needs to do corresponding modify, to agree with the extraction operation carried out the system file of different-format.
Step S2, according to analysis result, extracts the specific object information being associated with and configuring object accordingly and preserves in system file;
In preferred embodiment of the present invention, adopt the operation script of perl language generation, from said system file, extraction obtains the specific object information of configuration object and preserves.
In a preferred embodiment of the present invention, the system file for the xml form described in above:
The system file of above described xml form, actual in description one configuration object and specific object information thereof.Then in above-mentioned steps S2, the operation script of perl language generation can be adopted, extract from the system file of above-mentioned xml form and obtain corresponding specific object information (information of runic mark).
Therefore, in preferred embodiment of the present invention, the specific object information being associated with a configuration object can comprise:
Be associated with the object oriented of configuration object, such as, " table_name_string " in the system file of above described xml form.
In preferred embodiment of the present invention, further, the specific object information being associated with a configuration object can also comprise hereinafter described one or more:
Be associated with the title of configuration object's property value, such as, " attrName " in the system file of above described xml form;
Whether be " Y/N " in the system file of the cue mark of index value such as above described xml form, wherein " Y " represents that this property value is index value, and " N " correspondingly represents that this property value is not index value if being associated with configuration object's property value;
Be associated with the length of configuration object's property value, such as, " attrSize " in the system file of above described xml form;
Be associated with the action type that configuration object's property value is supported, such as, " DataType " in the system file of above described xml form;
Be associated with the interval of configuration object's property value, such as, " Range " in the system file of above described xml form;
Be associated with the default value of configuration object's property value, such as, " default value " in the system file of above described xml form.
In preferred embodiment of the present invention, above-mentioned specific object information can also comprise other parameter values in system file or character string, and such as, " RW " in the system file of above described xml form represents the read-write properties etc. of defined attribute value.
In preferred embodiment of the present invention, in above-mentioned steps S2, the all specific object information being associated with a configuration object adopting the operation script of perl language generation to extract are saved, for generating afterwards based on GPON OLT or EPON OLT, or based on the different deploy content of OMCI agreement.
Step S3, for the specific object information that each configuration object is corresponding, generates corresponding standard operation content and preserves.
In preferred embodiment of the present invention, in above-mentioned steps S3, for different configuration objects, different operational orders can be adopted, generates different deploy contents, thus different configuration operations can be performed.
Particularly, in a preferred embodiment of the present invention, in above-mentioned steps S3, if desired carry out the establishment of table record in database for each configuration object, then corresponding step is as shown in Figure 2, specifically comprises:
Step S31a, according to the order extracted from system file, extracts the different specific object information being associated with configuration object be saved successively;
In preferred embodiment of the present invention, in above-mentioned steps S31a, in a temporary variable, will to extract before and the specific object information being associated with a configuration object of preserving extracts one by one according to sequence of extraction (or preservation order).
Step S32a, calls corresponding data record and generates instruction, generates the data record corresponding to configuration object and preserve according to corresponding specific object information in database.
In a preferred embodiment of the present invention, it can be order that above-mentioned data record generates instruction:
perl mib.pl mib.xml–sql-dir dir/。
Then run mentioned order, can for different configuration objects, database initialize order (such as corresponding sql statement) is generated, to create the data record (i.e. table record) being associated with corresponding configuration object in a database according to its specific object information.
Therefore, in this embodiment, the final every bar data record generated is corresponding standard operation content.
In a preferred embodiment of the present invention, in above-mentioned steps S3, if desired generate the operation tool meeting database and use for each configuration object, then its concrete steps as shown in Figure 3, comprising:
Step S31b, according to the order extracted from system file, extracts the different specific object information being associated with configuration object be saved successively;
Step S32b, calls corresponding data record and generates instruction, generates the data record corresponding to configuration object and preserve according to corresponding specific object information in database.
Step S33b, calls corresponding data recording operation and generates instruction, generate corresponding operation tool and preserve for data record.
In preferred embodiment of the present invention, in above-mentioned steps S33b, it can be order that above-mentioned data record generates instruction:
Perl mib.pl mib.xml–mib-dir dir/。
Then in preferred embodiment of the present invention, according to mentioned order, can for this configuration object, and the type of database at this configuration object place (namely according to corresponding data record) generates the operation tool meeting this database and use.
Particularly, in preferred embodiment of the present invention, aforesaid operations instrument can comprise hereinafter described one or more:
Be associated with the structure function of described data record.
Be associated with the macrodefinition function of described data record.
Be associated with the enumeration function of described data record.
In preferred embodiment of the present invention, aforesaid operations instrument can also comprise following one or more:
Be associated with the C file call function of described data record.
Be associated with the H file call function of described data record.
In other words, in preferred embodiment of the present invention, aforesaid operations instrument can comprise multinomial content, for calling and operating accordingly database.
Therefore, in preferred embodiment of the present invention, aforesaid operations instrument is corresponding standard operation content.
In a preferred embodiment of the present invention, in above-mentioned steps S3, if desired for all configuration objects be included in tables of data, generate the grand of the table name of definition, then its step as shown in Figure 4, specifically comprises:
Step S31c, according to the order extracted from system file, extracts the different specific object information being associated with configuration object be saved successively;
Step S32c, calls corresponding data record and generates instruction, generates the data record corresponding to configuration object and preserve according to corresponding specific object information in database;
Step S33c, calls corresponding macro generation instruction, generates for the data form comprising all data record the grand function being associated with the table name of data form.
In preferred embodiment of the present invention, in above-mentioned steps S33c, corresponding macro generation instruction can be:
Perl mib.pl mib.xml–tbl-dir dir/。
Then in preferred embodiment of the present invention, according to above-mentioned macro generation instruction, can for the grand function of table name of data form comprising all configuration objects.
In a preferred embodiment of the present invention, in above-mentioned steps S3, if desired carry out initialization operation for all configuration objects, then can carry out according to step as shown in Figure 5:
Step S31d, according to the order extracted from system file, extracts the different specific object information being associated with configuration object be saved successively;
Step S32d, calls corresponding initialization directive, for all configuration objects, generates corresponding initialization function and preserves.
In preferred embodiment of the present invention, in above-mentioned steps S32d, corresponding initialization directive can be:
Perl mib.pl mib.xml–fdb-dir dir/。
Then in preferred embodiment of the present invention, above-mentioned initialization function is corresponding standard operation content.
In a preferred embodiment of the present invention, if desired for all configuration objects, the operation based on optical network management control interface (ONU Management and Control Interface, OMCI) agreement is performed, then concrete steps are as shown in Figure 6, comprising:
Step S31e, according to the order extracted from system file, extracts the different specific object information being associated with configuration object be saved successively;
Step S32e, calls corresponding data record and generates instruction, generates the data record corresponding to configuration object and preserve according to corresponding specific object information in database;
Step S33e, call corresponding global operation and generate instruction, the data form comprising all data record for database generates corresponding global operation function and preserves.
In preferred embodiment of the present invention, for OMCI protocol stack, due to managed object (the Managed Entity for wherein database, ME) operation is fixing substantially, therefore the operation script of perl language generation can be adopted to form the interface function of corresponding global operation, and state file accordingly.Such as adopt order:
Perl me.pl mib.xml–me-dir dir/。
For all configuration objects, the handling function of forwarding database (Forwarding DataBase, FDB) structure can be generated.Be specifically as follows the function interface to the operation such as increase, amendment, deletion, acquisition that FDB structure is carried out.
In preferred embodiment of the present invention, after finishing above-mentioned configuration effort in advance, above-mentionedly to be generated and the standard operation function preserved can be provided to user calls and perform, to operate accordingly corresponding configuration object, thus avoid needing in prior art manually to write the complicated processes that corresponding script just can be configured operation.
In sum, in technical solution of the present invention, first the CONFIG.SYS of self-defining xml form (can be self-defining extended formatting) is adopted to extract the specific object information of corresponding different configuration objects and preserve according to system.Subsequently according to different configuration orders, different configuration objects is performed to the generating run of different configuration functions, thus form different standard operation contents (different handling functions), these standard operation contents are available for users to call and run, thus perform different operating functions and configuration feature.
In preferred embodiment of the present invention, also provide a kind of optical line terminal (OLT), wherein adopt the method for above described operative configuration object.
The foregoing is only preferred embodiment of the present invention; not thereby embodiments of the present invention and protection range is limited; to those skilled in the art; should recognize and all should be included in the scheme that equivalent replacement done by all utilizations specification of the present invention and diagramatic content and apparent change obtain in protection scope of the present invention.