A method, device and related equipment for determining crowd density

Through data processing based on image acquisition equipment, predicting and calculating population density, the problem of poor accuracy of population density estimation is solved, and high accuracy monitoring effect is achieved under low-cost equipment deployment.

CN118658118BActive Publication Date: 2024-12-03北京数原数字化城市研究中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410815360.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-12-03
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

In the prior art, the accuracy of the population density estimation results is poor, and the camera deployment cost is high, making it difficult to apply to general monitoring scenarios, especially in areas with enhanced privacy protection awareness, resulting in inaccurate population density estimation results.

Method used

By determining the population density of N first sub-regions in the target area based on the monitoring data acquired by N image acquisition devices, the population density of N first sub-regions in the target area is predicted, and the population flow information of M second sub-regions is calculated, and the population density of the entire target area is then achieved. Data blinding in uncovered areas will be improved to improve the accuracy of population density estimation results.

Benefits of technology

When the deployment location and number of image acquisition equipment are limited, the accuracy of population density estimation results is improved through data processing, which is suitable for general monitoring scenarios, reduce device deployment costs, and improve monitoring coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658118B_ABST
    Figure CN118658118B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and related equipment for determining crowd density, and relates to the field of data processing technology. The method comprises: determining the crowd density of N first sub-areas in a target area based on monitoring data acquired by N image acquisition devices, and predicting the crowd flow information of M second sub-areas in the target area, wherein the N image acquisition devices are image acquisition devices deployed in the N first sub-areas, and the target area includes N first sub-areas and M second sub-areas; calculating the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the crowd flow information of the M second sub-areas; determining the crowd density of the target area according to the crowd density of the N first sub-areas and the crowd density of the M second sub-areas. In the case where the position and number of the image acquisition devices deployed in the target area are limited, the accuracy of the crowd density estimation result of the target area can also be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for determining crowd density and related equipment. Background Art

[0002] With the development of urbanization, people are paying more and more attention to the distribution of people in real space. As an important technical means, crowd density estimation plays a key role in improving the quality of public services, ensuring safety and optimizing resource allocation.

[0003] At present, the determination of crowd density is usually based on visual monitoring technology, which requires deploying cameras in each sub-area of ​​the target area to collect information about the flow of people in the monitoring coverage area, so as to determine the crowd density of the target area. However, to achieve full monitoring coverage, it is often necessary to deploy a large number of cameras, which is costly and difficult to apply to general monitoring scenarios; and as people's awareness of privacy protection increases, it is not suitable to deploy cameras in some specific areas, resulting in poor accuracy of crowd density estimation results. Summary of the invention

[0004] The embodiments of the present invention provide a method, an apparatus and related equipment for determining crowd density to solve the problem of poor accuracy of crowd density estimation results in the prior art.

[0005] In a first aspect, an embodiment of the present invention provides a method for determining crowd density, the method comprising:

[0006] Determine the crowd density of N first sub-areas in the target area based on monitoring data acquired by N image acquisition devices, where the N image acquisition devices are image acquisition devices deployed in the N first sub-areas, and N is an integer greater than or equal to 1;

[0007] Based on the monitoring data acquired by the N image acquisition devices, predict the crowd flow information of the M second sub-areas in the target area, the target area includes the N first sub-areas and the M second sub-areas, and M is an integer greater than N;

[0008] Calculating the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the crowd flow information of the M second sub-areas;

[0009] The crowd density of the target area is determined according to the crowd densities of the N first sub-areas and the crowd densities of the M second sub-areas.

[0010] In a second aspect, an embodiment of the present invention provides a device for determining crowd density, the device comprising:

[0011] A first determination module, configured to determine the crowd density of N first sub-areas in the target area based on monitoring data acquired by N image acquisition devices, wherein the N image acquisition devices are image acquisition devices deployed in the N first sub-areas, and N is an integer greater than or equal to 1;

[0012] A prediction module, configured to predict crowd flow information in M ​​second sub-areas in the target area based on the monitoring data acquired by the N image acquisition devices, wherein the target area includes the N first sub-areas and the M second sub-areas, and M is an integer greater than N;

[0013] A calculation module, configured to calculate the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the crowd flow information of the M second sub-areas;

[0014] The second determination module is used to determine the crowd density of the target area according to the crowd densities of the N first sub-areas and the crowd densities of the M second sub-areas.

[0015] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method according to the first aspect.

[0019] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the steps of the method described in the first aspect.

[0020] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0021] In the embodiment of the present invention, based on the monitoring data acquired by N image acquisition devices, the crowd density of N first sub-areas in the target area is determined and the crowd flow information of M second sub-areas is predicted, so that the crowd flow topological relationship of the entire target area can be determined; then, the crowd density of M second sub-areas is estimated based on the crowd density of N first sub-areas in the topological relationship, thereby achieving blind spot filling of the crowd density of the second sub-areas. In this way, when the location and number of image acquisition devices deployed in the target area are limited, the accuracy of the crowd density estimation result of the target area can also be improved by processing the data of the monitoring coverage area to fill in the data of the monitoring uncovered area. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0023] Figure 1 This is one of the flow charts of a method for determining crowd density provided by an embodiment of the present invention;

[0024] Figure 2 is a schematic diagram of grid division of a target area provided by an embodiment of the present invention;

[0025] Figure 3 This is one of the density coefficient distribution diagrams of the target area provided by the embodiment of the present invention;

[0026] Figure 4 This is the second schematic diagram of density coefficient distribution of the target area provided by the embodiment of the present invention;

[0027] Figure 5 This is the third schematic diagram of density coefficient distribution of the target area provided by the embodiment of the present invention;

[0028] Figure 6 This is the second flow chart of a method for determining crowd density provided by an embodiment of the present invention;

[0029] Figure 7 It is a structural schematic diagram of a crowd density determination device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] See also Figure 1 , Figure 1 is one of the flow charts of a method for determining crowd density provided by an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0032] Step 101: Determine the crowd density of N first sub-areas in a target area based on monitoring data acquired by N image acquisition devices, where the N image acquisition devices are image acquisition devices deployed in the N first sub-areas, and N is an integer greater than or equal to 1;

[0033] The target area can be shopping malls, parks, squares, stations and other areas where there is a need for crowd distribution analysis. The crowd density estimation results of the target area can be applied in security monitoring, traffic management, marketing and other fields. The image acquisition device can be a camera, camcorder, mobile phone and other devices with image acquisition function. The image acquisition device deployed in the target area can monitor the flow of people and help coordinate evacuation and rescue work when an emergency occurs (such as natural disasters, fires, etc.), thereby improving public safety.

[0034] In one example, considering that the monitoring range of the image acquisition device is difficult to cover the entire target area, it is costly to set up an image acquisition device (such as a camera) in each sub-area of ​​the target area; and not every sub-area is suitable for deploying a camera. Therefore, in this example, N image acquisition devices can be deployed in N pre-selected first sub-areas in the target area, and one image acquisition device is deployed in each first sub-area. Among them, the first sub-area can be a crowd intersection area such as an exit area, an entrance area, a fork area, a central area, etc. in the target area; or, the first sub-area can also be a sub-area for deploying image acquisition devices set at a certain distance in the target area. The deployment of image acquisition devices is reduced, which is suitable for general monitoring scenarios. In the case where the location and number of image acquisition devices deployed in the target area are limited, the accuracy of the crowd density estimation results of the target area can also be improved by processing the data of the monitoring coverage area to fill in the data of the uncovered area of ​​the monitoring.

[0035] Wherein, each image acquisition device may be provided with a crowd density sensing sensor, so as to determine the crowd density of the first sub-area corresponding to each image acquisition device.

[0036] Step 102: predicting crowd flow information of M second sub-areas in the target area based on the monitoring data acquired by the N image acquisition devices, where the target area includes the N first sub-areas and the M second sub-areas, and M is an integer greater than N;

[0037] In one example, N image acquisition devices are image acquisition devices deployed in N first sub-areas, that is, the crowd flow information of the uncovered area (i.e., the second sub-area) in the target area can be predicted based on the monitoring data of the monitored covered area in the target area, thereby filling the gap of the crowd density in the second sub-area. Among them, the monitoring data acquired by the N image acquisition devices may include the number of pedestrians and the movement trajectory of pedestrians, and the crowd density in the monitored area can be determined based on the number of pedestrians; the probability of pedestrians moving from the first sub-area to each second sub-area and the probability of moving between each second sub-area can be predicted based on the movement trajectory of pedestrians, thereby obtaining the crowd flow information of M second sub-areas in the target area.

[0038] For example, the crowd flow direction of the second sub-area can be topologically analyzed based on the monitored crowd flow direction between the first sub-area and the second sub-area adjacent to it, and the crowd flow topological relationship can be abstracted into the form of a graph, which is conducive to mathematical operations involving crowd flow prediction and blind spot filling.

[0039] Step 103: Calculate the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the crowd flow information of the M second sub-areas;

[0040] In one example, the crowd density of N first sub-areas is first determined through the above step 101; and the crowd flow information of M second sub-areas is determined based on the crowd flow direction of the N first sub-areas through the above step 102, so that the crowd flow topological relationship of the entire target area can be determined; then, the crowd density of other areas associated with them (i.e., M second sub-areas) is estimated based on the crowd density of the N first sub-areas in the topological relationship, thereby achieving blind spot filling.

[0041] Step 104: Determine the crowd density of the target area according to the crowd densities of the N first sub-areas and the crowd densities of the M second sub-areas.

[0042] In one example, the crowd density of the entire target area can be obtained based on the crowd density of N first sub-areas and the crowd density of M second sub-areas. When the location and number of image acquisition devices deployed in the target area are limited, the accuracy of the crowd density estimation results of the target area can also be improved.

