CN103475517A - Optical network terminal equipment and hardware configuration parameter saving method thereof - Google Patents

Optical network terminal equipment and hardware configuration parameter saving method thereof Download PDF

Info

Publication number
CN103475517A
CN103475517A CN2013103986732A CN201310398673A CN103475517A CN 103475517 A CN103475517 A CN 103475517A CN 2013103986732 A CN2013103986732 A CN 2013103986732A CN 201310398673 A CN201310398673 A CN 201310398673A CN 103475517 A CN103475517 A CN 103475517A
Authority
CN
China
Prior art keywords
parameter
api
statement
configuration
reads
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013103986732A
Other languages
Chinese (zh)
Other versions
CN103475517B (en
Inventor
杨淑文
赵立国
乐毅
赵红显
李双双
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN201310398673.2A priority Critical patent/CN103475517B/en
Publication of CN103475517A publication Critical patent/CN103475517A/en
Application granted granted Critical
Publication of CN103475517B publication Critical patent/CN103475517B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses optical network terminal equipment and a hardware configuration parameter saving method thereof. The method comprises the steps that a function module in the optical network terminal equipment resolves the name and value of a parameter to be configured in a hardware parameter configuration command and then calls a parameter configuration API, corresponding to the parameter name, of a hardware register in a parameter configuration module; the parameter configuration API carries out parameter configuration on the hardware register and then calls a storage statement generation API of a data sheet to which the parameter belongs in a statement encapsulating module; the storage statement generation API determines values of all fields of one record in the data sheet to which the parameter belongs, generates a character string containing an SQL storage statement and calls a database operation API in a database module; the database operation API resolves the character string and then executes the SQL storage statement. The optical network terminal equipment enables platformization of parameter saving to be achieved conveniently and is good in expandability and easy to maintain.

Description

Optical network terminal and hardware configuration parameter storing method thereof
Technical field
The present invention relates to the communications field, relate in particular to a kind of optical network terminal and hardware configuration parameter storing method thereof.
Background technology
At present, become stronger day by day in the Internet, people to the demand of the Internet be no longer solely browsing page, check news, but diversified application demand has been proposed.People's life has greatly been enriched in the appearance of the forms such as online game, online video display, telecommuting, Web TV, but proposed the requirement of more increasing also to the bandwidth of Internet simultaneously, such as tens kbps from before to 1Mbps, 2Mbps, 10Mbps, 20Mbps, hundreds of Mbps even.Now increasing domestic consumer selects network upgrade to fiber entering household, to obtain the higher network bandwidth.Therefore, increasing optical network terminal is applied by Virtual network operator.
For numerous optical network terminals, Virtual network operator, for distinguishing different application services, need to carry out parameter configuration to the hardware in optical network terminal usually, as the bias current of the laser of configuration MAC Address, IP address, optical module etc.; Such as, for the optical network unit (ONU near user side, Optical Network Unit), Virtual network operator can pass through local side apparatus, i.e. optical line terminal (OLT, Optical Line Terminal), issue configuration, hardware in ONU is configured, and the hardware configuration parameter is kept in ONU, to guarantee that the planning according to Virtual network operator that ONU can be correct is operated; Simultaneously, ONU self also can be by some hardware configuration reporting parameters to OLT, and these hardware configuration parameters are kept to ONU self inside.
At present commonplace way is, when optical network terminal is carried out to parameter configuration, by direct control FLASH sector, the parameter of configuration to be saved in to certain ad-hoc location of FLASH sector in the industry.
In actual applications, the present inventor finds that the method, for numerous parameters, has the parameter of incidence relation especially each other, be difficult to carry out hardware and software platform, and follow-up autgmentability is also not so good, and maintenance cost is higher; For example, the application service difference of the optical network terminal of different model, the technical staff need to develop different application programs so that the hardware configuration parameter is saved in the FLASH sector for the optical network terminal of different model, is difficult to hardware and software platform; And, the technical staff when exploitation need to be different to these application program safeguarded, and follow-up when optical network device is upgraded, if relate to replacing or the increase of some hardware, need change or increase many about the hardware configuration parameter is saved in to the code in the FLASH sector, make technical staff's inconvenience be safeguarded, upgrade optical network terminal, the autgmentability of optical network terminal is bad.
Therefore, be necessary to provide a kind of be convenient to hardware and software platform, autgmentability better, more optical network terminal and the hardware configuration parameter storing method thereof of easy care.
Summary of the invention
The defect existed for above-mentioned prior art, the invention provides a kind of optical network terminal and hardware configuration parameter storing method thereof, and the hardware and software platform that the parameter of being more convenient for is preserved also has preferably autgmentability, is easier to safeguard.
According to an aspect of the present invention, provide a kind of hardware configuration parameter storing method of optical network terminal, having comprised:
Functional module in described optical network terminal is resolved it after receiving the hardware parameter configuration-direct, parameter name and the parameter value of the parameter of the wish configuration that obtains wherein carrying; The parameter configuration API of the hardware register corresponding with this parameter name in the call parameters configuration module, and import described parameter name and parameter value into this parameter configuration API;
After this parameter configuration API carries out parameter configuration according to the parameter value imported into to this hardware register, under the parameter of the described wish configuration in the call statement package module, the storage statement of tables of data generates API, and described parameter name and parameter value are passed to this storage statement generation API;
This storage statement generates API according to the parameter name and the parameter value that import into, determines the value of each field of a record in tables of data under the parameter of wanting to be saved in described wish configuration; Afterwards, generate and take after the character string that SQL storage statement is content, the database manipulation API in the calling data library module, and this character string is passed in described database manipulation API;
After described database manipulation API is resolved the character string of importing into, carry out described SQL storage statement: the record of determining is increased in the affiliated tables of data of parameter of described wish configuration, or according to the corresponding record in tables of data under the parameter of the described wish configuration of the record modification of determining; In the affiliated database of data table stores in this device non-volatile memory part of the parameter of described wish configuration.
Preferably, after the parameter name and parameter value of the parameter configured in the described wish that obtains wherein carrying, also comprise:
The parameter that described functional module is called hardware register corresponding with this parameter name in described parameter configuration module reads API, and imports described parameter name into this parameter and read API;
This parameter reads the statement that reads of tables of data under the parameter of the described wish configuration in the described statement package module of API Calls and generates API, and described parameter name is passed to this reads statement and generate API;
This reads statement and generates API according to the parameter name of importing into, determines the record of wanting to read in the affiliated tables of data of parameter of described wish configuration; Afterwards, generate and take after SQL reads the character string that statement is content, call the database manipulation API in described database module, and this character string is passed in described database manipulation API;
Described database manipulation API carries out described SQL and reads statement after the character string of importing into is resolved: the record determined is read out under the parameter of described wish configuration to backward this tables of data and read statement and generate API and return;
This reads statement and generates record that API returns to described database manipulation API and read API to this parameter and return;
This parameter reads API and this is read to statement generates the record that API returns and return to described functional module;
Described functional module compares the parameter value that parses with the parameter value of parameter corresponding in the record returned; And
The parameter configuration API of the hardware register corresponding with this parameter name in described call parameters configuration module is specially: if the comparative result difference is called the parameter configuration API of the hardware register corresponding with this parameter name.
Further, after described database manipulation API is resolved the character string of importing into, after carrying out described SQL storage statement, also comprise:
If described functional module receives the hardware parameter reading command that the user sends, it is resolved parameter name and the parameter value of the parameter of wanting to read that obtains wherein carrying;
The parameter that described functional module is called hardware register corresponding to the parameter name of the parameter of wanting to read with this in described parameter configuration module reads API, and this parameter name is passed to this parameter reads API;
This parameter reads the statement that reads of tables of data under this parameter of wanting to read in the described statement package module of API Calls and generates API, and the parameter name of the parameter that this is wanted to read is passed to this and reads statement and generate API;
This reads statement and generates API according to the parameter name of importing into, determines the record of wanting to read in the affiliated tables of data of the described parameter of wanting to read; Afterwards, generate and take after SQL reads the character string that statement is content, the database manipulation API in the calling data library module, and this character string is passed in described database manipulation API;
Described database manipulation API carries out described SQL and reads statement after the character string of importing into is resolved: by reading out backward this in tables of data under the described parameter of wanting to read of record from described database of determining, read statement and generate API and return;
This reads statement and generates record that API returns to described database manipulation API and read API to this parameter and return;
This parameter reads API and this is read to statement generates the record that API returns and return to described functional module;
The parameter value that described functional module reads out corresponding parameter according to the parameter name of the described parameter of wanting to read from the record returned returns to described user.
Preferably, described functional module also comprises before receiving the hardware parameter configuration-direct:
After described optical network terminal starts, described parameter configuration module detects in described nonvolatile semiconductor memory member whether created database; If not, in described nonvolatile semiconductor memory member, create described database.
Wherein, describedly create described database in described nonvolatile semiconductor memory member, specifically comprise:
Described parameter configuration module creates described database in described nonvolatile semiconductor memory member, and each tables of data in described database; Wherein, the parameter that has each other incidence relation in this equipment is created in same tables of data; In this equipment with other parameter not each parameter of any incidence relation of tool be created in same tables of data.
According to another aspect of the present invention, also provide a kind of optical network terminal, having comprised: functional module, parameter configuration module, statement package module and database module;
Wherein, described functional module, for after receiving the hardware parameter configuration-direct, is resolved it, parameter name and the parameter value of the parameter of the wish configuration that obtains wherein carrying; The parameter configuration API of the hardware register corresponding with this parameter name in the call parameters configuration module, and import described parameter name and parameter value into this parameter configuration API;
After parameter configuration API in described parameter configuration module carries out parameter configuration for the parameter value according to importing into to this hardware register, under the parameter of the described wish configuration in the call statement package module, the storage statement of tables of data generates API, and described parameter name and parameter value are passed to this storage statement generation API;
Storage statement in described statement package module generates API for parameter name and parameter value according to importing into, determines the value of each field of a record in tables of data under the parameter of wanting to be saved in described wish configuration; Afterwards, generate and take after the character string that SQL storage statement is content, the database manipulation API in the calling data library module, and this character string is passed in described database manipulation API;
Database manipulation API in described database module is for after being resolved the character string of importing into, carry out described SQL storage statement: in the affiliated tables of data of parameter of the described wish configuration that the record of determining is increased to, or according to the corresponding record in tables of data under the parameter of the described wish configuration of the record modification of determining; In the affiliated database of data table stores in this device non-volatile memory part of the parameter of described wish configuration.
Preferably, described functional module is also after the parameter name and parameter value for the parameter of the wish configuration that obtains wherein carrying described, the parameter of calling hardware register corresponding with this parameter name in described parameter configuration module reads API, and imports described parameter name into this parameter and read API;
Parameter in described parameter configuration module reads API and generates API for the statement that reads of tables of data under the parameter of the described wish configuration of calling described statement package module, and described parameter name is passed to this reads statement and generate API; And this reads statement and generates API and also for the record that described database manipulation API is returned, to this parameter, read API and return;
The statement that reads in described statement package module generates API for the parameter name according to importing into, determines the record of wanting to read in the affiliated tables of data of parameter of described wish configuration; Afterwards, generate and take after SQL reads the character string that statement is content, call the database manipulation API in described database module, and this character string is passed in described database manipulation API; And this reads statement and generates API and also for the record that described database manipulation API is returned, to this parameter, read API and return;
Database manipulation API in described database module also for to described read statement and generate character string that API imports into and resolved after, carry out described SQL and read statement: the record of determining is read out to backward this under the parameter of described wish configuration read statement and generate API and return tables of data;
Also for the parameter value by parsing, the parameter value of the parameter corresponding with the record returned compares described functional module; If the comparative result difference, call the parameter configuration API of the hardware register corresponding with this parameter name.
Preferably, if the hardware parameter reading command that described functional module also sends for receiving the user is resolved parameter name and the parameter value of the parameter of wanting to read that obtains wherein carrying to it; And the parameter of hardware register corresponding to the parameter name of calling the parameter of wanting to read with this in described parameter configuration module reads API, and import this parameter name into this parameter and read API;
Parameter in described parameter configuration module reads the statement that reads of tables of data under this parameter of wanting to read in the described statement package module of API Calls and generates API, and the parameter name of the parameter that this is wanted to read is passed to this and reads statement and generate API; And this parameter reads API and also for this being read to statement, generates the record that API returns and return to described functional module;
The statement that reads in described statement package module generates API according to the parameter name of importing into, determines the record of wanting to read in the affiliated tables of data of the described parameter of wanting to read; Afterwards, generate and take after SQL reads the character string that statement is content, call the database manipulation API in described database module, and this character string is passed in described database manipulation API; And this reads statement and generates API and also for the record that described database manipulation API is returned, to this parameter, read API and return;
Database manipulation API in described database module carries out described SQL and reads statement after also being resolved for the character string to importing into: by reading out backward this in tables of data under the described parameter of wanting to read of record from described database of determining, read statement and generate API and return; And
Described functional module also reads out corresponding parameter from the record returned parameter value for the parameter name according to the described parameter of wanting to read returns to described user.
Preferably, described parameter configuration module also, for after starting at described optical network terminal, detects in described nonvolatile semiconductor memory member and whether has created database; If not, in described nonvolatile semiconductor memory member, create described database.
Preferably, described parameter configuration module specifically for creating described database and each tables of data in described database in described nonvolatile semiconductor memory member; Wherein, the parameter that has each other incidence relation in this equipment is created in same tables of data; In this equipment with other parameter not each parameter of any incidence relation of tool be created in same tables of data.
In technical scheme of the present invention, in the nonvolatile semiconductor memory member in optical network terminal, be provided for the database of the tables of data of storage hardware configuration parameter; And the hardware configuration parameter is preserved and carried out modularization, for no optical network terminal, parameter configuration module, statement package module and database manipulation module can be transplanted on the optical network terminal of different model, and realize the hardware and software platform that parameter is preserved, and are easy to maintainability; Parameter configuration module, statement package module and the database manipulation module of technical staff based on having developed simultaneously, and only need be absorbed in the writing of code of functional module, make exploitation, maintenance cost lower; And optical network terminal increases or while revising service, can increase or the field of Update Table storehouse corresponding data table, make optical network terminal there is autgmentability preferably.
The accompanying drawing explanation
The internal structure block diagram of MCU systems soft ware in the optical network terminal that Fig. 1 is the embodiment of the present invention;
The systems soft ware that Fig. 2 is the embodiment of the present invention carries out the flow chart of a kind of method of hardware configuration parameter preservation;
The systems soft ware that Fig. 3 is the embodiment of the present invention carries out the flow chart of the another kind of method of hardware configuration parameter preservation;
The method flow diagram of the parameter value of parameter in the systems soft ware reading database that Fig. 4 is the embodiment of the present invention.
Embodiment
Below with reference to accompanying drawing, technical scheme of the present invention is carried out to clear, complete description, obviously, described embodiment is only a part of embodiment of the present invention, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills are resulting all other embodiment under the prerequisite of not making creative work, all belong to the scope that the present invention protects.
The terms such as " module " used in this application, " system " are intended to comprise the entity relevant to computer, such as but not limited to hardware, firmware, combination thereof, software or executory software.For example, module can be, but be not limited in: the thread of the process of moving on processor, processor, object, executable program, execution, program and/or computer.For instance, the application program of moving on computing equipment and this computing equipment can be modules.One or more modules can be positioned at an executory process and/or thread, and module also can and/or be distributed on a computer between two or more computers.
The present inventor considers, can the nonvolatile semiconductor memory member (as FLASH) in optical network terminal in, a database is set, and creates the tables of data of corresponding each parameter in database; After in optical network terminal, the systems soft ware of MCU receives the hardware parameter configuration-direct, parameter name and the parameter value of the parameter configured according to wish, call corresponding application programs, hardware register is carried out to parameter configuration, and tables of data under the parameter of wish configuration is carried out to corresponding operating, preserve the hardware configuration parameter; Like this, realize separating of application program and database, optical network terminal for different model, perhaps optical network terminal is changed or while increasing hardware, realize that the application program of parameter configuration and the preservation of hardware configuration parameter is without change, therefore, be convenient to the hardware and software platform of parameter preservation and there is autgmentability preferably; And the technical staff only need be placed in energy the exploitation of the application service of optical network terminal, needn't be more the exploitation of the concern bottom hardware parameters application program of preserving, make maintenance cost lower.
Describe technical scheme of the present invention in detail below in conjunction with accompanying drawing.The optical network terminal that the embodiment of the present invention provides comprises micro-control unit (MCU, Micro Control Unit), the systems soft ware of MCU can carry out the hardware parameter configuration according to the hardware parameter configuration-direct received, and the hardware configuration parameter is preserved; As shown in Figure 1, the systems soft ware of MCU comprises: functional module 101, parameter configuration module 102, statement package module 103 and database module 104.
In fact, after optical network terminal starts, the parameter configuration module 102 in systems soft ware needs to detect in the nonvolatile semiconductor memory member in this equipment whether created database; If not create database is arranged in volatile memory device, parameter configuration module 102 is opened database, and does not need creation database again; On the contrary, if not do not create database is arranged in volatile memory device, parameter configuration module 102 creation database in nonvolatile semiconductor memory member, to store each hardware configuration parameter, it specifically comprises:
Parameter configuration module 102 creation database in nonvolatile semiconductor memory member, and each tables of data in database; Wherein, the parameter that has each other incidence relation in this equipment is created in same tables of data; In this equipment with other parameter not each parameter of any incidence relation of tool be created in same tables of data; And each tables of data in database can be created according to the business demand of Virtual network operator.
For example, VLAN(Virtual Local Area Network, VLAN) parameters such as the port numbers (port) in the configuration, pattern (mode), default vlan value (dflt_tpid, dflt_vid, dflt_cfi), default priority (dflt_pri), there is each other incidence relation, these parameters can be created in same tables of data, as shown in table 1 below:
Table 1
port mode dflt_tpid dflt_vid dflt_cfi dflt_pri
1 1 0x8100 100 1 7
2 2 0x8100 200 1 6
3 3 0x8100 300 1 5
4 4 0x8100 400 1 4
For another example, user name, password, MAC Address (MAC ADDR) or equipment SN(Serial Number) number etc. parameter, with any incidence relation of tool not of other parameter in this equipment, these parameters can be created in same tables of data, as shown in table 2 below:
Table 2
Module I D Parameter name Parameter value The length of value
1 MAC?ADDR 00:12:34:56:78:01 18
Afterwards, database based on having created and each tables of data in database, the systems soft ware of MCU in optical network terminal can operate the hardware register in hardware is configured by SET, and the hardware configuration parameter is saved in the tables of data of database, its method flow as shown in Figure 2, specifically comprises the steps:
S201: functional module 101 is resolved it after receiving the hardware parameter configuration-direct, parameter name and the parameter value of the parameter of the wish configuration that obtains wherein carrying.
Particularly, the hardware in optical network terminal is carried out to the mode of parameter configuration, a kind of is to be configured in the OLT side, and OLT sends the hardware parameter configuration-direct to optical network terminal, and this mode is the most commonly used; A kind of is by the WEB page or CLT(command-lineinterface in the optical network terminal side, Command Line Interface) order, send the hardware parameter configuration-direct to optical network terminal; In this step, after functional module 101 receives the hardware parameter configuration-direct, the hardware parameter configuration-direct is resolved parameter name and the parameter value of the parameter that the wish that obtains carrying in the hardware parameter configuration-direct configures;
For example, MAC Address in the OLT side to ONU is configured, after OLT receives that the user configures the message of MAC Address, can be by OAM(Operation Administration and Maintenance, operation management maintain) or OMCI(Optical network unit Management and Control Interface, optical network unit management and control interface) agreement, send the hardware parameter configuration-direct to ONU; After functional module 101 in ONU receives the hardware parameter configuration-direct, the parsing that it is carried out to respective protocol, the parameter name of the MAC Address that obtains wherein carrying and parameter value, as parameter name is: MAC ADDR, parameter value is: 00:12:34:56:78:01.
S202: the parameter configuration API of the hardware register corresponding with this parameter name in functional module 101 call parameters configuration modules 102, and import parameter name and the parameter value of the parameter of wish configuration into this parameter configuration API.
Particularly, store parameter configuration API(Application Programming Interface in parameter configuration module 102, API); Functional module 101 obtains the parameter name and parameter value of parameter of wish configuration according to above-mentioned steps S201 after, the parameter configuration API of the hardware register corresponding with this parameter name in call parameters configuration module 102, import parameter name and the parameter value of the parameter of wish configuration into this parameter configuration API;
For example, in above-mentioned steps S201, after functional module 101 obtains the parameter name MAC ADDR and parameter value 00:12:34:56:78:01 of the MAC Address of carrying in the hardware parameter configuration-direct, MIB_PonMacAddrSet(in call parameters configuration module 102) function (being parameter configuration API), and import parameter name MAC ADDR and parameter value 00:12:34:56:78:01 into MIB_PonMacAddrSet() function.
S203: parameter configuration API carries out parameter configuration according to the parameter value imported into to this hardware register.
For example, the above-mentioned configuration of ONU being carried out to MAC Address, MIB_PonMacAddrSet() function, according to the parameter value 00:12:34:56:78:01 that imports into, calls HAL_PonMacAddrSet() function realizes the MAC Address configuration of corresponding hardware register (as the hardware register of network interface card).
S204: under the parameter of the wish configuration in parameter configuration API Calls statement package module 103, the storage statement of tables of data generates API, and the parameter name of the parameter of wish configuration and parameter value are passed to this storage statement generation API.
Particularly, store the storage statement in statement package module 103 and generate API; After parameter configuration API carries out parameter configuration to hardware register in above-mentioned steps S203, the hardware configuration parameter need to be saved in the tables of data in database, therefore, in this step, under the parameter of the wish configuration in parameter configuration API Calls statement package module 103, the storage statement of tables of data generates API, and the parameter name of the parameter of wish configuration and parameter value are passed to this storage statement generation API.
For example, the above-mentioned configuration of ONU being carried out to MAC Address, MIB_PonMacAddrSet() DB_CmnTblWrite(of tables of data under the MAC Address in function call statement package module 103) function (store statement and generate API), and parameter name MAC ADDR and parameter value 00:12:34:56:78:01 are passed to DB_CmnTblWrite() function.
S205: this storage statement generates API according to the parameter name and the parameter value that import into, determines the value of each field of a record in tables of data under the parameter of wanting to be saved in the wish configuration.
For example, the above-mentioned configuration of ONU being carried out to MAC Address, DB_CmnTblWrite() function (store statement and generate API) can, according to the parameter name MAC ADDR imported into and parameter value 00:12:34:56:78:01, be determined the value of each field of a record in the affiliated tables of data of MAC Address; As table 2, the value of each field in the record of determining can be: module I D:1; Parameter name: MACADDR; Parameter value: 00:12:34:56:78:01; The length of value: 18.
S206: this storage statement generates API and generates and take after the character string that SQL storage statement is content, the database manipulation API in calling data library module 104, and this character string is passed in database manipulation API.
Particularly, this storage statement generates API and generates and take the character string that SQL storage statement is content, is specifically as follows: use sprintf() function will need the SQL storage statement of carrying out to change into character string; And database manipulation API can be specifically the interface API that existing embedded database provides.
For example, sprintf (sql, " INSERT INTO %s VALUES (' %d', ' %d', ' %d', ' %s'); ", CMN_TBL_NAME, record.mod_id, record.name_id, record.value_len, record.value); // will add record the changed string, exist in the SQL array.
S207: after database manipulation API is resolved the character string of importing into, carry out SQL storage statement.
Particularly, after database manipulation API is resolved the character string of importing into, the process of carrying out SQL storage statement comprises: the record of determining is increased in the affiliated tables of data of parameter of wish configuration, or according to the corresponding record in tables of data under the parameter of the record modification wish configuration of determining; Wherein, in the affiliated database of data table stores in this device non-volatile memory part of the parameter of wish configuration.
Like this, according to hardware configuration parameter storing method of the present invention, optical network terminal for different model, if business demand or application service difference, the technical staff only need to carry out change or the modification of the code of functional module, and parameter configuration module, the code of statement package module and database manipulation module without, perhaps only need be increased or the Update Table table in the little change of certain field, thereby, greatly be convenient to parameter configuration module, statement package module and database manipulation module can be transplanted on the optical network terminal of different model, and realize the hardware and software platform that parameter is preserved, and be easy to maintainability, parameter configuration module, statement package module and the database manipulation module of technical staff based on having developed simultaneously, and only need be absorbed in the writing of code of functional module, make exploitation, maintenance cost lower, and optical network terminal increases or while revising service, can increase or the field of Update Table storehouse corresponding data table, there is autgmentability preferably.
As a kind of more excellent mode, functional module 101 is being resolved the hardware parameter configuration-direct, after the parameter name and parameter value of the parameter of the wish configuration that obtains wherein carrying, the parameter name of the parameter that can also configure according to wish, the parameter value of this parameter recorded in reading database, parameter value by it with the parameter parsed compares, and carry out parameter configuration according to comparative result, and the preservation of hardware configuration parameter, the flow process of its method, as shown in Figure 3, specifically comprise the steps:
S301: functional module 101 is resolved it after receiving the hardware parameter configuration-direct, parameter name and the parameter value of the parameter of the wish configuration that obtains wherein carrying.
S302: in functional module 101 call parameters configuration modules 102, the parameter of the hardware register corresponding with this parameter name reads API, and imports the parameter name of the parameter of wish configuration into this parameter and read API.
Particularly, also store parameter in parameter configuration module 102 and read API;
For example, it is above-mentioned when ONU is carried out to the configuration of MAC Address, MIB_PonMacAddrGet(in functional module 101 call parameters configuration modules 102) function (being that parameter reads API), and the parameter name MAC ADDR of MAC Address is passed to MIB_PonMacAddrGet() function.
S303: this parameter reads the statement that reads of tables of data under the parameter of wish in API Calls statement package module 103 configuration and generates API, and the parameter name of the parameter of wish configuration is passed to this reads statement and generate API.
Particularly, also store in statement package module 103 and read statement generation API;
For example, it is above-mentioned when ONU is carried out to the configuration of MAC Address, MIB_PonMacAddrGet() DB_CmnTblRead(in function call statement package module 103) function (read statement and generate API), and the parameter name MAC ADDR of MAC Address is passed to DB_CmnTblRead() function.
S304: this reads statement and generates API according to the parameter name of importing into, determines the record of wanting to read in the affiliated tables of data of parameter of wish configuration.
S305: this reads statement and generates API and generate and take after SQL reads the character string that statement is content, the database manipulation API in calling data library module 104, and this character string is passed in database manipulation API.
S306: after database manipulation API is resolved the character string of importing into, carry out SQL and read statement.
Particularly, after database manipulation API is resolved the character string of importing into, carry out the process that SQL reads statement and comprise: the record of determining is read out to backward this under the parameter of wish configuration read statement and generate API and return tables of data.
S307: this reads statement and generates record that API returns to database manipulation API and read API to this parameter and return.
S308: this parameter reads API and this is read to statement generates the record that API returns and return to functional module 101.
S309: functional module 101 compares the parameter value that parses with the parameter value of parameter corresponding in the record returned, and judges that whether comparative result is identical; If not, perform step S310; Otherwise, execution step S320.
Particularly, functional module 101 compares the parameter value that parses with the parameter value of parameter corresponding in the record returned; If comparative result difference, show that the hardware configuration that the hardware parameter configuration-direct relates to is operating as new configuration operation, need to carry out the configuration of hardware register, and the hardware configuration parameter is saved in the tables of data in database, specific as follows stating shown in step S310; If comparative result is identical, show that the hardware configuration operation that the hardware parameter configuration-direct relates to is the configuration operation that repeats to issue, functional module 101 is according to following steps S320, directly the hardware configuration operational order is abandoned and gets final product, thereby avoid repeating the configuration of hardware register, and avoid repeating the hardware configuration parameter is saved in the tables of data in database.
S310: the hardware register corresponding to parameter name of the systems soft ware pair parameter configured with wish carries out parameter configuration, and the parameter value of the parameter of wish configuration is saved in the affiliated tables of data of parameter of wish configuration in database, concrete grammar is as shown in step S202~S207.
S320: functional module 101 abandons this hardware parameter configuration-direct, does not carry out any operation.
The systems soft ware of MCU in optical network terminal of the present invention can also operate by GET, reads out the parameter value of the parameter in database, and the flow process of its method as shown in Figure 4, specifically comprises the steps:
S401: functional module 101 receives the hardware parameter reading command that the user sends, and it is resolved to parameter name and the parameter value of the parameter of wanting to read that obtains wherein carrying.
Particularly, the WEB page the user by OLT or optical network terminal side or CLT order are after the systems soft ware transmission hardware parameter reading command of the MCU in optical network terminal, the hardware parameter reading command that 101 pairs of functional modules in systems soft ware receive is resolved, and parameter name and the parameter value of the parameter of wanting to read that obtains carrying.
S402: the parameter of the hardware register that the parameter name of the parameter of wanting to read with this in functional module 101 call parameters configuration modules 102 is corresponding reads API, and imports this parameter name into this parameter and read API.
S403: this parameter reads the statement that reads of tables of data under this parameter of wanting to read in API Calls statement package module 103 and generates API, and the parameter name of the parameter that this is wanted to read is passed to this and reads statement and generate API.
S404: this reads statement and generates API according to the parameter name of importing into, determines the record of wanting to read in the affiliated tables of data of the parameter of wanting to read.
S405: this reads statement and generates API and generate and take after SQL reads the character string that statement is content, the database manipulation API in calling data library module 104, and this character string is passed in database manipulation API.
S406: after database manipulation API is resolved the character string of importing into, carry out SQL and read statement.
Particularly, after database manipulation API is resolved the character string of importing into, carry out the process that SQL reads statement and comprise: by reading out backward this in tables of data under the described parameter of wanting to read of record from database of determining, read statement and generate API and return.
S407: this reads statement and generates record that API returns to database manipulation API and read API to this parameter and return.
S408: parameter reads API and this is read to statement generates the record that API returns and return to functional module 101.
S409: the parameter value that functional module 101 reads out corresponding parameter according to the parameter name of the parameter of wanting to read from the record returned returns to user/OLT.
Because the configuration data of hardware register is consistent with the data in database file, therefore, the hardware parameter reading command that systems soft ware sends according to user/OLT can directly read out the parameter value of corresponding parameter from database; Thereby, reduced the time of reading out data, and saved from hardware register and, after reading out data, data have been resolved to required memory headroom.
In technical scheme of the present invention, in the nonvolatile semiconductor memory member in optical network terminal, be provided for the database of the tables of data of storage hardware configuration parameter; And the hardware configuration parameter is preserved and carried out modularization, for no optical network terminal, parameter configuration module, statement package module and database manipulation module can be transplanted on the optical network terminal of different model, and realize the hardware and software platform that parameter is preserved, and are easy to maintainability; Parameter configuration module, statement package module and the database manipulation module of technical staff based on having developed simultaneously, and only need be absorbed in the writing of code of functional module, make exploitation, maintenance cost lower; And optical network terminal increases or while revising service, can increase or the field of Update Table storehouse corresponding data table, make optical network terminal there is autgmentability preferably.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. the hardware configuration parameter storing method of an optical network terminal, is characterized in that, comprising:
Functional module in described optical network terminal is resolved it after receiving the hardware parameter configuration-direct, parameter name and the parameter value of the parameter of the wish configuration that obtains wherein carrying; The parameter configuration API of the hardware register corresponding with this parameter name in the call parameters configuration module, and described parameter name and parameter value are passed to this parameter configuration API;
After this parameter configuration API carries out parameter configuration according to the parameter value imported into to this hardware register, under the parameter of the described wish configuration in the call statement package module, the storage statement of tables of data generates API, and described parameter name and parameter value are passed to this storage statement generation API;
This storage statement generates API according to the parameter name and the parameter value that import into, determines the value of each field of a record in tables of data under the parameter of wanting to be saved in described wish configuration; Afterwards, generate and take after the character string that SQL storage statement is content, the database manipulation API in the calling data library module, and this character string is passed in described database manipulation API;
After described database manipulation API is resolved the character string of importing into, carry out described SQL storage statement: the record of determining is increased in the affiliated tables of data of parameter of described wish configuration, or according to the corresponding record in tables of data under the parameter of the described wish configuration of the record modification of determining; In the affiliated database of data table stores in this device non-volatile memory part of the parameter of described wish configuration.
2. the method for claim 1, is characterized in that, after the parameter name and parameter value of the parameter configured in the described wish that obtains wherein carrying, also comprises:
The parameter that described functional module is called hardware register corresponding with this parameter name in described parameter configuration module reads API, and imports described parameter name into this parameter and read API;
This parameter reads the statement that reads of tables of data under the parameter of the described wish configuration in the described statement package module of API Calls and generates API, and described parameter name is passed to this reads statement and generate API;
This reads statement and generates API according to the parameter name of importing into, determines the record of wanting to read in the affiliated tables of data of parameter of described wish configuration; Afterwards, generate and take after SQL reads the character string that statement is content, call the database manipulation API in described database module, and this character string is passed in described database manipulation API;
Described database manipulation API carries out described SQL and reads statement after the character string of importing into is resolved: the record determined is read out under the parameter of described wish configuration to backward this tables of data and read statement and generate API and return;
This reads statement and generates record that API returns to described database manipulation API and read API to this parameter and return;
This parameter reads API and this is read to statement generates the record that API returns and return to described functional module;
Described functional module compares the parameter value that parses with the parameter value of parameter corresponding in the record returned; And
The parameter configuration API of the hardware register corresponding with this parameter name in described call parameters configuration module is specially: if the comparative result difference is called the parameter configuration API of the hardware register corresponding with this parameter name.
3. the method for claim 1, is characterized in that, after described database manipulation API is resolved the character string of importing into, after carrying out described SQL storage statement, also comprises:
If described functional module receives the hardware parameter reading command that the user sends, it is resolved parameter name and the parameter value of the parameter of wanting to read that obtains wherein carrying;
The parameter that described functional module is called hardware register corresponding to the parameter name of the parameter of wanting to read with this in described parameter configuration module reads API, and this parameter name is passed to this parameter reads API;
This parameter reads the statement that reads of tables of data under this parameter of wanting to read in the described statement package module of API Calls and generates API, and the parameter name of the parameter that this is wanted to read is passed to this and reads statement and generate API;
This reads statement and generates API according to the parameter name of importing into, determines the record of wanting to read in the affiliated tables of data of the described parameter of wanting to read; Afterwards, generate and take after SQL reads the character string that statement is content, the database manipulation API in the calling data library module, and this character string is passed in described database manipulation API;
Described database manipulation API carries out described SQL and reads statement after the character string of importing into is resolved: by reading out backward this in tables of data under the described parameter of wanting to read of record from described database of determining, read statement and generate API and return;
This reads statement and generates record that API returns to described database manipulation API and read API to this parameter and return;
This parameter reads API and this is read to statement generates the record that API returns and return to described functional module;
The parameter value that described functional module reads out corresponding parameter according to the parameter name of the described parameter of wanting to read from the record returned returns to described user.
4. described method as arbitrary as claim 1-3, is characterized in that, before described functional module receives the hardware parameter configuration-direct, also comprises:
After described optical network terminal starts, described parameter configuration module detects in described nonvolatile semiconductor memory member whether created database; If not, in described nonvolatile semiconductor memory member, create described database.
5. method as claimed in claim 4, is characterized in that, describedly creates described database in described nonvolatile semiconductor memory member, specifically comprises:
Described parameter configuration module creates described database in described nonvolatile semiconductor memory member, and each tables of data in described database; Wherein, the parameter that has each other incidence relation in this equipment is created in same tables of data; In this equipment with other parameter not each parameter of any incidence relation of tool be created in same tables of data.
6. an optical network terminal, is characterized in that, comprising: functional module, parameter configuration module, statement package module and database module; Wherein
Described functional module, for after receiving the hardware parameter configuration-direct, is resolved it, parameter name and the parameter value of the parameter of the wish configuration that obtains wherein carrying; The parameter configuration API of the hardware register corresponding with this parameter name in the call parameters configuration module, and import described parameter name and parameter value into this parameter configuration API;
After parameter configuration API in described parameter configuration module carries out parameter configuration for the parameter value according to importing into to this hardware register, under the parameter of the described wish configuration in the call statement package module, the storage statement of tables of data generates API, and described parameter name and parameter value are passed to this storage statement generation API;
Storage statement in described statement package module generates API for parameter name and parameter value according to importing into, determines the value of each field of a record in tables of data under the parameter of wanting to be saved in described wish configuration; Afterwards, generate and take after the character string that SQL storage statement is content, the database manipulation API in the calling data library module, and this character string is passed in described database manipulation API;
Database manipulation API in described database module is for after being resolved the character string of importing into, carry out described SQL storage statement: in the affiliated tables of data of parameter of the described wish configuration that the record of determining is increased to, or according to the corresponding record in tables of data under the parameter of the described wish configuration of the record modification of determining; In the affiliated database of data table stores in this device non-volatile memory part of the parameter of described wish configuration.
7. equipment as claimed in claim 6, is characterized in that,
Described functional module is also after the parameter name and parameter value for the parameter of the wish configuration that obtains wherein carrying described, the parameter of calling hardware register corresponding with this parameter name in described parameter configuration module reads API, and imports described parameter name into this parameter and read API;
Parameter in described parameter configuration module reads API and generates API for the statement that reads of tables of data under the parameter of the described wish configuration of calling described statement package module, and described parameter name is passed to this reads statement and generate API; And this reads statement and generates API and also for the record that described database manipulation API is returned, to this parameter, read API and return;
The statement that reads in described statement package module generates API for the parameter name according to importing into, determines the record of wanting to read in the affiliated tables of data of parameter of described wish configuration; Afterwards, generate and take after SQL reads the character string that statement is content, call the database manipulation API in described database module, and this character string is passed in described database manipulation API; And this reads statement and generates API and also for the record that described database manipulation API is returned, to this parameter, read API and return;
Database manipulation API in described database module also for to described read statement and generate character string that API imports into and resolved after, carry out described SQL and read statement: the record of determining is read out to backward this under the parameter of described wish configuration read statement and generate API and return tables of data;
Also for the parameter value by parsing, the parameter value of the parameter corresponding with the record returned compares described functional module; If the comparative result difference, call the parameter configuration API of the hardware register corresponding with this parameter name.
8. equipment as claimed in claim 6, is characterized in that,
If the hardware parameter reading command that described functional module also sends for receiving the user, resolved parameter name and the parameter value of the parameter of wanting to read that obtains wherein carrying to it; And the parameter of hardware register corresponding to the parameter name of calling the parameter of wanting to read with this in described parameter configuration module reads API, and import this parameter name into this parameter and read API;
Parameter in described parameter configuration module reads the statement that reads of tables of data under this parameter of wanting to read in the described statement package module of API Calls and generates API, and the parameter name of the parameter that this is wanted to read is passed to this and reads statement and generate API; And this parameter reads API and also for this being read to statement, generates the record that API returns and return to described functional module;
The statement that reads in described statement package module generates API according to the parameter name of importing into, determines the record of wanting to read in the affiliated tables of data of the described parameter of wanting to read; Afterwards, generate and take after SQL reads the character string that statement is content, call the database manipulation API in described database module, and this character string is passed in described database manipulation API; And this reads statement and generates API and also for the record that described database manipulation API is returned, to this parameter, read API and return;
Database manipulation API in described database module carries out described SQL and reads statement after also being resolved for the character string to importing into: by reading out backward this in tables of data under the described parameter of wanting to read of record from described database of determining, read statement and generate API and return; And
Described functional module also reads out corresponding parameter from the record returned parameter value for the parameter name according to the described parameter of wanting to read returns to described user.
9. described equipment as arbitrary as claim 6-8, is characterized in that,
Described parameter configuration module also, for after starting at described optical network terminal, detects in described nonvolatile semiconductor memory member and whether has created database; If not, in described nonvolatile semiconductor memory member, create described database.
10. equipment as claimed in claim 9, is characterized in that,
Described parameter configuration module specifically for creating described database and each tables of data in described database in described nonvolatile semiconductor memory member; Wherein, the parameter that has each other incidence relation in this equipment is created in same tables of data; In this equipment with other parameter not each parameter of any incidence relation of tool be created in same tables of data.
CN201310398673.2A 2013-09-04 2013-09-04 Optical network terminal and hardware configuration parameter storing method thereof Active CN103475517B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310398673.2A CN103475517B (en) 2013-09-04 2013-09-04 Optical network terminal and hardware configuration parameter storing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310398673.2A CN103475517B (en) 2013-09-04 2013-09-04 Optical network terminal and hardware configuration parameter storing method thereof

Publications (2)

Publication Number Publication Date
CN103475517A true CN103475517A (en) 2013-12-25
CN103475517B CN103475517B (en) 2016-06-29

Family

ID=49800227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310398673.2A Active CN103475517B (en) 2013-09-04 2013-09-04 Optical network terminal and hardware configuration parameter storing method thereof

Country Status (1)

Country Link
CN (1) CN103475517B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103731427A (en) * 2013-12-31 2014-04-16 华为技术有限公司 Conversation processing method, device and system
CN104168139A (en) * 2014-08-13 2014-11-26 烽火通信科技股份有限公司 OLT equipment customization method based on PON system
CN105429789A (en) * 2015-11-04 2016-03-23 上海斐讯数据通信技术有限公司 ME configuration method and system of OMCI protocols
CN105759778A (en) * 2014-12-16 2016-07-13 青岛经济技术开发区海尔热水器有限公司 Heat-pump water heater control and debugging system and debugging method thereof
CN107995033A (en) * 2017-11-30 2018-05-04 深圳市飞鸿光电子有限公司 A kind of ONU configuration files upgrade method and device
CN109885293A (en) * 2019-02-27 2019-06-14 重庆电子工程职业学院 The method, apparatus and server that Internet of Things application and development automatically creates
CN110392068A (en) * 2018-04-17 2019-10-29 阿里巴巴集团控股有限公司 A kind of data transmission method, device and its equipment
CN113342356A (en) * 2021-05-18 2021-09-03 浪潮软件股份有限公司 Client framework operation and management configuration method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040120326A1 (en) * 2002-12-24 2004-06-24 Hyeon-Sik Yoon System and method for VLAN configuration of E-PON, and recording medium with stored program thereof
CN101414925A (en) * 2007-10-17 2009-04-22 华为技术有限公司 Method, system and apparatus for configuring optical network terminal
CN102104420A (en) * 2009-12-22 2011-06-22 华为技术有限公司 Parameter configuring method, device and system for ONT (Optical Network Terminal)
CN102857838A (en) * 2012-06-29 2013-01-02 广东东研网络科技有限公司 Reconfiguration processing method for OLT (optical line terminal) end to ONU (optical network unit) end parameter configuration failure

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040120326A1 (en) * 2002-12-24 2004-06-24 Hyeon-Sik Yoon System and method for VLAN configuration of E-PON, and recording medium with stored program thereof
CN101414925A (en) * 2007-10-17 2009-04-22 华为技术有限公司 Method, system and apparatus for configuring optical network terminal
CN102104420A (en) * 2009-12-22 2011-06-22 华为技术有限公司 Parameter configuring method, device and system for ONT (Optical Network Terminal)
CN102857838A (en) * 2012-06-29 2013-01-02 广东东研网络科技有限公司 Reconfiguration processing method for OLT (optical line terminal) end to ONU (optical network unit) end parameter configuration failure

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103731427A (en) * 2013-12-31 2014-04-16 华为技术有限公司 Conversation processing method, device and system
WO2015101151A1 (en) * 2013-12-31 2015-07-09 华为技术有限公司 Session processing method, device and system
CN103731427B (en) * 2013-12-31 2017-04-12 华为技术有限公司 Conversation processing method, device and system
CN104168139A (en) * 2014-08-13 2014-11-26 烽火通信科技股份有限公司 OLT equipment customization method based on PON system
CN105759778A (en) * 2014-12-16 2016-07-13 青岛经济技术开发区海尔热水器有限公司 Heat-pump water heater control and debugging system and debugging method thereof
CN105429789A (en) * 2015-11-04 2016-03-23 上海斐讯数据通信技术有限公司 ME configuration method and system of OMCI protocols
CN105429789B (en) * 2015-11-04 2018-05-18 上海斐讯数据通信技术有限公司 A kind of OMCI agreements ME collocation methods and system
CN107995033A (en) * 2017-11-30 2018-05-04 深圳市飞鸿光电子有限公司 A kind of ONU configuration files upgrade method and device
CN110392068A (en) * 2018-04-17 2019-10-29 阿里巴巴集团控股有限公司 A kind of data transmission method, device and its equipment
CN110392068B (en) * 2018-04-17 2022-06-21 阿里巴巴集团控股有限公司 Data transmission method, device and equipment
CN109885293A (en) * 2019-02-27 2019-06-14 重庆电子工程职业学院 The method, apparatus and server that Internet of Things application and development automatically creates
CN113342356A (en) * 2021-05-18 2021-09-03 浪潮软件股份有限公司 Client framework operation and management configuration method

Also Published As

Publication number Publication date
CN103475517B (en) 2016-06-29

Similar Documents

Publication Publication Date Title
CN103475517A (en) Optical network terminal equipment and hardware configuration parameter saving method thereof
CN105224606B (en) A kind of processing method and processing device of user identifier
US9124490B2 (en) Consolidated performance metric analysis
CN105227352B (en) A kind of update method and device of user identifier collection
CN102819766A (en) Method, device and enterprise system for checking forms
CN104714442B (en) Software definition networking physical controller and its control method
CN104202178B (en) The communication means of intelligent optical distribution network Intelligent management terminal and network management system
CN102664967A (en) Method and system for interacting cross-platform personal information and background server
CN105611422A (en) Online live broadcast method based on multi-media list and apparatus thereof
CN102546558B (en) The changing method of agreement and optical network unit in a kind of optical network unit
WO2021057064A1 (en) Data interaction conversion method and apparatus based on artificial intelligence, device, and medium
CN103595566A (en) Method and device for detecting idle IP addresses
CN112468409A (en) Access control method, device, computer equipment and storage medium
CN107648854B (en) Game classification method and device and electronic equipment
CN115277566A (en) Load balancing method and device for data access, computer equipment and medium
CN103220359A (en) Management system and management method for desktop all-in-one machine
CN105224541B (en) Uniqueness control method, information storage means and the device of data
CN108897592A (en) A kind of software methods of exhibiting and relevant device
CN109858257B (en) Access control method and device
CN110807050A (en) Performance analysis method and device, computer equipment and storage medium
CN114143191A (en) Distributed gateway-based micro-service arranging method and device and related equipment
CN107995033B (en) ONU configuration file upgrading method and device
CN108184210A (en) A kind of multimode intelligent wireless communication system and its implementation based on multi-internet integration
CN105429867A (en) Fused type home gateway and access method of application service thereof
US20140215035A1 (en) Distribution of application components among devices

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant