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

By obtaining and analyzing the MAC address, counting its residence time and number of detected times, and calculating passenger flow, the problem of high cost of monitoring passenger flow in the existing technology is solved, and a more accurate and economical monitoring method is achieved.

CN111372278BActive Publication Date: 2024-11-05TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010129776.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-28
Publication Date
2024-11-05
Estimated Expiration
2040-02-28

AI Technical Summary

Technical Problem

In the prior art, monitoring passenger flow based on special sensors or cameras has a high cost problem.

Method used

By obtaining the MAC address of the detection device in the target time period, identifying the non-random MAC address and the random MAC address, counting its residence time distribution and the number of times being detected, calculating the number of devices that generate the random MAC address, and then determining the passenger flow.

Benefits of technology

The cost of monitoring passenger flow is reduced, the error of using special sensors or cameras is avoided, and the accuracy of passenger flow statistics is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111372278B_ABST
    Figure CN111372278B_ABST
Patent Text Reader

Abstract

The present application relates to a passenger flow monitoring method, device, computer equipment and storage medium. The method includes: obtaining MAC addresses detected by a detection device within a target time period; identifying non-random MAC addresses and random MAC addresses in MAC addresses; counting the residence time distribution of non-random MAC addresses and the actual number of detection times of random MAC addresses; determining the number of devices that generate random MAC addresses based on the residence time distribution and the actual number of detection times; determining the passenger flow within the target time period based on the number of devices and the number of first addresses of non-random MAC addresses. The use of this method can reduce the cost of passenger flow monitoring and obtain more accurate passenger flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a passenger flow monitoring method, apparatus, computer equipment, and storage medium. Background Art

[0002] For commercial venues focused on marketing, customer flow plays a crucial role in their management and marketing decisions. However, existing technologies that monitor customer flow using specialized sensors (such as infrared sensors, wireless radio frequency sensors) or cameras are costly. Summary of the Invention

[0003] Based on this, it is necessary to provide a passenger flow monitoring method, device, computer equipment and storage medium that can reduce costs in response to the above technical problems.

[0004] A passenger flow monitoring method, the method comprising:

[0005] Obtain the MAC addresses detected by the detection device during the target time period;

[0006] Identifying a non-random MAC address and a random MAC address among the MAC addresses;

[0007] Counting the residence time distribution of the non-random MAC address and the actual detection times distribution of the random MAC address;

[0008] Determining the number of devices that generate the random MAC addresses based on the residence time distribution and the actual detection number distribution;

[0009] The passenger flow rate within the target time period is determined according to the number of devices and the number of first addresses of the non-random MAC addresses.

[0010] A passenger flow monitoring device, comprising:

[0011] An acquisition module is used to obtain the MAC addresses detected by the detection device within a target time period;

[0012] an identification module, configured to identify a non-random MAC address and a random MAC address among the MAC addresses;

[0013] A statistics module, configured to count the residence time distribution of the non-random MAC address and the actual detection times distribution of the random MAC address;

[0014] A first determining module is used to determine the number of devices that generate the random MAC addresses according to the residence time distribution and the actual detection number distribution;

[0015] The second determining module is configured to determine the passenger flow within the target time period according to the number of devices and the number of first addresses of the non-random MAC addresses.

[0016] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0017] Obtain the MAC addresses detected by the detection device during the target time period;

[0018] Identifying a non-random MAC address and a random MAC address among the MAC addresses;

[0019] Counting the residence time distribution of the non-random MAC address and the actual detection times distribution of the random MAC address;

[0020] Determining the number of devices that generate the random MAC addresses based on the residence time distribution and the actual detection number distribution;

[0021] The passenger flow rate within the target time period is determined according to the number of devices and the number of first addresses of the non-random MAC addresses.

[0022] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0023] Obtain the MAC addresses detected by the detection device during the target time period;

[0024] Identifying a non-random MAC address and a random MAC address among the MAC addresses;

[0025] Counting the residence time distribution of the non-random MAC address and the actual detection times distribution of the random MAC address;

[0026] Determining the number of devices that generate the random MAC addresses based on the residence time distribution and the actual detection number distribution;

[0027] The passenger flow rate within the target time period is determined according to the number of devices and the number of first addresses of the non-random MAC addresses.

[0028] The above-mentioned passenger flow monitoring method, apparatus, computer equipment, and storage medium obtain MAC addresses detected by a detection device within a target time period, identify non-random MAC addresses and random MAC addresses in the MAC addresses, calculate the residence time distribution of non-random MAC addresses and the actual detection times of random MAC addresses, determine the number of devices that generate random MAC addresses based on the residence time distribution and the actual detection times, and determine the passenger flow within the target time period based on the number of devices and the number of first addresses of non-random MAC addresses. This avoids the high cost of using specialized sensors or cameras to monitor passenger flow, and restores the number of devices that generate random MAC addresses through statistical data related to non-random MAC addresses and random MAC addresses. This avoids the errors caused by counting all random MAC addresses or directly filtering them when counting passenger flow, thus helping to obtain more accurate passenger flow. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A diagram showing an application environment of a passenger flow monitoring method in one embodiment;

[0030] Figure 2 1 is a flow chart of a passenger flow monitoring method according to an embodiment;

[0031] Figure 3 Schematic diagram of a MAC address in one embodiment;

[0032] Figure 4 is a flow chart of a passenger flow monitoring method according to another embodiment;

[0033] Figure 5 Schematic diagram of the residence time distribution of non-random MAC addresses in one embodiment;

[0034] Figure 6 Schematic diagram showing a comparison between a simulated detection frequency distribution (A) and an actual detection frequency distribution (B) when a preset conversion probability p=0.1 in one embodiment;