[0043] In the embodiment of the present invention, based on the monitoring data acquired by N image acquisition devices, the crowd density of N first sub-areas in the target area is determined and the crowd flow information of M second sub-areas is predicted, so that the crowd flow topological relationship of the entire target area can be determined; then, the crowd density of M second sub-areas is estimated based on the crowd density of N first sub-areas in the topological relationship, thereby achieving blind spot filling of the crowd density of the second sub-areas. In this way, when the location and number of image acquisition devices deployed in the target area are limited, the accuracy of the crowd density estimation result of the target area can also be improved by processing the data of the monitoring coverage area to fill in the data of the monitoring uncovered area.

[0044] Optionally, before determining the crowd density of N first sub-areas in the target area based on the monitoring data acquired by N image acquisition devices, the method further includes:

[0045] Determine Q sub-regions of the target region with matching sizes, the Q sub-regions including the N first sub-regions and the M second sub-regions;

[0046] The method of determining the crowd density of N first sub-areas in the target area based on the monitoring data acquired by N image acquisition devices includes:

[0047] Performing crowd quantity analysis on monitoring data acquired by N image acquisition devices to determine the crowd density in the monitoring area of ​​each of the N image acquisition devices;

[0048] The crowd density of the target monitoring area is determined as the crowd density of the target first sub-area, the target monitoring area is any monitoring area of ​​the N monitoring areas of the N image acquisition devices, and the target first sub-area is the first sub-area among the Q sub-areas that meets a preset condition, and the preset condition is that the distance between the center of the target first sub-area and the center of the target monitoring area is less than 1 / 2 of the side length of the target first sub-area, or, the overlapping area of ​​the target first sub-area and the target monitoring area is larger than the overlapping area of ​​other sub-areas and the target monitoring area.

[0049] In this embodiment, before determining the crowd density of the N first sub-areas in the target area, first determine Q sub-areas of the target area with matching sizes, such as Figure 2As shown, the middle non-walkable sub-areas (i.e., S32, S33, S34, S35, S42, S43, S44, S45, S52, S53, S54, S55, S62, S63, S64, S65, S72, S73, S74, S75) are removed, and the remaining sub-areas are N first sub-areas and M second sub-areas. Each sub-area can be divided into square grids of the same size, and the side length of the grid is less than or equal to 10 meters, that is, each grid corresponds to a sub-area of ​​less than or equal to 100 square meters in the target area.

[0050] A crowd density determination method provided in an embodiment of the present invention can be applied to a blind spot crowd density filling system (hereinafter referred to as a blind spot filling system) based on regional crowd flow topology. The blind spot filling system may include a crowd density monitoring module. In one example, the crowd density monitoring module may perform crowd quantity analysis on the monitoring data obtained by N image acquisition devices to determine the crowd density in the monitoring area of ​​each of the N image acquisition devices. Specifically, Figure 2 Take an image acquisition device G1 as an example, that is, the target monitoring area is the monitoring range coverage area of ​​the image acquisition device G1, and an exemplary description is given, see the following statement:

[0051] The crowd density monitoring module obtains the monitoring data of the image acquisition device G1, including: the area a of the monitoring area of ​​the image acquisition device G1, and the number of pedestrians c within the area a of the monitoring area. The crowd density of the monitoring area of ​​the image acquisition device G1 can be calculated as c / a. Similarly, other image acquisition devices among the N image acquisition devices can also obtain the number of pedestrians in the corresponding monitoring area based on the image information obtained in the corresponding monitoring area, and then obtain the number of pedestrians in the corresponding monitoring area through the visual crowd recognition algorithm, and then divide the number of pedestrians by the area of ​​the corresponding monitoring area to obtain the crowd density of the monitoring area of ​​each image acquisition device.

[0052] When the target monitoring area of ​​an image acquisition device among N image acquisition devices happens to be located in a target sub-area of ​​the target area, the crowd density of the target monitoring area can be determined as the crowd density of the target sub-area, and the target sub-area can be defined as the first sub-area.

[0053] However, more often than not, the monitoring area of ​​the image acquisition device does not necessarily completely overlap with a certain sub-area. For example, the monitoring area of ​​the image acquisition device G1 covers both S21 and S31. Based on this, in one example, since the overlapping area of ​​S21 and the monitoring area of ​​the image acquisition device G1 is greater than the overlapping area of ​​S31 and the monitoring area of ​​the image acquisition device G1, the crowd density of the monitoring area of ​​the image acquisition device G1 can be determined as the crowd density of S21, and S21 can be defined as the first sub-area, or the central grid.

[0054] In another example, each sub-area (i.e., each grid) can be traversed in turn to determine the distance between the center of each sub-area and the center of the monitoring area of ​​the image acquisition device G1. If the distance between the center of S21 and the center of the monitoring area of ​​the image acquisition device G1 is less than 1 / 2 of the side length of S21, the crowd density of the monitoring area of ​​the image acquisition device G1 can be determined as the crowd density of S21, and S21 can be defined as the first sub-area, or the central grid.

