CN112822709B - Working method for carrying out wireless communication data capture on multiple devices with multiple wireless network cards - Google Patents

Working method for carrying out wireless communication data capture on multiple devices with multiple wireless network cards Download PDF

Info

Publication number
CN112822709B
CN112822709B CN202011642045.0A CN202011642045A CN112822709B CN 112822709 B CN112822709 B CN 112822709B CN 202011642045 A CN202011642045 A CN 202011642045A CN 112822709 B CN112822709 B CN 112822709B
Authority
CN
China
Prior art keywords
wireless network
network card
monitoring
working mode
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011642045.0A
Other languages
Chinese (zh)
Other versions
CN112822709A (en
Inventor
杨松
龚海澎
王庭宇
贾锦辉
郭�旗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Yingdesaike Technology Co ltd
Original Assignee
Sichuan Yingdesaike Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Yingdesaike Technology Co ltd filed Critical Sichuan Yingdesaike Technology Co ltd
Priority to CN202011642045.0A priority Critical patent/CN112822709B/en
Publication of CN112822709A publication Critical patent/CN112822709A/en
Application granted granted Critical
Publication of CN112822709B publication Critical patent/CN112822709B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W16/00Network planning, e.g. coverage or traffic planning tools; Network deployment, e.g. resource partitioning or cells structures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a working method for capturing wireless communication data by a plurality of devices with a plurality of wireless network cards, which comprises the following steps: the initial monitoring working mode of all the wireless network cards of each device is a monitoring working mode 1, when a wireless hotspot exists on a monitored Wi-Fi channel, the wireless network card is set as a reference wireless network card, the monitoring working mode of the wireless network card is adjusted to be a monitoring working mode 2, and then the fixed monitoring appointed Wi-Fi channel and the operation load of the device are synchronized/broadcasted to other devices in the same working environment; and the other equipment judges whether the monitoring working mode of the wireless network card of the equipment is adjusted to be the monitoring working mode 2 according to the monitoring working modes of all the wireless network cards of the equipment, the monitored Wi-Fi channels and the running load of the equipment. The invention not only ensures the circulation monitoring of the Wi-Fi channel, but also ensures that the wireless communication data capturing the Wi-Fi channel where the wireless hotspot is located does not lose packet as much as possible through the coordination and the coordination of a plurality of wireless network cards of a plurality of devices.

Description

Working method for carrying out wireless communication data capture on multiple devices with multiple wireless network cards
Technical Field
The invention relates to the field of communication, in particular to a working method for capturing wireless communication data by multiple devices with multiple wireless network cards.
Background
The working frequency bands of Wi-Fi are divided into 2.4GHz and 5 GHz. The working frequency of the 2.4G frequency band is 2.402-2.483GHz, and is divided into 14 channels, and China (excluding Taiwan province) uses the first 13 channels; the operating frequency of the 5G band is 5.170-5.835GHz, and is divided into 24 channels, and china (excluding hong kong, australian, taiwan province) uses 13 channels. Currently, the mainstream wireless Wi-Fi network equipment uses an 802.11a/b/g/n/ac protocol, and generally supports 13 channels regardless of 802.11b/g or 802.11a/b/g/n/ac, namely, 26 available channels in total. The Channel is also called a Channel (Channel), a frequency band, and is a data signal transmission Channel using a radio signal (electromagnetic wave) as a transmission carrier. The channel overlapping can cause mutual interference among wireless routes, further influences wireless transmission quality, and the automatic channel selection function enables a wireless hotspot to automatically set an optimal working channel according to the surrounding wireless environment, thereby effectively avoiding same frequency interference/competition. A wireless network (wireless hotspot, wireless network card) may operate on multiple channels. Various wireless network devices within the coverage area of a wireless signal should try to use different channels to avoid interference between the signals. Therefore, in a practical working environment, the wireless channel used by the wireless hotspot is unpredictable, and the wireless channel used by the wireless network card accessing the wireless hotspot is also unpredictable.
To monitor which wireless hotspots exist in the environment, a polling manner is generally adopted for monitoring the Wi-Fi channel. Due to business needs, in a specific working scene, wireless communication data on a wireless channel used by a certain detected wireless hotspot needs to be captured without losing packets for a long time besides the wireless hotspot existing in a working place needs to be continuously monitored.
Currently, a plurality of wireless network cards are usually included in the device (the number of the wireless network cards is greater than or equal to 2). The wireless network cards scan all Wi-Fi channels by adopting a method of ceaselessly and quickly switching channels, the method can ensure that wireless hotspots exist in a workplace are ceaselessly monitored, but because all the wireless network cards ceaselessly switch channels and the channels switched by the wireless network cards have randomness, when the wireless network cards are switched to a certain channel, wireless communication data on other channels can be lost, so that equipment with the wireless network cards cannot maintain seamless monitoring on an uncertain wireless channel, and the requirement of grabbing the wireless communication data on the wireless channel used by a certain wireless hotspot without losing packets for a long time cannot be met.
In summary, in a working environment, although two or more devices with multiple wireless network cards are deployed, the devices cannot cooperate with each other because there is no interaction mechanism, or there is no cooperation between the devices in terms of wirelessly monitoring and capturing wireless communication data although there is an interaction mechanism, and the requirement of capturing wireless communication data on a wireless channel used by a certain wireless hotspot without losing packets for a long time cannot be met.
Disclosure of Invention
The invention aims to provide a working method for capturing wireless communication data by a plurality of devices with a plurality of wireless network cards, which aims to solve the problem that the wireless communication data on a wireless channel used by a certain wireless hotspot can not be captured for a long time without losing packets at present.
The invention provides a working method for capturing wireless communication data by a plurality of devices with a plurality of wireless network cards, wherein the plurality of devices with the plurality of wireless network cards are in the same working environment, and each device is provided with the plurality of wireless network cards, and the working method comprises the following steps:
step S1, each device sets the initial monitoring mode of all the wireless network cards as monitoring mode 1; wherein, the monitoring mode of each wireless network card of each piece of equipment is divided into: the monitoring work mode 1 is to continuously perform frequency cutting scanning on all Wi-Fi channels; the monitoring working mode 2 is that the designated Wi-Fi channel is fixedly monitored and the designated Wi-Fi channel is subjected to packet grabbing work; at least one wireless network card in all the wireless network cards works in a monitoring working mode 1;
step S2, once any one wireless network card of any one device finds that at least one wireless hotspot exists on the monitored Wi-Fi channel, the device to which the wireless network card belongs sets the wireless network card as a reference wireless network card and adjusts the monitoring working mode of the reference wireless network card to be the monitoring working mode 2, and then the Wi-Fi channel appointed by the fixed monitoring of the reference wireless network card and the device information to which the reference wireless network card belongs are synchronized/broadcast to other devices in the same working environment, wherein the device information comprises a running load and a device number;
step S3, after receiving the Wi-Fi channel specified by the fixed monitoring of the reference wireless network card and the device information to which the reference wireless network card belongs, each of the other devices determines whether the monitoring mode of the wireless network card of the device itself needs to be adjusted to the monitoring mode 2 according to the monitoring modes of all the wireless network cards of the device itself, the monitored Wi-Fi channels, and the device information.
Further, the step S3 includes the following sub-steps:
step S31, after receiving the Wi-Fi channel appointed by the fixed monitoring of the reference wireless network card and the running load information of the equipment, each other equipment firstly checks the monitoring working mode of all the wireless network cards of the equipment;
step S32, when the monitoring working mode of the wireless network card in all the wireless network cards of the self equipment is the monitoring working mode 1, keeping the monitoring working mode of the wireless network card with the monitoring working mode of the monitoring working mode 1 unchanged; when the monitoring working mode of the wireless network card in all the wireless network cards of the self equipment is the monitoring working mode 2, checking whether the Wi-Fi channel, which is appointed by the fixed monitoring of the wireless network card with the monitoring working mode of the monitoring working mode 2, is the same as the Wi-Fi channel, which is appointed by the fixed monitoring of the reference wireless network card;
step S33, if the Wi-Fi channel designated by the fixed monitoring of the wireless network card is the same as the received Wi-Fi channel designated by the fixed monitoring of the reference wireless network card, judging whether the devices to which the wireless network card and the reference wireless network card belong are the same according to the device numbers among the devices to which the wireless network card and the reference wireless network card belong, and continuing to step S34; if the Wi-Fi channel appointed by the fixed monitoring of the wireless network card is different from the received Wi-Fi channel appointed by the fixed monitoring of the reference wireless network card, keeping the monitoring working mode of the wireless network card unchanged;
step S34, if the device belongs to the same device, judging whether the monitoring working mode of the wireless network card of the device is the monitoring working mode 2 according to the size of the network card number of the wireless network card; if the devices are not the same, judging whether the operation load of the device to which the wireless network card belongs is the same as the received operation load of the device to which the reference wireless network card belongs, and continuing to step S35;
step S35, if the operation load of the equipment to which the wireless network card belongs is different from the received operation load of the equipment to which the reference wireless network card belongs, comparing whether the operation load of the equipment to which the wireless network card belongs is better than the operation load of the equipment to which the reference wireless network card belongs, when the operation load of the equipment to which the wireless network card belongs is not better than the operation load of the equipment to which the reference wireless network card belongs, adjusting the monitoring work mode of the wireless network card to be a monitoring work mode 1, and when the operation load of the equipment to which the wireless network card belongs is better than the operation load of the equipment to which the reference wireless network card belongs, adjusting the monitoring work mode of the wireless network card of the reference equipment to be the monitoring work mode 1; if the operation load of the equipment to which the wireless network card belongs is the same as the received operation load of the equipment to which the reference wireless network card belongs, continuously comparing the equipment number of the equipment to which the wireless network card belongs to judge whether the monitoring working mode of the wireless network card needs to be kept as a monitoring working mode 2;
and step S36, when the device to which the wireless network card in the monitoring working mode 1 belongs finds that a new wireless hotspot exists on the monitored Wi-Fi channel, returning to step S2 to continue execution.
Further, the specific method for determining whether the devices to which the wireless network card and the reference wireless network card belong are the same device according to the device number between the devices to which the wireless network card belongs in step S33 is as follows: when the device numbers of the devices are the same, the devices of the wireless network card and the reference wireless network card are the same devices; and when the device numbers of the devices are different, the devices of the wireless network card and the reference wireless network card are not the same.
Further, the specific method for determining whether the monitoring operation mode of the wireless network card of the device itself needs to be maintained as the monitoring operation mode 2 according to the size of the network card number of the wireless network card in step S34 is as follows:
keeping the monitoring working mode of the wireless network card with the smaller network card number in the two wireless network cards unchanged, and adjusting the monitoring working mode of the wireless network card with the larger network card number in the two wireless network cards to be a monitoring working mode 1; or,
and keeping the monitoring working mode of the wireless network card with the larger network card number in the two wireless network cards unchanged, and adjusting the monitoring working mode of the wireless network card with the smaller network card number in the two wireless network cards to be the monitoring working mode 1.
Further, the operation load of the device includes CPU load and hardware resource consumption.
Further, in step S35, the specific content of continuing to compare the device number of the device to which the wireless network card belongs to determine whether the monitoring operation mode of the wireless network card needs to be kept as the monitoring operation mode 2 is:
selecting a wireless network card corresponding to the equipment with the smaller equipment number in the two pieces of equipment, wherein the monitoring working mode of the wireless network card corresponding to the equipment with the larger equipment number in the two pieces of equipment is kept unchanged, and the monitoring working mode of the wireless network card corresponding to the equipment with the larger equipment number in the two pieces of equipment is adjusted to be a monitoring working mode 1; or,
the monitoring working mode of the wireless network card corresponding to the device with the larger device number in the two devices is kept unchanged, and the monitoring working mode of the wireless network card corresponding to the device with the smaller device number in the two devices is adjusted to be the monitoring working mode 1.
Further, if only one wireless network card in all the devices is left to work in the monitoring working mode 1, the monitoring working mode of the wireless network card is kept unchanged, and the newly found Wi-Fi channel message of at least one wireless hotspot is broadcasted/synchronized to the other devices.
Further, when the device to which the wireless network card in the monitoring working mode 2 belongs receives another Wi-Fi channel which needs to be fixedly monitored and subjected to packet grabbing processing and is transmitted by the device to which the wireless network card in the monitoring working mode 1 belongs, the device to which the wireless network card in the monitoring working mode 2 belongs is started to perform time-sharing processing, the Wi-Fi channel is added into the long-time packet-loss-free grabbing channel list of the device to which the wireless network card in the monitoring working mode 2 belongs, and meanwhile, the monitored Wi-Fi channel and device information are broadcasted/synchronized to other devices.
Further, the specific content of the time-sharing processing mechanism is as follows: and while keeping the packet capturing processing of the wireless network card, switching the Wi-Fi channel by the equipment to which the wireless network card belongs at intervals of T1, and restarting traversing until the Wi-Fi channels in the packet-loss-free capturing channel list are traversed in sequence for a long time.
Further, the working method for the plurality of devices with the plurality of wireless network cards to capture the wireless communication data further comprises the following steps:
s4, when the wireless hotspot on the fixed monitoring appointed Wi-Fi channel disappears and the time that no wireless hotspot exists on the Wi-Fi channel exceeds the preset time T2, the monitoring working mode of the wireless network card of the fixed monitoring appointed Wi-Fi channel is adjusted to be the monitoring working mode 1.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:
1. the invention not only ensures the circulation monitoring of the Wi-Fi channel, but also ensures that the wireless communication data capturing the Wi-Fi channel where the wireless hotspot is located does not lose packet as much as possible through the coordination and the coordination of a plurality of wireless network cards of a plurality of devices;
2. the invention ensures the optimal selection of resource utilization among devices through an election mechanism based on the operation load, namely, the wireless communication data is grabbed and selected from the devices with the minimum load and the maximum residual resources;
3. the invention combines the election mechanism of the equipment number to rapidly configure the monitoring working modes of the two equipment when the running loads of the two equipment are completely the same.
4. The invention can rapidly configure the monitoring working mode of the wireless network cards of the two devices by combining the election mechanism of the network card number.
5. The invention further ensures that the wireless communication data does not lose packet through a time-sharing processing mechanism.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flow chart of a working method for performing wireless communication data capture by multiple devices having multiple wireless network cards according to an embodiment of the present invention.
FIG. 2 is a flowchart illustrating step S3 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
As shown in fig. 1, this embodiment provides a working method for performing wireless communication data capture by multiple devices having multiple wireless network cards, where the multiple devices having multiple wireless network cards are located in the same working environment, and each device is provided with multiple wireless network cards, in this embodiment, the numbers of the multiple devices in the same working environment are Dev _1, Dev _2, and. The working method comprises the following steps:
s1, each device sets the initial monitoring mode of all the wireless network cards as monitoring mode 1; in this embodiment, the monitoring mode of each wireless network card of each device is divided into the following two modes:
the monitoring work mode 1 is to uninterruptedly cut frequency and scan all Wi-Fi channels required to be monitored; in this embodiment, all the wireless network cards of all the devices rapidly scan all the Wi-Fi channels with a time interval of 200ms staying on each channel; the Wi-Fi has 26 channels, and the scanning period of each wireless network card is set to be 5.2 s;
the monitoring working mode 2 is that the designated Wi-Fi channel is fixedly monitored and the designated Wi-Fi channel is subjected to packet grabbing work;
in addition, at least one wireless network card in all the wireless network cards works in a monitoring working mode 1 so as to ensure that at least one wireless network card uninterruptedly switches frequency and scans all Wi-Fi channels required to be monitored;
s2, once any one of the wireless network cards Wi-Fi _ j (j belongs to [1, m ]) of any one of the devices Dev _ i finds that at least one wireless hotspot exists on the monitored Wi-Fi channel _ k (k belongs to [1,26], which represents one of the 26 Wi-Fi channels), the device to which the wireless network card Wi-Fi _ j belongs sets the wireless network card Wi-Fi _ j as a reference wireless network card and adjusts the monitoring mode of the reference wireless network card Wi-Fi _ j to the monitoring mode 2 (at this time, the monitoring modes of the other wireless network cards of the device and the wireless network cards of other devices are not changed), that is, the monitoring channel of the wireless network card Wi-Fi _ j is fixed on the Wi-Fi channel _ k used by the wireless hotspot, then the packet capturing process for the wireless network card Wi-Fi _ j is started, the wireless network card Wi-Fi _ j is used for realizing long-time non-packet loss capturing of wireless communication data on a Wi-Fi channel _ k used by a wireless hotspot; then the Wi-Fi channel _ k appointed by the fixed monitoring of the reference wireless network card Wi-Fi _ j and the information of the affiliated device Dev _ i are synchronized/broadcasted to other devices in the same working environment; in some embodiments, once any one of the wireless network cards Wi-Fi _ j in any one of the devices Dev _ i finds the Wi-Fi channel of at least one wireless hotspot, the Wi-Fi channel is stored by capturing the channel list without losing packets for a long time; the equipment information comprises an operation load and an equipment number;
and S3, after receiving the Wi-Fi channel fixedly monitored by the reference wireless network card Wi-Fi _ j and the information of the equipment, each other equipment judges whether the monitoring working mode of the wireless network card of the equipment needs to be adjusted to be a monitoring working mode 2 according to the monitoring working modes of all the wireless network cards of the equipment, the monitored Wi-Fi channel and the running load of the equipment. Referring to fig. 2, the step S3 includes the following sub-steps:
step S31, after receiving the Wi-Fi channel appointed by the fixed monitoring of the reference wireless network card Wi-Fi _ j and the information of the equipment, each other equipment firstly checks the monitoring working mode of all the wireless network cards of the equipment;
step S32, when the monitoring working mode of the wireless network card in all the wireless network cards of the self equipment is the monitoring working mode 1, keeping the monitoring working mode of the wireless network card with the monitoring working mode of the monitoring working mode 1 unchanged; when the monitoring working mode of the wireless network card in all the wireless network cards of the self equipment is the monitoring working mode 2, checking whether the Wi-Fi channel which is fixedly monitored and appointed by the wireless network card and is in the monitoring working mode 2 is the same as the Wi-Fi channel which is fixedly monitored and appointed by the reference wireless network card Wi-Fi _ j;
step S33, if the Wi-Fi channel designated by the fixed monitoring of the wireless network card is the same as the received Wi-Fi channel designated by the fixed monitoring of the reference wireless network card Wi-Fi _ j, judging whether the equipment to which the wireless network card and the reference wireless network card Wi-Fi _ j belong is the same equipment according to the equipment number between the equipment to which the wireless network card belongs, and continuing to step S34; if the Wi-Fi channel appointed by the fixed monitoring of the wireless network card is different from the received Wi-Fi channel appointed by the fixed monitoring of the reference wireless network card Wi-Fi _ j, keeping the monitoring working mode of the wireless network card unchanged; in step S33, the specific method for determining whether the devices to which the wireless network card and the reference wireless network card Wi-Fi _ j belong are the same device according to the device number between the devices to which the wireless network card and the reference wireless network card Wi-Fi _ j belong is as follows: when the device numbers of the devices are the same, the devices of the wireless network card and the reference wireless network card Wi-Fi _ j are the same; when the device numbers of the devices are different, the devices of the wireless network card and the reference wireless network card Wi-Fi _ j are not the same devices;
step S34, if the device belongs to the same device, judging whether the monitoring working mode of the wireless network card of the device is the monitoring working mode 2 according to the size of the network card number of the wireless network card; if the devices are not the same, judging whether the operation load of the device to which the wireless network card belongs is the same as the received operation load of the device to which the reference wireless network card Wi-Fi _ j belongs, and continuing to step S35;
in step S34, the specific method for determining whether the monitoring operation mode of the wireless network card of the device itself needs to be kept as the monitoring operation mode 2 according to the size of the network card number of the wireless network card includes:
keeping the monitoring working mode of the wireless network card with the smaller network card number in the two wireless network cards unchanged, and adjusting the monitoring working mode of the wireless network card with the larger network card number in the two wireless network cards into a monitoring working mode 1; or,
and keeping the monitoring working mode of the wireless network card with the larger network card number in the two wireless network cards unchanged, and adjusting the monitoring working mode of the wireless network card with the smaller network card number in the two wireless network cards to be the monitoring working mode 1.
The two election modes based on the network card numbers are determined according to the numbering condition of the wireless network card in practical application, and the monitoring working modes of the wireless network cards of the two devices can be rapidly configured by election through the network card numbers.
Step S35, if the operation load of the equipment to which the wireless network card belongs is different from the received operation load of the equipment to which the reference wireless network card Wi-Fi _ j belongs, comparing whether the operation load of the equipment to which the wireless network card belongs is better than the operation load of the equipment to which the reference wireless network card Wi-Fi _ j belongs, when the operation load of the equipment to which the wireless network card belongs is not better than the operation load of the equipment to which the reference wireless network card belongs, adjusting the monitoring work mode of the wireless network card to be a monitoring work mode 1, and when the operation load of the equipment to which the wireless network card belongs is better than the operation load of the equipment to which the reference wireless network card belongs, adjusting the monitoring work mode of the wireless network card of the reference equipment to be the monitoring work mode 1; if the operation load of the equipment to which the wireless network card belongs is the same as the received operation load of the equipment to which the reference wireless network card belongs, continuously comparing the equipment number of the equipment to which the wireless network card belongs to judge whether the monitoring working mode of the wireless network card needs to be kept as a monitoring working mode 2;
and step S36, when the device to which the wireless network card in the monitoring working mode 1 belongs finds that a new wireless hotspot exists on the monitored Wi-Fi channel, returning to step S2 to continue execution.
In some embodiments, the operation load of the device includes CPU load and hardware resource consumption. That is, whether the operation load of the device to which the wireless network card belongs is greater than the operation load of the device to which the reference wireless network card belongs in step S35 means whether the CPU load and the hardware resource consumption of the device to which the wireless network card belongs are greater than the CPU load and the hardware resource consumption of the device to which the reference wireless network card belongs:
(1) when the CPU load of the equipment to which the wireless network card belongs is lower and more available hardware resources are available compared with the CPU load of the equipment to which the reference wireless network card belongs, the running load of the equipment to which the wireless network card belongs is superior to that of the equipment to which the reference wireless network card belongs;
(2) when the CPU load of the equipment to which the wireless network card belongs is higher and the available hardware resources are less than that of the equipment to which the reference wireless network card belongs, the running load of the equipment to which the wireless network card belongs is not better than that of the equipment to which the reference wireless network card belongs;
(3) when the CPU load and the hardware resource consumption of the device to which the wireless network card belongs are the same as those of the device to which the reference wireless network card belongs, it indicates that the running loads of the device to which the wireless network card belongs and the device to which the reference wireless network card belongs are the same.
That is to say, in this embodiment, the wireless network cards of two devices are allocated according to the CPU load and the available hardware resources in the actual working condition, generally, the wireless network card that operates in the monitoring working mode 2 needs a higher CPU load and more hardware resources, and therefore, the wireless network card that operates in the monitoring working mode 2 on a device with a lower CPU load and more available hardware resources is preferably used in this embodiment. Therefore, through an election mechanism based on the operation load, the optimal selection of resource utilization among the devices is guaranteed, namely the devices with the minimum load and the maximum residual resources are selected for wireless communication data capture.
In some embodiments, the specific content of continuing to compare the device number of the device to which the wireless network card belongs in step S35 to determine whether the monitoring operation mode of the wireless network card needs to be kept as the monitoring operation mode 2 may include the following two cases:
selecting a wireless network card corresponding to the equipment with the smaller equipment number in the two pieces of equipment, wherein the monitoring working mode of the wireless network card corresponding to the equipment with the larger equipment number in the two pieces of equipment is kept unchanged, and the monitoring working mode of the wireless network card corresponding to the equipment with the larger equipment number in the two pieces of equipment is adjusted to be a monitoring working mode 1; or,
the monitoring working mode of the wireless network card corresponding to the device with the larger device number in the two devices is kept unchanged, and the monitoring working mode of the wireless network card corresponding to the device with the smaller device number in the two devices is adjusted to be the monitoring working mode 1.
The two election modes based on the device numbers are determined according to the numbering condition of the devices in practical application, and the monitoring working modes of the wireless network cards of the two devices can be rapidly configured when the running loads (such as CPU loads and hardware resource consumption conditions) are completely the same through the device numbers.
In some embodiments, if only one wireless network card of all the devices is left to operate in the monitoring operation mode 1, the wireless network card monitoring operation mode remains unchanged, and the newly found Wi-Fi channel message of at least one wireless hotspot is broadcasted/synchronized to the rest devices.
When the device to which the wireless network card in the monitoring working mode 2 belongs receives other Wi-Fi channels which are required to be fixedly monitored and subjected to packet capturing and transmitted by the device to which the wireless network card in the monitoring working mode 1 belongs, a time-sharing processing mechanism is started for the device to which the wireless network card in the monitoring working mode 2 belongs, the Wi-Fi channels are added into a long-time packet-loss-free capturing channel list of the device to which the wireless network card in the monitoring working mode 2 belongs, and the monitored Wi-Fi channels and device information are broadcasted/synchronized to other devices.
Setting the wireless network card which is in the monitoring working mode 2 and is added with a fixed monitoring new Wi-Fi channel as a new reference wireless network card, comparing every two of the information of the Wi-Fi channel and the affiliated device which is fixedly monitored by the new reference wireless network card received by other devices, and determining whether the wireless network card exits from the fixed monitoring of the new Wi-Fi channel, wherein the wireless network card which does not exit from the fixed monitoring of the new Wi-Fi channel continues to execute a time-sharing processing mechanism. The specific process of comparing the information of the Wi-Fi channel and the equipment which the other wireless network cards fixedly monitor with the new reference wireless network card in pairs is the same as the specific process of the step 2 and the step 3.
If the Wi-Fi channels appointed by the fixed monitoring of all the wireless network cards of the self equipment are different from the channels appointed by the fixed monitoring of the received new reference wireless network card, keeping the channels appointed by the fixed monitoring of the wireless network cards unchanged. If all the wireless network cards of the self equipment are fixedly monitored to be the same as the designated Wi-Fi channel of the received new reference wireless network card, comparing whether the operation load of the self device is the same as the operation load of the received device to which the new reference wireless network card belongs, if the operation load of the self device is not the same as the operation load of the received device to which the new reference wireless network card belongs, comparing whether the operation load of the self device is better than that of the device to which the new reference wireless network card belongs, when the running load of the self equipment is not better than that of the equipment to which the new reference wireless network card belongs, the self equipment is quitted from the fixed monitoring of the new Wi-Fi channel, when the running load of the self equipment is superior to that of the equipment to which the new reference wireless network card belongs, the equipment to which the new reference wireless network card belongs quits the fixed monitoring of a new Wi-Fi channel; and when the running load of the self equipment is the same as that of the equipment to which the new reference wireless network card belongs, comparing the numbers of the self equipment and the equipment to which the new reference wireless network card belongs to judge whether the equipment needs to quit the fixed monitoring of the new Wi-Fi channel. The specific content of the time-sharing processing mechanism is as follows:
and while maintaining the packet capturing processing of the wireless network card, switching the Wi-Fi channels once every T1 (preferably, the value range of T1 is 15-30 min) until the Wi-Fi channels in the packet-loss-free capturing channel list traverse in sequence for a long time, and then restarting the traversal.
Compared with the monitoring mode 1, the channel switching speed adopting the time-sharing processing mechanism is very slow, and at least no packet loss of wireless communication data within 15-30 minutes can be ensured. Therefore, the invention further ensures that the wireless communication data does not lose the packet through a time-sharing processing mechanism.
In some embodiments, the working method for performing wireless communication data capture by the plurality of devices having a plurality of wireless network cards further includes the following steps:
and S4, when the wireless hotspot on the designated Wi-Fi channel to be monitored disappears and the time that no wireless hotspot exists on the Wi-Fi channel exceeds the preset time T2 (preferably, the value range of T2 is 5-10 min), adjusting the monitoring working mode of the wireless network card of the designated Wi-Fi channel to be monitored to be the monitoring working mode 1. Broadcasting or synchronizing the fixedly monitored Wi-Fi channels to other equipment, comparing the fixedly monitored Wi-Fi channels received by the equipment which belongs to the wireless network card in the monitoring working mode 1 with a long-time non-packet-loss capturing channel list of the wireless network card of the self equipment, and if the fixedly monitored Wi-Fi channels exist, rejecting the fixedly monitored Wi-Fi channels of the wireless network card. If the Wi-Fi channel with at least one wireless hotspot is stored in the long-time non-packet-loss grabbing channel list, when the fact that the wireless hotspot on the designated Wi-Fi channel _ k disappears and no wireless hotspot exists on the Wi-Fi channel _ k is judged, the Wi-Fi channel _ k is removed from the long-time non-packet-loss grabbing channel list. The step prevents the situation that the wireless hotspot on the fixed monitoring appointed Wi-Fi channel temporarily disappears due to reasons such as bad signals by setting the preset time T2, so that the effect of capturing the wireless communication data of the Wi-Fi channel where the wireless hotspot is located without losing packets is achieved.
According to the method and the device, the multiple wireless network cards of the multiple devices are coordinated and matched, so that the circulating monitoring of the Wi-Fi channels is guaranteed, and the wireless communication data capturing the Wi-Fi channels where the wireless hot spots are located is guaranteed not to lose packets as much as possible.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A working method for a plurality of devices with a plurality of wireless network cards to capture wireless communication data is characterized in that the working method comprises the following steps:
step S1, each device sets the initial monitoring working mode of all the wireless network cards to be a monitoring working mode 1; wherein, the monitoring mode of each wireless network card of each station device is divided into: the monitoring working mode 1 is to uninterruptedly cut frequency, scan and monitor all Wi-Fi channels; the monitoring working mode 2 is that the designated Wi-Fi channel is fixedly monitored and the designated Wi-Fi channel is subjected to packet grabbing work; at least one wireless network card in all the wireless network cards works in a monitoring working mode 1;
step S2, once any one wireless network card of any one device finds that at least one wireless hotspot exists on the monitored Wi-Fi channel, the device to which the wireless network card belongs sets the wireless network card as a reference wireless network card and adjusts the monitoring working mode of the reference wireless network card to be the monitoring working mode 2, and then the Wi-Fi channel appointed by the fixed monitoring of the reference wireless network card and the device information to which the reference wireless network card belongs are synchronized/broadcast to other devices in the same working environment, wherein the device information comprises a running load and a device number;
step S3, after receiving the Wi-Fi channel specified by the fixed monitoring of the reference wireless network card and the device information to which the reference wireless network card belongs, each of the other devices determines whether the monitoring mode of the wireless network card of the device itself needs to be maintained as the monitoring mode 2 according to the monitoring modes of all the wireless network cards of the device itself, the monitored Wi-Fi channel, and the device information.
2. The method for performing wireless communication data capturing operation on a plurality of devices having a plurality of wireless network cards according to claim 1, wherein the step S3 includes the following sub-steps:
step S31, after each of the other devices receives the Wi-Fi channel appointed by the fixed monitoring of the reference wireless network card and the information of the device, the monitoring working modes of all the wireless network cards of the device are checked;
step S32, when the monitoring working mode of the wireless network card in all the wireless network cards of the device is the monitoring working mode 1, keeping the monitoring working mode of the wireless network card with the monitoring working mode of the monitoring working mode 1 unchanged; when the monitoring working mode of the wireless network card in all the wireless network cards of the self equipment is the monitoring working mode 2, checking whether the Wi-Fi channel, which is appointed by the fixed monitoring of the wireless network card with the monitoring working mode of the monitoring working mode 2, is the same as the Wi-Fi channel, which is appointed by the fixed monitoring of the reference wireless network card;
step S33, if the Wi-Fi channel designated by the fixed monitoring of the wireless network card is the same as the received Wi-Fi channel designated by the fixed monitoring of the reference wireless network card, judging whether the devices of the wireless network card and the reference wireless network card belong to the same device according to the device number between the devices, and continuing to step S34; if the Wi-Fi channel appointed by the fixed monitoring of the wireless network card is different from the received Wi-Fi channel appointed by the fixed monitoring of the reference wireless network card, keeping the monitoring working mode of the wireless network card unchanged;
step S34, if the device belongs to the same device, judging whether the monitoring working mode of the wireless network card of the device is the monitoring working mode 2 according to the size of the network card number of the wireless network card; if the devices are not the same, judging whether the operation load of the device to which the wireless network card belongs is the same as the received operation load of the device to which the reference wireless network card belongs, and continuing to step S35;
step S35, if the operation load of the equipment to which the wireless network card belongs is different from the received operation load of the equipment to which the reference wireless network card belongs, comparing whether the operation load of the equipment to which the wireless network card belongs is better than the operation load of the equipment to which the reference wireless network card belongs, when the operation load of the equipment to which the wireless network card belongs is not better than the operation load of the equipment to which the reference wireless network card belongs, adjusting the monitoring work mode of the wireless network card to be a monitoring work mode 1, and when the operation load of the equipment to which the wireless network card belongs is better than the operation load of the equipment to which the reference wireless network card belongs, adjusting the monitoring work mode of the wireless network card of the reference equipment to be the monitoring work mode 1; if the operation load of the equipment to which the wireless network card belongs is the same as the received operation load of the equipment to which the reference wireless network card belongs, continuously comparing the equipment number of the equipment to which the wireless network card belongs to judge whether the monitoring working mode of the wireless network card needs to be kept as a monitoring working mode 2;
and step S36, when the device to which the wireless network card in the monitoring working mode 1 belongs finds that a new wireless hotspot exists on the monitored Wi-Fi channel, returning to the step S2 to continue execution.
3. The method of claim 2, wherein the step S33 of determining whether the devices to which the wireless network card and the reference wireless network card belong are the same device according to the device number between the devices to which the wireless network card belongs is as follows: when the device numbers of the devices are the same, the devices of the wireless network card and the reference wireless network card are the same devices; and when the device numbers of the devices are different, the devices of the wireless network card and the reference wireless network card are not the same.
4. The method for capturing wireless communication data by multiple devices having multiple wireless network cards according to claim 2, wherein the specific method for determining whether the monitoring operation mode of the wireless network card of the device needs to be maintained as the monitoring operation mode 2 in step S34 according to the size of the network card number of the wireless network card is as follows:
keeping the monitoring working mode of the wireless network card with the smaller network card number in the two wireless network cards unchanged, and adjusting the monitoring working mode of the wireless network card with the larger network card number in the two wireless network cards into a monitoring working mode 1; or,
and keeping the monitoring working mode of the wireless network card with the larger network card number in the two wireless network cards unchanged, and adjusting the monitoring working mode of the wireless network card with the smaller network card number in the two wireless network cards to be the monitoring working mode 1.
5. The method as claimed in claim 2, wherein the operating loads of the devices include CPU load and hardware resource consumption.
6. The method of claim 2, wherein the specific content of step S35 for continuing to compare the device numbers of the devices to which the wlan card belongs to determine whether the listening mode of the wlan card needs to be kept as the listening mode 2 is:
selecting a monitoring working mode of the wireless network card corresponding to the equipment with the smaller equipment number in the two pieces of equipment to be kept unchanged, and adjusting the monitoring working mode of the wireless network card corresponding to the equipment with the larger equipment number in the two pieces of equipment to be a monitoring working mode 1; or,
and keeping the monitoring working mode of the wireless network card corresponding to the equipment with the larger equipment number in the two pieces of equipment unchanged, and adjusting the monitoring working mode of the wireless network card corresponding to the equipment with the smaller equipment number in the two pieces of equipment to be the monitoring working mode 1.
7. The method as claimed in claim 1, wherein if only one of the remaining network cards in all the devices is in the monitoring mode 1, the monitoring mode of the network card remains unchanged, and the newly found Wi-Fi channel message of at least one wireless hotspot is broadcasted/synchronized to the other devices.
8. The method as claimed in claim 7, wherein when the device to which the wireless network card belongs in the monitoring mode 2 receives another Wi-Fi channel that needs to be monitored fixedly and processed for packet capturing and is sent by the device to which the wireless network card belongs in the monitoring mode 1, the device to which the wireless network card belongs in the monitoring mode 2 starts a time-sharing processing mechanism, adds the Wi-Fi channel into the long-time non-packet-loss capturing channel list of the device to which the wireless network card belongs in the monitoring mode 2, and broadcasts/synchronizes the monitored Wi-Fi channel and device information to the other devices.
9. The method of claim 8, wherein the time-sharing processing mechanism is started by the following specific steps: and while maintaining the packet capturing processing of the wireless network card, switching the Wi-Fi channel by the equipment to which the wireless network card belongs at intervals of T1, and restarting traversing until the sequential traversal of the Wi-Fi channels in the packet capturing channel list is completed without packet loss for a long time.
10. The method for performing wireless communication data capture operation on a plurality of devices with a plurality of wireless network cards according to claim 1, further comprising the following steps:
and S4, when the wireless hotspot on the designated Wi-Fi channel which is fixedly monitored disappears and the time that no wireless hotspot exists on the Wi-Fi channel exceeds the preset time T2, adjusting the monitoring working mode of the wireless network card which is fixedly monitored on the designated Wi-Fi channel to be the monitoring working mode 1.
CN202011642045.0A 2020-12-31 2020-12-31 Working method for carrying out wireless communication data capture on multiple devices with multiple wireless network cards Active CN112822709B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011642045.0A CN112822709B (en) 2020-12-31 2020-12-31 Working method for carrying out wireless communication data capture on multiple devices with multiple wireless network cards

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011642045.0A CN112822709B (en) 2020-12-31 2020-12-31 Working method for carrying out wireless communication data capture on multiple devices with multiple wireless network cards

Publications (2)

Publication Number Publication Date
CN112822709A CN112822709A (en) 2021-05-18
CN112822709B true CN112822709B (en) 2022-07-22

Family

ID=75858234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011642045.0A Active CN112822709B (en) 2020-12-31 2020-12-31 Working method for carrying out wireless communication data capture on multiple devices with multiple wireless network cards

Country Status (1)

Country Link
CN (1) CN112822709B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299687A (en) * 2008-05-07 2008-11-05 中国联合通信有限公司 Method and system for measuring available bandwidth of wireless LAN
CN104349339A (en) * 2013-07-26 2015-02-11 中国科学院信息工程研究所 Collection device of mobile intelligent terminal Wi-Fi signal data package, method thereof and system thereof
CN105357712A (en) * 2015-05-11 2016-02-24 西南交通大学 Multi-node channel scanning and distribution method in wireless network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9686642B2 (en) * 2015-03-06 2017-06-20 At&T Intellectual Property I, L.P. Method and apparatus for providing location information for a wireless communication device
US10567447B2 (en) * 2015-10-26 2020-02-18 Mediatek Inc. Apparatuses and methods for coordinating communication operations associated with a plurality of subscriber identity cards in a mobile communication device with a single wireless transceiver

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299687A (en) * 2008-05-07 2008-11-05 中国联合通信有限公司 Method and system for measuring available bandwidth of wireless LAN
CN104349339A (en) * 2013-07-26 2015-02-11 中国科学院信息工程研究所 Collection device of mobile intelligent terminal Wi-Fi signal data package, method thereof and system thereof
CN105357712A (en) * 2015-05-11 2016-02-24 西南交通大学 Multi-node channel scanning and distribution method in wireless network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
RP-191016 "Introduction of Feature Indication Matrix for RAN Plenary Work Plan";AT amp等;《3GPP tsg_ran\tsg_ran》;20190527;全文 *
Tracking from One Side - Multi-Person Passive Tracking with WiFi Magnitude Measurements;Chitra R. Karanam等;《2019 18th ACM/IEEE International Conference on Information Processing in Sensor Networks (IPSN)》;20190610;全文 *
局域网管理中关键技术问题浅析;祝宏;《电脑编程技巧与维护》;20200918(第09期);全文 *

Also Published As

Publication number Publication date
CN112822709A (en) 2021-05-18

Similar Documents

Publication Publication Date Title
KR101838842B1 (en) An access node, a communication device, respective method performed thereby for carrier hopping
US9853797B2 (en) Method and apparatus for time division coexistence in unlicensed radio frequency bands for mobile devices
US8023468B2 (en) Methods, device and system for access point facilitated fast handoff
CN102308625B (en) Technique for anchor carrier selection in a telecommunication system
US20160345339A1 (en) Base station, terminal station, and wireless communication system
JP2019533965A (en) Spectral resource distribution method and apparatus for full spectrum sharing
DE102015201432B4 (en) Methods and devices for communication in unlicensed radio frequency bands by mobile wireless devices
US20150358980A1 (en) Mobile communication apparatus and radio communication method
JP5622311B2 (en) Frequency sharing type cognitive radio communication system and method, cognitive radio base station
CN113382448B (en) Adjacent cell selection method under shared network, terminal equipment and communication system
CN112822709B (en) Working method for carrying out wireless communication data capture on multiple devices with multiple wireless network cards
CN108156609B (en) Cell merging and splitting method, device and base station
CN112822710B (en) Working method for capturing wireless communication data by multiple devices with single wireless network card
JP2024518516A (en) METHOD FOR DETERMINING MEASUREMENT GAP, TERMINAL AND NETWORK SIDE DEVICE
CN112822708B (en) Method and equipment for capturing wireless communication data by using multiple wireless network cards
CN114125968A (en) Method and device for switching wireless access point of wireless terminal
US20090252244A1 (en) Wireless communication device, wireless communication method, program and wireless comunication system
CN110831069B (en) Load balancing method and device
US11510210B2 (en) Flexible radio assignment for multi-link capable access points
US11153761B2 (en) Spectrum management for coexistence of heterogeneous wireless technologies
US20240129976A1 (en) Stable balancing of multi-link operation (mlo) usage in crowded space
EP4262283A1 (en) Communication method, and device
WO2024099185A1 (en) Random access method and apparatus, terminal, network side device and medium
JP6361013B2 (en) Radio base station apparatus, radio communication system, and radio base station apparatus control method
US20220038973A1 (en) Measuring channel performance in wireless local area networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant