Summary of the invention
The embodiment of the present invention provides the method for a kind of port information renewal, Apparatus and system, is used for realizing port
The real-time update of information, makes message obtain accurate delivery, it is to avoid network congestion, ensures message transmissions simultaneously
Real-time.
A kind of port information update method, network element side network element comprises the following steps:
The port information of all network elements in the server that network element reception server in server sends;
According to the described port information received update in locally stored the first port status information table corresponding
The port information of network element.
A kind of port information update method, server side comprises the following steps:
Himself port information that in server reception book server, each network element sends;
According to the described port information received update in locally stored the second port status information table corresponding
The port information of network element.
A kind of network element, including:
First transceiver module, the port information of all network elements in receiving the server that server sends;
First more new module, for updating the first locally stored port shape according to the described port information received
The port information of respective network elements in state information table;
Based on described second port status information table, all in described server, each network element sends server
The port information of network element.
A kind of server, including:
Second transceiver module, himself port information that each network element sends in receiving book server;
Second more new module, for updating the second locally stored port shape according to the described port information received
The port information of the respective network elements in state information table;
Described second transceiver module is additionally operable to based on described second port status information table, in described server
The port information of all network elements in each network element transmission server.
A kind of port information updates system, including:
Network element, the port information of all network elements in receiving the server that server sends, and according to reception
Described port information update the port information of respective network elements in locally stored the first port status information table;
Server, himself port information that each network element sends in receiving book server, according to receive
Described port information updates the port information of respective network elements in the second locally stored port status information table, and
The present port information of all network elements in each network element sends server in book server.
The end of all network elements in the server that network element reception server in embodiment of the present invention server sends
Message ceases;The phase in the first locally stored port status information table is updated according to the described port information received
Answer the port information of network element.Thus update local first port status according to the port information of each network element received
In information table, the port information of each network element of storage, makes port information obtain real-time update.When network element need to
When other network element sends message, directly can obtain purpose by the first port status information table that inquiry is local
IP, MAC of network element and port information, it is achieved that sending in time and accurate delivery of message.
Detailed description of the invention
All network elements in the server that network element reception server end in embodiment of the present invention server sends
Port information;Update in the first locally stored port status information table according to the described port information received
The port information of respective network elements.Thus update local first port shape according to the port information of each network element received
In state information table, the port information of each network element of storage, makes port information obtain real-time update.When network element needs
When other network element sends message, directly can obtain mesh by the first port status information table that inquiry is local
IP, MAC of network element and port information, it is achieved that sending in time and accurate delivery of message.
Seeing Fig. 1, in the embodiment of the present invention, network element includes the first transceiver module 101 and the first more new module
102。
First transceiver module 101 is the port letter of all network elements in receiving the server that server end sends
Breath.Working as of all network elements being positioned at this server that first transceiver module 101 sends for receiving server
The present port information of all network elements in front port information, i.e. this server, described port information includes each
The IP of network element, MAC, port numbers and port status, port status includes UP (connected state) and DOWN
(disconnected state), if port status is UP, then it represents that this port can be used, if port status is
DOWN, then it represents that this port is unavailable.Network element described in the embodiment of the present invention is positioned at described server.
First transceiver module 101 is additionally operable to receive the first end of request this network element port status information that server sends
Mouthful status request message, after receiving the first port status request message, the first transceiver module 101 also to
Server returns the current port state information of this network element.Server can regularly send this first port status
Request message, for example, it is possible to send once every 2s.So it is able to monitor whole clothes in real time
The working condition of the network element in business device, it is also possible to send the request of this first port status when toggled and disappear
Breath.Wherein, if network element is to be initially received the first port status request message that server sends, then the
The current port state information that one transceiver module 101 returns can include the IP of this network element, MAC, end
Slogan and port status, disappear if network element is not the first port status request being initially received server transmission
Breath, then can only include the port of this network element in the current port state information that the first transceiver module 101 returns
Number and port status.First transceiver module 101 is additionally operable to send the 3rd port status request message to server,
The present port information of all network elements in request server.
First more new module 102 is for updating the first locally stored port according to the described port information received
The port information of the respective network elements in status information table.First transceiver module 101 receives being somebody's turn to do of server transmission
After the present port information of all network elements in server, the first more new module 102 is according to the first transceiver module
Respective end message in present port information updating the first port status information table of the 101 all network elements received
Breath.Wherein, if the first transceiver module 101 be initially received server send be positioned at a server pipe
The present port information of all network elements in the range of reason, then the first more new module 102 is according to all nets received
The IP of all network elements, MAC, port numbers in present port information updating the first port status information table of unit
And port status, if the first transceiver module 101 be not be initially received server send be positioned at a service
The present port information of all network elements in device range of management, then the first more new module 102 can be by reception
The present port information of all network elements and the port information of each network element of storage in the first port status information table
Compare, when the port information being found to have network element changes, i.e. have the port information comparison result of network element
Time inconsistent, then update, according to the port information received, the port changed in the first port status information table
Information, if the port information of the port information received and the first port status information table is consistent, then may not be used
Operate, to save operating procedure and operating time.
Seeing Fig. 2, described network element also includes the first memory module 103.
First memory module 103 is for storing the port information of each network element.First memory module 103 stores
First port status information table, stores in this first port status information table and is positioned at a server admin model
Enclose the interior IP of all network elements, MAC, port numbers and corresponding port state.When the first transceiver module 101
After receiving the present port information of all network elements that server sends, the first more new module 102 is according to reception
The port information of storage in first port status information table is updated by the present port information of all network elements.
The IP address of each network element of storage, MAC Address, the port numbers of port in first port status information table
And port status is all the most corresponding.
Seeing Fig. 3, in the embodiment of the present invention, server includes second transceiver module the 301, second more new module
302。
Seeing Fig. 4, described server also includes system control module the 303, second memory module 304 and number
Module 305 is configured according to storehouse.
Second transceiver module 301 himself port information that each network element sends in receiving server.Second
Transceiver module 301 can send the first port status request message by each network element in server, and each network element is being received
Return the port information of self after the first port status request message to the second transceiver module 301, second receives
Send out the port information of each network element in the server that will receive of module 301 and be sent to system control module 303.
Second transceiver module 301 can regularly send described first port status request message, for example, it is possible to every
2s sends once.So it is able to monitor in real time the working condition of the network element in whole server.Also
This first port status request message can be sent when toggled, or, each network element can not receive
During described first port status request message, timing sends the port information of self to the second transceiver module 301.
Second transceiver module 301 is for after the second more new module 302 updates the second port status information table, to respectively
The present port information of all network elements in network element transmission server, for each network element in real time according to the port received
The port information of storage in information updating the first port status information table.Second transceiver module 301 can pass through
The form of multicast sends the present port information of all network elements in server to each network element, with on each network element
All port informations of each network element in a current server of preservation.So network element is needs send message when
Directly can search the port information of purpose network element in this locality, interact without with server,
Save the operating time.Second transceiver module 301 can send in server by timing each network element in book server
The present port information of all network elements, it is also possible to each network element sends service in book server when toggled
The present port information of all network elements in device, the such as second transceiver module 301 network element in receiving book server
All network elements in each network element sends server in book server after the 3rd port status request message sent
Present port information, or such as, each in the second more new module 302 finds the book server received
The port information having network element in the port information of network element there occurs change, then can trigger the second transceiver module
301 in book server each network element send the present port information of all network elements in server, or when second
The port information of each network element has in the book server that the discovery of more new module 302 receives the port information of network element
There occurs change, then can trigger the second transceiver module 301 each network element in book server and send this and change
The present port information of the network element become.
Second more new module 302 is for updating the second locally stored port according to the described port information received
The port information of the respective network elements in status information table.Second more new module 302 is believed according to the 3rd port status
Port information in breath table updates the corresponding port information second more new module in the second port status information table
First 302 can send the present port of all network elements in request server to system control module 303
Second port status request message of status information, system control module 303 receives this second status information
After request message, according to the port information of storage in the 3rd port status information table to the second more new module 302
The present port information of all network elements in return server.Or, system control module 303 timing is to second
More new module 302 is the present port information of all network elements in sending server, or system control module 303
When the port information being found to have network element changes, i.e. system control module 303 finds the port received
Information there is the corresponding port information of storage in the port information of network element and the 3rd port status information table differ
During cause, to the present port information of second all network elements in more new module 302 returns server, or only to
Two more new module 302 return the present port information of this network element changed.Receiving data base's configuration
In the server that module 305 or system control module 303 send after the port information of all network elements, second more
New module 302 updates the respective end of storage in the second port status information table according to the described port information received
Message ceases.Wherein, if the second more new module 302 receive be data base configure module 305 send
The initial port information of all network elements in server, then the second more new module 302 is according to all network elements received
Initial port information updating the second port status information table in corresponding port information, if second update mould
The port information of all network elements in what block 302 received is server that system control module 303 sends, then
The all of the port information received can be stored in the second port status information table by the second more new module 302
Each corresponding port information compare, if there being the port information comparison of network element inconsistent, then according to reception
Port information update corresponding port information in the second port status information table, if there being the port of network element to believe
Breath comparison result is consistent, then can not operate, to save operating procedure and operating time.
System control module 303 is for updating the 3rd port status information table according to the described port information received
In corresponding port information.System control module 303 can often receive in server what a network element sent
Port information, i.e. updates the corresponding port in the 3rd port status information table according to the described port information received
Information.Second transceiver module 301 can send the first port status request message to each network element in server,
To ask the port status information of each network element, the port that the network element received is returned by the second transceiver module 301
Status information is all sent to system control module 303.Or each network element can not receive first in server
During port status request message, timing sends the port status information of self to the second transceiver module 301, and second
The information received all is sent to system control module 303 by transceiver module 301.System control module 303
A the 3rd port status information table can be safeguarded, the 3rd port status information table stores each network element
IP, MAC, the port numbers of port and port status, whenever the second transceiver module 301 receives in server
During the port information of network element, system control module 303 i.e. updates the 3rd port according to the port information received
Status information table.When system control module 303 detects port information and the 3rd port status information of reception
When the corresponding port information of storage is inconsistent in table, the 3rd port can updated according to the port information received
To the present port information of second all network elements in more new module 302 sends server after status information table, i.e.
The all of the port information of storage in the 3rd port status information table after renewal.System control module 303 is to
Two more new module 302 port information of all network elements in sending server.System control module 303 can be determined
Time send the port information of all network elements to the second more new module 302, it is also possible to second when toggled
More new module 302 sends the port information of all network elements, such as system control module 303 and is receiving second more
The second port is sent to the second more new module 302 after the second port status request message that new module 302 sends
The response message of status request message, the response message of this second port status request message can include owning
The port information of network element, or system control module 303 changes at the port information being found to have network element,
The state of such as ports having, when UP becomes DOWN, returns in server to the second more new module 302
The present port information of all network elements, or only return this network element changed to the second more new module 302
Present port information so that the second more new module 302 according to the port information received to the second port status
In information table, the information of storage carries out real-time update.
Second memory module 304 port information of each network element in storing server.Second memory module
In 304, storage has the second port status information table, stores in server in this second port status information table
The IP of all network elements, MAC, port numbers and corresponding port state.When the second transceiver module 301 receives
After the present port information of all network elements that system control module 303 sends, the second more new module 302 basis
The port information of storage in second port status information table is entered by the present port information of all network elements received
Row updates.The IP address of each network element of storage, MAC Address, port in second port status information table
Port numbers and port status be all respectively correspondence.
Data base configures module 305 port information of all network elements in storing server.Data base configures
Module 305 is the initial port information of all network elements in storing server, and when system initialization, second receives
Send out module 301 and configure the 3rd port of the module 305 transmission current all network element port informations of request to data base
Status request message, the initial port information of all network elements in request server, data base configures module 305
Current all network elements are returned to the second transceiver module 301 after receiving the 3rd port status request message
Initial port information, for the second more new module 302 according to the information received to the second port status information table
Update for the first time.
Seeing Fig. 5, also provide for the device of a kind of information transmission in the embodiment of the present invention, described device includes looking into
Ask module 501 and the first transceiver module 101.Described device may be located at network element side network element.
Enquiry module 501 is for inquiring about the port information of purpose network element.Report is sent to purpose network element when determining
Wen Shi, enquiry module 501 can be at the port information of local search purpose network element, i.e. by the first port shape
The port information of state information table inquiry purpose network element, wherein, data can be passed through in the IP address of purpose network element
Configuration obtains, and MAC Address can obtain according to IP address computation, therefore can be considered as it is known that inquire about mould
Block 501 can inquire about the port information of purpose network element by the first port status information table, and according to inquiring
The port information of purpose network element judge whether purpose network element can be used, i.e. according to the IP address of purpose network element and
MAC Address, whether the port status inquiring about corresponding port is UP, when inquiring purpose network element
When port is currently available, the first transceiver module 101 can send message to this network element, when inquiring purpose net
When the port of unit is currently unavailable, do not send message to this network element.
First transceiver module 101 is for reporting to the transmission of purpose network element according to the purpose network element port information inquired
Literary composition.When enquiry module 501 inquire purpose network element currently available time, the first transceiver module 101 is to purpose net
Unit's transmission message.
Seeing Fig. 6, the port information in the embodiment of the present invention updates system and includes network element 601 and server
602。
Network element 601, the end of all network elements 601 in receiving the server 602 that server 602 end sends
Message ceases, and updates phase in the first locally stored port status information table according to the described port information received
Answer the port information of network element.Multiple network element 601 can be included in server 602.
Server 602, himself port information that each network element 601 sends in receiving book server 602,
Respective network elements in the 3rd locally stored port status information table is updated according to the described port information received
Port information, and each network element sends the present port information of all network elements in server in book server.Clothes
Business device 602 updates in the second port status information table according to the port information in the 3rd port status information table
Corresponding port information, and each network element 601 all network elements 601 in sending server 602 in book server 602
Present port information.
Below by realizing flow process to introduce the method that port information updates and information is transmitted.
Seeing Fig. 7 A, in the embodiment of the present invention, the main method flow process of network element 601 side ports information updating is such as
Under:
Step 7001: the network element 601 in server 602 receives the server 602 that server 602 end sends
The port information of interior all network elements 601.
Step 7002: update the first locally stored port status information table according to the described port information received
The port information of middle respective network elements.
Seeing Fig. 7 B, in the embodiment of the present invention, the method detailed flow process of network element 601 side ports information updating is such as
Under:
Step 7101: receive the first port status request message.First transceiver module 101 receives the second transmitting-receiving
The first port status request message that module 301 sends, for asking the port information of this network element 601.The
Two transceiver modules 301 can regularly send this first port status request message.
Step 7102: return the present port information of this network element 601.First transceiver module 101 is received to second
Send out module 301 and return the present port information of this network element 601.Wherein, if network element 601 is to be initially received
The the first port status request message sent to server 602 side the second transceiver module 301, then the first transmitting-receiving
The current port state information that module 101 returns can include the IP of this network element 601, MAC, port
Number and port status, if network element be not be initially received server 602 side send the first port status please
Seek message, then the current port state information that the first transceiver module 101 returns can only include this network element
The port numbers of 601 and port status.Or, the first transceiver module 101 can also not receive the first port
In the case of status request message, timing returns the port information of this network element 601 to the second transceiver module 301,
The most then without step 701.
Step 7103: the port information of all network elements 601 in reception server 602.First transceiver module
The present port information of all network elements 601 in 101 servers 602 receiving the second transceiver module 301 transmission.
Step 7104: the described port information according to receiving updates the first port status information table.Wherein, as
Really the first transceiver module 101 is that the server 602 that is positioned at being initially received the transmission of server 602 side manages
In the range of the present port information of all network elements 601, then the first more new module 102 is all according to receive
The IP of all network elements 601 in present port information updating the first port status information table of network element 601, MAC,
Port numbers and port status, if the first transceiver module 101 is not initially received server 602 side and sends
Be positioned at the present port information of all network elements 601 of server 602 range of management, then first updates
Module 102 can be by the present port information of all network elements 601 of reception and the first port status information table
The port information of each network element 601 of storage is compared, when the port information being found to have network element 601 changes
Become, when i.e. having the port information comparison result of network element 601 inconsistent, then according to the end changed received
Corresponding port information in mouthful information updating the first port status information table, if the port information received and the
The port information of Single port status information table is consistent, then can not operate, to save operating procedure and behaviour
Make the time.
Seeing Fig. 8, in the embodiment of the present invention, the main method flow process of server 602 side ports information updating is such as
Under:
Step 801: server 602 himself port that in receiving book server 602, each network element 601 sends
Information.
Step 802: update the second locally stored port status information table according to the described port information received
The port information of middle respective network elements 601.
Seeing Fig. 9, in the embodiment of the present invention, the method detailed flow process of server 602 side ports information updating is such as
Under:
Step 901: the second transceiver module 301 in receiving server 602 each network element 601 send himself
Port information.
Step 902: the second more new module 302 sends the second port status request to system control module 303
Message.Present port information for network elements 601 all in system control module 303 request server.
Or, system control module 303 timing can send working as of all network elements 601 to the second more new module 302
Front port information, or system control module 303 is when the port information being found to have network element 601 changes
The present port information of all network elements 601, or system control module 303 is sent to the second more new module 302
Send this when the port information being found to have network element 601 changes to the second more new module 302 to change
The present port information of network element 601, then without this step during these three situation.
Step 903: system control module 303 to second in more new module 302 returns server 602 all
The present port information of network element 601.System control module 303 stores according in the 3rd port status information table
Port information to the present port letter of second all network elements 601 in more new module 302 returns server 602
Breath.
Step 904: the second more new module 302 updates the second port status information according to the port information received
Table.Wherein, the second more new module 302 can be by all of the port information received and the second port status letter
In breath table, each corresponding port information of storage is compared, if there being the port information comparison of network element 601 to differ
Cause, then update corresponding port information in the second port status information table according to the port information received, if
The port information comparison result having network element 601 is consistent, then can not operate, with save operating procedure and
Operating time.
Step 905: the second transceiver module 301 each network element 601 in book server sends in server 602
The present port information of all network elements 601.Second transceiver module 301 can send to each network element 601 in timing
The present port information of all network elements 601 in server 602, it is also possible to each network element 601 when toggled
The present port information of all network elements 601 in transmission server 602, such as, when the second more new module 302
Find that the port information of each network element 601 received has the port information of network element 601 to there occurs change, then
Can trigger the second transceiver module 301 in each network element 601 sends server 602 all network elements 601 work as
Front port information, or work as in the port information of each network element 601 that the second more new module 302 finds to receive
The port information having network element 601 there occurs change, then can trigger the second transceiver module 301 to each network element 601
Send the present port information of this network element 601 changed.
Seeing Figure 10, in the embodiment of the present invention, the main method flow process of information transmission is as follows:
Step 1001: the port information of inquiry purpose network element 601.IP address according to purpose network element 601
In the first port status information table, purpose is inquired about with MAC Address (or IP address, or MAC Address)
The port information of network element 601, i.e. whether inquiry purpose network element 601 can be used.
Step 1002: purpose network element 601 port information according to inquiring transmits message to purpose network element 601.
If inquiring purpose network element 601 can use, then transmit message to purpose network element 601.
Seeing Figure 11, in the embodiment of the present invention, the method detailed flow process of information transmission is as follows:
Step 1101: the port information of inquiry purpose network element 601.
Step 1102: judge whether the purpose network element 601 inquired is in upstate.When judged result is
When being, continue step 1103, otherwise terminate flow process.
Step 1103: purpose network element 601 port information according to inquiring transmits message to purpose network element 601.
The port information of all network elements 601 in embodiment of the present invention reception server 602;According to the institute received
State port information and update the corresponding port information in the first port status information table.Thus according to each net received
The port information of unit 601 updates the port letter of each network element 601 of storage in local first port status information table
Breath, makes port information obtain real-time update.Each network element 601 preserves institute in a server 602
There is the port information of network element 601.So can directly look in this ground when network element 601 needs and sends message
Look for the port information of purpose network element 601, interact without with server 602, save operation step
Rapid and operating time, message is made to be sent in time and accurate delivery.Server 602 can be each with real-time update
The port information of network element 601, or each network element 601 is updated when the port information having network element 601 changes
Port information, to guarantee that the port information of each network element 601 is upgraded in time.Server 602 can be real
Time send the port information of each network element 601 to each network element 601, or send out at the port information having network element 601
Send the port information of each network element 601 during changing to each network element 601, or receive each network element 601
Send the port information of each network element 601 to each network element 601 after the 3rd port status request message sent, it is achieved
Mode is various, it is ensured that at each network element 601 preserve each network element 601 port information can with real-time update,
To avoid network element 601 to make mistakes when transmitting message.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or meter
Calculation machine program product.Therefore, the present invention can use complete hardware embodiment, complete software implementation or knot
The form of the embodiment in terms of conjunction software and hardware.And, the present invention can use and wherein wrap one or more
Computer-usable storage medium containing computer usable program code (include but not limited to disk memory and
Optical memory etc.) form of the upper computer program implemented.
The present invention is with reference to method, equipment (system) and computer program product according to embodiments of the present invention
The flow chart of product and/or block diagram describe.It should be understood that can by computer program instructions flowchart and
/ or block diagram in each flow process and/or flow process in square frame and flow chart and/or block diagram and/
Or the combination of square frame.These computer program instructions can be provided to general purpose computer, special-purpose computer, embedding
The processor of formula datatron or other programmable data processing device is to produce a machine so that by calculating
The instruction that the processor of machine or other programmable data processing device performs produces for realizing at flow chart one
The device of the function specified in individual flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or the process of other programmable datas can be guided to set
In the standby computer-readable memory worked in a specific way so that be stored in this computer-readable memory
Instruction produce and include the manufacture of command device, this command device realizes in one flow process or multiple of flow chart
The function specified in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makes
Sequence of operations step must be performed to produce computer implemented place on computer or other programmable devices
Reason, thus the instruction performed on computer or other programmable devices provides for realizing flow chart one
The step of the function specified in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification without deviating from this to the present invention
Bright spirit and scope.So, if the present invention these amendment and modification belong to the claims in the present invention and
Within the scope of its equivalent technologies, then the present invention is also intended to comprise these change and modification.