A kind of network equipment information transfer approach
Technical field
The present invention relates to technical field of network management, particularly relate to a kind of network equipment information transfer approach.
Background technology
Communication network is the important communication medium that computer and the data of the various network equipment to the form such as figure, word gather, store, process and transmit.
Existing architectures of communication networks, general employing client section/service end pattern.Usually, under this existing architectures of communication networks, client may connect multiple network equipment, when service end regularly obtains from client the network equipment information that client detects, client then by the information reporting of the network equipment that detects to service end.In prior art, client generally adopts following transmission means to service end reporting information:
The interval time that service end regularly obtains the network equipment information that client detects is traditionally arranged to be 10 minutes.The network equipment information detected within 10 minutes is carried out record by client, and every 10 minutes by the information transmission of record to service end.After client-side information has been uploaded, the information of record can be emptied, and restart in next 10 minute cycle the information recording the network equipment detected.Information transmission mode in prior art between client and service end, although service end can be made to obtain the information of the network equipment that client detects, if but be provided with a lot of client, and when being all connected with a lot of network equipment around each client, each client will be uploaded to service end the bulk information obtaining record within 10 minutes when transmission information, the each uploading data of each client can take a large amount of network bandwidths, have a strong impact on the efficiency of transmission of information, and be delayed the information updating of service end.
Summary of the invention
For in prior art, the problems referred to above existed in information transmission mode between client and service end, now provide a kind of and reduce the network equipment information transfer approach taking the network bandwidth when being intended to information transmission between client and service end.
Concrete technical scheme is as follows:
A kind of network equipment information transfer approach, wherein, is applied in the network being provided with plurality of networks equipment, and provides:
At least one client, each described client and plurality of networks equipment connection;
One service end, described service end and described client's side link; And
Comprise the steps:
Step 1, described client gather in described plurality of networks equipment, by the information of the network equipment that described client detects;
Whether there is renewal between the content that step 2, described client judge the described information collected and the content of described information of having preserved, if without renewal, abandon corresponding described information, if there is renewal, preserve corresponding described information;
The described information upgraded, with one first predetermined period of time, is sent to described service end by step 3, described client.
Preferably, in described step 2, described client provides an information record sheet, and described information is stored in described information record sheet with the form of separate records, and
Described information is distinguished according to the described network equipment of correspondence.
Preferably, described information comprises:
By the device address of the described network equipment that described client detects; And
The time that the described network equipment corresponding to described device address is detected by described client.
Preferably, in described step 2, further comprising the steps:
Step 21, judge whether the corresponding identical described network equipment of the described information of having preserved and the described information collected, if had, perform step 22, if without, perform step 23;
Step 22, judge the identical described network equipment corresponding to the described information collected the described information of having preserved in time of being detected of the corresponding described network equipment, whether be in same second predetermined period of time with the time that the described network equipment corresponding in the corresponding described information collected is detected
If then abandon the corresponding described information collected,
If not then with the time that the described network equipment corresponding in the described information collected of correspondence is detected, upgrade the time that the described network equipment corresponding in the described information of having preserved is detected,
Perform described step 3;
The described information that step 23, preservation collect.
Preferably, in described step 23, preserve the method for the described information collected, comprise the following steps:
Step 231, judge whether the storage area of described client is filled with, if perform step 232, perform step 233 if not;
Step 232, by the holding time the earliest, and the described information deletion preserved be not updated within nearest first scheduled time,
In the space vacateed after being stored in deletion by needing the described information collected of preserving;
Perform described step 3;
Step 233, the information collected to be stored in the storage area of described client.
Preferably, described second predetermined period of time is set to the 1/N of described first predetermined period of time, and N is natural number;
The binary number that a plurality of figure place is equal is provided, described binary number length is at least N position, the described information of having preserved that the time that the corresponding described network equipment corresponding in nearest described first predetermined period of time of each described binary number is detected was updated;
In described binary number, each at least in N continuous position each described second predetermined period of time in order in corresponding described first predetermined period of time;
The order of the second predetermined period of time in described first predetermined period of time residing for the time that the described network equipment corresponding in the described information of correspondence is detected, by position, position corresponding in the described binary number of correspondence;
In described step 3, by all described binary numbers, as in preservation information, in nearest described first predetermined period of time, the content be updated in the described information be updated sends.
Preferably, described N=20.
Preferably, in described step 3, described client comprises to the described information of the described renewal that described service end sends:
The described information be saved in nearest described first predetermined period of time; And
In preservation information, the content be updated in the described information be updated in nearest described first predetermined period of time.
Preferably, described client provides a more new logo, and when the described information collected is saved, and when the described information of having preserved is updated, client is more new logo described in corresponding information is arranged; And
After the more described information of new logo is sent out described in having, more new logo removing described in described information will be sent out.
Preferably, in described step 3, also comprise in the described information of the described renewal that described client sends to described service end:
The quantity of the described information be saved in nearest described first predetermined period of time; And/or
In preservation information, the storage cis-position of the described information that the content be updated in the described information be updated in nearest described first predetermined period of time is corresponding.
The beneficial effect of technique scheme is:
Client only transmits lastest imformation to during service end reporting information, and this scheme effectively reduces taking of network transmission bandwidth, improves network transmission efficiency.
Accompanying drawing explanation
Fig. 1 is the structural representation of the embodiment of the communication network that the present invention is suitable for;
Fig. 2 is the steps flow chart block diagram of a kind of embodiment of network equipment information transmission method of the present invention;
Fig. 3 is that the present invention judges whether the information of the network equipment has renewal, and the steps flow chart block diagram of a kind of embodiment to the store method of lastest imformation;
Fig. 4 is the flow chart of steps that the present invention preserves the method for the information collected.
Embodiment
Below in conjunction with the drawings and specific embodiments, the invention will be further described, but not as limiting to the invention.
As shown in Figure 1, in technical scheme of the present invention, provide a kind of network equipment information transfer approach, wherein, be applied in the network being provided with plurality of networks equipment, and provide: at least one client 10, each client 10 is connected with plurality of networks equipment 20; One service end 00, service end 00 is connected with client 10; Based on the communication network of client-side/server-side architecture in this network and prior art.The Problems existing when client of a greater number and each client's side link have a large amount of network equipment is provided with because technical scheme of the present invention is intended to overcome communication network in prior art, therefore as preferred embodiment, above-mentioned communication network especially has the communication network that a large amount of client 10 and each client 10 are connected with a large amount of network equipment 20.
As shown in Figure 2, comprise the steps:
Step 1, client gather in plurality of networks equipment, by the information of the network equipment that client detects;
Whether there is renewal between the content that step 2, client judge the information collected and the content of information of having preserved, if without renewal, abandon corresponding information, if there is renewal, preserve corresponding information;
The information of renewal, with one first predetermined period of time, is sent to service end by step 3, client.
Because the network equipment of client's side link is not online all the time, when the network equipment is reached the standard grade, client can detect the network equipment of reaching the standard grade, and then obtain corresponding information by the form of message from the network equipment be detected, information is sent with the first predetermined period of time to service end based on client, within the cycle, some network equipment never presence becomes upper line states, thus detected by client, and further collect corresponding information by client, some network equipment becomes not presence from presence, thus no longer detected by client, some network equipment remains on line states, what then continue is detected by client, the temporal information be detected in corresponding information will be upgraded when the network equipment remaining on line states is detected at every turn.In technique scheme, client only will newly be detected the information of the network equipment, and the temporal information continuing to be updated in the information of the network equipment be detected is sent to service end as the information upgraded, instead of in the information of each first predetermined period of time Resurvey network equipment, thus both decreased the expense of client, the network bandwidth taken when simultaneously decreasing information transmission between client and service end.
In technique scheme, further, in step 2, client provides an information record sheet, and information is stored in information record sheet with the form of separate records, and information can be distinguished according to the network equipment of correspondence.That is, a record can only be had in the information record sheet that the network equipment that connects of same client provides in this client.
In technique scheme, further, can comprise in the information recorded in above-mentioned information record sheet: by the device address of the network equipment that client detects; And the time that the network equipment corresponding to device address is detected by client.
As one preferably execution mode, the said equipment address can be MAC Address.On this basis, the binary number of 48 can be provided to preserve MAC Address in every bar record of information record sheet.
As one preferably execution mode, the time that the binary number of 32 can be provided to be detected to preserve the network equipment corresponding to the said equipment address by client in every bar record of information record sheet
In technique scheme, further, as shown in Figure 3, in step 2, may further include following steps:
Step 21, judge whether the corresponding identical network equipment of the information of having preserved and the information collected, if had, perform step 22, if without, perform step 23;
Step 22, judge the identical network equipment corresponding to the information collected the information of having preserved in time of being detected of the corresponding network equipment, whether be in same second predetermined period of time with the time that the network equipment corresponding in the corresponding information collected is detected, if then abandon the corresponding information collected, if not then with the time that the network equipment corresponding in the information collected of correspondence is detected, upgrade the time that the network equipment corresponding in the information of having preserved is detected, perform step 3;
The information that step 23, preservation collect.
On technique scheme basis, further, as shown in Figure 4, in step 23, preserve the method for the information collected, comprise the following steps:
Step 231, judge whether the storage area of client is filled with, if perform step 232, perform step 233 if not;
Step 232, by the holding time the earliest, and the information deletion preserved be not updated within nearest first scheduled time,
In the space vacateed after being stored in deletion by needing the information collected of preserving;
Perform step 3;
Step 233, the information collected to be stored in the storage area of client.
In technique scheme, retain the information of the network equipment once detected, thus make client can have higher hit rate when the information of more new network device, and then reduce the expense of client, on the other hand, when storage area stores full, delete the holding time the earliest and the information deletion preserved be not updated within nearest first scheduled time, namely the time be detected the earliest, but in the information of the network equipment that nearest first scheduled time is not detected, thus the information making client preserve can the situation of more effective reaction current network device.
On technique scheme basis, further, the second predetermined period of time can be set to the 1/N of the first predetermined period of time, and N is natural number;
There is provided the binary number that a plurality of figure place is equal, binary number length is at least N position, the information of having preserved that the time that the corresponding network equipment corresponding in nearest first predetermined period of time of each binary number is detected was updated;
In binary number, each at least in N continuous position each second predetermined period of time in order in corresponding first predetermined period of time;
The order of the second predetermined period of time in the first predetermined period of time residing for the time that the network equipment corresponding in the information of correspondence is detected, by position, position corresponding in the binary number of correspondence;
In step 3, by all binary numbers, as in preservation information, in nearest first predetermined period of time, the content be updated in the information be updated sends.
Technique scheme, by with the content be updated in the information of preserving, from the binary number being newly encoded at least N position, sends, is decoded by service end, thus decreases the data volume needing transmission, and then decreases taking of the network bandwidth.
In one preferably execution mode, by the binary number of correspondence during corresponding position, position, can be 1 by corresponding position, other positions be 0, and as what replace, can be also 0 by corresponding position, other positions be 1.
As one preferably execution mode, N=20.On this basis, when the first predetermined period of time is 10 minutes, the second predetermined period of time is 30 seconds.Further, above-mentioned binary number can be 24, in the system of 8 word lengths, provides the binary number of 24 to be just in time 3 bytes, thus can the storage subsystem of matching system.
In prior art, preserve MAC Address and need 48 bit data, add that the time that the network equipment corresponding to MAC Address is detected needs 32 microdatas, altogether needs 80 bit data, and the content of information updating only needs 24 bit data in technique scheme, thus decrease the data volume needing transmission.
On technique scheme basis, further, in step 3, client comprises to the information of the renewal that service end sends:
The information be saved in nearest first predetermined period of time, is namely detected in nearest first predetermined period of time, and do not preserve before or the information of the deleted network equipment; And
In preservation information, the content be updated in the information be updated in nearest first predetermined period of time, i.e. time of being detected of the network equipment.
On technique scheme basis, further, client provides a more new logo, and when the information collected is saved, and when the information of having preserved is updated, client is that corresponding information arranges more new logo; And
After the information with more new logo is sent out, the more new logo being sent out information is removed.
As one preferably execution mode, more new logo can be set to 1 bit, when more new logo is set up, this 1 bit of corresponding informance can be put 1, when more new logo is eliminated, this 1 bit of corresponding informance can be set to 0.
On technique scheme basis, further, in step 3, also can comprise in the information of the renewal that client sends to service end:
The quantity of the information be saved in nearest first predetermined period of time; And/or
In preservation information, the storage cis-position of the information that the content be updated in the information be updated in nearest first predetermined period of time is corresponding.
In one preferably embodiment, the quantity of the information be saved in nearest first predetermined period of time carries out record by 16 bits.
In one preferably embodiment, the storage cis-position of above-mentioned information realizes by increasing serial number to every bar record road of preserving, and on this basis, serial number carries out record by 16 bits.
The foregoing is only preferred embodiment of the present invention; not thereby embodiments of the present invention and protection range is limited; to those skilled in the art; should recognize and all should be included in the scheme that equivalent replacement done by all utilizations specification of the present invention and diagramatic content and apparent change obtain in protection scope of the present invention.