[0035] Figure 7 Schematic diagram showing a comparison between a simulated detection frequency distribution (A) and an actual detection frequency distribution (B) when a preset conversion probability p=0.4 in one embodiment;

[0036] Figure 8 is a flow chart of a passenger flow monitoring method according to another embodiment;

[0037] Figure 9 is a flow chart of a passenger flow monitoring method according to another embodiment;

[0038] Figure 10 is a flow chart of a passenger flow monitoring method according to another embodiment;

[0039] Figure 11 is a structural block diagram of a passenger flow monitoring device in one embodiment;

[0040] Figure 12 is a diagram of the internal structure of a computer device in one embodiment;

[0041] Figure 13 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0043] The passenger flow monitoring method provided in this application can be applied to Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. Users can access an application platform that provides passenger flow statistics services through terminal 102, and server 104 can be the server where the application platform is located. Server 104 obtains MAC addresses detected by a detection device within a target time period; identifies non-random MAC addresses and random MAC addresses among the MAC addresses; calculates the residence time distribution of non-random MAC addresses and the distribution of the actual number of detections of random MAC addresses; determines the number of devices that generate random MAC addresses based on the residence time distribution and the actual number of detections; and determines the passenger flow within the target time period based on the number of devices and the number of first addresses of non-random MAC addresses. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, and portable wearable devices. Server 104 can be implemented as an independent server or a server cluster consisting of multiple servers. The passenger flow monitoring method in the embodiment of the present application can be executed by server 104, by terminal 102, or by both server 104 and terminal 102. Specifically, the execution of the passenger flow monitoring method in the embodiment of the present application by terminal 102 can be executed by a processor.

[0044] In one embodiment, Figure 2 As shown, a passenger flow monitoring method is provided, which is applied to Figure 1 The server 104 in the example is used for explanation, and the steps include the following steps S202 to S210.

[0045] S202: Acquire the MAC address detected by the detection device within the target time period.

[0046] Among them, the detection device refers to a device that can detect the MAC address of a nearby device. The detection device can specifically be a WIFI probe, which can identify the WIFI signal emitted by a nearby device and obtain the corresponding MAC address. For example, the WIFI probe can be placed in a fixed detection location (such as inside a store), and its target detection area can include the entire store range or a certain range near the store. When the target object (such as a pedestrian) enters the target detection area, the MAC address emitted by the terminal device (usually a mobile phone) carried by the pedestrian will be detected by the WIFI probe, and the WIFI probe will report the detected MAC address to the server.

[0047] S204: Identify the non-random MAC address and the random MAC address in the MAC address.

[0048] like Figure 3 The figure below provides an example of a MAC address. The MAC address is 48 bits long and is represented as 12 hexadecimal digits. The first six hexadecimal digits (01:23:45) represent the manufacturer's number, represented by the Organizationally Unique Identifier (OUI), assigned to the manufacturer by the Institute of Electrical and Electronics Engineers (IEEE). The last six hexadecimal digits (67:89:AB) represent the serial number of the Network Interface Card (NIC) manufactured by that manufacturer.

[0049] Specifically, after obtaining each MAC address, the server decodes it and determines whether each MAC address is a non-random MAC address or a random MAC address by identifying the 7th bit code (Universal / Local Bit) of the OUI. If the 7th bit is 0, it is determined to be a non-random MAC address; if the 7th bit is 1, it is determined to be a random MAC address. Figure 3 As shown in the figure, the 7th bit of the OUI (01:23:45) is 0, so it can be determined that the MAC address (01:23:45:67:89:AB) is a non-random MAC address.

[0050] For a mobile phone terminal, whether it issues a random MAC address depends on the phone system and model. For example, mobile phones using the iOS system usually issue random MAC addresses, while mobile phones using the Android system may issue random MAC addresses or non-random MAC addresses. For the same mobile phone terminal, its non-random MAC address is unique, and it can only issue one of the random MAC address and the non-random MAC address. Therefore, the non-random MAC address corresponds one-to-one to the device that generates the non-random MAC address (for the sake of simplicity, the device that generates the non-random MAC address will be referred to as a non-random device in the following), and the number of identified non-random MAC addresses is the number of non-random devices. However, multiple different random MAC addresses may correspond to the same device that generates a random MAC address (for the sake of simplicity, the device that generates the random MAC address will be referred to as a random device in the following). For different random devices, the method and frequency of generating random MAC addresses are different, so the number of random devices cannot be simply determined by the number of identified random MAC addresses.

[0051] S206: Count the residence time distribution of non-random MAC addresses and the actual detection times distribution of random MAC addresses.

[0052] 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 will be detected multiple times. For non-random MAC addresses, the distribution of their residence time is counted to represent the residence time distribution of non-random devices. For example, if the residence time of a non-random MAC address is long, it is considered that the residence time of the non-random device corresponding to the non-random MAC address is long. For random MAC addresses, the distribution of the number of times they are detected is counted to reflect the frequency of random devices sending random MAC addresses. For example, if a random MAC address is detected a large number of times, it is considered that the frequency of random devices generating random MAC addresses is small.

[0053] S208: Determine the number of devices that generate random MAC addresses based on the distribution of residence time and the distribution of actual detection times.

[0054] The dwell time distribution of non-random MAC addresses can be used as the dwell time distribution of non-random devices, that is, the dwell time distribution of target objects carrying non-random MAC devices in the target detection area. If the dwell time of the target object in the target detection area satisfies a certain distribution, it can be assumed that this distribution is independent of whether the device carried by the target object generates a random MAC address. Therefore, the dwell time distribution of non-random MAC addresses can be approximated as the dwell time distribution of target objects carrying random devices in the target detection area, that is, the dwell time distribution of random devices. Based on the dwell time distribution of random devices and the distribution of the actual number of detections of random MAC addresses, the number of random devices can be restored.

