Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of access point to the method and system of server reporting terminal access state, to be taken the problem of a large amount of network bandwidth resources for solving AP in prior art by the state that message transmits STA.
For achieving the above object and other relevant objects, the invention provides the method for a kind of access point to server reporting terminal access state, be applied in the network system comprising server, access point, described access point comprises to the method for server reporting terminal access state: according to the information management terminal information table of the terminal of the described access point of access, each entry in described terminal information table correspond to the information state of a terminal, described entry comprises the essential information field of terminal, and identification field turn-on time of terminal; In the first time period of each setting, obtain the access state of described terminal, the stamp turn-on time of current first time period is written to the turn-on time of the entry in terminal information table corresponding to the terminal that is in access state in identification field; A state bitmap is generated within the second time period of setting, described second time period comprises the first time period of integral multiple, described state bitmap comprises a described integral multiple state table, a described state table one_to_one corresponding the access state of all terminals in a first time period, and a bit place value one_to_one corresponding of described state table in terminal information table the access state of a terminal in a first time period corresponding with described state table; Described state bitmap and the end message that newly adds within current described second time period are created SOT state of termination message and sends to server; Described server according to the terminal information table corresponding with described access point in described SOT state of termination message amendment server, to make the synchronizing information of terminal information table that the terminal information table of described access point is corresponding with server.
Alternatively, when described access point receives the Probe frame of described terminal transmission, the access state of current first time period is access.
Alternatively, when the access state in a first time period of a terminal in terminal information table is for access, a bit assignment corresponding to the described terminal in corresponding one group of state table is 1.
Alternatively, described access point also comprises to the method for server reporting terminal access state: when comprising replacement mark in the described SOT state of termination message that server receives, described server re-establishes the terminal information table in server.
Alternatively, described access point also comprises to the method for server reporting terminal access state: described access point sends described SOT state of termination message by server described in TCP chain road direction, when described TCP link disconnection re-establishes, first that sends described SOT state of termination message comprises replacement mark.
The present invention also provides a kind of access point to the system of server reporting terminal access state, described access point comprises server, access point to the system of server reporting terminal access state, described access point comprises: terminal information table administration module, for the information management terminal information table of the terminal according to the described access point of access, each entry in described terminal information table correspond to the information state of a terminal, described entry comprises the essential information field of terminal, and identification field turn-on time of terminal; In the first time period of each setting, obtain the access state of described terminal, the stamp turn-on time of current first time period is written to the turn-on time of the entry in terminal information table corresponding to the terminal that is in access state in identification field; SOT state of termination message generation module, for generating a state bitmap within the second time period of setting, described second time period comprises the first time period of integral multiple, described state bitmap comprises a described integral multiple state table, a described state table one_to_one corresponding the access state of all terminals in a first time period, and a bit place value one_to_one corresponding of described state table in terminal information table the access state of a terminal in a first time period corresponding with described state table; Described state bitmap and the end message that newly adds within current described second time period are created SOT state of termination message; SOT state of termination message sending module, for sending to server by described SOT state of termination message.
Alternatively, when described access point receives the Probe frame of described terminal transmission, the access state of current first time period is access.
Alternatively, when the access state in a first time period of a terminal in terminal information table is for access, a bit assignment corresponding to the described terminal in corresponding one group of state table is 1.
Alternatively, described SOT state of termination generation module also for: described access point sends described SOT state of termination message by server described in TCP chain road direction, when described TCP link disconnection re-establishes, first that sends described SOT state of termination message comprises replacement mark.
The present invention also provides a kind of access point to the system of server reporting terminal access state, described access point comprises server, access point to the system of server reporting terminal access state, described server comprises: SOT state of termination message processing module (MPM), for receiving the SOT state of termination message that access point sends, and according to the terminal information table corresponding with described access point in described SOT state of termination message amendment server, to make the synchronizing information of terminal information table that the terminal information table of described access point is corresponding with server.
Alternatively, described SOT state of termination message processing module (MPM) also for: when comprise in the described SOT state of termination message that server receives reset mark time, described server re-establishes the terminal information table in server.
The present invention also provides a kind of access point to the system of server reporting terminal access state, and described access point comprises server as above, access point as above to the system of server reporting terminal access state.
As mentioned above, a kind of access point of the present invention is to the method and system of server reporting terminal access state, there is following beneficial effect: while AP (access point) ensures regularly STA (terminal) access state to be reported to server, significantly reduce taking network bandwidth resources.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this specification can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this specification also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.
It should be noted that, the diagram provided in the present embodiment only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
The invention provides the method for a kind of access point to server reporting terminal access state, be applied in the network system comprising server, access point.Described server is connected with multiple access point, manages multiple access point, and each access point (AP) can access multiple terminal (STA).The terminal access state of this access point 11 (AP) is reported in each access point 11 (AP) timing to server 12.In one embodiment, as shown in Figure 1, described access point comprises to the method for server reporting terminal access state:
Step S1, according to the information management terminal information table of the terminal of the described access point of access, each entry in described terminal information table correspond to the information state of a terminal, and described entry comprises the essential information field of terminal, and identification field turn-on time of terminal.In one embodiment, when described access point receives the Probe frame of described terminal transmission, show that this terminal is the terminal being linked into described access point, set up the entry corresponding with described terminal by terminal information table, the essential information field of wherein said terminal can comprise the MAC Address of this terminal.When described terminal finds corresponding entry (entry that namely essential information field contents is identical) in terminal information table, illustrate that this end message exists in terminal information table, this terminal is added terminal.When described terminal does not find corresponding entry (entry that namely essential information field contents is identical) in terminal information table, illustrate that this end message does not exist in terminal information table, this terminal is the terminal newly added.Access point will be that the terminal newly added sets up corresponding entry in terminal information table.
Step S2, obtains the access state of described terminal in the first time period of each setting, the stamp turn-on time of current first time period is written to the turn-on time of the entry in terminal information table corresponding to the terminal that is in access state in identification field.In one embodiment, when described access point receives the Probe frame of described terminal transmission, the access state showing current first time period is access, the stamp turn-on time of current first time period is written to the turn-on time of the entry in terminal information table corresponding to the terminal that is in access state in identification field.Stamp turn-on time of current first time period can be the temporal information of a current first time period of mark, and this temporal information also can be described as the time stamp of the first time period that specification is crossed, or the time stamp that specification is crossed.
Step S3, a state bitmap is generated within the second time period of setting, described second time period comprises the first time period of integral multiple, described state bitmap comprises a described integral multiple state table, a described state table one_to_one corresponding the access state of all terminals in a first time period, and a bit place value one_to_one corresponding of described state table in terminal information table the access state of a terminal in a first time period corresponding with described state table.Particularly, when the access state in a first time period of a terminal in terminal information table is for access, a bit assignment corresponding to the described terminal in corresponding one group of state table is 1, and this shows that this terminal is in the region that access point (AP) covers.When the access state in a first time period of a terminal in terminal information table is not for access, a bit assignment corresponding to the described terminal in corresponding one group of state table is 0, and this shows the region that this terminal has been left access point (AP) and covered.In one embodiment, described first time period is 30 seconds, and the second time period was 10 minutes, and described integral multiple is the 20, second time period comprised 20 first time period.
Step S4, creates SOT state of termination message by described state bitmap and the end message that newly adds within current described second time period and sends to server.When current second time section detects that the terminal of access does not find corresponding entry (entry that namely essential information field contents is identical) in terminal information table, illustrate that this end message does not exist in terminal information table, this terminal is the terminal that current second time Duan Xin adds.In one embodiment, described SOT state of termination message also comprises replacement mark, and when described SOT state of termination message comprises replacement mark, all terminal entry in the terminal information table of access point all join as the end message newly added in SOT state of termination message.In one embodiment, described access point sends described SOT state of termination message by server described in TCP chain road direction, and when described TCP link disconnects reconstruction, first that sends described SOT state of termination message comprises replacement mark.First SOT state of termination message that described access point sends comprises replacement mark.The described end message newly added comprises partial content or the full content of the essential information field of the terminal newly added.
Step S5, described server according to the terminal information table corresponding with described access point in described SOT state of termination message amendment server, to make the synchronizing information of terminal information table that the terminal information table of described access point is corresponding with server.In one embodiment, described access point also comprises to the method for server reporting terminal access state: when comprising replacement mark in the described SOT state of termination message that server receives, described server re-establishes the terminal information table in server.Described server be its management each access point (AP) set up one with described access point for terminal information table.
In one embodiment, the second time period comprised 20 first time period, and the maximum length of described terminal information table is 1024.AP (access point) leaves the end message of STA (accessing terminal) in terminal information table in.After AP receives the PROBE frame of certain STA, should inquire about whether have this according to MAC Address in array, if do not had, then find the Empty Entry in table or delete the terminal type of the oldest entry record STA of time stamp when showing full, the information such as brand, SSID, and on the timing node of 30 seconds integral multiples, record these information in information upload message.(terminal type of STA, the information such as brand, SSID can be stored in Dram, after information is dealt into server, can delete in table, can save memory headroom) is sent when within next 10 minutes, timing arrives.If find MAC Address in array, then upgrade time stamp to receiving PROBE time stamp recently.SOT state of termination table is as shown in the table:
MAC0 |
The end message of MAC0 |
The time stamp that the specification received recently is crossed |
MAC1 |
The end message of MAC1 |
The time stamp that the specification received recently is crossed |
MAC2 |
The end message of MAC2 |
The time stamp that the specification received recently is crossed |
... |
... |
... |
... |
... |
... |
MAC1023 |
The end message of MAC1023 |
The time stamp that the specification received recently is crossed |
Wherein, MAC0, MAC1...MAC1023 represent the position stored in SOT state of termination table, are not to represent actual MAC Address.Described terminating packet terminal essential information, the time stamp that the specification received recently is crossed, index knows the temporal information of some first time period.
Described state bitmap is as shown in the table:
The SOT state of termination message generated is as shown in the table:
Wherein, message version number is current is 1, accounts for 1byte.Whether whether RESET identifies representative server section and needs to empty previous record, namely exist and reset mark, and when RESET is designated 1, show to there is replacement mark, service end needs to rebuild terminal information table; When RESET is designated 0, show to there is not replacement mark, service end does not need to rebuild terminal information table; RESET flag can account for 1byte.BIT position state table is exactly above-mentioned state bitmap.Newly-increased entry N shows end message number newly-increased in this SOT state of termination message, and newly-increased terminal is generate the terminal newly increased in the second time period of this SOT state of termination message.Described newly-increased end message has N bar, and representative comprises the information of newly-increased N number of terminal, and the content of described newly-increased end message is as shown in the table:
ID1 (representing the position at terminal information table) |
End message |
The time stamp that specification is crossed |
ID2 (representing the position at terminal information table) |
End message |
The time stamp that specification is crossed |
ID3 (representing the position at terminal information table) |
End message |
The time stamp that specification is crossed |
... |
... |
... |
IDN (representing the position at terminal information table) |
End message |
The time stamp that specification is crossed |
Wherein, end message can be the content of the essential information field of terminal, comprises the MAC Address of terminal.Like this, only comprise STA (terminal) state of new access in SOT state of termination message, those had been indicated in upper once state message to the STA (terminal) of state, and only needed to identify at BIT state table 1 BIT.When periodic 10 minutes (the second time period), timing arrived, we create message the end message left in terminal information table by the message organizational form mentioned by the present invention, and are sent to server by the long connection of TCP of setting up in advance.Due to the memory resource limitation of AP, if the STA number obtained within 10 minutes (the second time period) exceedes the maximum number that AP can store, then AP should delete and receive the oldest STA of PROBE frame time stamp.When network failure causes TCP to re-establish connection, our the RESET position of first message after TCP connects is 1, and empties current STA information table.Server should know the STA information table that Server holds the very first time after receiving this message, make Server (server) and AP (access point) client information synchronous.
The present invention also provides a kind of access point to the system of server reporting terminal access state, and described access point comprises server, access point to the system of server reporting terminal access state.Described server is connected with multiple access point, manages multiple access point, and each access point (AP) can access multiple terminal (STA).Described a kind of access point can adopt a kind of access point as above to carry out terminal's status information report to the method for server reporting terminal access state to the system of server reporting terminal access state.
In one embodiment, as shown in Figure 2, described access point comprises server 12, access point 11 to the system 1 of server reporting terminal access state.Described access point 11 comprises terminal information table administration module 111, SOT state of termination message generation module 112 and SOT state of termination message sending module 113.Wherein:
Terminal information table administration module 111 is for the information management terminal information table of the terminal according to the described access point of access, each entry in described terminal information table correspond to the information state of a terminal, described entry comprises the essential information field of terminal, and identification field turn-on time of terminal; In the first time period of each setting, obtain the access state of described terminal, the stamp turn-on time of current first time period is written to the turn-on time of the entry in terminal information table corresponding to the terminal that is in access state in identification field.In one embodiment, when described access point receives the Probe frame of described terminal transmission, show that this terminal is the terminal being linked into described access point, set up the entry corresponding with described terminal by terminal information table, the essential information field of wherein said terminal can comprise the MAC Address of this terminal.When described terminal finds corresponding entry (entry that namely essential information field contents is identical) in terminal information table, illustrate that this end message exists in terminal information table, this terminal is added terminal.When described terminal does not find corresponding entry (entry that namely essential information field contents is identical) in terminal information table, illustrate that this end message does not exist in terminal information table, this terminal is the terminal newly added.Access point will be that the terminal newly added sets up corresponding entry in terminal information table.In one embodiment, when described access point receives the Probe frame of described terminal transmission, the access state showing current first time period is access, the stamp turn-on time of current first time period is written to the turn-on time of the entry in terminal information table corresponding to the terminal that is in access state in identification field.Stamp turn-on time of current first time period can be the temporal information of a current first time period of mark, and this temporal information also can be described as the time stamp of the first time period that specification is crossed, or the time stamp that specification is crossed.
SOT state of termination message generation module 112 is connected with terminal information table administration module 111, for generating a state bitmap within the second time period of setting, described second time period comprises the first time period of integral multiple, described state bitmap comprises a described integral multiple state table, a described state table one_to_one corresponding the access state of all terminals in a first time period, and a bit place value one_to_one corresponding of described state table in terminal information table the access state of a terminal in a first time period corresponding with described state table; Described state bitmap and the end message that newly adds within current described second time period are created SOT state of termination message.In one embodiment, when the access state in a first time period of a terminal in terminal information table is for access, a bit assignment corresponding to the described terminal in corresponding one group of state table is 1, and this shows that this terminal is in the region that access point (AP) covers.When the access state in a first time period of a terminal in terminal information table is not for access, a bit assignment corresponding to the described terminal in corresponding one group of state table is 0, and this shows the region that this terminal has been left access point (AP) and covered.In one embodiment, described first time period is 30 seconds, and the second time period was 10 minutes, and described integral multiple is the 20, second time period comprised 20 first time period.When current second time section detects that the terminal of access does not find corresponding entry (entry that namely essential information field contents is identical) in terminal information table, illustrate that this end message does not exist in terminal information table, this terminal is the terminal that current second time Duan Xin adds.In one embodiment, described SOT state of termination message also comprises replacement mark, and when described SOT state of termination message comprises replacement mark, all terminal entry in the terminal information table of access point all join as the end message newly added in SOT state of termination message.In one embodiment, described access point sends described SOT state of termination message by server described in TCP chain road direction, and when described TCP link disconnects reconstruction, first that sends described SOT state of termination message comprises replacement mark.First SOT state of termination message that described access point sends comprises replacement mark.The described end message newly added comprises partial content or the full content of the essential information field of the terminal newly added.The timing within each second time period of described SOT state of termination message generation module 112 generates a SOT state of termination message.
SOT state of termination message sending module 113 is connected with SOT state of termination message generation module 112, for described SOT state of termination message is sent to server.
In one embodiment, as shown in Figure 2, described access point comprises server 12, access point 11 to the system 1 of server reporting terminal access state, and described server 12 comprises SOT state of termination message processing module (MPM) 121.The SOT state of termination message that described SOT state of termination message processing module (MPM) 121 sends for receiving access point, and according to the terminal information table corresponding with described access point in described SOT state of termination message amendment server, to make the synchronizing information of terminal information table that the terminal information table of described access point is corresponding with server.Described server 12 for each access point (AP) that it manages set up one with described access point for terminal information table.In one embodiment, described SOT state of termination message processing module (MPM) 121 also for: when comprise in the described SOT state of termination message that server receives reset mark time, described server re-establishes the terminal information table in server.
The present invention also provides a kind of access point to the system of server reporting terminal access state.As shown in Figure 2, described access point comprises server 12 as above, access point 11 as above to the system 1 of server reporting terminal access state.Described server 12 is connected with multiple access point 11, manages multiple access point 11, and each access point 11 (AP) can access multiple terminal (STA).The terminal access state of this access point 11 (AP) is reported in each access point 11 (AP) timing to server 12.
In sum, a kind of access point of the present invention is to the method and system of server reporting terminal access state, there is following beneficial effect: while AP (access point) ensures regularly STA (terminal) access state to be reported to server, significantly reduce taking network bandwidth resources.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.