CN110650220A - MAC address acquisition method and detection device - Google Patents

MAC address acquisition method and detection device Download PDF

Info

Publication number
CN110650220A
CN110650220A CN201910858603.8A CN201910858603A CN110650220A CN 110650220 A CN110650220 A CN 110650220A CN 201910858603 A CN201910858603 A CN 201910858603A CN 110650220 A CN110650220 A CN 110650220A
Authority
CN
China
Prior art keywords
mac address
frame
target frame
real
real mac
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.)
Pending
Application number
CN201910858603.8A
Other languages
Chinese (zh)
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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201910858603.8A priority Critical patent/CN110650220A/en
Publication of CN110650220A publication Critical patent/CN110650220A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic

Abstract

The invention provides a method for acquiring an MAC address and detection equipment, which are used for solving the problem that a random MAC address in the prior art causes interference on user behavior analysis. The method comprises the following steps: monitoring at least one target frame on a first channel, wherein the target frame comprises a Media Access Control (MAC) address of terminal equipment; and determining the real MAC address from the MAC addresses respectively contained in at least one target frame according to the type of the target frame and/or the format of the real MAC address.

Description

MAC address acquisition method and detection device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method for acquiring an MAC address and a detection device.
Background
In mobile internet communication, Wireless local area network (WIFI) technology based on IEEE802.11 series standards is often applied to user behavior analysis to provide a data base for the user behavior analysis, for example, a Media Access Control (MAC) Address of a terminal device in a place such as a mall, a park, etc. is acquired based on the WIFI technology to analyze a traffic volume of the place.
Currently, a WIFI Probe is generally used to capture a Probe Request (Probe Request) frame broadcasted by a terminal device to obtain a MAC address of the terminal device, and then a user behavior analysis is performed based on the obtained MAC address. However, random MAC addresses may exist in the Probe Request frame, which may cause interference to user behavior analysis, and the accuracy is poor.
Disclosure of Invention
The invention provides a method for acquiring an MAC address and detection equipment, which are used for solving the problem that a random MAC address in the prior art causes interference on user behavior analysis.
In a first aspect, an embodiment of the present invention provides a method for acquiring an MAC address, which is applied to a detection device, and includes:
monitoring at least one target frame on a first channel, wherein the target frame comprises an MAC address of terminal equipment;
and determining the real MAC address from the MAC addresses respectively contained in the at least one target frame according to the type of the target frame and/or the format of the real MAC address.
In an optional implementation manner, the first channel is a WIFI channel corresponding to a WIFI hotspot device located within a preset detection range of the detection device.
In an optional implementation manner, the determining, according to the type of the target frame and/or the format of the real MAC address, the real MAC address from the MAC addresses respectively included in the at least one target frame includes:
when the type of the first target frame is a management frame, if the MAC address contained in the management frame is consistent with the format of the real MAC address, determining that the MAC address contained in the management frame is the real MAC address; alternatively, the first and second electrodes may be,
and when the type of the target frame is a data frame, determining that the MAC address contained in the data frame is a real MAC address.
In an optional implementation, the monitoring at least one target frame on the first channel includes:
monitoring at least one target frame on a first channel within a preset time length;
the method further comprises the following steps: after determining real MAC addresses from the MAC addresses respectively contained in the at least one target frame, sending a first message to a server, wherein the first message carries the determined real MAC addresses, and the determined MAC addresses are used for user behavior analysis.
In an optional implementation, the method further includes:
and when the number of the determined real MAC addresses reaches a preset threshold value, sending a second message to the server, wherein the second message carries the determined real MAC addresses, and the determined MAC addresses are used for user behavior analysis.
In an optional implementation manner, the management frame is a Probe request frame, and the Data frame is a QoS Data frame.
In a second aspect, an embodiment of the present invention provides a detection apparatus, including:
the monitoring module is used for monitoring at least one target frame on a first channel, wherein the target frame comprises an MAC address of the terminal equipment;
and the determining module is used for determining the real MAC address from the MAC addresses respectively contained in the at least one target frame according to the type of the target frame and/or the format of the real MAC address.
In an optional implementation manner, the first channel is a WIFI channel corresponding to a WIFI hotspot device located within a preset detection range of the detection device.
In an optional implementation manner, the determining module is specifically configured to:
when the type of the first target frame is a management frame, if the MAC address contained in the management frame is consistent with the format of the real MAC address, determining that the MAC address contained in the management frame is the real MAC address; alternatively, the first and second electrodes may be,
and when the type of the target frame is a data frame, determining that the MAC address contained in the data frame is a real MAC address.
In an optional implementation manner, the monitoring module is specifically configured to:
monitoring at least one target frame on a first channel within a preset time length;
the detection apparatus further includes:
and the sending module is used for sending a first message to the server after determining a real MAC address from the MAC addresses respectively contained in the at least one target frame, wherein the first message carries the determined real MAC address, and the determined MAC address is used for user behavior analysis.
In an optional implementation manner, the sending module is further configured to:
and when the number of the determined real MAC addresses reaches a preset threshold value, sending a second message to the server, wherein the second message carries the determined real MAC addresses, and the determined MAC addresses are used for user behavior analysis.
In an optional implementation manner, the management frame is a Probe request frame, and the Data frame is a QoS Data frame.
In a third aspect, an embodiment of the present invention provides a detection apparatus, including:
a memory and a processor;
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the method of any implementation mode of the first aspect according to the obtained program.
In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the above method.
In the embodiment of the invention, according to the type of the target frame and/or the format of the real MAC address monitored on the first channel, the real MAC address is determined from the MAC addresses respectively contained in at least one target frame for user behavior analysis, so that the interference caused by random MAC addresses can be avoided, and the accuracy of user behavior analysis is effectively improved.
Drawings
Fig. 1 is a schematic diagram of a frame structure according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for acquiring an MAC address according to an embodiment of the present invention;
fig. 3 is a block diagram of a detection device according to an embodiment of the present invention;
fig. 4 is a schematic circuit diagram of a detection apparatus 300 according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an interaction provided by an embodiment of the invention;
fig. 6 is a structural diagram of another detection apparatus provided in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The plurality of the present invention means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. In addition, it should be understood that although the terms first, second, etc. may be used to describe various data in embodiments of the present invention, these data should not be limited by these terms. These terms are only used to distinguish the data from each other.
In mobile internet communication, a terminal device such as a mobile phone accesses a router to implement WIFI communication, and communication data between the terminal device and the router in the WIFI communication is encapsulated into a frame with a fixed format, for example, referring to fig. 1, an embodiment of the present invention provides a frame structure schematic diagram, and fig. 1 specifically illustrates a frame structure specified by an IEEE802.11 protocol. Specifically, the field descriptions included in the frame structure are shown in table 1 below:
TABLE 1
WIFI communication typically involves a probing phase, an authentication phase, an association phase, and a data interaction phase after connecting with a router. Taking a mobile phone as an example, the mobile phone turning on the WIFI switch but not connected to the router is a probing phase, in which the mobile phone broadcasts Probe request frames on all channels around the mobile phone to Probe the routers connectable around the mobile phone. Then, the Authentication phase sends an Authentication frame, the Association phase sends an Association request frame to establish connection with the router, and then the Data interaction phase is switched to after the connection with the router, and in the Data interaction phase, the mobile phone sends a QoS Data frame to the router accessed by the mobile phone and also receives the QoS Data frame from the router. The above-mentioned frame transmitted by the terminal device contains its own MAC address information, and this characteristic is often used to provide a data base for user behavior analysis, for example, by obtaining the MAC address of the terminal device in a place such as a mall, a park, etc., to analyze the traffic situation in a specific time period in the place.
At present, a WIFI Probe is generally used to poll Probe Request frames in management frames (managementframes) broadcasted by all channel capture terminal devices to obtain MAC addresses of the terminal devices, and then user behavior analysis is performed based on the obtained MAC addresses. However, since some mobile phones of brands such as apple, wary, vivo and the like adopt a random MAC address mechanism, the MAC address contained in the Probe Request frame sent by such mobile phones is a random MAC address, and the random MAC address changes in the WIFI communication process, which causes interference to user behavior analysis when the random MAC address exists in the Probe Request frame captured by the WIFI Probe, and the accuracy of user behavior analysis performed in such a manner is poor.
Based on this, embodiments of the present invention provide a method for acquiring an MAC address and a detection device, so as to solve the problem that a random MAC address in the prior art interferes with user behavior analysis. The method and the device are based on the same inventive concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the method and the device can be mutually referred, and repeated parts are not repeated.
For convenience of understanding, a method for acquiring a MAC address according to an embodiment of the present invention is first described in detail.
Referring to fig. 2, a MAC address acquisition method is applied to a detection device, which may be a device having a function of capturing and processing frames, such as a WIFI probe. The method comprises the following steps:
step S201, at least one target frame on the first channel is monitored, where the target frame includes the MAC address of the terminal device.
The types of the target frame include a management frame and a data frame. The management frame may be a Probe request (Probe request) frame, an Association request (Association request) frame; the Data frame may be a quality of service Data (QoS Data) frame, a NULL (NULL) frame, a contention free period acknowledgement (CF-ACK) frame, a contention free period polling (CF-POLL) frame, a QoS version of a NULL frame, that is, a QoS NULL frame, and the like, where the QoS Data frame is different from the Data frame, and after the QoS Data frame is sent from the sending end to the receiving end, the receiving end returns an indication acknowledgement signal so that the sending end acknowledges the successful sending of the Data, and the quality of the sent signal is ensured.
Step S202, according to the type of the target frame and/or the format of the real MAC address, the real MAC address is determined from the MAC addresses respectively contained in at least one target frame.
In specific implementation, when the type of the first target frame is a management frame, if the format of the MAC address contained in the management frame is consistent with that of the real MAC address, determining that the MAC address contained in the management frame is the real MAC address; or, when the type of the target frame is a data frame, determining that the MAC address contained in the data frame is a real MAC address. According to the IEEE802.11 specification, the lower four bits of the first byte in the real MAC address are 0, 4, 8, and C, and based on this, the address contained in the management frame that is inconsistent with the format of the real MAC address, that is, the random MAC address in the management frame, can be filtered out. The interference of the random MAC address to the subsequent user behavior analysis can be avoided.
According to the method for acquiring the MAC address provided by the embodiment of the invention, the real MAC address is determined from the MAC addresses respectively contained in at least one target frame according to the type of the target frame and/or the format of the real MAC address monitored on the first channel, so that the method is used for user behavior analysis, the interference caused by random MAC addresses can be avoided, and the accuracy of user behavior analysis is effectively improved.
Further, since the terminal device continuously broadcasts the Probe request frame when the WIFI switch is turned on, and continuously broadcasts the QoS Data frame after being connected to the WIFI hotspot, the time for the existence of the Probe request frame and the QoS Data frame is long, in an optional implementation, the MAC address contained in the Probe request frame and/or the QoS Data frame may be acquired by capturing the Probe request frame and/or the QoS Data frame sent by the terminal device on the first channel.
In specific implementation, IEEE802.1 specifies a corresponding frame structure for different frames, for example, IEEE802.11 specifies: the values of the field types of the frame structures of different types of frames are different, the value of the field Type in management frames such as a Probe Request frame and an Association Request frame is 00, and the value of the field Type in Data frames such as a QoS Data frame is 10; the first byte value of Frame structure field Frame Control of different types of frames is different, such as the first byte value of Frame Control in QoS Data Frame is 136, the first byte value of Frame Control in Probe Request Frame is 64, the first byte value of Frame Control in Association Request Frame is 0; the QoS Data frame is transmitted in two directions, the QoS Data frame in the direction of the terminal device sending to the WIFI hotspot device and the QoS Data frame in the direction of the WIFI hotspot device sending to the terminal device are included, the difference is that values of fields ToDS and FramDS in the QoS Data frames in different directions are different, and values of ToDS and FramDS in the direction of the terminal device sending to the WIFI hotspot device are respectively 1 and 0; the values of the ToDS and the FramDS which are sent by the WIFI hotspot equipment to the terminal equipment are 0 and 1 respectively.
Based on this, acquiring the Probe request frame sent by the terminal device on the first channel may be implemented as follows: capturing a frame conforming to a first frame structure format on a first channel to obtain a Probe request frame sent by terminal equipment; the first Frame structure format is that the Type value of the Frame is 00, and the first byte value of the Frame Control in the Frame is 64. Acquiring the QoS Data frame transmitted by the terminal device on the first channel may be implemented as follows: capturing a frame conforming to the second frame structure format on the first channel to obtain a QoS Data frame sent by the terminal equipment; the second Frame structure format is that the Type value in the Frame is 10, the first byte value of the Frame Control in the Frame is 136, and the values of the ToDS and the framemds in the Frame are 0 and 1 respectively.
Further, in an optional implementation manner, the first channel is a WIFI channel corresponding to a WIFI hotspot device located within a preset detection range of the detection device.
As the WIFI hotspot device, such as a router, is powered on to work, a Beacon Frame (Beacon Frame) is sent to the surroundings, and a Frame body of the Beacon Frame contains relevant parameter information of the WIFI hotspot device, including a timestamp, a Frame interval, a service set identifier, channel frequency information, authentication information, and the like, or a detection device actively sends a scanning request to obtain relevant parameter information returned by the WIFI hotspot device. Based on this, the first channel may be determined by: and determining the WIFI hotspot devices in the detection range and the corresponding WIFI channels according to the beacon frames captured in the detection range of the detection device.
In the embodiment of the invention, only the WIFI channel, namely the first channel, corresponding to the WIFI hotspot equipment in the detection range is needed to be scanned to obtain the MAC address, and compared with the prior art in which a WIFI probe polls and scans all channels in the detection range, the time consumption and the scanning period time can be reduced, interference signals are avoided, and the obtained MAC address result is more accurate.
Further, the method further comprises the step of sending the determined real MAC address to the server so as to provide a big data base for the server to analyze the user behavior.
In an alternative embodiment, monitoring at least one target frame on a first channel comprises: monitoring at least one target frame on a first channel within a preset time length;
based on this, the above method further comprises: after real MAC addresses are determined from the MAC addresses respectively contained in at least one target frame, a first message is sent to a server, the determined real MAC addresses are carried in the first message, and the determined MAC addresses are used for user behavior analysis
In another optional embodiment, the method further comprises:
and when the number of the determined real MAC addresses reaches a preset threshold value, sending a second message to the server, wherein the second message carries the determined real MAC addresses, and the determined MAC addresses are used for user behavior analysis.
Further, when a plurality of WIFI hotspot devices exist within the detection range of the detection device, in an optional implementation, the determined real MAC addresses corresponding to the WIFI hotspot devices within the detection range may be respectively sent to the server by taking the WIFI hotspot devices as units; if a target frame acquired by the detection device from a WIFI channel corresponding to the WIFI hotspot device has both a Probe request frame and a QoS Data frame, the real MAC address corresponding to the WIFI hotspot device comprises a first MAC address from the Probe request frame conforming to the real MAC address format and a second MAC address from the QoS Data frame sent by the terminal device. In addition, with reference to the foregoing manner, in an optional implementation manner, respectively sending the real MAC addresses corresponding to the WIFI hotspot devices in the detection range to the server includes: and when the preset time length is reached or a preset threshold value set for the number of the MAC addresses is reached, respectively sending the real MAC addresses corresponding to the WIFI hotspot devices in the detection range to the server.
In specific implementation, after the server receives the real MAC addresses sent by the detection device, the server can screen and count the real MAC addresses according to specific user behaviors to be analyzed. For example, the server needs to count which users are connected to a certain WIFI hotspot device all the time within the preset time length, and then, by counting the occurrence frequency/frequency of the same MAC address in the second MAC address corresponding to the WIFI hotspot device, when it is determined that the frequency of the same MAC address occurring within the preset time length is higher than a preset frequency threshold, it is determined that the terminal device indicated by the same MAC address always exists within a detection range and is connected to the certain WIFI hotspot device. For another example, to count how many terminal devices introduce the random MAC address mechanism in a user accessing a certain WIFI hotspot device, the server determines the number of terminal devices currently accessing the WIFI hotspot device into which the random MAC address mechanism is introduced by counting the number of MAC addresses that are included in the second MAC address corresponding to the WIFI hotspot device but not included in the first MAC address corresponding to the WIFI hotspot device.
In summary, the method provided by the embodiment of the present invention is applied to a detection device, and is implemented by scanning WIFI channels corresponding to WIFI hotspot devices located within a detection range of the detection device, monitoring a target frame including an MAC address of a terminal device on the channel, and then determining a real MAC address corresponding to each WIFI hotspot device according to a type of the target frame and/or a format of the real MAC address, and further sending the determined MAC address to a server for user behavior analysis when a preset duration is reached or a preset threshold set for the number of MAC addresses is reached. The method and the device can reduce scanning time of scanning channels and simultaneously use real MAC addresses to analyze the user behaviors to avoid interference, thereby improving the accuracy of user behavior analysis. The method provided by the embodiment of the invention can be applied to user behavior analysis and big data analysis such as shopping mall passenger flow volume statistics, staff attendance positioning, specified customer reminding and the like.
Based on the same inventive concept as the method embodiment, the embodiment of the present invention provides a detection apparatus 300, as shown in fig. 3, including:
a monitoring module 301, configured to monitor at least one target frame on a first channel, where the target frame includes an MAC address of a terminal device;
a determining module 302, configured to determine, according to the type of the target frame and/or the format of the real MAC address, a real MAC address from MAC addresses respectively included in the at least one target frame.
According to the detection device 300 provided by the embodiment of the present invention, according to the type of the target frame and/or the format of the real MAC address monitored on the first channel, the real MAC address is determined from the MAC addresses respectively included in at least one target frame, so as to analyze the user behavior, avoid interference caused by a random MAC address, and effectively improve the accuracy of user behavior analysis.
In an optional implementation manner, the first channel is a WIFI channel corresponding to a WIFI hotspot device located within a preset detection range of the detection device.
In an optional implementation, the determining module 302 is specifically configured to:
when the type of the first target frame is a management frame, if the format of the MAC address contained in the management frame is consistent with that of the real MAC address, determining that the MAC address contained in the management frame is the real MAC address; alternatively, the first and second electrodes may be,
and when the type of the target frame is the data frame, determining that the MAC address contained in the data frame is a real MAC address.
In an optional implementation, the monitoring module 301 is specifically configured to:
monitoring at least one target frame on a first channel within a preset time length;
the detection device further comprises:
a sending module 303, configured to send a first message to the server after determining a real MAC address from the MAC addresses respectively included in the at least one target frame, where the first message carries the determined real MAC address, and the determined MAC address is used for user behavior analysis.
In an optional implementation, the sending module 303 is further configured to:
and when the number of the determined real MAC addresses reaches a preset threshold value, sending a second message to the server, wherein the second message carries the determined real MAC addresses, and the determined MAC addresses are used for user behavior analysis.
In an alternative embodiment, the management frame is a Probe request frame, and the Data frame is a QoS Data frame.
Further, referring to fig. 4, an embodiment of the present invention provides a circuit schematic diagram of a detection device 400, where the detection device 400 includes a power adapter (5V/1A), a circuit protection and management circuit, an LDO voltage regulator circuit, and two ESP8266 chips connected through a serial port, which are respectively a first ESP-12F module and a second ESP-12F module illustrated in the figure; the first ESP-12F module is used for realizing the functions of the detection module and the determination module, namely detecting the MAC address in the target frame on the first channel and determining a real MAC address; the second ESP-12F module is used for realizing the function of the uploading module, namely, sending the first message and/or the second message to the server.
Specifically, as shown in an interaction schematic diagram shown in fig. 5, the detection device 400 communicates with the server 500, and as an example, there are one WIFI hotspot device 401 and three terminal devices (UE 1, UE2, and UE3, respectively) in the detection range of the detection device 400, the detection device 400 is applied to execute the above method, which includes the following processes:
device initialization procedure
Because the serial ports of the ESP-12F modules can print a section of messy codes after being electrified, in order to prevent the messy codes printed by the serial ports of the first ESP-12F module after being electrified from influencing the second ESP-12F module, the second ESP-12F module is disabled firstly before the serial ports of the first ESP-12F module are electrified, then the first ESP-12F module is electrified, and the serial ports of the first ESP-12F module are initialized for subsequent transparent transmission through the serial ports of the first ESP-12F module for configuring the second ESP-12F module.
The working mode of setting up first ESP-12F module is the STA mode to start the function that first ESP-12F module scanned the channel, determine the WIFI channel that is located the WIFI hotspot device 401 of detection range and corresponds, aforementioned first channel promptly.
Initializing a hardware timer preset in the detection equipment, registering a callback function completed by initialization of a system, and executing the following operations in the callback function: closing the Sniffer mode of the first ESP-12F module, and initializing a channel; and enabling the second ESP-12F module, and clearing data received and sent by the serial port of the first ESP-12F module, for example, enabling the second ESP-12F module and then inputting a messy code to the serial port of the first ESP-12F module.
Enabling a hardware timer, registering a callback function in the Sniffer mode to enable the Sniffer mode in the hardware timer, and sending an AT (access point) instruction to the second ESP-12F module by the first ESP-12F module through a serial port to configure the transparent transmission mode of the second ESP-12F module.
(II) detection and determination procedure
The following operations are executed in the callback function of the Sniffer mode: the MAC Address contained in the Probe request frame sent by UE1, UE2, and UE3 and the MAC Address in the QoS Data frame sent by UE1, UE2, and UE3 are captured according to the buf length of the different types of frames and the format of the frames (field in the frame), specifically, the Address2 field in each Probe request frame and QoS Data frame can be read by the first ESP-12F module in Sniffer mode, and 6 bytes of the Address2 field are the MAC Address of the terminal device. And filtering the random MAC address in the Probe request frame through the format specification of the real MAC address, and determining the real MAC address, namely reserving the real MAC address existing in the Probe request frame and the MAC address in the QoS Data frame.
(III) transmitting procedure
And when a certain number of MAC addresses (namely, the preset threshold) are collected or the preset time is reached, respectively sending the MAC addresses of the two frames to the server through the second ESP-12F module so as to enable the server to perform user behavior analysis, big data analysis and the like according to the MAC addresses.
Further, another structural intention of the detecting device 600 is also provided in the embodiments of the present invention, as shown in fig. 6, including:
a communication interface 601, a memory 602, and a processor 603;
wherein the processor 603 communicates with other devices through the communication interface 601, for example, the other devices may be servers, and the processor 603 may send the first message/the second message to the servers through the communication interface 601; a memory 602 for storing program instructions; the processor 603 is configured to call the program instructions stored in the memory 602, and execute the method executed by the detection device in the foregoing embodiment according to the obtained program.
In the embodiment of the present application, the specific connection medium among the communication interface 601, the memory 602, and the processor 603 is not limited, for example, a bus may be divided into an address bus, a data bus, a control bus, and the like.
In the embodiments of the present application, the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
In this embodiment, the memory is used for storing program instructions, and the memory may be a nonvolatile memory, such as a Hard Disk Drive (HDD) or a solid-state drive (SSD), and may also be a volatile memory, such as a random-access memory (RAM). The memory can also be, but is not limited to, any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data. In the embodiment of the present application, the specific connection medium among the communication interface, the memory, and the processor is not limited, for example, the bus may be divided into an address bus, a data bus, a control bus, and the like.
Further, an embodiment of the present invention provides a computer-readable storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the above-mentioned method.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (14)