[0055] S210: Determine the passenger flow in the target time period according to the number of devices and the number of first addresses of non-random MAC addresses.

[0056] Among them, the number of devices represents the number of restored random devices, the number of first addresses of non-random MAC addresses represents the number of non-random MAC addresses actually detected, that is, the number of non-random devices, and the passenger flow can be the sum of the number of random devices and the number of non-random devices.

[0057] In the above-mentioned passenger flow monitoring method, the MAC addresses detected by the detection device within the target time period are obtained, the non-random MAC addresses and random MAC addresses are identified in the MAC addresses, the residence time distribution of the non-random MAC addresses and the actual detection times of the random MAC addresses are calculated, and the number of devices that generate random MAC addresses is determined based on the residence time distribution and the actual detection times. The passenger flow within the target time period is determined based on the number of devices and the number of first addresses of the non-random MAC addresses. This avoids the high cost of using specialized sensors or cameras to monitor passenger flow. The number of devices that generate random MAC addresses is restored by using the relevant statistical data of non-random MAC addresses and random MAC addresses. This avoids the errors caused by counting all random MAC addresses or directly filtering them when counting passenger flow, and helps to obtain more accurate passenger flow.

[0058] In one embodiment, Figure 4 As shown, the step of counting the residence time distribution of non-random MAC addresses may specifically include the following steps S2061 to S2063.

[0059] S2061: Obtain the detection time of each non-random MAC address.

[0060] The detection time indicates the time when the detection device detects and obtains the non-random MAC address. When the detection device reports the non-random MAC address to the server, it uses the detection time of the non-random MAC address as the timestamp of the non-random MAC address and reports it to the server together. If the same non-random MAC address is detected multiple times, it will correspond to multiple detection times. The server can group the reported data obtained by non-random MAC address. Each group of data corresponds to the same non-random MAC address. The number of detection times corresponding to the same non-random MAC address is the number of detection times for that non-random MAC address.

[0061] S2062: Calculate and determine the residence time of each non-random MAC address based on each detection time.

[0062] Specifically, when a detection device detects a non-random MAC address that remains unchanged multiple times, the maximum time range of the multiple detection times can be calculated based on the detection times of the non-random MAC address, and used as the residence time of the non-random MAC address. For example, if the detection device's detection frequency is once per second, and a non-random MAC address is detected five times at 9:01, 9:02, 9:03, 9:04, and 9:05, the residence time of the non-random MAC address is calculated to be 5 seconds.

[0063] S2063: Obtain a residence time distribution of the non-random MAC address according to each residence time and the number of second addresses of the non-random MAC address corresponding to each residence time.

[0064] For the same dwell time, there may be multiple different non-random MAC addresses corresponding to the second address. The number of second addresses indicates the number of non-random MAC addresses with the same dwell time. For example, if the total number of non-random MAC addresses detected is 200, and 10 of them have a dwell time of 5s, then the number of second addresses of non-random MAC addresses corresponding to a dwell time of 5s is 10. Figure 5 FIG. 1 shows a schematic diagram of the residence time distribution of non-random MAC addresses in an embodiment, wherein the horizontal axis represents the residence time, and the vertical axis represents the number of second addresses of the non-random MAC addresses corresponding to each residence time.

[0065] In this embodiment, the residence time of each non-random MAC address is determined based on the detection time of each non-random MAC address, and the residence time distribution of the non-random MAC address is obtained based on each residence time and the number of non-random MAC addresses corresponding to each residence time. The residence time distribution obtained in this way can intuitively reflect the residence status of non-random devices in the target detection area.

[0066] In one embodiment, Figure 4 As shown, the step of counting the distribution of the actual number of detection times of the random MAC address may specifically include the following steps S2064 to S2066.

[0067] S2064: Obtain the number of times each random MAC address has been detected.

[0068] When a detection device reports a random MAC address to the server, it uses the detection time of the random MAC address as the timestamp of the random MAC address and reports it to the server. If the same random MAC address is detected multiple times, it corresponds to multiple detection times. The server can group the reported data obtained by non-random MAC address. Each group of data corresponds to the same random MAC address. The number of detection times corresponding to the same random MAC address is the number of detection times for that random MAC address.

[0069] S2065: Obtain the number of random MAC addresses corresponding to each detection number according to the detection number of each random MAC address.

[0070] The same number of probes may correspond to multiple different random MAC addresses. For example, if the total number of random MAC addresses detected is 200, and 10 of them are detected 5 times, then the number of random MAC addresses corresponding to the 5 probes is 10.

[0071] S2066 , obtaining a distribution of actual detection times of the random MAC address according to the detection times of each random MAC address and the ratio of the number of random MAC addresses corresponding to each detection time to the total number of random MAC addresses.

[0072] like Figure 6 and Figure 7 As shown, Distribution B is a schematic diagram of the actual number of detections of random MAC addresses in one embodiment. The horizontal axis is the dwell time (since the detection frequency of the detection device is fixed, the number of detections of the random MAC address can represent the dwell time), and the vertical axis is the distribution probability of each dwell time, that is, the proportion of the number of random MAC addresses corresponding to each dwell time to the total number of random MAC addresses.

[0073] In this embodiment, the actual detection frequency distribution of the random MAC addresses is obtained based on the number of detection times of each random MAC address and the ratio of the number of random MAC addresses corresponding to each detection frequency to the total number of random MAC addresses. The actual detection frequency distribution obtained in this way can intuitively reflect the residence status of the random MAC addresses generated by random devices in the target detection area.