[0055] Similarly, the crowd density of the target monitoring area is determined as the crowd density of the target first sub-area, the target monitoring area is any monitoring area of ​​the N monitoring areas of the N image acquisition devices, and the target first sub-area is the first sub-area among the Q sub-areas that meets the preset condition, and the preset condition is that the distance between the center of the target first sub-area and the center of the target monitoring area is less than 1 / 2 of the side length of the target first sub-area, or the overlapping area of ​​the target first sub-area and the target monitoring area is greater than the overlapping area of ​​other sub-areas and the target monitoring area. The crowd density of the N first sub-areas in the target area can be obtained.

[0056] Optionally, predicting crowd flow information of M second sub-areas in the target area based on the monitoring data acquired by the N image acquisition devices includes:

[0057] Performing crowd flow analysis on the monitoring data acquired by the N image acquisition devices to determine a crowd flow prediction result between any two second sub-areas in the M second sub-areas;

[0058] The crowd flow information is predicted according to the crowd flow prediction result.

[0059] The blind spot filling system may further include a region identification module. The region identification module first performs crowd flow analysis on the monitoring data acquired by the N image acquisition devices, determines the crowd flow prediction result between any two second sub-regions in the M second sub-regions, and then determines whether the crowd flow prediction result of each region is a random crowd flow region, and finally predicts the crowd flow information according to the crowd flow prediction result.

[0060] In some optional embodiments, the crowd flow information may be represented as the following adjacency matrix:

[0061]

[0062]

[0063] Where A is the adjacency matrix, M is the number of second sub-regions, a ijis the crowd flow prediction result, which is used to characterize whether the crowd in the i-th second sub-area among the M second sub-areas flows to the j-th second sub-area, where i and j are both positive integers less than or equal to M.

[0064] In this example, the region recognition module can be used to determine Q sub-regions of the target region with matching sizes; then, crowd flow analysis is performed on the monitoring data obtained by the N image acquisition devices to determine the crowd flow prediction result a between any two second sub-regions in the M second sub-regions. ij ; Then according to the crowd flow prediction result a ij Predict the crowd flow information, that is, according to the crowd flow prediction result a ij Generate an adjacency matrix A. The adjacency matrix A and the attribute information V of each region (which may include name and location information) may be stored in a configuration file or a database in the form of a graph structure, denoted as G(V,A).

[0065] In this way, according to the crowd flow direction of the monitored first sub-area and its adjacent second sub-area, the crowd flow direction of the second sub-area is topologically analyzed, and the crowd flow topological relationship is abstracted into a graph form, namely G(V,A), which is conducive to mathematical operations involving crowd flow prediction and blind spot filling. When the location and number of image acquisition devices deployed in the target area are limited, the accuracy of the crowd density estimation results in the target area can also be improved by processing the data of the monitored coverage area to fill in the data of the uncovered area.

[0066] Optionally, calculating the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the crowd flow information of the M second sub-areas includes:

[0067] Diffusion is performed from each of the N first sub-regions as a center to the M second sub-regions to obtain N sets of density coefficients, each set of density coefficients includes a density coefficient of each of the M second sub-regions obtained by diffusion from a first sub-region as a center to the M second sub-regions;

[0068] The crowd densities of the M second sub-areas are calculated according to the crowd densities of the N first sub-areas and the N sets of density coefficients.

[0069] The blind spot filling system may further include a blind spot filling module. The blind spot filling module estimates the crowd density of the blind spot (ie, the M second sub-areas) by combining the crowd density of the N first sub-areas and the crowd flow information of the M second sub-areas, and writes the final result into a database.

[0070] In this embodiment, Q sub-regions of matching sizes of the target area are determined, and the Q sub-regions include the N first sub-regions and the M second sub-regions; after determining the crowd density of the monitoring area of ​​the N image acquisition devices, the N first sub-regions are assigned so that the crowd density of the grids corresponding to the N first sub-regions is not 0, and the crowd density of other grids is set to 0. After obtaining the initialization crowd density of each grid, the grid with a crowd density not equal to 0 is used as the central grid, and then the relationship between each grid and the adjacent grid is obtained according to the crowd flow information, that is, the adjacency matrix A, and the crowd density of its adjacent grid is calculated, and then the crowd density of the surrounding grids is obtained by continuing to diffuse outward on the basis of the adjacent grid until the newly calculated grid crowd density coefficient is less than 0.1. In this way, each of the N first sub-regions is diffused to the M second sub-regions as the center, and N sets of density coefficients are calculated. Then, according to the crowd density of the N first sub-regions and the N sets of density coefficients, the crowd density of the M second sub-regions can be calculated.

[0071] Furthermore, considering the time and grid distance issues, a timer with a time interval of T can be set during the calculation to trigger the blind spot calculation regularly.

[0072] by Figure 2 Taking the image acquisition device G1 as an example, the process of calculating the crowd density in the blind area is explained. Figure 2 The arrow in the middle indicates the flow direction of the crowd in the grid. In the first T seconds, the average flow speed is set to 1.5 m / s. The calculation starts from the second sub-area around the first central grid (i.e. S21). The crowd density calculation of each second sub-area needs to be calculated through the S21 crowd density D / 1.5 (D is the distance from the adjacent second sub-area to the current first sub-area) seconds ago and the S21 crowd density coefficient, such as Figure 6 As shown, the specific steps are as follows:

[0073] First, determine the distance from each grid to the center of the monitoring area. Each sub-area (i.e., each grid) can be traversed in turn to determine the distance between the center of each sub-area and the center of the monitoring area of ​​the image acquisition device G1. If the distance is less than 1 / 2 of the grid side length, the crowd density of the grid is set to the crowd density of the corresponding monitoring area. This type of grid is recorded as the central grid. Exemplarily, based on the distance from the center of S21 to the center of the monitoring area of ​​the image acquisition device G1 is less than 1 / 2 of the side length of S21, the crowd density of the monitoring area of ​​the image acquisition device G1 can be determined as the crowd density of S21, and S21 can be defined as the first sub-area, or the central grid. If the distance is greater than or equal to 1 / 2 of the grid side length, the crowd density of the grid is set to 0.

[0074] After all grids are initialized, that is, N first sub-areas and M second sub-areas are determined in the target area, the crowd density of the N first sub-areas is set as the crowd density of the monitoring area of ​​the N image acquisition devices, and the crowd density of the M second sub-areas is set to 0, the crowd density coefficient of the grids adjacent to the central grid is calculated. The calculation of the crowd density coefficient of the grids adjacent to the central grid can be referred to the following expression:

[0075] Optionally, the M second sub-regions are diffused to include m 1 First-level sub-regions and m 2 Second-level sub-regions, m 1 With m 2 The sum is less than or equal to M, m 1 With m 2 are all positive integers, the first-level sub-region is the second sub-region directly adjacent to the first sub-region, and the second-level sub-region is the second sub-region adjacent to the first sub-region through the first-level sub-region;

[0076] The step of respectively diffusing from each of the N first sub-regions as a center to the M second sub-regions to obtain N sets of density coefficients by calculation includes:

[0077] Taking the kth first sub-region among the N first sub-regions as the center, 1 The first-level sub-regions are diffused, and the center of the k-th first sub-region is divided into the m 1 The distance between the boundaries of each first-level sub-region in the first-level sub-regions determines the m 1 The density coefficient of each first-level sub-region in the first-level sub-regions, k is a positive integer less than or equal to N;

[0078] According to the m 1 The density coefficients of two adjacent first-level sub-regions in the m first-level sub-regions and the distances between the two adjacent first-level sub-regions and the target second-level sub-region are used to determine the density coefficient of the target second-level sub-region. The target second-level sub-region is the m 2 A second-level sub-region among the second-level sub-regions associated with the two adjacent first-level sub-regions.

[0079] In this example, Figure 3 Taking the image acquisition device G1 as an example, the kth first sub-area among the N first sub-areas may be S21. 1 First-level sub-region diffusion, m 1 The first-level sub-regions may include S11, S12, S22, S32 and S31. 1 The distance between the boundaries of each first-level sub-region in the first-level sub-region is determined by m1 The density coefficient of each first-level sub-region in the first-level sub-region can be expressed as follows:

[0080]

[0081] Among them, coef i is the density coefficient of the kth first sub-region to the Sij grid, dis is the distance between the center of the ith first-level sub-region and the center of the kth first sub-region, and L is the grid side length. In this way, the density coefficient of S11 is 0.6, the density coefficient of S12 is 0.4, the density coefficient of S22 is 0.6, the density coefficient of S32 is 0.4, and the density coefficient of S31 is 0. In this way, m can be determined 1 The density coefficient of each first-level sub-region in the first-level sub-regions.

[0082] Get the m directly adjacent to S21 1 After calculating the population density coefficient of each first-level sub-area, we can calculate the population density coefficient of each first-level sub-area from m 2 In other words, it continues to diffuse outward with each adjacent grid as the center to calculate the density coefficients of other grids.

[0083] Furthermore, considering that the flow of people in a secondary sub-area may come from multiple primary sub-areas, we can 1 The density coefficients of two adjacent first-level sub-regions in the first-level sub-regions and the distances between the two adjacent first-level sub-regions and the target second-level sub-region are used to determine the density coefficient of the target second-level sub-region, thereby determining m 2 The density coefficient of each secondary sub-region in the secondary sub-regions. For example, Figure 3 The flow of people in S13 can come from S12 and S22, so the density coefficient of S13 is coef s 13 It can be the weighted average of the population density coefficients of S12 and S22. 13 =(coef s 12 *0.6+coef s 22 *0.4) / 2, the weights of S12 and S22 are based on coef i The calculation ends when the crowd density coefficients coef sij in all newly calculated sub-areas (i.e., grids) are less than 0.2. In this way, m 2 The density coefficient of each secondary sub-region in the secondary sub-regions.

[0084] Similarly, Figure 4 Taking the image acquisition device G2 as an example, the kth first sub-area among the N first sub-areas may be S24. 1The density coefficients of each first-level sub-region are obtained by diffusing the first-level sub-regions. Then, the density coefficients of each first-level sub-region are obtained. 2 The second-level sub-regions diffuse and obtain the density coefficient of each second-level sub-region, such as Figure 4 shown.

