Crowd counting method and device, electronic equipment and storage medium
By acquiring the terminal model and detecting frame frequency, combined with the behavior database, the problem of low accuracy of crowd counting in small areas is solved, and high-precision crowd counting is achieved.
Patent Information
- Application Number
- CN202311759220.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-07-22
AI Technical Summary
The accuracy of population counting in small and medium-sized areas in the prior art is low, and the mobile network positioning accuracy is insufficient, so it is impossible to accurately determine the number of people in small areas.
By obtaining the terminal model and terminal behavior in the target area, collecting the detection frames and detection frame frequency in the sub-region, using the wireless LAN for identification and statistics, and determining the number of terminals in combination with the behavior database to improve the counting accuracy.
The accuracy of population counting in small areas is improved, and the number of people in the sub-region is quickly and accurately determined through the combination of terminal models and detection frame frequency.
Smart Images

Figure CN120356140A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a method, apparatus, electronic device, and storage medium for counting people in a crowd. Background Art
[0002] Counting people in a crowd is an important technology often applied to personnel management in public places. In the related art, the number of people in a crowd in a specific area can be confirmed through a mobile network. However, in the related art, the mobile network determines the area where a person is located through a communication cell, and the positioning accuracy of this technology is poor. Usually, the accuracy distance exceeds 100m, and it can only be applied to counting people in a relatively large area. For a relatively small area (such as different areas of an office building), the mobile network cannot accurately locate the people in this area, resulting in a low accuracy rate of counting people in a small area.
[0003] It can be seen that there is a problem of low accuracy rate of counting people in a small area in the related art. Summary of the Invention
[0004] Embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for counting people in a crowd to solve the problem of low accuracy rate of counting people in a small area in the related art.
[0005] To solve the above problems, the present invention is implemented as follows:
[0006] In a first aspect, an embodiment of the present invention provides a method for counting people in a crowd, including:
[0007] Obtaining N terminal models of terminals in a target area, and at least one terminal behavior corresponding to each terminal of each terminal model, where N is a positive integer greater than or equal to 1, and the terminals in the target area are terminals carried by people in a crowd;
[0008] Obtaining a plurality of detection frames of terminals in a sub-area of the target area and the detection frame frequencies corresponding to the plurality of detection frames;
[0009] Identifying the plurality of detection frames to obtain at least one target model corresponding to the terminals in the sub-area, different detection frame frequencies corresponding to each target model in the at least one target model, the sum of the detection frame frequencies corresponding to the at least one target model being equal to the detection frame frequencies corresponding to the plurality of detection frames of the terminals in the sub-area, and the at least one target model being at least one terminal model among the N terminal models;
[0010] Determining the number of terminals of each target model in the sub-area based on the terminal behavior corresponding to each target model and the detection frame frequency corresponding to each target model.
[0011] In a second aspect, an embodiment of the present invention further provides a crowd counting device, including:
[0012] A first acquisition module, configured to acquire N terminal models of terminals in a target area, and at least one terminal behavior of the terminals corresponding to each terminal model, where N is a positive integer greater than or equal to 1, and the terminals in the target area are terminals carried by people in a crowd;
[0013] A second acquisition module, configured to acquire a plurality of detection frames of terminals in a sub-area of the target area and the detection frame frequencies corresponding to the plurality of detection frames;
[0014] An identification module, configured to identify the plurality of detection frames to obtain at least one target model corresponding to the terminals in the sub-area, different detection frame frequencies corresponding to each target model in the at least one target model, and the sum of the detection frame frequencies corresponding to the at least one target model is equal to the detection frame frequencies corresponding to the plurality of detection frames of the terminals in the sub-area, and the at least one target model is at least one terminal model among the N terminal models;
[0015] A processing module, configured to determine the number of terminals of each target model in the sub-area based on the terminal behavior corresponding to each target model and the detection frame frequency corresponding to each target model.
[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, the steps in the crowd counting method described in the first aspect above are implemented.
[0017] In a fourth aspect, an embodiment of the present invention further provides a readable storage medium, configured to store a program, and when the program is executed by a processor, the steps in the crowd counting method described in the first aspect above are implemented.
[0018] In an embodiment of the present invention, by obtaining N terminal models of terminals in a target area, and at least one terminal behavior of the terminals corresponding to each terminal model; obtaining a plurality of detection frames of terminals in a sub - area of the target area and the detection frame frequencies corresponding to the plurality of detection frames; identifying the plurality of detection frames to obtain at least one target model corresponding to the terminals in the sub - area, different detection frame frequencies corresponding to each target model among the at least one target model, the sum of the detection frame frequencies corresponding to the at least one target model being equal to the detection frame frequencies corresponding to the plurality of detection frames of the terminals in the sub - area, and the at least one target model being at least one terminal model among the N terminal models; based on the terminal behavior corresponding to each target model and the detection frame frequency corresponding to each target model, to determine the number of terminals of each target model in the sub - area. In this way, through the terminal behavior corresponding to each terminal model in the target area and the detection frame frequency corresponding to the target model in the sub - area, the number of terminals of the target terminal model in the sub - area is determined, thereby improving the accuracy of population counting in a small area. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments of the present invention. Obviously, the following - described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0020] Figure 1 is a flowchart of a population counting method provided by an embodiment of the present invention;
[0021] Figure 2 is a schematic diagram of a behavior database provided by an embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of the terminal model and different feature libraries provided by an embodiment of the present invention;
[0023] Figure 4 is a schematic diagram of a population counting system provided by an embodiment of the present invention;
[0024] Figure 5 is a structural diagram of a population counting device provided by an embodiment of the present invention;
[0025] Figure 6 is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0027] Please refer to Figure 1 , Figure 1 which is a flowchart of a population counting method provided by an embodiment of the present invention. As Figure 1 shown, it includes the following steps:
[0028] Step 101: Obtain N terminal models of the terminals in the target area, and at least one terminal behavior corresponding to each terminal model. N is a positive integer greater than or equal to 1. The terminals in the target area are the terminals carried by the people in the crowd.
[0029] The above-mentioned target area is a relatively large area. In the target area, the terminal model and the terminal behavior of the terminal can be obtained through the mobile signal. Among them, the terminal is the terminal carried by the people in the crowd. By default, one terminal corresponds to one person. By calculating the number of terminals, the number of people is determined.
[0030] Step 102: Obtain multiple probe frames (Probe frames) of the terminals in the sub-area of the target area and the probe frame frequencies corresponding to the multiple probe frames.
[0031] The above-mentioned sub-area is a small area with a higher positioning accuracy requirement than the mobile network positioning accuracy. The sub-area is located within the target area. The accuracy of directly counting the crowd in the sub-area through the mobile network is relatively low. In the embodiment of the present invention, multiple probe frames and the probe frame frequencies of the multiple probe frames in the sub-area are collected through a Wireless Local Area Network (WLAN) to count the number of terminals in the sub-area.
[0032] Step 103: Identify the multiple probe frames to obtain at least one target model corresponding to the terminals in the sub-area. For each target model in the at least one target model, the corresponding different probe frame frequencies, and the sum of the probe frame frequencies corresponding to the at least one target model is equal to the probe frame frequencies corresponding to the multiple probe frames of the terminals in the sub-area. The at least one target model is at least one terminal model among the N terminal models.
[0033] It should be noted that there are differences in the fields of the probe frames of terminals of different terminal models collected. By pre - establishing a feature library including the probe frame fields corresponding to each terminal model among different terminal models, including the terminal models of terminals in the target area, and then searching in the feature library based on multiple probe frames in the sub - area, the terminal models corresponding to the multiple probe frames are obtained.
[0034] The frequencies of the above - mentioned multiple probe frames are the total frequencies of the probe frames corresponding to all target - model terminals. After identifying the target models of the terminals corresponding to each probe frame among the multiple probe frames, and at the same time comparing with the probe frames corresponding to the terminals whose target models have been determined, the probe - frame frequencies corresponding to the terminals of each target model are further determined.
[0035] Step 104: Based on the terminal behavior corresponding to each target model and the probe - frame frequency corresponding to each target model, determine the number of terminals of each target model in the sub - area.
[0036] It should be noted that when the terminal performs different terminal behaviors, there are differences in the probe - frame frequencies in the data of the communication interaction between the terminal and the WLAN. After identifying the probe - frame frequencies corresponding to the terminals of each target model in the sub - area, compare them with the probe - frame frequencies corresponding to the terminal when performing a single terminal behavior, so as to determine the number of terminals of the target - terminal model in the sub - area.
[0037] In the embodiment of the present invention, by obtaining N terminal models of the terminals in the target area and at least one terminal behavior corresponding to each terminal model; obtaining multiple probe frames of the terminals in the sub - area of the target area and the probe - frame frequencies corresponding to the multiple probe frames; identifying the multiple probe frames to obtain at least one target model corresponding to the terminals in the sub - area, different probe - frame frequencies corresponding to each target model in the at least one target model, the sum of the probe - frame frequencies corresponding to the at least one target model is equal to the probe - frame frequencies corresponding to the multiple probe frames of the terminals in the sub - area, and the at least one target model is at least one of the N terminal models; based on the terminal behavior corresponding to each target model and the probe - frame frequency corresponding to each target model, to determine the number of terminals of each target model in the sub - area. In this way, through the terminal behavior corresponding to each terminal model in the target area and the probe - frame frequency corresponding to the target model in the sub - area, the number of terminals of the target - terminal model in the sub - area is determined, thereby improving the accuracy of population counting in a small area.
[0038] In one embodiment, the determining the number of terminals of each target model in the sub - area based on the terminal behavior corresponding to each target model and the probe - frame frequency corresponding to each target model includes:
[0039] Determine the number of terminals of each target model in the sub-region based on the behavior database, the terminal behaviors corresponding to each target model, and the detection frame frequencies corresponding to each target model. The behavior database includes the detection frame frequencies corresponding to the terminal behavior of one terminal among the M terminal behaviors of multiple terminal models. At least one terminal behavior of the terminals corresponding to different terminal models is one of the M terminal behaviors of the multiple terminal models, and M is a positive integer greater than 1.
[0040] The above-mentioned behavior database is as Figure 2 shown, including different terminal models and the detection frame frequencies corresponding to the M terminal behaviors of each terminal model. Search in the behavior database through the terminal behaviors corresponding to each target model to obtain the detection frame frequencies corresponding to the terminal behaviors of each target model. This frequency is the frequency when one terminal executes the terminal behavior, and then combine the detection frame frequencies corresponding to the target models in the sub-region to determine the number of terminals in the sub-region.
[0041] Among them, determining the number of terminals of each target model in the sub-region based on the behavior database, the terminal behaviors corresponding to each target model, and the detection frame frequencies corresponding to each target model may specifically include two cases:
[0042] 1. The terminal behavior corresponding to one terminal model within the target model is one terminal behavior;
[0043] 2. The terminal behavior corresponding to one terminal model within the target model is multiple terminal behaviors.
[0044] Specifically, in the case where the terminal behavior corresponding to one terminal model (such as the first model) within the target model is one terminal behavior, obtain the detection frame frequency of the one terminal behavior corresponding to the first model based on the behavior database;
[0045] Set the quotient of the detection frame frequency corresponding to the first model and the detection frame frequency of the one terminal behavior corresponding to the first model as the number of terminals of the first model.
[0046] For example, the first model is model A, and only executes the terminal behavior of using the positioning service. The detection frame frequency corresponding to this behavior is 5.5. At this time, the detection frame frequency of the terminals corresponding to the first model in the sub-region is 16.5. It can be determined that the number of terminals of the first model in the sub-region is 3. After determining the number of terminals of all terminal models in the sub-region, the sum of the number of terminals of all terminal models is set as the number of terminals in the sub-region, that is, the number of people in the crowd in the sub-region.
[0047] In an embodiment of the present invention, when the terminal behavior corresponding to the first model is a certain terminal behavior, by setting the quotient of the detection frame frequency corresponding to the first model and the detection frame frequency of a certain terminal behavior corresponding to the first model as the number of terminals of the first model, it is possible to quickly and accurately determine the number of terminals of the first model in the sub-region.
[0048] However, when the terminal behavior corresponding to a terminal model within the target model is multiple terminal behaviors, it is necessary to accurately determine the number of terminals based on the detection frame frequencies of multiple terminal behaviors. Specifically, when the terminal behavior corresponding to the second model is multiple terminal behaviors, the detection frame frequencies of multiple terminal behaviors corresponding to the second model are obtained based on the behavior database, and the second model is one of at least one target model;
[0049] Set the quotient of the detection frame frequency corresponding to the second model and a preset value as the number of terminals of the second model.
[0050] Wherein, the preset value is the average value of the detection frame frequencies corresponding to multiple terminal behaviors, or the preset value is the average value of the detection frame frequencies corresponding to the terminal behaviors of each of the K terminals corresponding to the second model in the target area, and K is a positive integer greater than 1. For example, in the target area, the second model is model B, including three terminal behaviors, namely using location services (detection frame frequency is 2.3), not using location services (detection frame frequency is 1.6), and screen on (detection frame frequency is 1.5). Among the terminals of model B in the target area, 5 terminals use location services, 3 terminals do not use location services, and 1 terminal has the screen on. In this case, the preset value can be the average value of the three terminal behaviors (2.3 + 1.6 + 1.5) / 3 = 1.8, and the preset value can also be the average value of the terminal behaviors corresponding to model B in the target area (2.3 * 5 + 1.6 * 3 + 1.5) / 9 = 1.98.
[0051] In an embodiment of the present invention, when the terminal behavior corresponding to the second model is multiple terminal behaviors, by setting the quotient of the detection frame frequency corresponding to the second model and a preset value as the number of terminals of the second model, and the preset value is the average value of the detection frame frequencies corresponding to multiple terminal behaviors, or the preset value is the average value of the detection frame frequencies corresponding to the terminal behaviors of each of the K terminals corresponding to the second model in the target area, thereby realizing the determination of the number of terminals of the second model in the sub-region.
[0052] In one embodiment, the behavior database is obtained in the following manner:
[0053] Obtain sample data, where the sample data includes multiple sample detection frame frequencies when terminals of different terminal models perform different terminal behaviors;
[0054] Set the average value of the frequencies of multiple sample detection frames of the same terminal behavior executed by terminals of the same terminal model in the sample data as the detection frame frequency of the same terminal behavior corresponding to the same terminal model, so as to generate the behavior database.
[0055] It should be noted that during the execution of the same terminal behavior by terminals of the same terminal model, there are certain differences in the frequencies of the detection frames for the terminals to conduct communication interactions, and they are not exactly the same. At this time, it is necessary to determine the detection frame frequency of the terminals of the same terminal model when executing the same terminal behavior through the sample data.
[0056] The above sample data is data obtained by sampling different models of terminals performing different behaviors. By setting the average value of the frequencies of multiple sample detection frames of the same terminal behavior executed by terminals of the same terminal model as the detection frame frequency of the same terminal behavior corresponding to the same terminal model, a behavior database including the detection frame frequencies corresponding to different terminal behaviors of each terminal model among multiple terminal models is generated.
[0057] In one embodiment, the obtaining of N terminal models of the terminals in the target area and at least one terminal behavior of the terminals corresponding to each terminal model includes:
[0058] Obtain the International Mobile Equipment Identity Type Allocation Code (IMEI-TAC) and Deep Packet Inspection (DPI) information of the terminals in the target area, where the DPI information includes at least one of uplink and downlink traffic information, used protocol information, and used application information;
[0059] Identify the IMEI-TAC of the terminals in the target area to obtain N terminal models in the target area;
[0060] Based on at least one of a preset behavior set, the uplink and downlink traffic information, the used protocol information, and the used application information, perform a search to obtain M terminal behaviors of the terminals corresponding to different terminal models in the target area, where the preset behavior set includes at least one of the uplink and downlink traffic information, the used protocol information, and the used application information corresponding to different terminal behaviors.
[0061] It should be noted that in a mobile network, the terminal model corresponding to a terminal can be identified through the Mobile Subscriber International Integrated Service Digital Network (MSISDN) and the International Mobile Subscriber Identity (IMSI) of the terminal, or the terminal model corresponding to the terminal can be obtained through the International Mobile Equipment Identity (IMEI) of the terminal. However, since opening the IMEI will disclose the personal privacy of the terminal user, in the embodiments of the present invention, the terminal model of the terminal is identified through the IMEI-TAC. The specific terminal cannot be located through the IMEI-TAC, and the personal privacy of the terminal user will not be disclosed.
[0062] Furthermore, the IMEI-TAC can be used to create an IMEI-TAC feature library, which can be used to identify the mobile network mobile phone model. Specifically, the IMEI-TAC feature library can be created in advance to confirm the terminal model of the terminal. The IMEI-TAC feature library includes multiple terminal models and the IMEI-TAC corresponding to each terminal model. After obtaining the IMEI-TAC of the terminal in the target area, the terminal model of the terminal is determined according to the IMEI-TAC feature library and the IMEI-TAC of the terminal.
[0063] Among them, as Figure 3 shown, the same terminal model corresponds to one IMEI-TAC and one type of detection frame field. The terminal model of the terminal is determined through the IMEI-TAC feature library and the detection frame feature library.
[0064] The above DPI information can determine the current information of the terminal through the data packet, including the uplink and downlink traffic information, the used protocol information, the used application information, etc. After the terminal accesses the mobile network, the DPI information is obtained to obtain at least one of the uplink and downlink traffic information, the used protocol information, and the used application information, and the terminal behavior being executed by the terminal is determined through at least one of the uplink and downlink traffic information, the used protocol information, and the used application information.
[0065] For example, when the terminal is using an application, the traffic consumption is large and the uplink traffic accounts for a low proportion. Through the uplink and downlink traffic information and the used application information of the terminal, terminal behaviors such as the phone screen off, screen on, and active state can be identified.
[0066] The above preset behavior set includes at least one of the uplink and downlink traffic information, usage protocol information, and usage application information corresponding to different terminal behaviors. After obtaining the DPI information of the target area, search in the preset behavior set according to at least one of the uplink and downlink traffic information, usage protocol information, and usage application information included in the DPI information, so as to obtain a terminal behavior corresponding to each terminal in the target area, and then obtain M terminal behaviors corresponding to terminals of different terminal models.
[0067] In one embodiment, the method further includes:
[0068] Obtain multiple Received Signal Strength Indication (RSSI) information corresponding to each terminal in each target model of the sub-region, the access point (AP) information corresponding to each RSSI information, and the location data of the AP device corresponding to each AP information;
[0069] Based on the each RSSI information corresponding to each terminal and the AP information corresponding to each RSSI information, obtain the distance between each terminal and each AP device;
[0070] Based on the distance between each terminal and each AP device and the location data of each AP device, calculate the target location of each terminal.
[0071] The above AP information is the information of the AP device, each AP device corresponds to one AP information, and the AP device is set in the sub-region and is used to obtain the RSSI information and AP information of the terminals in the sub-region.
[0072] After obtaining the RSSI information and AP information in the sub-region, the distance from the terminal to each AP device can be determined. Based on the known location of each AP device, the location of the terminal can be calculated. Among them, to ensure that there is only one calculated terminal location, the number of AP devices can be set to at least three, so as to improve the accuracy of terminal positioning.
[0073] In an embodiment of the present invention, by obtaining multiple RSSI information corresponding to each terminal in each target model of a sub-region, the Access Point (AP) information corresponding to each RSSI information, and the location data of the AP device corresponding to each AP information, then based on each RSSI information corresponding to each terminal and the AP information corresponding to each RSSI information, obtaining the distance between each terminal and each AP device, and finally based on the distance between each terminal and each AP device and the location data of each AP device, calculating the target location of each terminal, thereby realizing the location positioning of terminals in the sub-region, and further realizing the positioning of personnel in the crowd in the sub-region.
[0074] The embodiment of the present invention also provides a Figure 4 crowd counting system as shown. The system includes a mobile network perception module, a wireless network perception module, and a fusion processing module. The mobile network perception module is used to perform deep packet inspection through the core network and / or access network to obtain the IMEI-TAC and DPI information of terminals in the target area, and further determine the terminal model and terminal behavior of terminals in the target area through the IMEI-TAC feature library; the wireless network perception module is used to obtain multiple probe frames, probe frame frequencies, RSSI information, and AP information in the sub-region, and further determine the terminal model and terminal location of terminals in the sub-region through the probe frame feature library; the fusion processing module is used to combine the behavior database, the terminal model and terminal behavior of terminals in the target area, and the terminal signals and probe frame frequencies of terminals in the sub-region to determine the number of personnel in the crowd in the sub-region.
[0075] Please refer to Figure 5 , Figure 5 which is a structural diagram of a crowd counting device provided by an embodiment of the present invention. As Figure 5 shown, the crowd counting device 500 includes:
[0076] A first acquisition module 501, configured to acquire N terminal models of terminals in the target area, and at least one terminal behavior corresponding to each terminal model, where N is a positive integer greater than or equal to 1, and the terminals in the target area are terminals carried by personnel in the crowd;
[0077] A second acquisition module 502, configured to acquire multiple probe frames of terminals in the sub-region of the target area and the probe frame frequencies corresponding to the multiple probe frames;
[0078] An identification module 503, configured to identify the multiple detection frames to obtain at least one target model corresponding to a terminal in the sub-region, different detection frame frequencies corresponding to each target model in the at least one target model, and the sum of the detection frame frequencies corresponding to the detection frames of the at least one target model being equal to the detection frame frequencies corresponding to the multiple detection frames of the terminals in the sub-region, where the at least one target model is at least one terminal model among the N terminal models;
[0079] A processing module 504, configured to determine the number of terminals of each target model in the sub-region based on the terminal behavior corresponding to each target model and the detection frame frequency corresponding to each target model.
[0080] In one embodiment, the processing module 504 includes:
[0081] A processing unit, configured to determine the number of terminals of each target model in the sub-region based on a behavior database, the terminal behavior corresponding to each target model, and the detection frame frequency corresponding to each target model. The behavior database includes the detection frame frequency corresponding to the terminal behavior of one terminal among the M terminal behaviors of multiple terminal models. At least one terminal behavior of terminals corresponding to different terminal models is one terminal behavior among the M terminal behaviors of the multiple terminal models, and M is a positive integer greater than 1.
[0082] In one embodiment, the processing unit includes:
[0083] A first acquisition subunit, configured to, when the terminal behavior corresponding to the first model is one terminal behavior, acquire the detection frame frequency of one terminal behavior corresponding to the first model based on the behavior database, where the first model is one terminal model among the at least one target model;
[0084] A first processing subunit, configured to set the quotient of the detection frame frequency corresponding to the first model and the detection frame frequency of one terminal behavior corresponding to the first model as the number of terminals of the first model.
[0085] In one embodiment, the processing unit includes:
[0086] A second acquisition subunit, configured to, when the terminal behavior corresponding to the second model is multiple terminal behaviors, acquire the detection frame frequencies of the multiple terminal behaviors corresponding to the second model based on the behavior database, where the second model is one terminal model among the at least one target model;
[0087] A second processing subunit, configured to set the quotient of the detection frame frequency corresponding to the second model and a preset value as the number of terminals of the second model;
[0088] Wherein, the preset value is the average of the detection frame frequencies corresponding to the multiple terminal behaviors, or the preset value is the average of the detection frame frequencies corresponding to the terminal behaviors of each of the K terminals corresponding to the second model in the target area, where K is a positive integer greater than 1.
[0089] In one embodiment, the behavior database is obtained in the following manner:
[0090] Obtain sample data, where the sample data includes multiple sample detection frame frequencies when terminals of different terminal models perform different terminal behaviors;
[0091] Set the average of the multiple sample detection frame frequencies when terminals of the same terminal model perform the same terminal behavior in the sample data as the detection frame frequency corresponding to the same terminal behavior of the same terminal model, so as to generate the behavior database.
[0092] In one embodiment, the first acquisition module 501 includes:
[0093] An acquisition unit, configured to acquire the International Mobile Equipment Identity Type Allocation Code (IMEI-TAC) and Deep Packet Inspection (DPI) information of the terminals in the target area, where the DPI information includes at least one of uplink and downlink traffic information, used protocol information, and used application information;
[0094] An identification unit, configured to identify the IMEI-TAC of the terminals in the target area to obtain N terminal models in the target area;
[0095] A search unit, configured to search based on at least one of a preset behavior set, the uplink and downlink traffic information, the used protocol information, and the used application information to obtain M terminal behaviors of terminals corresponding to different terminal models in the target area, where the preset behavior set includes at least one of the uplink and downlink traffic information, the used protocol information, and the used application information corresponding to different terminal behaviors.
[0096] In one embodiment, the crowd counting device 500 further includes:
[0097] A third acquisition module, configured to acquire multiple Received Signal Strength Indication (RSSI) information corresponding to each terminal in each target model of the sub-region, the access point (AP) information corresponding to each RSSI information, and the location data of the AP device corresponding to each AP information;
[0098] A fourth acquisition module, configured to obtain the distance between each terminal and each AP device based on the each RSSI information corresponding to each terminal and the AP information corresponding to each RSSI information;
[0099] A calculation module, configured to calculate the target position of each terminal based on the distance between each terminal and each AP device and the position data of each AP device.
[0100] The crowd counting device provided by the embodiments of the present invention can implement each process of the above-mentioned crowd counting method, and the technical features correspond one by one and can achieve the same technical effects. To avoid repetition, details are not described herein again.
[0101] It should be noted that the device in the embodiments of the present invention can be a device, or a component, an integrated circuit, or a chip in an electronic device.
[0102] The embodiments of the present invention further provide an electronic device. Refer to Figure 6 , Figure 6 which is a schematic structural diagram of an electronic device provided by the embodiments of the present invention. The electronic device includes a memory 601, a processor 602, and a program or instruction running on the memory 601. When the program or instruction is executed by the processor 602, it can implement Figure 1 any step in the corresponding method embodiment and achieve the same beneficial effects. Details are not described herein again.
[0103] Among them, the processor 602 can be a CPU, an ASIC, an FPGA, or a GPU.
[0104] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the program can be stored in a readable medium.
[0105] The embodiments of the present invention further provide a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it can implement any step in the above-mentioned Figure 1 corresponding method embodiment and can achieve the same technical effects. To avoid repetition, details are not described herein again. The storage medium can be, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.
[0106] The terms "first", "second", etc. in the embodiments of the present invention are used to distinguish similar objects and do not necessarily describe a specific order or sequence. In addition, the terms "comprising", "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily limit to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices. In addition, the use of "and / or" in this application means at least one of the connected objects. For example, A and / or B and / or C means including seven cases: A alone, B alone, C alone, A and B both present, B and C both present, A and C both present, and A, B and C all present.
[0107] It should be noted that in this document, the term "comprising", "including" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, article or device. Without more limitations, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article or device including that element.
[0108] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions to enable a terminal (which can be a mobile phone, computer, server, air conditioner, or a second terminal device, etc.) to execute the methods of the various embodiments of this application.
[0109] The above describes the embodiments of this application in conjunction with the accompanying drawings, but this application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of this application, those of ordinary skill in the art can also make many forms without departing from the purpose of this application and the scope protected by the claims, and all belong to the protection scope of this application.
Claims
1. A method for crowd counting, characterized in that, Including: Obtain N terminal models of terminals within a target area, as well as at least one terminal behavior corresponding to each terminal of each terminal model, where N is a positive integer greater than or equal to 1, and the terminals within the target area are terminals carried by people in a crowd; Obtain multiple detection frames of terminals within a sub-area of the target area and the detection frame frequencies corresponding to the multiple detection frames; Identify the multiple detection frames to obtain at least one target model corresponding to the terminals within the sub-area, different detection frame frequencies corresponding to each target model in the at least one target model, and the sum of the detection frame frequencies corresponding to the at least one target model being equal to the detection frame frequencies corresponding to the multiple detection frames of the terminals within the sub-area, and the at least one target model being at least one terminal model among the N terminal models; Based on the terminal behavior corresponding to each target model and the detection frame frequency corresponding to each target model, determine the number of terminals of each target model within the sub-area.
2. The population counting method according to claim 1, characterized in that, The determining the number of terminals of each target model within the sub-area based on the terminal behavior corresponding to each target model and the detection frame frequency corresponding to each target model includes: Based on a behavior database, the terminal behavior corresponding to each target model, and the detection frame frequency corresponding to each target model, determine the number of terminals of each target model within the sub-area. The behavior database includes the detection frame frequency corresponding to the terminal behavior of one terminal among M terminal behaviors of multiple terminal models, and at least one terminal behavior corresponding to terminals of different terminal models is one terminal behavior among the M terminal behaviors of the multiple terminal models, where M is a positive integer greater than 1.
3. The population counting method according to claim 2, wherein, The determining the number of terminals of each target model within the sub-area based on a behavior database, the terminal behavior corresponding to each target model, and the detection frame frequency corresponding to each target model includes: When the terminal behavior corresponding to a first model is one terminal behavior, obtain the detection frame frequency of the one terminal behavior corresponding to the first model based on the behavior database, where the first model is one terminal model among the at least one target model; Set the quotient of the detection frame frequency corresponding to the first model and the detection frame frequency of the one terminal behavior corresponding to the first model as the number of terminals of the first model.
4. The crowd counting method according to claim 2, wherein, The determining the number of terminals of each target model within the sub-area based on a behavior database, the terminal behavior corresponding to each target model, and the detection frame frequency corresponding to each target model includes: When the terminal behavior corresponding to a second model is multiple terminal behaviors, obtain the detection frame frequencies of the multiple terminal behaviors corresponding to the second model based on the behavior database, where the second model is one terminal model among the at least one target model; Set the quotient of the detection frame frequency corresponding to the second model and a preset value as the number of terminals of the second model; Wherein, the preset value is the average value of the detection frame frequencies corresponding to the multiple terminal behaviors, or the preset value is the average value of the detection frame frequencies corresponding to the terminal behaviors of each of the K terminals corresponding to the second model in the target area, where K is a positive integer greater than 1.
5. The population counting method according to claim 2, wherein The behavior database is obtained in the following manner: Obtain sample data, where the sample data includes multiple sample detection frame frequencies when terminals of different terminal models perform different terminal behaviors; Set the average value of the multiple sample detection frame frequencies when terminals of the same terminal model perform the same terminal behavior in the sample data as the detection frame frequency corresponding to the same terminal behavior of the same terminal model, so as to generate the behavior database.
6. The crowd counting method according to claim 1, wherein, The obtaining of the N terminal models of the terminals in the target area, and at least one terminal behavior corresponding to each terminal model includes: Obtain the International Mobile Equipment Identity Type Allocation Code (IMEI-TAC) and Deep Packet Inspection (DPI) information of the terminals in the target area, where the DPI information includes at least one of uplink and downlink traffic information, used protocol information, and used application information; Identify the IMEI-TAC of the terminals in the target area to obtain N terminal models in the target area; Based on at least one of a preset behavior set, the uplink and downlink traffic information, the used protocol information, and the used application information, perform a search to obtain M terminal behaviors of terminals corresponding to different terminal models in the target area, where the preset behavior set includes at least one of the uplink and downlink traffic information, the used protocol information, and the used application information corresponding to different terminal behaviors.
7. The crowd counting method according to claim 1, wherein, The method further includes: Obtain multiple Received Signal Strength Indicator (RSSI) information corresponding to each terminal in each target model of the sub-region, and the access point (AP) information corresponding to each RSSI information, as well as the location data of the AP device corresponding to each AP information; Based on each RSSI information corresponding to each terminal and the AP information corresponding to each RSSI information, obtain the distance between each terminal and each AP device; Based on the distance between each terminal and each AP device and the location data of each AP device, calculate the target location of each terminal.
8. A crowd counting device, characterized in that, It includes: A first acquisition module, configured to acquire N terminal models of the terminals in the target area, and at least one terminal behavior corresponding to each terminal model, where N is a positive integer greater than or equal to 1, and the terminals in the target area are terminals carried by people in the crowd; A second acquisition module, configured to acquire multiple detection frames of the terminals in the sub-region of the target area and the detection frame frequencies corresponding to the multiple detection frames; An identification module, configured to identify the multiple detection frames to obtain at least one target model corresponding to the terminals in the sub-region, different detection frame frequencies corresponding to each target model in the at least one target model, and the sum of the detection frame frequencies corresponding to the detection frames of the terminals in the sub-region being equal to the detection frame frequencies corresponding to the multiple detection frames of the terminals in the sub-region, and the at least one target model being at least one of the N terminal models; A processing module, configured to determine the number of terminals of each target model in the sub-region based on the terminal behavior corresponding to each target model and the detection frame frequency corresponding to each target model.
9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored on the memory and executable on the processor, and when the computer program is executed by the processor, it implements the steps in the crowd counting method according to any one of claims 1 to 7.
10. A readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps in the crowd counting method according to any one of claims 1 to 7.