[0074] In one embodiment, Figure 8As shown, the step of determining the number of devices generating random MAC addresses (ie, step S208 ) according to the distribution of residence time and the distribution of actual detection times may specifically include the following steps S2081 to S2084 .

[0075] S2081: Select the dwell times of a preset number of devices from the dwell time distribution as the simulated dwell times of each simulated device.

[0076] Among them, the simulated device represents the random device that is assumed to exist, and the preset number of devices (represented by k) is the number of simulated devices. Figure 5 The residence time distribution shown in the figure is sampled k times to obtain the simulated residence time of k simulated devices, which are represented by s1, s2, ..., s k For example, if k = 5, and the five dwell time data randomly sampled from the dwell time distribution are 5s, 8s, 10s, 15s, and 25s, they are used as the simulated dwell times of the five simulated devices, such as s1 = 5s, s2 = 8s, s3 = 10s, s4 = 15s, and s5 = 25s.

[0077] S2082: Generate a simulated random MAC address based on each simulated residence time and each preset change probability, and obtain a distribution of simulated detection times of each simulated random MAC address under each preset change probability.

[0078] The preset transformation probability represents the probability of obtaining a new random MAC address when scanning each simulated device. Although different random devices may use different methods and frequencies to generate random MAC addresses, for a detection device, there are two possibilities for the random MAC address obtained each time the same random device is scanned: one is the same as the random MAC address obtained in the previous scan, and the other is different from the random MAC address obtained in the previous scan (i.e., the random device has generated a new random MAC address). The probability of obtaining a new random MAC address can be assumed to be a stable value and then estimated. The value of the preset transformation probability (represented by p) can be any value between 0 and 1. In one embodiment, for each simulated device, a grid search method can be used to set its preset transformation probability p to 0.01, 0.02, ..., 0.99, respectively, to detect the simulated random MAC addresses generated by it during the corresponding simulated residence time.

[0079] For the same simulated device, when the preset transformation probability changes, the existence time of the generated simulated random MAC address will change accordingly. Accordingly, the simulated detection times of the simulated random MAC address will also change, which will affect the distribution of the simulated detection times of the simulated random MAC address. Figure 6As shown, the distribution A is a schematic diagram of the distribution of the number of simulated detections of a simulated random MAC address when the preset conversion probability p=0.1 in one embodiment. Figure 7 As shown, the distribution A is a schematic diagram of the distribution of the number of simulated detections of a simulated random MAC address when the preset transformation probability p=0.4 in an embodiment. Figure 6 and Figure 7 From the distribution A in Figure 2, it can be seen that under different preset transformation probabilities, the distribution of the simulated detection times of the simulated random MAC address is different.

[0080] S2083 , determining a target transformation probability from among the preset transformation probabilities according to the distribution of each simulated detection number and the distribution of the actual detection number.

[0081] Under different preset transformation probabilities, the simulated detection times distribution is different, and accordingly, the similarity between each simulated detection times distribution and the actual detection times distribution is also different. Figure 6 As shown in FIG, a schematic diagram comparing the simulated detection frequency distribution (A) and the actual detection frequency distribution (B) is provided when the preset conversion probability p=0.1 in an embodiment. Figure 7 The figure provides a schematic diagram comparing the simulated detection count distribution (A) and the actual detection count distribution (B) when the preset transformation probability p = 0.4 in one embodiment. As can be seen from the figure, the simulated detection count distribution (A) and the actual detection count distribution (B) are more similar when p = 0.4 than when p = 0.1.

[0082] The target transformation probability represents the preset transformation probability corresponding to the simulated detection frequency distribution that is most similar to the actual detection frequency distribution (denoted by B). For example, if there are N preset transformation probabilities p, denoted by p1, p2, ... pN, their corresponding simulated detection frequency distributions are denoted by A, B, and C, respectively. p1 , A p2 ,…,A pN Indicates that, assuming that the distribution A p40 It is closest to distribution B, so the target transformation probability is p40.

[0083] S2084, when it is determined that the iteration end condition is met according to the target transformation probability, the preset number of devices is used as the number of devices for generating random MAC addresses; otherwise, after updating the preset number of devices, the process returns to the step of selecting the residence time of the preset number of devices from the residence time distribution.

[0084] After determining the target transformation probability, the total number of simulated addresses corresponding to the target transformation probability is obtained. This total number of simulated addresses represents the total number of simulated random MAC addresses generated by a preset number of simulated devices. If this total number of simulated addresses meets the iteration end condition, it indicates that the simulation result conforms to the situation where random devices actually generate random MAC addresses. Therefore, the preset number of devices is used as the actual number of random devices. If this total number of simulated addresses does not meet the iteration end condition, it indicates that the simulation result does not yet conform to the situation where random devices actually generate random MAC addresses. Therefore, the preset number of devices is updated, and the process returns to steps S2081 to S2083 until the total number of simulated addresses meets the iteration end condition.

[0085] In this embodiment, simulated random MAC addresses are generated based on the preset number of devices and the preset transformation probabilities, and the corresponding total number of simulated addresses and the distribution of simulated detection times are obtained. By comparing the distribution of each simulated detection time with the actual detection time distribution, as well as the total number of simulated addresses with the total number of random MAC addresses obtained through actual detection, the preset number of devices closest to the actual situation is obtained. The preset number of devices obtained in this way can more accurately restore the number of devices that generate random MAC addresses.