1. A method for acquiring MAC address is applied to a detection device, and comprises the following steps:
monitoring at least one target frame on a first channel, wherein the target frame comprises a Media Access Control (MAC) address of terminal equipment;
and determining the real MAC address from the MAC addresses respectively contained in the at least one target frame according to the type of the target frame and/or the format of the real MAC address.
2. The method of claim 1, wherein the first channel is a WIFI channel corresponding to a WIFI hotspot device located within a preset detection range of the detection device.
3. The method according to claim 2, wherein the determining a real MAC address from MAC addresses respectively included in the at least one target frame according to the type of the target frame and/or the format of the real MAC address comprises:
when the type of the first target frame is a management frame, if the MAC address contained in the management frame is consistent with the format of the real MAC address, determining that the MAC address contained in the management frame is the real MAC address; alternatively, the first and second electrodes may be,
and when the type of the target frame is a data frame, determining that the MAC address contained in the data frame is a real MAC address.
4. The method of any one of claims 1-3, wherein the monitoring at least one target frame on the first channel comprises:
monitoring at least one target frame on a first channel within a preset time length;
the method further comprises the following steps: after determining real MAC addresses from the MAC addresses respectively contained in the at least one target frame, sending a first message to a server, wherein the first message carries the determined real MAC addresses, and the determined MAC addresses are used for user behavior analysis.
5. The method of any one of claims 1-3, further comprising:
and when the number of the determined real MAC addresses reaches a preset threshold value, sending a second message to the server, wherein the second message carries the determined real MAC addresses, and the determined MAC addresses are used for user behavior analysis.
6. A method according to any of claims 1-3, wherein the management frame is a Probe request frame and the data frame is a quality of service data QoSData frame.
7. A detection apparatus, comprising:
the monitoring module is used for monitoring at least one target frame on a first channel, wherein the target frame comprises a Media Access Control (MAC) address of the terminal equipment;
and the determining module is used for determining the real MAC address from the MAC addresses respectively contained in the at least one target frame according to the type of the target frame and/or the format of the real MAC address.
8. The detection device of claim 7, wherein the first channel is a WIFI channel corresponding to a WIFI hotspot device within a preset detection range of the detection device.
9. The detection device of claim 8, wherein the determination module is specifically configured to:
when the type of the first target frame is a management frame, if the MAC address contained in the management frame is consistent with the format of the real MAC address, determining that the MAC address contained in the management frame is the real MAC address; alternatively, the first and second electrodes may be,
and when the type of the target frame is a data frame, determining that the MAC address contained in the data frame is a real MAC address.
10. The detection device according to any one of claims 7 to 9, wherein the monitoring module is specifically configured to:
monitoring at least one target frame on a first channel within a preset time length;
the detection apparatus further includes:
and the sending module is used for sending a first message to the server after determining a real MAC address from the MAC addresses respectively contained in the at least one target frame, wherein the first message carries the determined real MAC address, and the determined MAC address is used for user behavior analysis.
11. The probe device of any one of claims 7-9, wherein the sending module is further configured to:
and when the number of the determined real MAC addresses reaches a preset threshold value, sending a second message to the server, wherein the second message carries the determined real MAC addresses, and the determined MAC addresses are used for user behavior analysis.
12. A probing device according to any one of claims 7-9 wherein said management frame is a Probe request frame and said data frame is a quality of service data QoSData frame.
13. A detection apparatus, comprising:
a memory and a processor;
a memory for storing program instructions;
a processor for calling the program instructions stored in the memory and executing the method of any one of claims 1 to 6 according to the obtained program.
14. A computer readable storage medium having stored thereon computer instructions which, when run on a computer, cause the computer to perform the method of any of claims 1-6.
CN201910858603.8A 2019-09-11 2019-09-11 MAC address acquisition method and detection device Pending CN110650220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910858603.8A CN110650220A (en) 2019-09-11 2019-09-11 MAC address acquisition method and detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910858603.8A CN110650220A (en) 2019-09-11 2019-09-11 MAC address acquisition method and detection device

