CN111372278A - Passenger flow monitoring method and device, computer equipment and storage medium - Google Patents

Passenger flow monitoring method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111372278A
CN111372278A CN202010129776.9A CN202010129776A CN111372278A CN 111372278 A CN111372278 A CN 111372278A CN 202010129776 A CN202010129776 A CN 202010129776A CN 111372278 A CN111372278 A CN 111372278A
Authority
CN
China
Prior art keywords
distribution
mac address
random mac
simulated
detected
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
CN202010129776.9A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010129776.9A priority Critical patent/CN111372278A/en
Publication of CN111372278A publication Critical patent/CN111372278A/en
Pending legal-status Critical Current

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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a passenger flow monitoring method, a passenger flow monitoring device, computer equipment and a storage medium. The method comprises the following steps: acquiring an MAC address acquired by detection of detection equipment in a target time period; identifying a non-random MAC address and a random MAC address in the MAC addresses; counting the residence time distribution of the non-random MAC address and the actual detected time distribution of the random MAC address; determining the number of equipment for generating the random MAC address according to the residence time distribution and the actual detected frequency distribution; and determining the passenger flow in the target time period according to the number of the devices and the number of the first addresses of the non-random MAC addresses. By adopting the method, the passenger flow monitoring cost can be reduced, and more accurate passenger flow can be obtained.

Description