[0086] In one embodiment, Figure 9 As shown, according to each simulated residence time and each preset transformation probability, a simulated random MAC address is generated, and the distribution of the simulated detection times of the simulated random MAC address under each preset transformation probability is obtained (i.e., step S2082), which can specifically include the following steps S2082a to S2082d.

[0087] S2082a, obtaining the corresponding number of simulation tests for each simulation device according to each simulation residence time and the preset detection frequency.

[0088] The preset detection frequency represents the detection frequency in the simulation test, which is consistent with the actual detection frequency. The number of simulation tests corresponding to each simulation device can be calculated based on the simulation dwell time and the preset detection frequency. Assuming that the number of preset devices is k, the simulation dwell time is s. i (i=1, 2, ..., k), the preset detection frequency is f times per second, and the simulated residence time of the simulated device is s i The number of simulation trials corresponding to the time (using y i ) can be a pair of i For example, if the simulation dwell time of a simulation device is 5 seconds and the preset detection frequency is 1 time per second, the corresponding number of simulation tests for the simulation device is 5 times.

[0089] S2082b, performing Bernoulli trials according to the number of simulation trials and the preset transformation probabilities, to obtain the number of simulated addresses of the simulated random MAC addresses generated by each simulation device and the number of simulated detections of each simulated random MAC address under each preset transformation probability.

[0090] Among them, the Bernoulli test has only two results: 0 and 1. The result 0 means that the simulated random MAC address remains unchanged, and the result 1 means that the simulated random MAC address changes. The probability corresponding to the result 1 is the preset change probability. i , perform y i A Bernoulli trial with probability p can yield s i1 , s i2 ,…,s imi , where m i Indicates the number of simulated random MAC addresses generated by the simulated device corresponding to the dwell time, s ij (j=1,2,…,m i ) represents the duration of existence of each simulated random MAC address, s i1 +s i2 +…+s imi =s i Since the detection frequency is fixed, the duration of each simulated random MAC address can also be converted into the number of simulated detections. For example, if the detection frequency is 1 per second and the duration of the simulated random MAC address is 2 seconds, the number of simulated detections is 2.

[0091] S2082c: Obtain the total number of simulated addresses of the simulated random MAC addresses under each preset transformation probability according to the number of each simulated address.

[0092] Specifically, the number of simulated addresses generated by each simulated device is added together to obtain the total number of simulated addresses of the simulated random MAC addresses generated by the preset number of simulated devices. For example, assuming that the number of simulated addresses generated by k simulated devices are m1, m2, ..., m k , then the total number of simulated addresses m=m1+m2+…+m k .

[0093] S2082d: According to each simulated detection count and the ratio of the number of simulated random MAC addresses corresponding to each simulated detection count to the total number of simulated addresses, obtain the distribution of the simulated detection count of the simulated random MAC addresses under each preset transformation probability.

[0094] like Figure 6 and Figure 7As shown, Distribution A is a schematic diagram of the distribution of the number of simulated detections of a simulated random MAC address in one embodiment. The horizontal axis represents the dwell time (since the detection frequency is fixed, the number of simulated detections of a simulated random MAC address can represent the dwell time), and the vertical axis represents the distribution probability of each dwell time, that is, the ratio of the number of simulated random MAC addresses corresponding to each dwell time to the total number of simulated random MAC addresses.

[0095] In this embodiment, the process of detecting random MAC addresses is simulated by performing Bernoulli trials with various probabilities, and the distribution of simulated detection times of the simulated random MAC addresses under various probabilities is obtained, which helps to accurately restore the number of devices generating random MAC addresses.

[0096] In one embodiment, Figure 10 As shown, the step of determining the target conversion probability from each preset conversion probability according to each simulated detection number distribution and the actual detection number distribution (ie, step S2083) may specifically include the following steps S2083a to S2083b.

[0097] S2083a, respectively calculating the distance between each simulated detection frequency distribution and the actual detection frequency distribution, and obtaining the distribution distance corresponding to each preset transformation probability.

[0098] The distance between the simulated detection frequency distribution and the actual detection frequency distribution can be represented by the total variation distance. Specifically, the calculation of the distribution distance may include the following steps: obtaining the simulated distribution probability corresponding to each detection frequency in each simulated detection frequency distribution, and the actual distribution probability corresponding to each detection frequency distribution; calculating the probability difference between each simulated distribution probability and the actual distribution probability; and obtaining the distribution distance corresponding to each preset transformation probability based on the probability difference. For example, Figure 7 and Figure 8 In the distribution A and distribution B shown, the horizontal axis is the dwell time (representing the number of detections), and the vertical axis is the distribution probability corresponding to each dwell time. The probability difference between the distribution probabilities corresponding to each dwell time in distribution A and distribution B can be calculated, and the distance between distribution A and distribution B can be determined based on each probability difference. In one embodiment, Figure 7 and Figure 8 The distribution distance between distribution A and distribution B in can be calculated using the following formula:

[0099]

[0100] Among them, A i and B irepresents the distribution probability corresponding to the i-th dwell duration in distribution A and distribution B, respectively, that is, the height of each column in the figure. It is understood that other parameters, such as Kullback-Leibler Divergence (KL Divergence) or F-Divergence (F-Divergence), can also be used when calculating the distribution distance to determine the degree of similarity between the two distributions, and this is not limited to this.

[0101] S2083b: Obtain the minimum distribution distance from each distribution distance, and use the preset transformation probability corresponding to the minimum distribution distance as the target transformation probability.

[0102] The size of the distribution distance is used to characterize the degree of approximation of the distribution. The smaller the distribution distance between the two distributions, the higher the degree of approximation of the two distributions, that is, the closer the simulation result is to the actual situation. Therefore, the preset transformation probability corresponding to the minimum distribution distance is used as the target transformation probability.