[0085] Similarly, Figure 5 Taking the image acquisition device G3 as an example, the kth first sub-area among the N first sub-areas may be S81. 1 The density coefficients of each first-level sub-region are obtained by diffusing the first-level sub-regions. Then, the density coefficients of each first-level sub-region are obtained. 2 The second-level sub-regions diffuse and obtain the density coefficient of each second-level sub-region, such as Figure 5 shown.

[0086] Similarly, the diffusion among the N first sub-regions with other first sub-regions as the center can also be carried out in the same manner, which will not be described in detail here.

[0087] In this way, each of the N first sub-regions is diffused to the M second sub-regions, and N groups of density coefficient sets are calculated. Each group of density coefficient sets includes a first sub-region as the center and m second sub-regions as the center. 1 The density coefficients of each first-level sub-region are obtained by diffusion, and the density coefficients of each first-level sub-region are obtained by diffusion. 2 The density coefficients of the second-level sub-areas are obtained by diffusion. Further, according to the population density of the N first sub-areas and the N sets of density coefficients, the population density of the M second sub-areas is calculated. For details, please refer to the following expression:

[0088] Optionally, calculating the crowd densities of the M second sub-areas according to the crowd densities of the N first sub-areas and the N sets of density coefficients includes:

[0089] Calculate the product of the crowd density of the kth first sub-region among the N first sub-regions and the density coefficient of the target second sub-region to obtain N product values, where the density coefficient of the target second sub-region is the density coefficient obtained by diffusing the N groups of density coefficients from the kth first sub-region as the center to the target second sub-region, and k is a positive integer less than or equal to N;

[0090] The quotient of the sum of the N product values ​​and the sum of the N density coefficients corresponding to the target second sub-area in the N groups of density coefficients is calculated to obtain the crowd density of the target second sub-area.

[0091] In this example, after the above steps, each grid will obtain the crowd density coefficient diffused from the central grid, and then perform weighted average to obtain the final crowd density of each grid, comprehensively considering the impact of the flow of people in each central grid and improving the accuracy of the prediction results. Calculate the crowd density of M second sub-areas The crowd density of each second sub-area can be referred to the following formula:

[0092]

[0093] Where N is the number of the first sub-region (i.e., the central grid), coef i is the density coefficient of the kth first sub-region to the Sij grid, density i is the crowd density of the kth first sub-area D / 1.5 seconds ago. is the sum of N product values, It is the sum of the density coefficients of the kth first sub-region to the Sij grid in the N groups of density coefficient sets. The Sij grid may be the target second sub-region.

[0094] In this way, after all the central grids are calculated, the crowd density of each grid is obtained. In this embodiment, the entire target area is first divided into a number of grids of the same size, and then the crowd flow direction between each grid and its adjacent grids is obtained based on observations, and then the topological relationship is stored in the form of a graph structure, which is conducive to mathematical operations involving crowd flow prediction and blind spot filling. Image acquisition equipment can be deployed only at key locations in the target area, and blind spot filling technology can be used to fill in the crowd density in other areas that are not covered by monitoring, thereby expanding the crowd flow monitoring area of ​​the entire system. When the location and number of image acquisition equipment deployed in the target area are limited, the accuracy of the crowd density estimation results of the target area can also be improved.

[0095] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a crowd density determination device provided by an embodiment of the present invention. Figure 7 As shown, the crowd density determination device 700 includes:

[0096] A first determination module 701 is used to determine the crowd density of N first sub-areas in the target area based on monitoring data acquired by N image acquisition devices, where the N image acquisition devices are image acquisition devices deployed in the N first sub-areas, and N is an integer greater than or equal to 1;

[0097] A prediction module 702, configured to predict crowd flow information in M ​​second sub-areas in the target area based on the monitoring data acquired by the N image acquisition devices, wherein the target area includes the N first sub-areas and the M second sub-areas, and M is an integer greater than N;

[0098] A calculation module 703, configured to calculate the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the crowd flow information of the M second sub-areas;

[0099] The second determination module 704 is used to determine the crowd density of the target area according to the crowd densities of the N first sub-areas and the crowd densities of the M second sub-areas.

[0100] Optionally, the device further comprises:

[0101] A third determination module is used to determine Q sub-regions of the target region with matching sizes, where the Q sub-regions include the N first sub-regions and the M second sub-regions;

[0102] The first determining module comprises:

[0103] A first determination submodule is used to perform crowd quantity analysis on the monitoring data acquired by the N image acquisition devices to determine the crowd density in the monitoring area of ​​each of the N image acquisition devices;

[0104] The second determination submodule is used to determine the crowd density of the target monitoring area as the crowd density of the target first sub-area, wherein the target monitoring area is any monitoring area of ​​the N monitoring areas of the N image acquisition devices, and the target first sub-area is the first sub-area among the Q sub-areas that meets a preset condition, and the preset condition is that the distance between the center of the target first sub-area and the center of the target monitoring area is less than 1 / 2 of the side length of the target first sub-area, or, the overlapping area of ​​the target first sub-area and the target monitoring area is larger than the overlapping area of ​​other sub-areas and the target monitoring area.

