The content of the invention
Regarding to the issue above, the invention provides a kind of WIFI equipment downlink broadcast messages suppressing method and its device, have
Effect solves the technical problem that radio broadcasting bandwidth resources are wasted in the prior art.
The technical scheme that the present invention is provided is as follows:
A kind of WIFI equipment downlink broadcast messages suppressing method, applied to WIFI equipment, the WIFI equipment includes multiple
Wave point, the downlink broadcast messages suppressing method includes:
S11 receives broadcasting packet to be sent;
S21 judges the wave point being connected with terminal device;
S31 calculates the quantity for the wave point being connected with terminal device;
S41 is replicated according to the quantity obtained in step S31 to broadcasting packet to be sent;
S51 sends broadcasting packet to be sent from the wave point being connected with terminal device successively.
In the technical program, control broadcasting packet to be sent only to be sent from the wave point being connected with terminal device, have
Effect has saved the broadband resource of radio broadcasting, it is to avoid waste.
It is further preferred that including before step S11:
S01 sets each wave point broadcast bandwidth threshold value and broadcast rate threshold value.
It is further preferred that also including after step s 11:
S12 obtains the broadcast rate of broadcasting packet to be sent;
S13 judges the broadcast rate of acquisition whether exceeding broadcast rate threshold value, if so, jumping to step S14, otherwise jumps
Go to step S15;
S14 sends super-limit prewarning;
S15 stops super-limit prewarning.
It is further preferred that also including after the step s 15:
S16 judges whether, in super-limit prewarning state, if so, jumping to step S17, otherwise to jump to step S21;
S17 abandons broadcasting packet to be sent.
In the technical program, if judging to be currently at super-limit prewarning state, that is, when there is downlink broadcast storm, according to
Actual conditions selection abandons broadcasting packet to be sent, is effectively protected the normal work of WIFI equipment (wireless driver module).
Present invention also offers a kind of WIFI equipment downlink broadcast messages restraining device, applied to WIFI equipment, and it is described
WIFI equipment includes multiple wave points, and the downlink broadcast messages restraining device includes:
Message receiver module, for receiving broadcasting packet to be sent;
Judge module, for the wave point for judging to be connected with terminal device;
Computing module, the quantity of the wave point being connected with terminal device judged for calculating in judge module;
Message replication module, the broadcast to be sent that the quantity for being calculated according to computing module is received to message receiver module
Message is replicated;
Message sending module, the broadcasting packet to be sent for message replication module to be replicated connects from terminal device successively
The wave point connect is sent.
In the technical program, control broadcasting packet to be sent only to be sent from the wave point being connected with terminal device, have
Effect has saved the broadband resource of radio broadcasting, it is to avoid waste.
It is further preferred that also including configuration module in the broadcasting packet restraining device, for setting each wave point
Broadcast bandwidth threshold value and broadcast rate threshold value.
It is further preferred that also including in the broadcasting packet restraining device:
Broadcast rate acquisition module, the broadcast rate of the broadcasting packet to be sent for obtaining the reception of message receiver module;
Judge module judges whether the broadcast rate that broadcast rate acquisition module is obtained exceedes broadcast rate threshold value;
Early warning control module, for sending super-limit prewarning according to the judged result of judge module or stopping super-limit prewarning.
It is further preferred that also including packet loss module in broadcasting packet restraining device, when judge module judges current
In super-limit prewarning state, the broadcasting packet to be sent that packet loss module receives message receiver module is abandoned.
In the technical program, if judging to be currently at super-limit prewarning state, that is, when there is downlink broadcast storm, according to
Actual conditions selection abandons broadcasting packet to be sent, is effectively protected the normal work of WIFI equipment (wireless driver module).
Embodiment
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, control is illustrated below
The embodiment of the present invention.It should be evident that drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing, and obtain other embodiments.
It is known that, it is necessary to forwarded to all ports when handling broadcasting packet in Linux protocol stacks, for
For business WIFI, a wireless network card often provides multiple wave points, and broadcasting packet can be from each wireless interface
Replicate a and then send, so as to cause the waste of radio broadcasting resource.
As shown in figure 1, WIFI equipment includes n wave point (P1, P2 in such as figure ..., Pn), and it is only wireless
Interface P1 is connected with terminal device STA1 and terminal device STA2 respectively, and other wave points are not connected with terminal device, i.e.,
Broadcasting packet is sent respectively for n wave point.During broadcasting packet is sent, broadcasting packet can be replicated n parts, according to
It is secondary from wave point P1, wave point P2 ..., wave point Pn send, still, in actually only wave point P1
There is terminal device (including terminal device STA1 and terminal device STA2) the interface broadcasting packet, it is wide that other wave points are sent
It is all useless to report text.In addition, when there is downlink broadcast storm, because the wireless driving in WIFI equipment is not appointed
What resistance, substantial amounts of broadcasting packet can overstock not to be sent not go out in wireless queue of giving out a contract for a project, and ultimately results in wireless driving mould
Block is paralysed, even collapsed.
Based on this, the invention provides a kind of WIFI equipment downlink broadcast messages suppressing method, it is applied to WIFI equipment,
And the WIFI equipment includes multiple wave points.It is illustrated in figure 2 a kind of embodiment of downlink broadcast messages suppressing method
Schematic flow sheet, it can be seen that including in the downlink broadcast messages suppressing method:S11 receives broadcast report to be sent
Text;S21 judges the wave point being connected with terminal device;31 calculate the quantity for the wave point being connected with terminal device;S41 roots
Broadcasting packet to be sent is replicated according to the quantity obtained in step S31;S51 by broadcasting packet to be sent successively from terminal
The wave point of equipment connection is sent.
In the present embodiment, after broadcasting packet to be sent is received, each in WIFI equipment is wirelessly connect immediately
The current state of mouth is judged, finds out which wave point has user's access, which wave point not to have user's access, with
This controls broadcasting packet to be sent to be sent from the wave point for having accessed user, so that the suppression to downlink broadcast messages is realized,
Effectively protect radio broadcasting bandwidth resources, it is to avoid the waste of bandwidth.It is noted that the WIFI equipment in present embodiment is refered in particular to
The relatively limited commercial WIFI equipment of interface-free resources.In addition, the broadcasting packet to be sent that ought be received in step s 11 is multiple
During broadcasting packet to be sent, then each broadcasting packet to be sent is replicated successively in step S41, and respectively by it from access
The wave point of user is sent.Judge that only one of which wave point has been accessed in user, step S41 not further, working as
Message to be sent is replicated.
In one example, as shown in figure 3, WIFI equipment includes n wave point (P1, P2 in such as figure ..., Pn),
And only wave point P1 is connected with terminal device STA1 and terminal device STA2 respectively, other wave points are not set with terminal
Standby connection.
During broadcasting packet is sent, after receiving broadcasting packet to be sent, immediately to each in WIFI equipment
The current state of wave point judged, then only will be pending because judged result for only wave point P1 has accessed user
Broadcasting packet is sent to be sent from wave point P1, other wave points are refused to send.
Above-mentioned embodiment is improved and obtains present embodiment, as shown in figure 4, in the present embodiment, this is descending
Broadcasting packet suppressing method includes:S01 sets each wave point broadcast bandwidth threshold value and broadcast rate threshold value;S11 is received and treated
Send broadcasting packet;S12 obtains the broadcast rate of broadcasting packet to be sent;S13 judges whether exceed the broadcast rate of acquisition
Broadcast rate threshold value, if so, jumping to step S14, otherwise jumps to step S15;S14 sends super-limit prewarning;S15 stops transfiniting
Early warning;S21 judges the wave point being connected with terminal device;31 calculate the quantity for the wave point being connected with terminal device;S41
Broadcasting packet to be sent is replicated according to the quantity obtained in step S31;S51 by broadcasting packet to be sent successively from end
The wave point of end equipment connection is sent.
In the present embodiment, broadcasting packet to be sent is being suppressed using the WIFI equipment downlink broadcast messages suppressing method
Before, radio open broadcast bandwidth threshold value and broadcast rate threshold value are set to WIFI equipment first, and it is to be sent wide receiving
Report after text, counting rate is carried out by the wireless driver module in WIFI equipment respectively to broadcasting packet to be sent.Work as system
When counting obtained broadcast rate more than broadcast rate threshold value, then wireless driver module produces radio broadcasting speed super-limit prewarning;When
When statistics obtains broadcast rate and dropped to below broadcast rate threshold value, then wireless driver module remove radio broadcasting speed transfinite it is pre-
It is alert.Afterwards, the current state to each wave point in WIFI equipment judges, finds out which wave point has user to connect
Enter, which wave point does not have user's access, control broadcasting packet to be sent to be sent from the wave point for having accessed user with this,
So as to realize the suppression to downlink broadcast messages, effectively protection radio broadcasting bandwidth resources, it is to avoid the waste of bandwidth.
In addition, in the present embodiment, when the broadcasting packet to be sent received in step S11 is multiple broadcast to be sent
During message, then the broadcast rate of each broadcasting packet to be sent is obtained respectively in step s 12, and successively report each broadcast to be sent
The broadcast rate of text is compared with broadcast rate threshold value.Each broadcasting packet to be sent is replicated successively in step S41,
And respectively send it from the wave point for having accessed user, certainly, when judging that only one of which wave point accesses
Message to be sent is not replicated in user, step S41.
Above-mentioned embodiment is improved and obtains present embodiment, as shown in figure 5, in the present embodiment, this is descending
Broadcasting packet suppressing method includes:S01 sets each wave point broadcast bandwidth threshold value and broadcast rate threshold value;S11 is received and treated
Send broadcasting packet;S12 obtains the broadcast rate of broadcasting packet to be sent;S13 judges whether exceed the broadcast rate of acquisition
Broadcast rate threshold value, if so, jumping to step S14, otherwise jumps to step S15;S14 sends super-limit prewarning;S15 stops transfiniting
Early warning;S16 judges whether, in super-limit prewarning state, if so, jumping to step S17, otherwise to jump to step S21;S17 is abandoned
Broadcasting packet to be sent;S21 judges the wave point being connected with terminal device;31 calculate the wave point being connected with terminal device
Quantity;S41 is replicated according to the quantity obtained in step S31 to broadcasting packet to be sent;S51 is by broadcasting packet to be sent
Sent successively from the wave point being connected with terminal device.
In the present embodiment, broadcasting packet to be sent is being suppressed using the WIFI equipment downlink broadcast messages suppressing method
Before, radio open broadcast bandwidth threshold value and broadcast rate threshold value are set to WIFI equipment first, and it is to be sent wide receiving
Report after text, counting rate is carried out by the wireless driver module in WIFI equipment respectively to broadcasting packet to be sent.Work as system
When counting obtained broadcast rate more than broadcast rate threshold value, then wireless driver module produces radio broadcasting speed super-limit prewarning;When
When statistics obtains broadcast rate and dropped to below broadcast rate threshold value, then wireless driver module remove radio broadcasting speed transfinite it is pre-
It is alert.When judging to be currently at super-limit prewarning state, then the broadcasting packet to be sent is abandoned, otherwise exiting broadcast rate transfinites
Alarm status and current state to each wave point in WIFI equipment judges, finds out which wave point has user
Access, which wave point do not have user's access, control broadcasting packet to be sent to be sent out from the wave point for having accessed user with this
Send, so as to realize the suppression to downlink broadcast messages, effectively protect radio broadcasting bandwidth resources, it is to avoid the waste of bandwidth.In addition,
In the present embodiment, when the broadcasting packet to be sent received in step S11 is multiple broadcasting packets to be sent, then in step
The broadcasting packet to be sent that broadcast rate has exceeded broadcast rate threshold value is abandoned in rapid S17.
In one example, as shown in figure 3, WIFI equipment includes n wave point (P1, P2 in such as figure ..., Pn),
And only wave point P1 is connected with terminal device STA1 and terminal device STA2 respectively, other wave points are not set with terminal
Standby connection, and broadcast rate threshold value is V.
During broadcasting packet is sent, two broadcasting packets to be sent are received, and count two to be sent wide
The broadcast rate for reporting text is respectively V1 and V2, and V1>V、V2<V, then lose broadcast rate for V1 broadcasting packet to be sent
Abandon, continue with the broadcasting packet to be sent that broadcast rate is V2.
Afterwards, the current state to each wave point in WIFI equipment judges, due to judged result for only without
Line interface P1 has accessed user, then only sends out broadcast rate from wave point P1 successively for V2 broadcasting packet to be sent
Go, other wave points are refused to send.
It is illustrated in figure 6 a kind of embodiment signal of WIFI equipment downlink broadcast messages restraining device that the present invention is provided
Figure, specific downlink broadcast messages restraining device 100 is applied to WIFI equipment, and WIFI equipment includes multiple wave points.From
As can be seen that including in the downlink broadcast messages restraining device 100 in figure:Message receiver module 110, judge module 120, meter
Module 130, message replication module 140 and message sending module 150 are calculated, wherein, computing module 130 connects with judge module 120
Connect, message replication module 140 is connected with message receiver module 110 and judge module 120 respectively, message sending module 150 and report
Literary replication module 140 is connected.
In the course of the work, after message receiver module 110 receives broadcasting packet to be sent, judge module 120 is right immediately
The current state of each wave point is judged in WIFI equipment, find out which wave point have user access, which is wireless
Interface does not have user's access, and the wireless of being connected with terminal device of judging in judge module 120 is calculated by computing module 130
The quantity of interface;Afterwards, the broadcasting packet to be sent received by message replication module 140 to message receiver module 110 is carried out
Replicate;Finally, the broadcasting packet to be sent replicated message replication module 140 by message sending module 150 successively from end
The wave point of end equipment connection is sent.It is noted that the WIFI equipment in present embodiment refers in particular to interface-free resources phase
To limited commercial WIFI equipment.In addition, when the broadcasting packet to be sent that message receiver module 110 is received is multiple to be sent
During broadcasting packet, then each broadcasting packet to be sent is replicated successively in message replication module 140, and respectively by it from connecing
The wave point for having entered user is sent.Further, when judging that only one of which wave point has accessed user, then message is replicated
Module 140 is not replicated to message to be sent.
In one example, as shown in fig. 7, WIFI equipment includes n wave point (P1, P2 in such as figure ..., Pn),
And only wave point P1 and wave point P2 are connected with terminal device respectively, wherein wave point P1 respectively with terminal device
STA1 and terminal device STA2 connections, wave point P2 are connected with terminal device STA3, and other wave points are not set with terminal
Standby connection.
During broadcasting packet is sent, message receiver module 110 is received after broadcasting packet to be sent, is sentenced immediately
Disconnected module 120 is judged the current state of each wave point in WIFI equipment, because judged result wirelessly connects to only have
Mouth P1 and wave point P2 has accessed user, and message to be sent is replicated into 1 part with this, and by it respectively from wave point P1 and nothing
Sent in line interface P2, other wave points are refused to send.
Above-mentioned embodiment is improved and obtains present embodiment, as shown in figure 8, in the present embodiment, this is descending
Except being replicated including message receiver module 110, judge module 120, computing module 130, message in broadcasting packet restraining device 100
Outside module 140 and message sending module 150, also including configuration module 160, broadcast rate acquisition module 170 and early warning
Control module 180.
Before suppressing using the downlink broadcast messages restraining device 100 to downlink broadcast, pass through configuration module 160
Set each wave point broadcast bandwidth threshold value and broadcast rate threshold value.Afterwards, message receiver module 110 receives broadcast report to be sent
Text, then obtains the broadcast speed for the broadcasting packet to be sent that message receiver module 110 is received by broadcast rate acquisition module 170
Rate, and judge whether the broadcast rate that broadcast rate acquisition module 170 is obtained exceedes broadcast rate threshold by judge module 120
Value;If the broadcast rate obtained exceedes broadcast rate threshold value, early warning control module 180 sends super-limit prewarning, otherwise not sent
Super-limit prewarning stops super-limit prewarning.Afterwards, judge module 120 is carried out to the current state of each wave point in WIFI equipment
Judge, find out which wave point has user's access, which wave point not to have user's access, and pass through computing module 130
Calculate the quantity of the wave point being connected with terminal device judged in judge module 120;Afterwards, message replication module is passed through
The broadcasting packet to be sent that 140 pairs of message receiver modules 110 are received is replicated;Finally, it will be reported by message sending module 150
The broadcasting packet to be sent that literary replication module 140 is replicated is sent from the wave point being connected with terminal device successively.
It is noted that when the broadcasting packet to be sent that message receiver module 110 is received is multiple broadcast reports to be sent
Wen Shi, then successively replicated each broadcasting packet to be sent in message replication module 140, and respectively by it from having accessed use
The wave point at family is sent.Judge that only one of which wave point has accessed user further, working as, then message replication module
140 do not replicate to message to be sent.
Above-mentioned embodiment is improved and obtains present embodiment, as shown in figure 9, in the present embodiment, this is descending
Except being replicated including message receiver module 110, judge module 120, computing module 130, message in broadcasting packet restraining device 100
Module 140, message sending module 150, configuration module 160, broadcast rate acquisition module 170 and early warning control module 180 it
Outside, also including packet loss module 190.
Before suppressing using the downlink broadcast messages restraining device 100 to downlink broadcast, pass through configuration module 160
Set each wave point broadcast bandwidth threshold value and broadcast rate threshold value.Afterwards, message receiver module 110 receives broadcast report to be sent
Text, then obtains the broadcast speed for the broadcasting packet to be sent that message receiver module 110 is received by broadcast rate acquisition module 170
Rate, and judge whether the broadcast rate that broadcast rate acquisition module 170 is obtained exceedes broadcast rate threshold by judge module 120
Value;If the broadcast rate obtained exceedes broadcast rate threshold value, early warning control module 180 sends super-limit prewarning, otherwise not sent
Super-limit prewarning stops super-limit prewarning.When judge module 120 judges to be currently at super-limit prewarning state, packet loss module
190 broadcasting packets to be sent for receiving message receiver module 110 are abandoned, otherwise by judge module 120 further to WIFI
The current state of each wave point is judged in equipment, finds out which wave point has user's access, which wave point
There is no user's access, and the wave point being connected with terminal device judged in judge module 120 is calculated by computing module 130
Quantity;Afterwards, the broadcasting packet to be sent received by message replication module 140 to message receiver module 110 is replicated;
Finally, the broadcasting packet to be sent replicated message replication module 140 by message sending module 150 successively from terminal device
The wave point of connection is sent.In addition, in the present embodiment, when message receiver module 110 receive it is to be sent wide
When reporting text for multiple broadcasting packets to be sent, then broadcast rate treating for broadcast rate threshold value is exceeded into packet loss module
Broadcasting packet is sent to abandon.
In one example, as shown in fig. 7, WIFI equipment includes n wave point (P1, P2 in such as figure ..., Pn),
And only wave point P1 and wave point P2 are connected with terminal device respectively, wherein wave point P1 respectively with terminal device
STA1 and terminal device STA2 connections, wave point P2 are connected with terminal device STA3, and other wave points are not set with terminal
Standby connection, and broadcast rate threshold value is V.
During broadcasting packet is sent, two broadcasting packets to be sent are received, and count two to be sent wide
The broadcast rate for reporting text is respectively V1 and V2, and V1<V、V2<V, then do not abandon broadcasting packet to be sent.
Afterwards, judge module 120 is judged the current state of each wave point in WIFI equipment, due to judging knot
Fruit has accessed user for only wave point P1 and wave point P2, and two messages to be sent are replicated into 1 part respectively with this, and will
It sends from wave point P1 and wave point P2 respectively, and other wave points are refused to send.
It should be noted that above-described embodiment can independent assortment as needed.The above is only the preferred of the present invention
Embodiment, it is noted that for those skilled in the art, is not departing from the premise of the principle of the invention
Under, some improvements and modifications can also be made, these improvements and modifications also should be regarded as protection scope of the present invention.