[0103] In this embodiment, the distance between the simulated detection count distribution and the actual detection count distribution is used to characterize the degree of similarity between the two distributions, and the preset transformation probability corresponding to the minimum distribution distance is used as the target transformation probability, which helps to accurately restore the number of devices that generate random MAC addresses.

[0104] In one embodiment, when the error between the total number of simulated addresses corresponding to the target conversion probability and the total number of random MAC addresses obtained through actual detection is less than a preset error, it is determined that the iteration end condition is met.

[0105] The closer the total number of simulated addresses (m) corresponding to the target transformation probability is to the total number of random MAC addresses (n) obtained by actual detection, the closer the simulation result is to the actual situation. Therefore, the iteration target is that the error between n and m is less than the preset error. Specifically, the iteration target can be that the difference between n / m and 1 is less than or equal to the preset threshold. The preset threshold can be set in combination with the actual situation and is not limited here. If the difference between n / m and 1 is greater than the preset threshold, the preset number of devices is updated according to n / m. Specifically, the preset number of devices can be updated by the formula: k′=n / m*k, where k represents the preset number of devices before the update and k′ represents the preset number of devices after the update. It can be understood that k′ is an integer. When the result calculated by the formula is not an integer, the result is further rounded.

[0106] The present application also provides an application scenario that applies the above-mentioned customer flow monitoring method. Specifically, the application of the customer flow monitoring method in this application scenario is as follows: a WIFI probe is set up in the store, and the detection range of the WIFI probe includes the entire store. The WIFI probe uploads the MAC addresses detected within one hour to the server of the customer flow marketing system. The server obtains the customer flow of the store within this hour through the customer flow monitoring method in the above embodiment and displays it on the system page. Users can view the customer flow of the store in real time by accessing the system page.

[0107] It should be understood that although Figure 2 , 4, 6, 9-10, the steps in the flowcharts are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , at least part of the steps in 4, 6, 9-10 may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0108] In one embodiment, Figure 11 As shown, a passenger flow monitoring device is provided. The device can be a software module or a hardware module, or a combination of both to form a part of a computer device. 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:

[0109] The acquisition module 1110 is configured to acquire a MAC address detected by a detection device within a target time period.

[0110] The identification module 1120 is configured to identify a non-random MAC address and a random MAC address in the MAC address.

[0111] The statistics module 1130 is used to count the residence time distribution of non-random MAC addresses and the actual detection times distribution of random MAC addresses.

[0112] The first determining module 1140 is configured to determine the number of devices generating random MAC addresses according to the distribution of residence time and the distribution of actual detection times.

[0113] The second determining module 1150 is configured to determine the passenger flow rate within the target time period according to the number of devices and the number of first non-random MAC addresses.

[0114] In one embodiment, the statistics module 1130 includes a first statistics submodule for counting the residence time distribution of non-random MAC addresses. The first statistics submodule includes a first acquisition unit, a first calculation unit, and a first statistics unit.

[0115] The first acquiring unit is configured to acquire a detection time of each non-random MAC address.

[0116] The first calculation unit is used to calculate and determine the residence time of each non-random MAC address according to each detection time.

[0117] The first statistical unit is configured to obtain a residence time distribution of the non-random MAC address according to each residence time and the number of second addresses of the non-random MAC address corresponding to each residence time.

[0118] In one embodiment, the statistics module 1130 includes a second statistics submodule for counting the actual number of detections of random MAC addresses. The second statistics submodule includes a second acquisition unit, a second calculation unit, and a second statistics unit.

[0119] The second acquiring unit is configured to acquire the number of times each random MAC address has been detected.

[0120] The second calculation unit is used to obtain the number of random MAC addresses corresponding to each detection number according to the detection number of each random MAC address.

[0121] The second statistical unit is used to obtain the actual detection frequency distribution of the random MAC address according to the detection frequency of each random MAC address and the ratio of the number of random MAC addresses corresponding to each detection frequency to the total number of random MAC addresses.

[0122] In one embodiment, the first determination module 1140 includes: a selection submodule, a simulation generation submodule, a transformation probability determination submodule, and a device number determination submodule.

[0123] The selection submodule is used to select the residence time of a preset number of devices from the residence time distribution as the simulated residence time of each simulated device.

[0124] The simulation generation submodule is used to generate a simulated random MAC address according to each simulated residence time and each preset transformation probability, and obtain the distribution of the simulated detection times of the simulated random MAC address under each preset transformation probability.

[0125] The transformation probability determination submodule is used to determine the target transformation probability from each preset transformation probability according to each simulated detection number distribution and the actual detection number distribution.

[0126] The device number determination submodule is used to use the preset number of devices as the number of devices for generating random MAC addresses when the iteration end condition is determined to be met according to the target transformation probability. Otherwise, after updating the preset number of devices, return to the step of selecting the residence time of the preset number of devices from the residence time distribution.

[0127] In one embodiment, the simulation generation submodule includes: a test number determination unit, a simulation test unit, a simulation address total number determination unit, and a simulation distribution determination unit.

[0128] The test number determination unit is used to obtain the corresponding simulation test number of each simulation device according to each simulation residence time and the preset detection frequency.

[0129] The simulation test unit is used to perform Bernoulli tests according to the number of simulation tests and the preset transformation probabilities, and obtain the number of simulated addresses of the simulated random MAC addresses generated by each simulation device and the number of simulated detections of each simulated random MAC address under each preset transformation probability.

[0130] The total number of simulated addresses determining unit is used to obtain the total number of simulated addresses of the simulated random MAC addresses under each preset transformation probability according to each number of simulated addresses.