[0105] Optionally, the prediction module includes:

[0106] An analysis submodule, configured to perform crowd flow analysis on the monitoring data acquired by the N image acquisition devices, and determine a crowd flow prediction result between any two second sub-areas in the M second sub-areas;

[0107] A prediction submodule is used to predict the crowd flow information according to the crowd flow prediction result.

[0108] Optionally, the crowd flow information is represented as the following adjacency matrix:

[0109]

[0110] Where A is the adjacency matrix, M is the number of second sub-regions, a ijis the crowd flow prediction result, which is used to characterize whether the crowd in the i-th second sub-area among the M second sub-areas flows to the j-th second sub-area, where i and j are both positive integers less than or equal to M.

[0111] Optionally, the calculation module includes:

[0112] A first calculation submodule is used for respectively diffusing from each of the N first subregions to the M second subregions, and calculating to obtain N groups of density coefficient sets, each group of density coefficient sets including a density coefficient of each of the M second subregions obtained by diffusing from one first subregion to the M second subregions;

[0113] The second calculation submodule is used to calculate the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the N sets of density coefficients.

[0114] Optionally, the second calculation submodule includes:

[0115] A first calculation unit is used to calculate the product of the crowd density of the kth first sub-region of the N first sub-regions and the density coefficient of the target second sub-region to obtain N product values, where the density coefficient of the target second sub-region is the density coefficient obtained by diffusing the N groups of density coefficients from the kth first sub-region as the center to the target second sub-region, and k is a positive integer less than or equal to N;

[0116] The second calculation unit is used to calculate the quotient of the sum of the N product values ​​and the sum of the N density coefficients corresponding to the target second sub-area in the N groups of density coefficients to obtain the crowd density of the target second sub-area.

[0117] Optionally, the M second sub-regions are diffused to include m 1 First-level sub-regions and m 2 Second-level sub-regions, m 1 With m 2 The sum is less than or equal to M, m 1 With m 2 are all positive integers, the first-level sub-region is the second sub-region directly adjacent to the first sub-region, and the second-level sub-region is the second sub-region adjacent to the first sub-region through the first-level sub-region;

[0118] The first calculation submodule includes:

[0119] The first determining unit is configured to determine the number of first sub-regions in the N first sub-regions from the kth first sub-region as the center to the m 1 The first-level sub-regions are diffused, and the center of the k-th first sub-region is divided into the m 1The distance between the boundaries of each first-level sub-region in the first-level sub-regions determines the m 1 The density coefficient of each first-level sub-region in the first-level sub-regions, k is a positive integer less than or equal to N;

[0120] The second determining unit is used to determine the 1 The density coefficients of two adjacent first-level sub-regions in the m first-level sub-regions and the distances between the two adjacent first-level sub-regions and the target second-level sub-region are used to determine the density coefficient of the target second-level sub-region. The target second-level sub-region is the m 2 A second-level sub-region among the second-level sub-regions associated with the two adjacent first-level sub-regions.

[0121] The crowd density determination device 700 is capable of implementing each process of each embodiment of the above-mentioned crowd density determination method, and the technical features correspond one to one and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0122] An embodiment of the present invention further provides an electronic device, including:

[0123] at least one processor; and

[0124] a memory communicatively connected to the at least one processor; wherein,

[0125] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the various processes of the above-mentioned crowd density determination method embodiment and achieve the same technical effect. To avoid repetition, they are not repeated here.

[0126] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above crowd density determination method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0127] The embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, each process of the above-mentioned crowd density determination method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0128] 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 a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present invention 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.

[0129] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0130] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A method for determining crowd density, characterized in that: The method comprises: Determine the crowd density of N first sub-areas in the target area based on monitoring data acquired by N image acquisition devices, where the N image acquisition devices are image acquisition devices deployed in the N first sub-areas, and N is an integer greater than or equal to 1; Based on the monitoring data acquired by the N image acquisition devices, predict the crowd flow information of the M second sub-areas in the target area, the target area includes the N first sub-areas and the M second sub-areas, and M is an integer greater than N; Calculating the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the crowd flow information of the M second sub-areas; Determining the crowd density of the target area according to the crowd densities of the N first sub-areas and the crowd densities of the M second sub-areas; The method of predicting crowd flow information of the M second sub-areas in the target area based on the monitoring data acquired by the N image acquisition devices includes: Performing crowd flow analysis on the monitoring data acquired by the N image acquisition devices to determine a crowd flow prediction result between any two second sub-areas in the M second sub-areas; Predicting the crowd flow information according to the crowd flow prediction result; The crowd flow information is represented by the following adjacency matrix: ; ; Wherein, A is the adjacency matrix, M is the number of second sub-regions, and is the crowd flow prediction result, which is used to characterize the first i Whether the people in the second sub-area flow to the j The second sub-region, i and j are all positive integers less than or equal to M; The calculating of the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the crowd flow information of the M second sub-areas includes: Diffusion is performed from each of the N first sub-regions as a center to the M second sub-regions to obtain N sets of density coefficients, each set of density coefficients includes a density coefficient of each of the M second sub-regions obtained by diffusion from a first sub-region as a center to the M second sub-regions; The crowd densities of the M second sub-areas are calculated according to the crowd densities of the N first sub-areas and the N sets of density coefficients.