Passenger flow monitoring method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a passenger flow volume monitoring method and apparatus, a computer device, and a storage medium.
Background
For a business that is targeted for marketing, nearby traffic conditions play an important role in business management and marketing decisions. In the related art, the passenger flow volume is monitored based on special sensors (such as infrared sensors and wireless radio frequency sensors) or cameras and other devices, and the problem of high cost exists.
Disclosure of Invention
In view of the above, it is necessary to provide a passenger flow volume monitoring method, a passenger flow volume monitoring device, a computer device, and a storage medium, which can reduce the cost.
A method of passenger flow monitoring, the method comprising:
acquiring an MAC address acquired by detection of detection equipment in a target time period;
identifying a non-random MAC address and a random MAC address in the MAC addresses;
counting the residence time distribution of the non-random MAC address and the actual detected time distribution of the random MAC address;
determining the number of devices for generating the random MAC address according to the residence time distribution and the actual detected time distribution;
and determining the passenger flow in the target time period according to the number of the devices and the number of the first addresses of the non-random MAC addresses.
A passenger flow monitoring device, the device comprising:
the acquisition module is used for acquiring the MAC address acquired by the detection equipment in the target time period;
the identification module is used for identifying a non-random MAC address and a random MAC address in the MAC addresses;
the statistic module is used for counting the residence time distribution of the non-random MAC address and the actual detected time distribution of the random MAC address;
a first determining module, configured to determine, according to the residence time distribution and the actual detected time distribution, the number of devices that generate the random MAC address;
and the second determining module is used for determining the passenger flow in the target time period according to the number of the devices and the number of the first addresses of the non-random MAC addresses.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring an MAC address acquired by detection of detection equipment in a target time period;
identifying a non-random MAC address and a random MAC address in the MAC addresses;
counting the residence time distribution of the non-random MAC address and the actual detected time distribution of the random MAC address;
determining the number of devices for generating the random MAC address according to the residence time distribution and the actual detected time distribution;
and determining the passenger flow in the target time period according to the number of the devices and the number of the first addresses of the non-random MAC addresses.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring an MAC address acquired by detection of detection equipment in a target time period;
identifying a non-random MAC address and a random MAC address in the MAC addresses;
counting the residence time distribution of the non-random MAC address and the actual detected time distribution of the random MAC address;
determining the number of devices for generating the random MAC address according to the residence time distribution and the actual detected time distribution;
and determining the passenger flow in the target time period according to the number of the devices and the number of the first addresses of the non-random MAC addresses.
According to the passenger flow monitoring method, the passenger flow monitoring device, the computer equipment and the storage medium, the MAC address obtained by detection of the detection equipment in the target time period is obtained, the non-random MAC address and the random MAC address in the MAC address are identified, the residence time distribution of the non-random MAC address and the actual detected time distribution of the random MAC address are counted, the number of equipment for generating the random MAC address is determined according to the residence time distribution and the actual detected time distribution, and the passenger flow in the target time period is determined according to the number of the equipment and the first address number of the non-random MAC address. Therefore, the high cost required by monitoring the passenger flow volume by using special devices such as a sensor or a camera is avoided, the number of the devices for generating the random MAC address is reduced by the related statistical data of the non-random MAC address and the random MAC address, the error caused by counting all the random MAC addresses in the passenger flow volume statistics or directly filtering can be avoided, and the passenger flow volume can be obtained more accurately.
Drawings
FIG. 1 is a diagram of an exemplary embodiment of a passenger flow monitoring method;
FIG. 2 is a schematic flow chart of a passenger flow monitoring method in one embodiment;
FIG. 3 is a diagram of a MAC address in one embodiment;
FIG. 4 is a schematic flow chart of a passenger flow monitoring method in another embodiment;
FIG. 5 is a diagram illustrating residence time distribution of non-random MAC addresses, according to an embodiment;
fig. 6 is a schematic diagram illustrating comparison between the simulated detected time distribution (a) and the actual detected time distribution (B) when the predetermined transformation probability p is 0.1 in one embodiment;
fig. 7 is a schematic diagram illustrating comparison between the simulated detected time distribution (a) and the actual detected time distribution (B) when the predetermined transformation probability p is 0.4 in one embodiment;
FIG. 8 is a schematic flow chart of a passenger flow monitoring method in another embodiment;
FIG. 9 is a schematic flow chart of a passenger flow monitoring method in another embodiment;
FIG. 10 is a schematic flow chart of a passenger flow monitoring method in another embodiment;
FIG. 11 is a block diagram of an embodiment of a passenger flow monitoring device;
FIG. 12 is a diagram showing an internal structure of a computer device in one embodiment;
FIG. 13 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The passenger flow monitoring method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The user may access an application platform providing a traffic statistics service through the terminal 102, and the server 104 may be a server on which the application platform is located. The server 104 acquires the MAC address acquired by the detection device in the target time period; identifying a non-random MAC address and a random MAC address in the MAC addresses; counting the residence time distribution of the non-random MAC address and the actual detected time distribution of the random MAC address; determining the number of equipment for generating the random MAC address according to the residence time distribution and the actual detected frequency distribution; and determining the passenger flow in the target time period according to the number of the devices and the number of the first addresses of the non-random MAC addresses. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers. The passenger flow monitoring method in the embodiment of the present application may be executed by the server 104, or executed by the terminal 102, or executed by both the server 104 and the terminal 102. Specifically, the terminal 102 may execute the passenger flow monitoring method in the embodiment of the present application through a processor.
In one embodiment, as shown in fig. 2, a passenger flow monitoring method is provided, which is described by taking the method as an example applied to the server 104 in fig. 1, and includes the following steps S202 to S210.
S202, acquiring the MAC address acquired by the detection device in the target time period.
The detection device represents a device capable of detecting the MAC address of the nearby device, and the detection device may specifically be a WIFI probe, and the WIFI probe may identify a WIFI signal sent by the nearby device and obtain a corresponding MAC address. For example, the WIFI probe may be placed in a fixed detection location (e.g., in a store), the target detection area may include the whole range of the store, and may also include a certain range near the store, when a target object (e.g., a pedestrian) enters the target detection area, an MAC address sent by a terminal device (usually a mobile phone) carried by the pedestrian is detected by the WIFI probe, and the WIFI probe reports the detected MAC address to the server.
S204, identifying a non-random MAC address and a random MAC address in the MAC addresses.
As shown in fig. 3, an example of a MAC address is provided, which is 48 bits in length and is represented as 12 16-ary numbers. Wherein the first 6 16-ary numbers (01:23:45) represent the manufacturer's number, represented by an Organization Unique Identifier (OUI), assigned to the manufacturer by the Institute of Electrical and Electronics Engineers (IEEE). The last 6 16 digits (67:89: AB) represent the serial number of the network Card (NIC) manufactured by the manufacturer.
Specifically, the server decodes each MAC address after obtaining it, and identifies the 7 th Bit code (Universal/Local Bit) of the OUI to determine whether each MAC address is a non-random MAC address or a random MAC address, and determines as a non-random MAC address if the 7 th Bit is 0, and determines as a random MAC address if the 7 th Bit is 1. As shown in FIG. 3, the 7 th bit of OUI (01:23:45) is 0, and it can be determined that the MAC address (01:23:45:67:89: AB) is a non-random MAC address.
For the mobile phone terminal, whether the mobile phone terminal sends the random MAC address or not is related to the system and model of the mobile phone, for example, a mobile phone using the ios system usually sends the random MAC address, and a mobile phone using the android system may send the random MAC address or may send the non-random MAC address. For the same mobile phone terminal, the non-random MAC address is unique, and only one of the random MAC address and the non-random MAC address can be sent out. Therefore, the non-random MAC address corresponds to a device that generates the non-random MAC address (for simplicity, the device that generates the non-random MAC address is hereinafter referred to as a non-random device), and the number of the identified non-random MAC addresses is the number of the non-random devices. However, a plurality of different random MAC addresses may correspond to the same device generating the random MAC address (for simplicity, the device generating the random MAC address is hereinafter referred to as a random device), and for different random devices, methods and frequencies for generating the random MAC address are different, so that the number of the random devices cannot be determined simply by the number of the identified random MAC addresses.
S206, counting the residence time distribution of the non-random MAC address and the actual detected times distribution of the random MAC address.
Specifically, when the detection device detects at a certain sampling frequency, if the target object stays in the target detection area for a long time, the MAC address sent by the terminal device carried by the target object may be detected multiple times. For the non-random MAC address, the residence time distribution is counted, and the residence time distribution is used to represent the residence time distribution of the non-random device, for example, if the residence time of a certain non-random MAC address is longer, the residence time of the non-random device corresponding to the non-random MAC address is considered to be longer. For a random MAC address, the detected number distribution is counted, which is used to reflect the frequency of sending the random MAC address by the random device, for example, if the detected number of a random MAC address is large, it is considered that the frequency of generating the random MAC address by the random device corresponding to the random MAC address is small.
And S208, determining the number of the equipment for generating the random MAC address according to the residence time distribution and the actual detected frequency distribution.
The residence time distribution of the non-random MAC addresses may be regarded as the residence time distribution of the non-random device, that is, may be regarded as the residence time distribution of the target object carrying the non-random MAC device in the target detection region, and if the residence time of the target object in the target detection region satisfies a certain distribution, it may be considered that the distribution is unrelated to whether the device carried by the target object will generate the random MAC address, so the residence time distribution of the non-random MAC addresses may be approximately regarded as the residence time distribution of the target object carrying the random device in the target detection region, that is, may be approximately the residence time distribution of the random device. The number of the random devices can be reduced according to the residence time distribution of the random devices and the actual detected time distribution of the random MAC addresses.
S210, determining the passenger flow in the target time period according to the number of the devices and the number of the first addresses of the non-random MAC addresses.
The number of the devices represents the number of the restored random devices, the number of the first addresses of the non-random MAC addresses represents the number of the non-random MAC addresses actually detected, that is, the number of the non-random devices, and the passenger flow volume may be the sum of the number of the random devices and the number of the non-random devices.
In the passenger flow monitoring method, the MAC addresses acquired by detection of the detection equipment in the target time period are obtained, the non-random MAC addresses and the random MAC addresses in the MAC addresses are identified, the residence time distribution of the non-random MAC addresses and the actual detected time distribution of the random MAC addresses are counted, the number of equipment for generating the random MAC addresses is determined according to the residence time distribution and the actual detected time distribution, and the passenger flow in the target time period is determined according to the number of the equipment and the first address number of the non-random MAC addresses. Therefore, the high cost required by monitoring the passenger flow volume by using special devices such as a sensor or a camera is avoided, the number of the devices for generating the random MAC address is reduced by the related statistical data of the non-random MAC address and the random MAC address, the error caused by counting all the random MAC addresses in the passenger flow volume statistics or directly filtering can be avoided, and the passenger flow volume can be obtained more accurately.
In an embodiment, as shown in fig. 4, the step of counting the residence time distribution of the non-random MAC address may specifically include the following steps S2061 to S2063.
S2061, the detected time of each non-random MAC address is acquired.
The detected time represents the time for the detection equipment to detect and obtain the non-random MAC address, and when the detection equipment reports the non-random MAC address to the server, the detected time of the non-random MAC address is used as a timestamp of the non-random MAC address and reported to the server together. When the same non-random MAC address is detected for multiple times, the non-random MAC address corresponds to multiple detected times, the server can group the obtained reported data according to the non-random MAC address, each group of data corresponds to the same non-random MAC address, and the number of the detected times corresponding to the same non-random MAC address is the detected times of the non-random MAC address.
S2062, calculating and determining the residence time of each non-random MAC address according to each detected time.
Specifically, when the detection device continuously detects a certain non-random MAC address for multiple times, the maximum time range of the multiple detected times may be calculated according to the multiple detected times of the non-random MAC address, and the maximum time range is used as the residence time of the non-random MAC address. For example, if the detection frequency of the detection device is 1 time per second, a certain non-random MAC address is detected 5 times, the detected times are respectively 9:01, 9:02, 9:03, 9:04 and 9:05, and the residence time of the non-random MAC address is calculated and determined to be 5 s.
S2063, obtaining the residence time distribution of the non-random MAC address according to each residence time and the second address number of the non-random MAC address corresponding to each residence time.
For the same residence time, the first address number may represent the number of non-random MAC addresses having the same residence time. For example, if the total number of the non-random MAC addresses obtained by the probing is 200, and the residence time of 10 non-random MAC addresses is 5s, the number of the second addresses of the non-random MAC addresses corresponding to the residence time of 5s is 10. As shown in fig. 5, a schematic diagram of the residence time distribution of the non-random MAC address in one embodiment is provided. The abscissa is the residence time length, and the ordinate is the second address number of the non-random MAC address corresponding to each residence time length.
In this embodiment, the residence time of each non-random MAC address is determined according to the detected time of each non-random MAC address, and the residence time distribution of the non-random MAC addresses is obtained according to each residence time and the number of the non-random MAC addresses corresponding to each residence time, so that the obtained residence time distribution can visually reflect the residence condition of the non-random device in the target detection area.
In an embodiment, as shown in fig. 4, the step of counting the distribution of the actual detected times of the random MAC address may specifically include the following steps S2064 to S2066.
S2064, the detected number of times of each random MAC address is acquired.
When the detection device reports the random MAC address to the server, the detected time of the random MAC address is used as a timestamp of the random MAC address and is reported to the server together. When the same random MAC address is detected for multiple times, the random MAC address corresponds to multiple detected times, the server can group the obtained reported data according to the non-random MAC address, each group of data corresponds to the same random MAC address, and the number of the detected times corresponding to the same random MAC address is the detected times of the random MAC address.
S2065, obtaining the number of the random MAC addresses corresponding to each detected number according to the detected number of the random MAC addresses.
Multiple different random MAC addresses may be corresponded to the same number of probes. For example, if the total number of the random MAC addresses obtained by probing is 200, and the number of times of probing 10 random MAC addresses is 5 times, the number of random MAC addresses corresponding to the number of times of probing 5 is 10.
S2066, obtaining the actual detected times distribution of the random MAC address according to the detected times of each random MAC address and the proportion of the number of the random MAC addresses corresponding to the detected times to the total number of the random MAC addresses.
As shown in fig. 6 and fig. 7, the distribution B is a schematic diagram of the distribution of the actual detected times of the random MAC address in one embodiment. The abscissa is the residence time (the detected times of the random MAC address may represent the residence time because the detection frequency of the detection device is fixed), and the ordinate is the distribution probability of each residence time, that is, the ratio of the number of the random MAC addresses corresponding to each residence time to the total number of the random MAC addresses.
In this embodiment, the actual detected number distribution of the random MAC addresses is obtained according to the detected number of times of each random MAC address and the ratio of the number of random MAC addresses corresponding to each detected number of times to the total number of the random MAC addresses, and the actual detected number distribution obtained in this way can visually reflect the residence condition of the random MAC addresses generated by the random device in the target detection area.
In an embodiment, as shown in fig. 8, the step of determining the number of devices generating the random MAC address according to the residence time distribution and the actual detected number distribution (i.e., step S208) may specifically include the following steps S2081 to S2084.
S2081, selecting the residence time with the preset equipment number from the residence time distribution, and respectively using the residence time as the simulated residence time of each simulation equipment.
Wherein, the simulation device represents the random device assumed to exist, the preset device number (represented by k) is the number of the simulation devices, k times of sampling are performed from the residence time distribution shown in fig. 5 to obtain the simulated residence time of k simulation devices, which are respectively s1,s2,…,skAnd (4) showing. For example, if k is 5, 5 pieces of dwell duration data randomly sampled from the dwell duration distribution are 5s, 8s, 10s, 15s, and 25s, respectively, and then the 5 pieces of dwell duration data are respectively used as the simulated dwell durations of the 5 pieces of simulation equipment, such as s1=5s,s2=8s,s3=10s,s4=15s,s5=25s。
S2082, generating a simulated random MAC address according to each simulated residence time and each preset transformation probability, and obtaining the distribution of the simulated detected times of each simulated random MAC address under each preset transformation probability.
The preset transformation probability represents the probability of obtaining a new random MAC address when each analog device is scanned. Although the method and frequency of generating the random MAC address may be different for different random devices, there are two possibilities for the probing device to obtain the random MAC address each time the probing device scans the same random device, one is the same as the random MAC address obtained by the previous scan, and the other is different from the random MAC address obtained by the previous scan (i.e. the probing device generates a new random MAC address), and the probability of obtaining the new random MAC address can be assumed to be a stable value and then evaluated. The value of the predetermined transformation probability (denoted by p) may be any value between 0 and 1, and in one embodiment, for each analog device, a grid search method may be used to make the predetermined transformation probability p to be 0.01, 0.02, …, and 0.99, respectively, and detect the analog random MAC address generated in the corresponding analog residence time.
For the same simulation device, when the preset transformation probability changes, the existing time length of the generated simulation random MAC address changes, and accordingly, the simulation detected times of the simulation random MAC address also change, and the distribution of the simulation detected times of the simulation random MAC address is influenced. As shown in fig. 6, the distribution a is a schematic diagram of distribution of simulated detected times of the simulated random MAC address when the predetermined transformation probability p is 0.1 in one embodiment. As shown in fig. 7, the distribution a is a schematic diagram of distribution of simulated detected times of the simulated random MAC address when the predetermined transformation probability p is 0.4 in one embodiment. Comparing distribution a in fig. 6 and fig. 7, it can be seen that the distribution of the simulated detected times of the simulated random MAC address is different under different preset transition probabilities.
And S2083, determining target transformation probability from each preset transformation probability according to each simulated detected frequency distribution and actual detected frequency distribution.
Under different preset transformation probabilities, the simulated detected times are distributed differently, and accordingly, the similarity degree between each simulated detected times and the actual detected times is different. As shown in fig. 6, a schematic diagram of comparing the simulated detected time distribution (a) with the actual detected time distribution (B) when the predetermined transformation probability p is 0.1 in one embodiment is provided. As shown in fig. 7, a schematic diagram of comparing the simulated detected time distribution (a) with the actual detected time distribution (B) when the predetermined transformation probability p is 0.4 in one embodiment is provided. As can be seen from the figure, the simulated detected number-of-times distribution (a) is more similar to the actual detected number-of-times distribution (B) when p is 0.1 and 0.4.
The target transition probability represents a preset transition probability corresponding to a simulated detected number distribution that is most similar to an actual detected number distribution (denoted by B). For example, if there are N predetermined transformation probabilities p, which are respectively represented by p1, p2, and … pN, the corresponding simulated detected times distribution is respectively represented by ap1,Ap2,…,ApNRepresents, assuming a distribution A thereinp40Closest to distribution B, the target transformation probability is p 40.
S2084, when the iteration ending condition is judged to be met according to the target transformation probability, the number of the preset devices is used as the number of the devices for generating the random MAC address, otherwise, after the number of the preset devices is updated, the step of selecting the residence time of the number of the preset devices from the residence time distribution is returned.
After the target transformation probability is determined, the total number of the simulated addresses corresponding to the target transformation probability is obtained, and the total number of the simulated addresses represents the total number of simulated random MAC addresses generated by the simulation equipment with the preset equipment number. If the total number of the simulation addresses meets the iteration end condition, the simulation result is in accordance with the situation that the random MAC address is generated by the actual random equipment, and therefore the number of the preset equipment is taken as the actual number of the random equipment. If the total number of the simulation addresses does not meet the iteration end condition, the simulation result does not meet the condition that the random MAC address is generated by the actual random equipment, so that the preset equipment number is updated, and the steps S2081 to S2083 are returned to be executed until the total number of the simulation addresses meets the iteration end condition.
In this embodiment, the simulated random MAC address is generated according to the preset device numbers and the preset transition probabilities, the corresponding total number of simulated addresses and the corresponding distribution of simulated detected times are obtained, and the preset device number closest to the actual situation is obtained by comparing the distribution of the simulated detected times with the distribution of the actual detected times, and the total number of the simulated addresses with the total number of the random MAC addresses obtained by the actual detection, so that the number of devices generating the random MAC address can be accurately reduced by the obtained preset device number.
In an embodiment, as shown in fig. 9, the step of generating a simulated random MAC address according to each simulated residence time and each preset transformation probability, and obtaining a simulated detected number distribution of the simulated random MAC address under each preset transformation probability (i.e., step S2082) may specifically include the following steps S2082a to S2082 d.
And S2082a, obtaining the corresponding simulation test times of each simulation device according to each simulation residence time and the preset detection frequency.
The preset detection frequency represents the detection frequency in the simulation test and is consistent with the actual detection frequency. The simulation test times corresponding to each simulation device can be obtained by calculating according to each simulation residence time and the preset detection frequency. Assuming that the preset number of devices is k, the simulation residence time is si(i ═ 1, 2, …, k), the preset detection frequency is f times per second, and the simulation residence time of the simulation equipment is siNumber of simulation tests (by y) corresponding to timei) May be a pair of siThe product of f is rounded to the value obtained. For example, if the simulation residence time of a simulation device is 5s and the preset detection frequency is 1 time per second, the corresponding simulation test times of the simulation device is 5 times.
S2082b, carrying out Bernoulli test according to the simulation test times and the preset transformation probability, and obtaining the number of the simulation addresses of the simulation random MAC addresses generated by the simulation equipment and the simulation detected times of the simulation random MAC addresses under the preset transformation probability.
The Bernoulli test only has two results of 0 and 1, the result of 0 indicates that the simulated random MAC address is unchanged, the result of 1 indicates that the simulated random MAC address is changed, and the probability corresponding to the result of 1 is the preset transformation probability. For a certain dwell time siCarry out yiBernoulli test with a probability of p can yield si1,si2,…,simiWherein m isiNumber, s, of simulated random MAC addresses generated by the simulation equipment corresponding to the residence timeij(j=1,2,…,mi) Indicating the duration of time, s, that each simulated random MAC address existsi1+si2+…+simi=si. Because the detection frequency is fixed, the time length of each analog random MAC address can also be converted into the analog detected number, for example, the detection frequency is 1 time per second, the time length of each analog random MAC address is 2s, and the conversion time length is 2 times.
S2082c, the total number of the simulated addresses of the simulated random MAC addresses under each preset transformation probability is obtained according to the number of the simulated addresses.
Specifically, the number of the analog addresses generated by each analog device is added to obtain the total number of the analog addresses of the analog random MAC addresses generated by the analog devices with the preset number of devices. For example, assume that the number of analog addresses generated by k analog devices is m1,m2,…,mkIf m is the total number of the analog addresses1+m2+…+mk
S2082d, obtaining the distribution of the simulated detected times of the simulated random MAC address under each preset transformation probability according to each simulated detected time and the proportion of the number of the simulated random MAC addresses corresponding to each simulated detected time to the total number of the simulated addresses.
As shown in fig. 6 and fig. 7, the distribution a is a schematic diagram of the distribution of simulated detected times of the simulated random MAC address in one embodiment. The abscissa is the residence time (since the detection frequency is fixed, the number of times the analog random MAC address is detected can represent the residence time), and the ordinate is the distribution probability of each residence time, that is, the ratio of the number of the analog random MAC addresses corresponding to each residence time to the total number of the analog random MAC addresses.
In this embodiment, the process of detecting the random MAC address is simulated by performing bernoulli tests with various probabilities, so that the distribution of simulated detected times of the random MAC address is obtained with various probabilities, which is helpful for accurately restoring the number of devices generating the random MAC address.
In an embodiment, as shown in fig. 10, the step of determining the target transformation probability from the preset transformation probabilities (i.e., step S2083) according to each simulated detected number distribution and actual detected number distribution may specifically include the following steps S2083a to S2083 b.
S2083a, respectively calculating the distance between each simulated detected time distribution and the actual detected time distribution, and obtaining the distribution distance corresponding to each preset transformation probability.
The distance of the simulated detected number distribution from the actual detected number distribution may be represented by a total variation distance, and specifically, the calculation of the distribution distance may include the steps of: acquiring the corresponding simulation distribution probability of each detected time in each simulation detected time distribution and the corresponding actual distribution probability in the actual detected time distribution; calculating probability difference between each simulation distribution probability and actual distribution probability; and obtaining the distribution distance corresponding to each preset transformation probability according to the probability difference. For example, as shown in distribution a and distribution B of fig. 7 and 8, the abscissa is the residence time length (representing the number of detected times), and the ordinate is the distribution probability corresponding to each residence time length, the probability difference of the distribution probability corresponding to each residence time length in distribution a and distribution B may be calculated, and the distance between distribution a and distribution B may be determined based on each probability difference. In one embodiment, the distribution distances of distribution a and distribution B in fig. 7 and 8 may be calculated using the following formula:
Figure BDA0002395476210000121
wherein A isiAnd BiThe distribution probabilities corresponding to the ith residence time in distribution A and distribution B, i.e., the height of each pillar in the graph, are shown. It is understood that other parameters, such as KL Divergence or F Divergence, may be used to determine the approximation degree of the two distributions when calculating the distribution distance, which is not limited to thisAnd (4) determining.
S2083b, obtaining the minimum distribution distance from the distribution distances, and using the preset transformation probability corresponding to the minimum distribution distance as the target transformation probability.
The size of the distribution distance is used for representing the approximation degree of the distribution, and the smaller the distribution distance of the two distributions is, the higher the approximation degree of the two distributions is, namely, the closer the simulation result is to the actual situation, so that the preset transformation probability corresponding to the minimum distribution distance is used as the target transformation probability.
In this embodiment, the approximation degree of the two distributions is represented by simulating the distance between the detected time distribution and the actual detected time distribution, and the preset transformation probability corresponding to the minimum distribution distance is used as the target transformation probability, which is helpful for accurately restoring the number of devices generating the random MAC address.
In one embodiment, when the error between the total number of the simulated addresses corresponding to the target transformation probability and the total number of the random MAC addresses obtained by actual detection is smaller than a preset error, it is determined that the iteration end condition is satisfied.
When the total number (m) of the simulated addresses corresponding to the target transformation probability is closer to the total number (n) of the random MAC addresses obtained by actual detection, the simulation result is closer to the actual situation. Therefore, the iteration target is that the error between n and m is smaller than the preset error. Specifically, the iteration target may be that a difference between n/m and 1 is less than or equal to a preset threshold, and the preset threshold may be set in combination with an actual situation, which is not limited herein. If the difference between n/m and 1 is greater than the preset threshold, updating the preset number of devices according to n/m, specifically, by using a formula: and k ' ═ n/m × k, updating the preset equipment number, wherein k represents the preset equipment number before updating, and k ' represents the preset equipment number after updating, and it can be understood that k ' is an integer, and when the result calculated by the formula is not an integer, the result is further rounded.
The application also provides an application scene, and the application scene applies the passenger flow monitoring method. Specifically, the passenger flow monitoring method is applied to the application scene as follows: the WIFI probe is arranged in the shop, the detection range of the WIFI probe comprises the whole shop range, the WIFI probe uploads the MAC address detected within one hour to a server of a passenger flow marketing system, the server obtains the passenger flow of the shop within the hour through the passenger flow monitoring method in the embodiment, the passenger flow is displayed in a system page, and a user can check the passenger flow of the shop in real time by accessing the system page.
It should be understood that although the various steps in the flow charts of fig. 2, 4, 6, 9-10 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 4, 6, 9-10 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or in alternation with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 11, a passenger flow monitoring device is provided, which may be a part of a computer device using a software module or a hardware module, or a combination of the two modules, and the passenger flow monitoring device 1100 specifically includes: an acquisition module 1110, an identification module 1120, a statistics module 1130, a first determination module 1140, and a second determination module 1150, wherein:
an obtaining module 1110, configured to obtain a MAC address obtained by the detection device in the target time period.
An identifying module 1120 for identifying a non-random MAC address and a random MAC address among the MAC addresses.
The counting module 1130 is configured to count the residence time distribution of the non-random MAC address and the actual detected time distribution of the random MAC address.
The first determining module 1140 is configured to determine the number of devices generating the random MAC address according to the residence time distribution and the actual detected time distribution.
The second determining module 1150 is configured to determine the passenger flow volume in the target time period according to the number of the devices and the number of the first addresses of the non-random MAC addresses.
In one embodiment, the statistics module 1130 includes a first statistics sub-module for counting the residence time distribution of the non-random MAC addresses. The first statistical submodule comprises a first obtaining unit, a first calculating unit and a first statistical unit. Wherein:
a first acquiring unit, configured to acquire a detected time of each non-random MAC address.
And the first calculating unit is used for calculating and determining the residence time of each non-random MAC address according to each detected time.
And the first statistical unit is used for obtaining residence time distribution of the non-random MAC addresses according to the residence time and the second address number of the non-random MAC addresses corresponding to the residence time.
In one embodiment, the statistics module 1130 includes a second statistics submodule for counting an actual detected number distribution of the random MAC address. The second statistical submodule comprises a second obtaining unit, a second calculating unit and a second statistical unit. Wherein:
and a second acquiring unit configured to acquire the detected number of times of each random MAC address.
And the second calculating unit is used for obtaining the number of the random MAC addresses corresponding to each detected number according to the detected number of the random MAC addresses.
And the second statistical unit is used for obtaining the actual detected times distribution of the random MAC addresses according to the detected times of the random MAC addresses and the proportion of the number of the random MAC addresses corresponding to the detected times to the total number of the random MAC addresses.
In one embodiment, the first determination module 1140 includes: the device comprises a selection submodule, a simulation generation submodule, a transformation probability determination submodule and an equipment number determination submodule. Wherein:
and the selection submodule is used for selecting the residence time with the preset equipment number from the residence time distribution and respectively taking the residence time as the simulated residence time of each piece of simulation equipment.
And the simulation generation submodule is used for generating a simulation random MAC address according to each simulation residence time and each preset transformation probability, and acquiring the distribution of the simulation detected times of the simulation random MAC address under each preset transformation probability.
And the transformation probability determining submodule is used for determining the target transformation probability from each preset transformation probability according to each simulated detected frequency distribution and actual detected frequency distribution.
And the equipment number determining submodule is used for taking the preset equipment number as the equipment number for generating the random MAC address when the iteration ending condition is judged to be met according to the target transformation probability, and returning to the step of selecting the residence time of the preset equipment number from the residence time distribution after the preset equipment number is updated if the iteration ending condition is not judged to be met.
In one embodiment, the simulation generation submodule includes: the device comprises a test frequency determining unit, a simulation test unit, a simulation address total number determining unit and a simulation distribution determining unit. Wherein:
and the test frequency determining unit is used for obtaining the corresponding simulation test frequency of each simulation device according to each simulation residence time and the preset detection frequency.
And the simulation test unit is used for carrying out Bernoulli tests according to the simulation test times and the preset transformation probabilities to obtain the number of the simulation addresses of the simulation random MAC addresses generated by the simulation equipment and the simulation detected times of the simulation random MAC addresses under the preset transformation probabilities.
And the total number determining unit of the analog addresses is used for obtaining the total number of the analog addresses of the analog random MAC addresses under each preset transformation probability according to the number of each analog address.
And the analog distribution determining unit is used for obtaining the analog detected times distribution of the analog random MAC address under each preset transformation probability according to each analog detected time and the proportion of the number of the analog random MAC addresses corresponding to each analog detected time to the total number of the analog addresses.
In one embodiment, the transformation probability determination sub-module includes: a distribution distance calculation unit and a transformation probability determination unit. Wherein:
the distribution distance calculation unit is used for calculating the distance between each simulated detected frequency distribution and the actual detected frequency distribution respectively to obtain the distribution distance corresponding to each preset transformation probability;
and the transformation probability determining unit is used for acquiring the minimum distribution distance from the distribution distances and taking the preset transformation probability corresponding to the minimum distribution distance as the target transformation probability.
In an embodiment, the device number determining submodule is further configured to determine that an iteration end condition is satisfied when an error between the total number of the simulated addresses corresponding to the target transformation probability and the total number of the random MAC addresses obtained through actual detection is smaller than a preset error.
For the specific definition of the passenger flow monitoring device, reference may be made to the above definition of the passenger flow monitoring method, which is not described herein again. All or part of the modules in the passenger flow monitoring device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 12. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a passenger flow monitoring method.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 13. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a passenger flow monitoring method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the configurations shown in fig. 12 or fig. 13 are only block diagrams of some configurations relevant to the present application, and do not constitute a limitation on the computer device to which the present application is applied, and a particular computer device may include more or less components than those shown in the drawings, or may combine some components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It should be understood that the terms "first", "second", etc. in the above-described embodiments are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of passenger flow monitoring, the method comprising:
acquiring an MAC address acquired by detection of detection equipment in a target time period;
identifying a non-random MAC address and a random MAC address in the MAC addresses;
counting the residence time distribution of the non-random MAC address and the actual detected time distribution of the random MAC address;
determining the number of devices for generating the random MAC address according to the residence time distribution and the actual detected time distribution;
and determining the passenger flow in the target time period according to the number of the devices and the number of the first addresses of the non-random MAC addresses.
2. The method of claim 1, comprising at least one of:
the first item: counting the residence time distribution of the non-random MAC address, including:
acquiring the detected time of each non-random MAC address;
calculating and determining the residence time of each non-random MAC address according to each detected time;
obtaining residence time distribution of the non-random MAC addresses according to the residence time and the second address number of the non-random MAC addresses corresponding to the residence time;
the second term is: counting the actual detected frequency distribution of the random MAC address, including:
acquiring the detected times of each random MAC address;
obtaining the number of random MAC addresses corresponding to each detected number according to the detected number of the random MAC addresses;
and acquiring the actual detected times distribution of the random MAC address according to the detected times of each random MAC address and the proportion of the number of the random MAC addresses corresponding to the detected times to the total number of the random MAC addresses.
3. The method according to claim 1 or 2, wherein determining the number of devices generating the random MAC address according to the residence time distribution and the actual detected number distribution comprises:
selecting residence time of preset equipment quantity from the residence time distribution, and respectively taking the residence time as simulated residence time of each simulation equipment;
generating a simulated random MAC address according to each simulated residence time and each preset transformation probability, and obtaining the distribution of the simulated detected times of the simulated random MAC address under each preset transformation probability;
determining a target transformation probability from each preset transformation probability according to each simulated detected frequency distribution and the actual detected frequency distribution;
and when judging that the iteration end condition is met according to the target transformation probability, taking the number of the preset devices as the number of the devices for generating the random MAC address, otherwise, after updating the number of the preset devices, returning to the step of selecting the residence time of the number of the preset devices from the residence time distribution.
4. The method according to claim 3, wherein generating a simulated random MAC address according to each simulated residence time and each preset transition probability, and obtaining a distribution of simulated detected times of the simulated random MAC address under each preset transition probability comprises:
obtaining the corresponding simulation test times of each simulation device according to each simulation residence time and the preset detection frequency;
carrying out Bernoulli tests according to the times of each simulation test and each preset transformation probability to obtain the number of simulated addresses of simulated random MAC addresses generated by each simulation device and the simulated detected times of each simulated random MAC address under each preset transformation probability;
acquiring the total number of the analog addresses of the analog random MAC address under the preset transformation probability according to the number of the analog addresses;
and obtaining the distribution of the simulated detected times of the simulated random MAC addresses under the preset transformation probability according to the simulated detected times and the proportion of the number of the simulated random MAC addresses corresponding to the simulated detected times to the total number of the simulated addresses.
5. The method of claim 3, wherein determining a target transition probability from each of the predetermined transition probabilities based on each of the simulated detected times distribution and the actual detected times distribution comprises:
respectively calculating the distance between each simulated detected frequency distribution and the actual detected frequency distribution to obtain the distribution distance corresponding to each preset transformation probability;
and acquiring the minimum distribution distance from the distribution distances, and taking the preset transformation probability corresponding to the minimum distribution distance as the target transformation probability.
6. The method according to claim 5, wherein calculating distances between the simulated detected time distributions and the actual detected time distributions respectively to obtain distribution distances corresponding to the preset transformation probabilities includes:
acquiring the corresponding simulation distribution probability of each detected time in each simulation detected time distribution and the corresponding actual distribution probability in the actual detected time distribution;
calculating a probability difference between each of the simulated distribution probabilities and the actual distribution probability;
and obtaining the distribution distance corresponding to each preset transformation probability according to the probability difference.
7. The method according to claim 4, wherein it is determined that the iteration end condition is satisfied when an error between the total number of simulated addresses corresponding to the target transition probability and the total number of random MAC addresses obtained by actual detection is smaller than a preset error.
8. A passenger flow monitoring device, the device comprising:
the acquisition module is used for acquiring the MAC address acquired by the detection equipment in the target time period;
the identification module is used for identifying a non-random MAC address and a random MAC address in the MAC addresses;
the statistic module is used for counting the residence time distribution of the non-random MAC address and the actual detected time distribution of the random MAC address;
a first determining module, configured to determine, according to the residence time distribution and the actual detected time distribution, the number of devices that generate the random MAC address;
and the second determining module is used for determining the passenger flow in the target time period according to the number of the devices and the number of the first addresses of the non-random MAC addresses.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202010129776.9A 2020-02-28 2020-02-28 Passenger flow monitoring method and device, computer equipment and storage medium Pending CN111372278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010129776.9A CN111372278A (en) 2020-02-28 2020-02-28 Passenger flow monitoring method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010129776.9A CN111372278A (en) 2020-02-28 2020-02-28 Passenger flow monitoring method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111372278A true CN111372278A (en) 2020-07-03