[0131] The simulation distribution determination unit is used to obtain the distribution of the simulated detection times of the simulated random MAC addresses under each preset transformation probability based on the number of simulated detection times and the ratio of the number of simulated random MAC addresses corresponding to each simulated detection time to the total number of simulated addresses.

[0132] In one embodiment, the transformation probability determination submodule includes: a distribution distance calculation unit and a transformation probability determination unit.

[0133] A distribution distance calculation unit is used to calculate the distance between each simulated detection number distribution and the actual detection number distribution, and obtain the distribution distance corresponding to each preset transformation probability;

[0134] The transformation probability determination unit is configured to obtain a minimum distribution distance from each distribution distance, and use a preset transformation probability corresponding to the minimum distribution distance as a target transformation probability.

[0135] In one embodiment, the device number determination submodule is further configured to determine that an iteration end condition is satisfied when an error between the total number of simulated addresses corresponding to the target conversion probability and the total number of random MAC addresses actually detected is less than a preset error.

[0136] The specific definition of the passenger flow monitoring device can be found in the definition of the passenger flow monitoring method above and will not be repeated here. The various modules in the above-mentioned passenger flow monitoring device can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of the above-mentioned modules.

[0137] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 12 As shown. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile 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 the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a passenger flow monitoring method is implemented.

[0138] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 13 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile 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 the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a passenger flow monitoring method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.

[0139] Those skilled in the art will understand that Figure 12 or Figure 13The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0140] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0141] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0142] It should be understood that the terms "first", "second", etc. in the above embodiments are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.

[0143] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may 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 or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0144] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0145] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A passenger flow monitoring method, the method comprising: Obtain the MAC addresses detected by the detection device within the target time period; Identify a non-random MAC address and a random MAC address among the MAC addresses; The non-random MAC address is a MAC address whose 7th bit of the organization's unique identifier is 0, and the random MAC address is a MAC address whose 7th bit of the organization's unique identifier is 1; Counting the residence time distribution of the non-random MAC address and the actual detection times distribution of the random MAC address; the residence time distribution is used to represent the residence time distribution of the non-random device; the actual detection times distribution is used to reflect the frequency of the random device sending the random MAC address; the non-random device is the device that generates the non-random MAC address, and the random device is the device that generates the random MAC address; Determine the number of devices generating the random MAC address according to the residence time distribution and the actual detection number distribution; the number of devices represents the number of restored random devices; The passenger flow in the target time period is determined according to the number of devices and the first number of addresses of the non-random MAC addresses; the first number of addresses is the number of non-random devices.

2. The method according to claim 1, characterized in that Include at least one of the following: The first item: counting the residence time distribution of the non-random MAC address, including: Obtaining the detection time of each of the non-random MAC addresses; Calculate and determine the residence time of each non-random MAC address according to each detection time; Obtaining a residence time distribution of the non-random MAC address according to each of the residence time and the number of second addresses of the non-random MAC address corresponding to each of the residence time; The second item: counting the actual number of detections of the random MAC address, including: Obtaining the number of detections of each of the random MAC addresses; According to the number of detections of each of the random MAC addresses, the number of random MAC addresses corresponding to each of the detections is obtained; According to the number of detections of each of the random MAC addresses and the ratio of the number of random MAC addresses corresponding to each of the detections to the total number of random MAC addresses, the actual detection number distribution of the random MAC addresses is obtained.

3. The method according to claim 1 or 2, characterized in that: Determining the number of devices generating the random MAC addresses according to the residence time distribution and the actual detection number distribution includes: Selecting the dwell times of a preset number of devices from the dwell time distribution as the simulated dwell times of each simulated device; Generate a simulated random MAC address according to each of the simulated residence time and each preset change probability, and obtain a distribution of simulated detection times of the simulated random MAC address under each of the preset change probabilities; Determining a target transformation probability from each of the preset transformation probabilities according to each of the simulated detection frequency distributions and the actual detection frequency distribution; When the iteration end condition is determined to be satisfied according to the target transformation probability, the preset number of devices is used as the number of devices for generating the random MAC address; otherwise, after updating the preset number of devices, the step of selecting the residence time of the preset number of devices from the residence time distribution is returned.

4. The method according to claim 3, characterized in that: Generate a simulated random MAC address according to each of the simulated residence time and each of the preset change probabilities, and obtain a simulated detection number distribution of the simulated random MAC address under each of the preset change probabilities, including: According to each of the simulated dwell times and the preset detection frequency, the corresponding number of simulation tests of each of the simulation devices is obtained; Performing a Bernoulli test according to the number of simulation tests and the preset transformation probabilities to obtain the number of simulated addresses of the simulated random MAC addresses generated by each simulation device and the number of simulated detections of each simulated random MAC address under the preset transformation probabilities; According to the number of each simulated address, the total number of simulated addresses of the simulated random MAC address under each preset transformation probability is obtained; According to each of the simulated detection times and the ratio of the number of simulated random MAC addresses corresponding to each of the simulated detection times to the total number of simulated addresses, the distribution of the simulated detection times of the simulated random MAC addresses under each of the preset transformation probabilities is obtained.

5. The method according to claim 3, characterized in that: Determining a target transformation probability from each of the preset transformation probabilities according to each of the simulated detection frequency distributions and the actual detection frequency distributions includes: Calculating the distance between each of the simulated detection times distribution and the actual detection times distribution respectively, and obtaining the distribution distance corresponding to each of the preset transformation probabilities; The minimum distribution distance is obtained from each of the distribution distances, and the preset transformation probability corresponding to the minimum distribution distance is used as the target transformation probability.