2. The method according to claim 1, characterized in that Before determining the crowd density in the N first sub-areas in the target area based on the monitoring data acquired by the N image acquisition devices, the method further includes: Determine Q sub-regions of the target region whose sizes match, where the Q sub-regions of the target region include the N first sub-regions and the M second sub-regions; The method of determining the crowd density of N first sub-areas in the target area based on the monitoring data acquired by N image acquisition devices includes: Performing crowd quantity analysis on monitoring data acquired by N image acquisition devices to determine the crowd density in the monitoring area of ​​each of the N image acquisition devices; The crowd density of the target monitoring area is determined as the crowd density of the target first sub-area, the target monitoring area is any monitoring area of ​​the N monitoring areas of the N image acquisition devices, and the target first sub-area is the first sub-area among the Q size-matched sub-areas that meets a preset condition, and the preset condition is that the distance between the center of the target first sub-area and the center of the target monitoring area is less than 1 / 2 of the side length of the target first sub-area, or, the overlapping area of ​​the target first sub-area and the target monitoring area is larger than the overlapping area of ​​other sub-areas and the target monitoring area.

3. The method according to claim 1, characterized in that The calculating the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the N sets of density coefficients includes: Calculate the first k The product of the population density of the first sub-area and the density coefficient of the target second sub-area is obtained by multiplying N product values, wherein the density coefficient of the target second sub-area is the product of the population density of the first sub-area and the density coefficient of the target second sub-area. k The density coefficient obtained by diffusing from the first sub-region as the center to the target second sub-region, k is a positive integer less than or equal to N; The quotient of the sum of the N product values ​​and the sum of the N density coefficients corresponding to the target second sub-area in the N groups of density coefficients is calculated to obtain the crowd density of the target second sub-area.

4. The method according to claim 1, characterized in that: The M second sub-regions diffusely include m1 primary sub-regions and m2 secondary sub-regions, the sum of m1 and m2 is less than or equal to M, m1 and m2 are both positive integers, the primary sub-region is the second sub-region directly adjacent to the first sub-region, and the secondary sub-region is the second sub-region adjacent to the first sub-region through the primary sub-region; The step of respectively diffusing from each of the N first sub-regions as a center to the M second sub-regions to obtain N sets of density coefficients by calculation includes: The first N sub-areas k The first sub-region is the center and diffuses to the m1 first-level sub-regions. k The density coefficient of each of the m1 first-level sub-regions is determined by calculating the distance between the center of the first sub-region and the boundary of each of the m1 first-level sub-regions. k is a positive integer less than or equal to N; The density coefficient of the target secondary sub-region is determined based on the density coefficients of two adjacent first-level sub-regions among the m1 first-level sub-regions and the distances between the two adjacent first-level sub-regions and the target second-level sub-region. The target second-level sub-region is the second-level sub-region associated with the two adjacent first-level sub-regions among the m2 second-level sub-regions.

5. A crowd density determination device, characterized in that: The device comprises: A first determination module, configured to determine the crowd density of N first sub-areas in the target area based on monitoring data acquired by N image acquisition devices, wherein the N image acquisition devices are image acquisition devices deployed in the N first sub-areas, and N is an integer greater than or equal to 1; A prediction module, configured to predict crowd flow information in M ​​second sub-areas in the target area based on the monitoring data acquired by the N image acquisition devices, wherein the target area includes the N first sub-areas and the M second sub-areas, and M is an integer greater than N; A calculation module, configured to calculate the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the crowd flow information of the M second sub-areas; A second determination module, configured to determine the crowd density of the target area according to the crowd densities of the N first sub-areas and the crowd densities of the M second sub-areas; Wherein, the prediction module includes: An analysis submodule, configured to perform crowd flow analysis on the monitoring data acquired by the N image acquisition devices, and determine a crowd flow prediction result between any two second sub-areas in the M second sub-areas; A prediction submodule, used for predicting the crowd flow information according to the crowd flow prediction result; The crowd flow information is represented by the following adjacency matrix: ; ; Wherein, A is the adjacency matrix, M is the number of second sub-regions, and is the crowd flow prediction result, which is used to characterize the first i Whether the people in the second sub-area flow to the j The second sub-region, i and j are all positive integers less than or equal to M; Wherein, the calculation module includes: A first calculation submodule is used for respectively diffusing from each of the N first subregions to the M second subregions, and calculating to obtain N groups of density coefficient sets, each group of density coefficient sets including a density coefficient of each of the M second subregions obtained by diffusing from one first subregion to the M second subregions; The second calculation submodule is used to calculate the crowd density of the M second sub-areas according to the crowd density of the N first sub-areas and the N sets of density coefficients.

6. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 4.

8. A computer program product, characterized in that The method comprises computer instructions, which implement the method according to any one of claims 1 to 4 when executed by a processor.