Family

ID=71211593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010129776.9A Pending CN111372278A (en) 2020-02-28 2020-02-28 Passenger flow monitoring method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111372278A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114158031A (en) * 2021-12-02 2022-03-08 深圳市共进电子股份有限公司 Method and device for counting terminals, router and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114158031A (en) * 2021-12-02 2022-03-08 深圳市共进电子股份有限公司 Method and device for counting terminals, router and storage medium
CN114158031B (en) * 2021-12-02 2023-08-22 深圳市共进电子股份有限公司 Method, device, router and storage medium for counting terminals

Similar Documents

Publication Publication Date Title
CN109684047B (en) Event processing method, device, equipment and computer storage medium
US10001389B1 (en) Analysis of smart meter data based on frequency content
EP3764705B1 (en) Positioning method, positioning device, server, and computer-readable storage medium
RU2527754C2 (en) System for generating statistical information and method of generating statistical information
EP3036557B1 (en) System and method for selecting a wi-fi access point for position determination
CN110502442B (en) Dynamic parameter checking method, device, equipment and storage medium
CN108140297A (en) A suspect's detecting system and a suspect's detection method
CN110162976A (en) Methods of risk assessment, device and terminal
CN110209551B (en) Abnormal equipment identification method and device, electronic equipment and storage medium
CN110992135A (en) Risk identification method and device, electronic equipment and storage medium
CN110348717B (en) Base station value scoring method and device based on grid granularity
CN111372278A (en) Passenger flow monitoring method and device, computer equipment and storage medium
CN113064916B (en) Monitoring method and device for abnormal card punching behavior, computer equipment and storage medium
CN114743132A (en) Target algorithm selection method and device, electronic equipment and storage medium
CN113705693A (en) Power grid lightning early warning method, device, recording medium and system
CN114967751B (en) Aircraft track tracking method, device, equipment and storage medium
CN113055901B (en) Terminal positioning method and device
CN111141981B (en) Line loss point inspection method and device, computer equipment and storage medium
CN109635057B (en) Electricity utilization business processing method and device, computer equipment and storage medium
CN113076451A (en) Abnormal behavior recognition and risk model library establishing method and device and electronic equipment
CN113159537A (en) Evaluation method and device for new technical project of power grid and computer equipment
JP5512882B2 (en) Information processing apparatus and terminal number estimation method
CN112235724A (en) Indoor positioning method and device, electronic equipment and computer readable storage medium
CN112307475A (en) System detection method and device
CN110958565A (en) Method and device for calculating signal distance, computer equipment and storage medium

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