6. The method according to claim 5, characterized in that Calculating the distance between each of the simulated detection times distribution and the actual detection times distribution respectively, and obtaining the distribution distance corresponding to each of the preset transformation probabilities, comprises: Obtaining the simulated distribution probability corresponding to each detection number in each of the simulated detection number distributions, and the actual distribution probability corresponding to the actual detection number distribution; Calculating the probability difference between each of the simulated distribution probabilities and the actual distribution probability; The distribution distance corresponding to each of the preset transformation probabilities is obtained according to the probability difference.

7. The method according to claim 4, characterized in that When the error between the total number of simulated addresses corresponding to the target change probability and the total number of random MAC addresses obtained through actual detection is less than a preset error, it is determined that the iteration end condition is met.

8. A passenger flow monitoring device, characterized in that: The device comprises: An acquisition module is used to acquire the MAC address detected by the detection device within a target time period; An identification module, used to identify a non-random MAC address and a random MAC address in the MAC address; the non-random MAC address is a MAC address whose 7th bit code of the organization unique identifier is 0, and the random MAC address is a MAC address whose 7th bit code of the organization unique identifier is 1; A statistical module, used to count the residence time distribution of the non-random MAC address and the actual detection times distribution of the random MAC address; the residence time distribution is used to represent the residence time distribution of non-random devices; the actual detection times distribution is used to reflect the frequency of random devices sending the random MAC address; the non-random device is a device that generates the non-random MAC address, and the random device is a device that generates the random MAC address; A first determination module is used to determine the number of devices that generate the random MAC address according to the residence time distribution and the actual detection number distribution; the number of devices represents the number of restored random devices; The second determination module is used to determine the passenger flow in the target time period according to the number of devices and the first number of addresses of the non-random MAC addresses; the first number of addresses is the number of non-random devices.

9. The device according to claim 8, characterized in that The statistical module includes a first statistical submodule; The first statistical submodule is used to count the residence time distribution of the non-random MAC address; The first statistical submodule includes a first acquisition unit, a first calculation unit and a first statistical unit; The first acquisition unit is used to acquire the detection time of each of the non-random MAC addresses; The first calculation unit is used to calculate and determine the residence time of each of the non-random MAC addresses according to each of the detection times; The first statistical unit obtains the residence time distribution of the non-random MAC address according to each residence time and the number of second addresses of the non-random MAC address corresponding to each residence time.

10. The device according to claim 8, characterized in that The statistical module includes a second statistical submodule; The second statistical submodule is used to count the actual detection times of the random MAC address; The second statistical submodule includes a second acquisition unit, a second calculation unit and a second statistical unit; The second acquisition unit is used to obtain the number of detection times of each of the random MAC addresses; The second calculation unit is used to obtain the number of random MAC addresses corresponding to each of the detection times according to the detection times of each of the random MAC addresses; The second statistical unit is used to obtain the actual detection number distribution of the random MAC address according to the detection number of each random MAC address and the ratio of the number of random MAC addresses corresponding to each detection number to the total number of random MAC addresses.

11. The device according to any one of claims 8 to 10, characterized in that The first determination module includes: a selection submodule, a simulation generation submodule, a transformation probability determination submodule and a device number determination submodule; The selection submodule is used to select the dwell time of a preset number of devices from the dwell time distribution as the simulated dwell time of each simulated device; The simulation generation submodule is used to generate a simulated random MAC address according to each of the simulated residence time and each preset transformation probability, and obtain the distribution of the simulated detection times of the simulated random MAC address under each of the preset transformation probabilities; The transformation probability determination submodule is used to determine the target transformation probability from each of the preset transformation probabilities according to each of the simulated detection times distribution and the actual detection times distribution; The device number determination submodule is used to use the preset number of devices as the number of devices for generating the random MAC address when the iteration end condition is determined to be met according to the target transformation probability; otherwise, after updating the preset number of devices, return to the step of selecting the residence time of the preset number of devices from the residence time distribution.

12. The device according to claim 11, characterized in that The simulation generation submodule includes: a test number determination unit, a simulation test unit, a simulation address total number determination unit and a simulation distribution determination unit; The test number determination unit is used to obtain the corresponding simulation test number of each simulation device according to each simulation residence time and the preset detection frequency; The simulation test unit is used to perform a Bernoulli test according to the number of simulation tests and the preset transformation probabilities, and obtain the number of simulated addresses of the simulated random MAC addresses generated by each simulation device and the number of simulated detections of each simulated random MAC address under the preset transformation probabilities; The simulated address total number determination unit is used to obtain the simulated address total number of the simulated random MAC address under each of the preset transformation probabilities according to each of the simulated address numbers; The simulation distribution determination unit is used to obtain the distribution of the simulated detection times of the simulated random MAC addresses under each preset transformation probability according to each of the simulated detection times and the ratio of the number of simulated random MAC addresses corresponding to each of the simulated detection times to the total number of simulated addresses.

13. The device according to claim 11, characterized in that The transformation probability determination submodule includes: a distribution distance calculation unit and a transformation probability determination unit; The distribution distance calculation unit is used to respectively calculate the distance between each of the simulated detection times distribution and the actual detection times distribution, and obtain the distribution distance corresponding to each of the preset transformation probabilities; The transformation probability determination unit is used to obtain the minimum distribution distance from each of the distribution distances, and use the preset transformation probability corresponding to the minimum distribution distance as the target transformation probability.

14. The device according to claim 13, characterized in that The device number determination submodule is further used to determine that the iteration end condition is satisfied when the error between the total number of simulated addresses corresponding to the target change probability and the total number of random MAC addresses obtained by actual detection is less than a preset error.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.