Crowd counting method and related equipment
By receiving detection request frames and image data in the crowd counting server, fusion of features and inputting into a fully connected neural network, the problem of low accuracy of WiFi-aware population counting is solved, and the accuracy of population counting is improved.
Patent Information
- Application Number
- CN202410348452.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-03-26
AI Technical Summary
When the prior art maps the number of people through WiFi perception, there is a problem of low accuracy, mainly due to the influence of the frequency of sending random Mac addresses without mobile phones and wireless devices.
The crowd counting server is used to communicate with the wireless network detector and camera, receive detection request frames and image data, obtain inference samples through feature fusion, and input them into the trained fully connected neural network to predict the target number.
The accuracy of population number prediction is improved through feature fusion, and combining image feature vectors and wireless feature vectors, the counting accuracy is significantly improved compared to mapping the number of people based on the number of random hardware addresses alone.
Smart Images

Figure CN118212585B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communication technology, and in particular to a crowd counting method and related equipment. Background Art
[0002] Crowd counting is an active research area currently involving a variety of techniques and methods for real-time monitoring and estimating the number of people in a space.
[0003] At present, a single method of sensing the number of people, such as wireless fidelity (WiFi) sensing, is to sense the number of random hardware addresses in the corresponding area and thus map the number of people in the corresponding area. However, due to the influence of factors such as some people not bringing their mobile phones and the frequency of random Mac addresses sent by different wireless devices, there will be a large error between the mapped number of people in the area and the actual number of people in the area.
[0004] It can be seen that the existing technology of mapping the number of people in a corresponding area according to the number of random hardware addresses in the area through WiFi perception has the problem of low accuracy. Summary of the invention
[0005] The embodiments of the present application provide a crowd counting method and related devices to solve the problem of low accuracy in the prior art of mapping the number of people in a corresponding area according to the number of random hardware addresses in the area through WiFi perception.
[0006] In a first aspect, an embodiment of the present application provides a crowd counting method, which is applied to a crowd counting server, wherein the crowd counting server is communicatively connected to at least four wireless network detectors AP and a camera, each of the APs corresponds to a sensing area, the AP is used to monitor detection request frames of wireless devices, the camera and the first AP both correspond to a first sensing area, the first AP is any of the APs, the first sensing area is any of the sensing areas, the camera is used to obtain image data of the first sensing area, and the method includes:
[0007] Receiving a first detection request frame and image data of the camera from the first AP;
[0008] Performing feature fusion on a wireless feature vector and an image feature vector to obtain an inference sample, wherein the wireless feature vector is determined based on a second detection request frame, the image feature vector is determined based on the image data, and the second detection request frame is the first detection request frame located in the first sensing area;
[0009] The inference sample is input into a trained fully connected neural network to predict the number of target people in the first perception area.
[0010] In a second aspect, an embodiment of the present application further provides a crowd counting device, which is applied to a crowd counting server, wherein the crowd counting server is communicatively connected to at least four wireless network detectors AP and a camera, each of the APs corresponds to a sensing area, the AP is used to monitor the detection request frame of the wireless device, the camera and the first AP both correspond to the first sensing area, the first AP is any of the APs, the first sensing area is any of the sensing areas, the camera is used to obtain image data of the first sensing area, and the device includes:
[0011] A receiving module, configured to receive a first detection request frame from the first AP and image data from the camera;
[0012] a feature fusion module, configured to perform feature fusion on a wireless feature vector and an image feature vector to obtain an inference sample, wherein the wireless feature vector is determined based on a second detection request frame, the image feature vector is determined based on the image data, and the second detection request frame is the first detection request frame located in the first sensing area;
[0013] A prediction module is used to input the inference sample into a trained fully connected neural network to predict the number of target people in the first perception area.
[0014] In a third aspect, an embodiment of the present application provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0016] In a fifth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In an embodiment of the present application, by receiving the first detection request frame from the first AP and the image data of the camera; performing feature fusion on the wireless feature vector and the image feature vector to obtain an inference sample, the wireless feature vector is determined based on the second detection request frame, the image feature vector is determined based on the image data, and the second detection request frame is the first detection request frame located in the first perception area; the inference sample is input into the trained fully connected neural network to predict the target number of people in the first perception area. In this way, since the inference sample is obtained by feature fusion, the inference sample is combined with the image feature vector, and the inference sample is used to infer the population of the first perception area, compared with inferring and mapping the population of the first perception area based solely on the number of random hardware addresses in the first perception area, the accuracy of the predicted population of the first perception area is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 It is a flow chart of a crowd counting method provided in an embodiment of the present application;
[0020] Figure 2 It is a schematic diagram of a data collection moment provided by the present application;
[0021] Figure 3 It is a schematic diagram of the structure of a fully connected neural network provided in an embodiment of the present application;
[0022] Figure 4 It is a structural schematic diagram of a convolutional neural network for extracting image feature vectors provided in an embodiment of the present application;
[0023] Figure 5 It is a structural schematic diagram of a crowd counting system provided by an embodiment of the present application;
[0024] Figure 6 is a schematic diagram of the structure of a crowd counting device provided in an embodiment of the present application;
[0025] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the structures used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0028] like Figure 1 As shown, Figure 1 The present application provides a flow chart of a crowd counting method, which is applied to a crowd counting server, wherein the crowd counting server is connected to at least four wireless network detectors AP and cameras, each of which corresponds to a sensing area, and the AP is used to monitor the detection request frame of the wireless device, and the camera and the first AP both correspond to the first sensing area, the first AP is any of the APs, the first sensing area is any of the sensing areas, and the camera is used to obtain image data of the first sensing area, and the method includes:
[0029] Step 101: receiving a first detection request frame and image data of the camera from the first AP;
[0030] It should be understood that the above-mentioned wireless device refers to a device with WiFi function.
[0031] In step 101, the receiving may be real-time receiving or may be received once every fixed period.
[0032] For example, see Figure 2 , Figure 2 It is a schematic diagram of data collection time provided by the present application; starting from time 0, the number of random hardware addresses of the above-mentioned first AP in the first time window is counted, and the latter time window is obtained by sliding a step of 5 seconds from the starting time of the previous time window.
[0033] Step 102: Perform feature fusion on a wireless feature vector and an image feature vector to obtain an inference sample, wherein the wireless feature vector is determined based on a second detection request frame, the image feature vector is determined based on the image data, and the second detection request frame is the first detection request frame located in the first sensing area;
[0034] In step 102, the wireless feature vector and the image feature vector to be feature fused have a certain temporal correlation.
[0035] For example, Figure 3 As shown, Figure 3 It is a schematic diagram of the structure of a fully connected neural network provided in an embodiment of the present application.
[0036] The normalized number of random hardware addresses of AP1 in the 1st, 2nd, 3rd, 4th, and 5th time windows, as well as the mean and standard deviation of the number of random hardware addresses in these five time windows, and the image feature vector corresponding to the image data collected at the 10th second.
[0037] Step 103: input the inference sample into the trained fully connected neural network to predict the number of target people in the first perception area.
[0038] Optionally, the fully connected neural network includes: an input layer, two hidden layers, and an output layer. The following processing is performed during training:
[0039] (1) The hidden layers all use the sigmoid activation function, while the output layer uses the linear activation function.
[0040] (2) Use MSE as the loss function of the neural network.
[0041] (3) Use the Adam optimization algorithm to solve.
[0042] (4) Use the dropout strategy to prevent overfitting of the full neural network model.
[0043] See also Figure 3 The above inference sample can be understood as a 519-dimensional multimodal fusion vector. The inference sample is input into Figure 3 In the trained fully connected neural network shown, the target number of people in the first perception area can be obtained.
[0044] In an embodiment of the present application, by receiving the first detection request frame from the first AP and the image data of the camera; performing feature fusion on the wireless feature vector and the image feature vector to obtain an inference sample, the wireless feature vector is determined based on the second detection request frame, the image feature vector is determined based on the image data, and the second detection request frame is the first detection request frame located in the first perception area; the inference sample is input into the trained fully connected neural network to predict the target number of people in the first perception area. In this way, since the inference sample is obtained by feature fusion, the inference sample is combined with the image feature vector, and the inference sample is used to infer the population of the first perception area, compared with the inference of mapping the population of the first perception area based on the number of random hardware addresses in the first perception area alone, the accuracy of the predicted population of the first perception area is improved.
[0045] Optionally, in some embodiments, before inputting the inference sample into a trained fully connected neural network to obtain the number of people in the first perception area, the method further includes:
[0046] Acquire training samples of the first perception area corresponding to different historical moments, the training samples including wireless feature vectors and image feature vectors;
[0047] For each of the historical moments, training the fully connected neural network using the training samples to obtain a first number of people in the first perception area;
[0048] When the loss value is less than a first preset value, determining the fully connected neural network as the trained fully connected neural network;
[0049] The loss value is determined based on a true value and the first number of people, and the true value is obtained by manually recording at a corresponding historical moment.
[0050] Optionally, in some embodiments, after receiving the detection request frame from the first AP and the image data of the camera and before fusing the wireless feature vector and the image feature vector to obtain the inference sample, the method further includes:
[0051] For each historical moment, a convolutional neural network is trained using image data corresponding to the historical moment in a data set to obtain a second number of people in the first perception area, the data set includes an open source data set and a self-built data set, and the self-built data set includes image data of the first perception area at different historical moments;
[0052] When the counting accuracy is greater than a second preset value, determining the convolutional neural network as a trained convolutional neural network, the counting accuracy being determined based on the second number of people and a true value, the true value being obtained by manually recording at a corresponding historical moment;
[0053] The image feature vector of the image data is extracted using the trained convolutional neural network.
[0054] See also Figure 4 , Figure 4 It is a structural schematic diagram of a convolutional neural network for extracting image feature vectors provided in an embodiment of the present application.
[0055] In a specific embodiment, the above convolutional neural network includes using VGG as a backbone and adding an AdaptiveAverage Pooling layer to improve VGG.
[0056] 1) VGG backbone network
[0057] See also Figure 5 , the input image dimension of VGG is (3×1280×1280); according to the calculation characteristics of the convolutional network, after multiple convolution and pooling operations, before the pooling layer, the size of the feature map is (512×40×40), and after the pooling layer, the final visual feature dimension is (1×1×512), which can be expressed as an image feature vector such as (512×1).
[0058] 2) Pooling layer
[0059] The adaptive average pooling layer is similar to the average pooling layer, and both can output the average of the feature map; the difference is that the adaptive average pooling layer is adaptive, that is, it can output the average value of the specified dimension. In the present invention, the output dimension is specified as (1×1×512) to facilitate the construction of visual features.
[0060] 3) Trained Convolutional Neural Network
[0061] The head detection and counting algorithm is used as the training algorithm of the trained convolutional neural network, and the model is trained and verified using open source datasets and self-built datasets.
[0062] Deploy cameras to key locations in the perception area where people must pass, corresponding to the wireless sensor AP1 in the perception area. Based on the camera stream, a self-built data set is created. The image data collection time is shown in the figure. The image data is collected at the middle moment in a signal group, which is enough to cover the entire perception area. Therefore, the photo at the middle moment of the time window can represent the number of people visually perceived in the entire perception area within 20 seconds.
[0063] After pre-training the deep convolutional neural network, the number of people counted in the perception area can be obtained. When our crowd counting accuracy is ≥ 98.5%, a trained convolutional neural network is obtained, so that it can be used to extract visual features later.
[0064] Optionally, in some embodiments, after receiving the first detection request frame from the first AP and the image data of the camera and before fusing the wireless feature vector and the image feature vector to obtain the inference sample, the method includes:
[0065] Based on the fingerprint positioning algorithm and the preset fingerprint library, the first detection request frame is screened to obtain the second detection request frame;
[0066] Performing signal statistical processing on the target report message to obtain the wireless feature vector;
[0067] The preset fingerprint library is constructed based on a second AP, the second AP is the AP other than the first AP, and the target reporting message includes determination based on the second probe request frame.
[0068] It should be understood that the fingerprint library is constructed based on the strength of the WiFi uplink signal at historical moments collected by at least three of the second APs.
[0069] Among them, screening the first detection request frame based on the fingerprint positioning algorithm and the preset fingerprint library means positioning all first detection request frames monitored by the first AP, and determining the first detection request frame located in the first sensing area as the second detection request frame.
[0070] Optionally, in some embodiments, before performing signal statistical processing on the target reporting message to obtain the wireless feature vector, the method further includes:
[0071] Performing a cyclic redundancy check on the second probe request frame to obtain a first reporting message, where the first reporting message is the second probe request frame that passes the cyclic redundancy check;
[0072] Extracting a timestamp, an original random hardware address, and a signal strength in a second reporting message, wherein the second reporting message is a first reporting message whose signal strength is greater than a second preset threshold;
[0073] Pepper-encrypt the original random hardware address in the second report message to obtain the random hardware address;
[0074] The target reporting message of the first AP is obtained according to the timestamp, the random hardware address and the signal strength.
[0075] Exemplarily, (1) for AP1, a signal strength threshold is set so that the perceived signal is as close to AP1 as possible.
[0076] (2) According to the fingerprint database, the location information of the random hardware addresses sensed on AP1 is calculated, and all random hardware addresses that are not in the first sensing area corresponding to AP1 are excluded.
[0077] (3) Count all signal units that fall within the 30-second time window based on the timestamp.
[0078] (4) All signal units in the signal group are sorted according to timestamps.
[0079] (5) Using timestamps as buckets (e.g., hash tables), the signal units (ts, rssi, mac, ap#) are placed in different time buckets according to their timestamps.
[0080] (6) Traverse each time bucket, take mac as the bucket, and query the rssi of the current ap# for the tuple (rssi, mac, ap#) with the same mac. If it is greater than the rssi threshold in the initial threshold with the same ap#, then store (ap#) in the mac bucket, overwriting the ap# with the smaller rssi value. As a result, each ap detects the random and unique mac closest to the ap, that is, the one with the largest rssi.
[0081] Optionally, in some embodiments, the target reporting message includes the number of the second probe request frames corresponding to at least two consecutive time windows, the second probe request frame includes a random hardware address, and performing signal statistical processing on the target reporting message to obtain the wireless feature vector includes:
[0082] Based on the number of random hardware addresses in each of the time windows, calculating the mean and standard deviation of the random hardware addresses of the target reporting messages;
[0083] The wireless feature vector is obtained based on the number of random hardware addresses in each of the time windows, the mean value and the standard deviation.
[0084] like Figure 5 As shown, Figure 5 It is a structural schematic diagram of a crowd counting system provided by an embodiment of the present application, wherein the crowd counting system includes a WiFi sensing part, a visual sensing part and a multimodal feature fusion crowd counting server.
[0085] Furthermore, the first AP is AP1, and the second APs are AP2, AP3 and AP4.
[0086] like Figure 6 As shown, Figure 6: is a structural schematic diagram of a crowd computing device provided by an embodiment of the present application, which is applied to a crowd counting server, wherein the crowd counting server is communicatively connected with at least four wireless network detectors AP and a camera, each of the APs corresponds to a sensing area, the AP is used to monitor the detection request frame of the wireless device, the camera and the first AP both correspond to the first sensing area, the first AP is any of the APs, the first sensing area is any of the sensing areas, and the camera is used to obtain image data of the first sensing area, including the following modules:
[0087] A receiving module 601 is configured to receive a first detection request frame and image data of the camera from the first AP;
[0088] a feature fusion module 602, configured to perform feature fusion on a wireless feature vector and an image feature vector to obtain an inference sample, wherein the wireless feature vector is determined based on a second detection request frame, the image feature vector is determined based on the image data, and the second detection request frame is the first detection request frame located in the first sensing area;
[0089] The prediction module 603 is used to input the inference sample into the trained fully connected neural network to predict the number of target people in the first perception area.
[0090] Optionally, the device further comprises:
[0091] An acquisition module, used to acquire training samples of the first perception area corresponding to different historical moments, wherein the training samples include wireless feature vectors and image feature vectors;
[0092] A first obtaining module is used for training the fully connected neural network through the training samples for each of the historical moments to obtain a first number of people in the first perception area;
[0093] A first determination module, configured to determine the fully connected neural network as the trained fully connected neural network when the loss value is less than a first preset value;
[0094] The loss value is determined based on a true value and the first number of people, and the true value is obtained by manually recording at a corresponding historical moment.
[0095] Optionally, the device further comprises:
[0096] A second obtaining module is used to train a convolutional neural network for each historical moment using image data corresponding to the historical moment in the data set to obtain a second number of people in the first perception area, wherein the data set includes an open source data set and a self-built data set, and the self-built data set includes image data of the first perception area at different historical moments;
[0097] a second determination module, configured to determine the convolutional neural network as a trained convolutional neural network when the counting accuracy is greater than a second preset value, the counting accuracy being determined based on the second number of people and a true value, the true value being obtained by manually recording at a corresponding historical moment;
[0098] The image feature vector of the image data is extracted using the trained convolutional neural network.
[0099] Optionally, the device further comprises:
[0100] A third obtaining module is used to filter the first detection request frame based on a fingerprint positioning algorithm and a preset fingerprint library to obtain the second detection request frame;
[0101] A fourth obtaining module is used to perform signal statistical processing on the target reporting message to obtain the wireless feature vector;
[0102] The preset fingerprint library is constructed based on a second AP, the second AP is the AP other than the first AP, and the target reporting message includes determination based on the second probe request frame.
[0103] Optionally, the device further comprises:
[0104] a fifth obtaining module, configured to perform a cyclic redundancy check on the second detection request frame to obtain a first reporting message, wherein the first reporting message is the second detection request frame that passes the cyclic redundancy check;
[0105] An extraction module, used to extract a timestamp, an original random hardware address and a signal strength in a second report message, wherein the second report message is a first report message whose signal strength is greater than a second preset threshold;
[0106] A sixth obtaining module, configured to perform pepper encryption on the original random hardware address in the second reporting message to obtain the random hardware address;
[0107] The seventh obtaining module is used to obtain the target reporting message of the first AP according to the timestamp, the random hardware address and the signal strength.
[0108] Optionally, the target reporting message includes the number of the second probe request frames corresponding to at least two consecutive time windows, the second probe request frames include a random hardware address, and the fourth obtaining module includes:
[0109] A calculation submodule, configured to calculate a mean and a standard deviation of the random hardware addresses of the target reporting message based on the number of random hardware addresses in each of the time windows;
[0110] The obtaining submodule is used to obtain the wireless feature vector based on the number of random hardware addresses in each of the time windows, the mean value and the standard deviation.
[0111] The crowd counting device 600 can realize the Figure 1 The various processes of the method embodiment and the same beneficial effects are achieved, and will not be described again here to avoid repetition.
[0112] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0113] The present application also provides an electronic device. Figure 7 , the electronic device may include a processor 701, a memory 702, and a program 7021 stored in the memory 702 and executable on the processor 701.
[0114] When program 7021 is executed by processor 701, it can achieve Figure 1 Any steps in the corresponding method embodiments and achieving the same beneficial effects will not be repeated here.
[0115] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned embodiment method can be completed by hardware associated with program instructions, and the program can be stored in a readable medium.
[0116] The present application also provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned Figure 1 Any steps in the corresponding method embodiments can achieve the same technical effect and will not be repeated here to avoid repetition.
[0117] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0118] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A crowd counting method, characterized in that: Applied to a crowd counting server, the crowd counting server is connected to at least four wireless network detectors AP and a camera, each of the APs corresponds to a sensing area, the AP is used to monitor the detection request frame of the wireless device, the camera and the first AP both correspond to the first sensing area, the first AP is any of the APs, the first sensing area is any of the sensing areas, the camera is used to obtain image data of the first sensing area, and the method includes: Receiving a first detection request frame and image data of the camera from the first AP; Based on the fingerprint positioning algorithm and the preset fingerprint library, the first detection request frame is screened to obtain a second detection request frame; the target reporting message is subjected to signal statistical processing to obtain a wireless feature vector; wherein the preset fingerprint library is constructed based on a second AP, the second AP is the AP other than the first AP, and the target reporting message includes determination based on the second detection request frame; the first AP is set in the center of the first sensing area, and the second AP is set at the edge of the first sensing area; Performing feature fusion on a wireless feature vector and an image feature vector to obtain an inference sample, wherein the wireless feature vector is determined based on a second detection request frame, the image feature vector is determined based on the image data, and the second detection request frame is the first detection request frame located in the first sensing area; Inputting the inference sample into a trained fully connected neural network to predict the number of target people in the first perception area; Before performing signal statistical processing on the target reporting message to obtain the wireless feature vector, the method further includes: Perform a cyclic redundancy check on the second detection request frame to obtain a first reporting message, where the first reporting message is the second detection request frame that passes the cyclic redundancy check; extract the timestamp, the original random hardware address, and the signal strength in the second reporting message, where the second reporting message is the first reporting message whose signal strength is greater than a second preset threshold; perform pepper encryption on the original random hardware address in the second reporting message to obtain the random hardware address; obtain the target reporting message of the first AP according to the timestamp, the random hardware address, and the signal strength; The extracting the timestamp, the original random hardware address and the signal strength in the second reporting message includes: Taking the timestamp as a bucket, correspond the random hardware address to at least one time bucket; traverse the at least one time bucket and compare the signal strengths of the same random hardware address in different time buckets; retain the first report message in the time bucket that is greater than the second preset threshold, otherwise, cover the first report message in the time bucket that is less than the second preset threshold.
2. The method according to claim 1, characterized in that: Before inputting the inference sample into the trained fully connected neural network to obtain the number of people in the first perception area, the method further includes: Acquire training samples of the first perception area corresponding to different historical moments, the training samples including wireless feature vectors and image feature vectors; For each of the historical moments, training the fully connected neural network using the training samples to obtain a first number of people in the first perception area; When the loss value is less than a first preset value, determining the fully connected neural network as the trained fully connected neural network; The loss value is determined based on a true value and the first number of people, and the true value is obtained by manually recording at a corresponding historical moment.
3. The method according to claim 1, characterized in that After receiving the detection request frame from the first AP and the image data of the camera and before fusing the wireless feature vector and the image feature vector to obtain the inference sample, the method includes: For each historical moment, a convolutional neural network is trained using image data corresponding to the historical moment in a data set to obtain a second number of people in the first perception area, the data set includes an open source data set and a self-built data set, and the self-built data set includes image data of the first perception area at different historical moments; When the counting accuracy is greater than a second preset value, determining the convolutional neural network as a trained convolutional neural network, the counting accuracy being determined based on the second number of people and a true value, the true value being obtained by manually recording at a corresponding historical moment; The image feature vector of the image data is extracted using the trained convolutional neural network.
4. The method according to claim 1, characterized in that: The target reporting message includes the number of the second probe request frames corresponding to at least two consecutive time windows, and the second probe request frames include a random hardware address; The performing signal statistical processing on the target reporting message to obtain the wireless feature vector comprises: Based on the number of random hardware addresses in each of the time windows, calculating the mean and standard deviation of the random hardware addresses of the target reporting messages; The wireless feature vector is obtained based on the number of random hardware addresses in each of the time windows, the mean value and the standard deviation.
5. A crowd counting device, characterized in that: Applied to a crowd counting server, the crowd counting server is connected to at least four wireless network detectors AP and a camera, each of the APs corresponds to a sensing area, the AP is used to monitor the detection request frame of the wireless device, the camera and the first AP both correspond to the first sensing area, the first AP is any of the APs, the first sensing area is any of the sensing areas, the camera is used to obtain image data of the first sensing area, and the device includes: A receiving module, configured to receive a first detection request frame from the first AP and image data from the camera; A third obtaining module is used to filter the first detection request frame based on a fingerprint positioning algorithm and a preset fingerprint library to obtain a second detection request frame; The fourth obtaining module is used to perform signal statistical processing on the target reporting message to obtain a wireless feature vector; wherein the preset fingerprint library is constructed based on a second AP, the second AP is the AP other than the first AP, the target reporting message includes determination based on the second detection request frame; the first AP is set in the center of the first sensing area, and the second AP is set at the edge of the first sensing area; a feature fusion module, configured to perform feature fusion on a wireless feature vector and an image feature vector to obtain an inference sample, wherein the wireless feature vector is determined based on a second detection request frame, the image feature vector is determined based on the image data, and the second detection request frame is the first detection request frame located in the first sensing area; A prediction module, used for inputting the inference sample into a trained fully connected neural network to predict the number of target persons in the first perception area; a fifth obtaining module, configured to perform a cyclic redundancy check on the second detection request frame to obtain a first reporting message, wherein the first reporting message is the second detection request frame that passes the cyclic redundancy check; An extraction module, used to extract a timestamp, an original random hardware address and a signal strength in a second report message, wherein the second report message is a first report message whose signal strength is greater than a second preset threshold; A sixth obtaining module, configured to perform pepper encryption on the original random hardware address in the second reporting message to obtain the random hardware address; A seventh obtaining module, configured to obtain the target reporting message of the first AP according to the timestamp, the random hardware address and the signal strength; The extraction module is used to: use the timestamp as a bucket to correspond the random hardware address to at least one time bucket; traverse the at least one time bucket to compare the signal strength of the same random hardware address in different time buckets; retain the first report message in the time bucket that is greater than the second preset threshold, otherwise, cover the first report message in the time bucket that is less than the second preset threshold.
6. A computer program product, characterized in that The method comprises computer instructions, which, when processed and executed, implement the steps of the crowd counting method according to any one of claims 1 to 4.
7. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the crowd counting method according to any one of claims 1 to 4 are implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the crowd counting method according to any one of claims 1 to 4 are implemented.
