Invention content
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide the numbers of device port in PON network
According to indexing means, system and OLT device, solve the problems, such as that Port Management committed memory is larger in the prior art.
To realize above-mentioned target and other related objectives, the present invention provides a kind of data rope of device port in PON network
Draw method, including:The port of each equipment to be managed creates Port Management table in corresponding PON network, wherein the Port Management table
Including:Each privately owned port description field in port and the port-mark field for being associated with the port description field;Wherein, often
A port, which corresponds to create in the Port Management table, at least one record;Establishment is associated with the port description field and institute
The index tool for stating port-mark field, for index Single port port record when by index the port description field come
Associated port-mark field is searched, to index corresponding record.
Optionally, the port description field includes:1) the PON messages of the equipment first line of a couplet to be managed where description port cease
First field;2) port id of each port and port on the device id and equipment to be managed of equipment predistribution to be managed are described
Second field of type.
Optionally, the record further includes:Port configuration field, for indicating whether Single port record needs to configure.
Optionally, the quantity of the port is less than 65536, and the size of the port-mark field is two bytes.
Optionally, the Port Management table is created in OLT device, and the equipment to be managed is ONU equipment.
To realize above-mentioned target and other related objectives, the present invention provides a kind of data rope of device port in PON network
Draw system, including:Table creation module is managed, the port for corresponding to each equipment to be managed in PON network creates Port Management table,
Wherein, the Port Management table includes:Each privately owned port description field in port and the end for being associated with the port description field
Mouth identification field;Wherein, each port, which corresponds to create in the Port Management table, at least one record;Index creation mould
Block, for creating the index tool for being associated with the port description field and the port-mark field, in index one end
Associated port-mark field is searched by indexing the port description field when port record of mouth, to index corresponding note
Record.
Optionally, the port description field includes:1) the PON messages of the equipment first line of a couplet to be managed where description port cease
First field;2) port id of each port and port on the device id and equipment to be managed of equipment predistribution to be managed are described
Second field of type.
Optionally, the record further includes:Port configuration field, for indicating whether Single port record needs to configure.
Optionally, the quantity of the port is less than 65536, and the size of the port-mark field is two bytes.
Optionally, the Port Management table is created in OLT device, and the equipment to be managed is ONU equipment.
To realize that above-mentioned target and other related objectives, the present invention provide a kind of OLT device, it is connected in PON network each
Equipment to be managed;The OLT device includes:Processor and memory;The processor, corresponding each connected equipment to be managed
Port create and Port Management table and stored by memory, wherein the Port Management table includes:Each port is privately owned
Port description field and the port-mark field for being associated with the port description field;Wherein, each port is corresponded in the port tube
Being created in reason table has at least one record;And it is associated with the port description field and the port-mark field for creating
Index tool is marked for searching associated port by indexing the port description field when being recorded in the port for indexing Single port
Character learning section, to index corresponding record.
As described above, the present invention provides data index method, system and the OLT device of device port in PON network, it is corresponding
The port of each equipment to be managed creates Port Management table in PON network, wherein the Port Management table includes:Each port institute
Privately owned port description field and the port-mark field for being associated with the port description field;Wherein, each port is corresponded to described
Being created in Port Management table has at least one record;It creates and is associated with the port description field and the port-mark field
Index tool is marked for searching associated port by indexing the port description field when being recorded in the port for indexing Single port
Character learning section, to index corresponding record;It records to optimize port index management, can be greatly reduced to call by searching for port id
The occupancy of memory headroom, while the inquiry velocity of system is improved, the OLT of large capacity equipment can be made in memory resource limitation
It can normal work.
Specific implementation mode
Illustrate that embodiments of the present invention, those skilled in the art can be by this specification below by way of specific specific example
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under the spirit of the present invention.It should be noted that in the absence of conflict, the embodiment in the application
And the feature in embodiment can be combined with each other.
For current OLT (opticallineterminal, optical line terminal), a large amount of memory consumption that configures is
Come from the configuration to the port on ONU (optical network unit) and ONU.
In general it describes some port on ONU and needs to describe the port at which PON mouthfuls of which veneer (slot)
On and the ID of ONU and the type and ID of the port, always need 8 bytes altogether.Generally use this 8 bytes as index
The attribute of ONU and ONU upper ports and business is described.For example a basic concordance list is:
Wherein,
Oltif fields, the PON messages breath of the description affiliated ONU in port;
Onuif fields describe the information of ONU, including ONUID, port id etc.;
All tables are all using oltif/onuif fields as index.
When the port density of OLT management is smaller, since comparatively EMS memory occupation is smaller, using this coding
Mode is possible;But when the branch of system requirements ratio will be increased to 1: 128, the demand of memory needs raising one
Times, it is therefore necessary to need the occupancy for taking other methods to reduce configuration data to memory.
Specifically, for the system using Embedded Main Memory Database, for example a system supports 2048 ONU,
Each ONU supports 4 ports to need to configure up to 8192 ports if full configuration;If each port needs to configure
100 tables (for example preserving all OMCI data), then the byte number for indexing occupancy is at least 8*8192*100=700K, in addition
For the data of other preservation indexes distributed for ONU, it should more than 1M.
For this purpose, as shown in Figure 1, the present invention provides a kind of data index method of device port in PON network, including:
Step S1:The port of each equipment to be managed creates Port Management table in corresponding PON network, wherein the port tube
Reason table includes:Each privately owned port description field in port and the port-mark field for being associated with the port description field;Its
In, each port, which corresponds to create in the Port Management table, at least one record.
Specifically, the structure of the Port Management table is, for example,:
" id " i.e. therein port-mark field, it is just corresponding to create a record when creating a port;Either
The value of what kind of port, corresponding port id is unique in table intf_map, and the id field is that have uniquely
Determine the ID numerical value of port, and a port corresponds oltif/onuif and id;The port id can be used
32 shapings are described, and space is enough for an OLT device, and 2 32 powers describe system enough to be needed
The port wanted.
Since the port-mark field can combine the ID of ONU equipment ID and ONU Ethernet interface, value also may be used
To draw the line, such as:
For the ID of ONU equipment from 1 to 8192, expression system can support 8192 ONU etc.;
ONU upper ports ID is from 10000 to 30000 etc.;To which the value for combining the port-mark field of those values is same
With value range.
In one embodiment, the record further includes:Port configuration field " st ", for indicating whether Single port record needs
It configures, i.e., whether port configures;For example, it is defaulted as all ports when system initial start-up and creates a record,
Field st values are 0, indicate that current configuration state is not configure.
Step S2:Create the index tool of the port description field and the port-mark field of being associated with, for
Associated port-mark field is searched by indexing the port description field when port record of index Single port, to index
Corresponding record.
In one embodiment, when being configured to some port, the port of storage record will with oltif/
The corresponding id fields of onuif (i.e. port-mark field) are as index.
In two index tools of system creation, respectively
CREATEINDEXintf_map_idx_ifONintf_map (oltif, onuif)/i.e. with oltif and onuif words
Segment index id fields;
CREATEINDEXintf_map_idx_idONintf_map (id)/recorded with id field index, such as search
To the port information etc. of some port.
More than, i.e., explanation passes through the unique privately owned associated unique id fields of oltif and onuif field index in port,
Unique port record can be indexed by id fields.
Preferably, if the quantity of all of the port, which determines, is less than 65536, the range of id can be limited to two words
The byte number that index occupies then can be reduced one times again by section;Simultaneously as the description of port is used with 2 four-byte fields
As index, embedded database also needs additionally to create composite index (the i.e. both of the aforesaid index work based on the two fields
Tool), still, since reduction is the index of individual character section in the embodiment, this compound management for making to draw can be effectively reduced, conducive to carrying
Rise search efficiency.
Verify how method provided by the invention compares existing indexed mode saving memory below:
By taking the OMCI tables under OMCI agreements as an example, the quantity for saving memory is calculated:
Fig. 2 a show the data structure of the existing port record storage, it is assumed that the quantity of OMCI tables is 100;Single OMCI
There is record field and index field (index field is required in order to quickly search establishment index), each port note in table
It is 26+8=34 byte altogether that record field the space occupied of record, which is 26 bytes plus index 8 bytes of byte, is counted in often
12 bytes of the index field of a port record, it is 46 bytes that each port, which records the space occupied, in total.
If stored in a manner of provided by the invention, Fig. 2 b displays port record storage in this embodiment of the invention
Data structure, then it is that (this 4 byte is to increase to 26+4 that the record field of each port record, which occupies byte number, in single OMCI tables
Id fields, as index byte) be 30 bytes count in index field occupy 8 bytes (this 8 bytes are for quick rope
Draw establishment, the index byte in record field is few, and index field occupies byte also corresponding reduction), it is total up to 38 bytes.
The byte numerical digit 46-38=8 then saved, each record at least save 8 bytes, then it is (46-38)/46=to save ratio
17%.
It described in brought forward, is calculated if occupying two bytes using id fields, OMCI table middle ports record occupies word
Joint number is 26+2 (id is as index byte)+4 (index field)=32 bytes.The ratio of saving is (46-32)/46=
30%.
For example, it is 8192* (16+12+8)=294K to create the memory headroom that an OMCI table occupies more;If total
Port number is 8192, total occupancy byte numerical digit 100*46*8192*294K=36M, and the byte number of saving is 36M*17%=
6M.The memory saved when full configuration is considerable, creates the memory that new table needs and almost can be ignored;If id fields with
2 byte representations, then the memory saved is up to 36M*30%=10M.
In addition to saving memory, another important role of the invention is indexed indeed through independent id fields
Port record is searched, reduced index search procedure greatly reduces query time.
As shown in figure 3, the present invention provides a kind of data directory system 1 of device port in PON network, principle with it is above-mentioned
Method is roughly the same, therefore it is no longer repeated for identical technical detail;The system 1 includes:Table creation module 11 is managed, is used
The port of each equipment to be managed creates Port Management table in corresponding PON network, wherein the Port Management table includes:Each
The privately owned port description field in port and the port-mark field for being associated with the port description field;Wherein, each port corresponds to
Being created in the Port Management table has at least one record;Index creation module 12 is associated with the port for establishment and retouches
The index tool for stating field and the port-mark field, by indexing the port when for being recorded in the port for indexing Single port
Description field searches associated port-mark field, to index corresponding record.
In one embodiment, the port description field includes:1) the PON mouths of the equipment first line of a couplet to be managed where description port
First field of information;2) port id of each port on the device id and equipment to be managed of equipment predistribution to be managed is described
With the second field of port type.
In one embodiment, the record further includes:Port configuration field, for indicating whether Single port record needs to match
It sets.
In one embodiment, the quantity of the port is less than 65536, and the size of the port-mark field is two words
Section.
In one embodiment, the Port Management table is created in OLT device, and the equipment to be managed is ONU equipment.
As shown in figure 4, the present invention provides a kind of OLT device 2, the hardware of the software realizations such as the be used as above method or system
Carrier, the OLT device 2 are connected to each equipment (such as ONU equipment) to be managed in PON network;The OLT device 2 includes:Place
Manage device 21 and memory 22;The port of the processor 21, corresponding each connected equipment to be managed creates Port Management table simultaneously
Pass through memory storage 22, wherein the Port Management table includes:Each privately owned port description field in port and association
The port-mark field of the port description field;Wherein, each port, which corresponds to create in the Port Management table, at least one
Item records;And for creating the index tool for being associated with the port description field and the port-mark field, in rope
By indexing the port description field associated port-mark field is searched when the port record for drawing Single port, to index pair
It should record.
In conclusion the present invention provides data index method, system and the OLT device of device port in PON network, it is corresponding
The port of each equipment to be managed creates Port Management table in PON network, wherein the Port Management table includes:Each port institute
Privately owned port description field and the port-mark field for being associated with the port description field;Wherein, each port is corresponded to described
Being created in Port Management table has at least one record;It creates and is associated with the port description field and the port-mark field
Index tool is marked for searching associated port by indexing the port description field when being recorded in the port for indexing Single port
Character learning section, to index corresponding record;It records to optimize port index management, can be greatly reduced to call by searching for port id
The occupancy of memory headroom, while the inquiry velocity of system is improved, the OLT of large capacity equipment can be made in memory resource limitation
It can normal work.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology can all carry out modifications and changes to above-described embodiment without violating the spirit and scope of the present invention.Cause
This, institute is complete without departing from the spirit and technical ideas disclosed in the present invention by those of ordinary skill in the art such as
At all equivalent modifications or change, should by the present invention claim be covered.