Publications (1)

Publication Number Publication Date
CN110650220A true CN110650220A (en) 2020-01-03

Family

ID=68991761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910858603.8A Pending CN110650220A (en) 2019-09-11 2019-09-11 MAC address acquisition method and detection device

Country Status (1)

Country Link
CN (1) CN110650220A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629374A (en) * 2020-06-01 2020-09-04 佳都新太科技股份有限公司 Physical address identification method and device, computer equipment and storage medium
CN115988609A (en) * 2022-12-28 2023-04-18 北京数原数字化城市研究中心 Equipment classification method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007086705A1 (en) * 2006-01-27 2007-08-02 Lg Electronic Inc. Communication method for wireless network and wireless network system
CN107094293A (en) * 2017-06-27 2017-08-25 南京赢纳信息科技有限公司 A kind of device and method for obtaining WiFi terminal real MAC address
US20180324142A1 (en) * 2015-03-13 2018-11-08 Intel IP Corporation Systems and methods to enable network coordinated mac randomization for wi-fi privacy
CN109219050A (en) * 2018-11-27 2019-01-15 武汉虹旭信息技术有限责任公司 A kind of WIFI acquisition system and its method based on virtual AP

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007086705A1 (en) * 2006-01-27 2007-08-02 Lg Electronic Inc. Communication method for wireless network and wireless network system
US20180324142A1 (en) * 2015-03-13 2018-11-08 Intel IP Corporation Systems and methods to enable network coordinated mac randomization for wi-fi privacy
CN107094293A (en) * 2017-06-27 2017-08-25 南京赢纳信息科技有限公司 A kind of device and method for obtaining WiFi terminal real MAC address
CN109219050A (en) * 2018-11-27 2019-01-15 武汉虹旭信息技术有限责任公司 A kind of WIFI acquisition system and its method based on virtual AP

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱小明: "《探索计算机网络协议与服务的奥秘》", 31 March 2017, 科学出版社 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629374A (en) * 2020-06-01 2020-09-04 佳都新太科技股份有限公司 Physical address identification method and device, computer equipment and storage medium
CN115988609A (en) * 2022-12-28 2023-04-18 北京数原数字化城市研究中心 Equipment classification method and device, electronic equipment and storage medium
CN115988609B (en) * 2022-12-28 2023-12-19 北京数原数字化城市研究中心 Equipment classification method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11032858B2 (en) Network access method, terminal, access network, and core network
US20230199858A1 (en) Methods and apparatuses for requesting system information
US20230232370A1 (en) Relative positioning method, terminal, and base station
WO2014110380A1 (en) System and method for network selection
CN111107612B (en) Method and device for configuring bandwidth part
CN111278036B (en) Method and device for acquiring MAC address
EP3905778A1 (en) Cell registration method and terminal device
CN110650220A (en) MAC address acquisition method and detection device
CN106664625B (en) user equipment and network access method
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
WO2012136245A1 (en) Considering privacy when using area-based minimization of drive-tests (mdt)
CN109413637B (en) Electromagnetic interference control method, related device, related equipment and storage medium
US10070289B1 (en) Client association for provisioning devices in a communication network
CN110933741B (en) Positioning method and device of user equipment
CN110677842A (en) Network searching method, device, terminal equipment and storage medium
US8856311B2 (en) System coordinated WLAN scanning
CN107666365B (en) CSI acquisition method, server, terminal and AP
CN103442327A (en) M2M device and communication method thereof
CN108141906B (en) Mobile data sharing method and mobile terminal
TWM576291U (en) System for analyzing flow based on Wi-Fi probing
WO2022057828A1 (en) Measurement method, measurement apparatus, terminal and network device
CN106888424B (en) Acquisition method and acquisition device for media access control address and network camera
CN111343627B (en) Network registration method and device and terminal equipment
CN113873608A (en) Voice communication method, device, storage medium and terminal
CN106793024A (en) The method and wireless device of a kind of wireless device response wireless terminal

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200103