Method and device for determining space-time thermodynamic distribution of community
Through comprehensive analysis and noise reduction processing of the spatial and temporal dimensions of personnel position information, the problem of inaccurate thermal distribution caused by inaccurate personnel position estimation is solved, and a more accurate acquisition of spatiotemporal thermal distribution of crowds is achieved.
Patent Information
- Application Number
- CN202410804920.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, inaccurate estimation of personnel positions results in the inability to ensure the accuracy of crowd thermal distribution. In particular, it is difficult to accurately obtain the spatiotemporal distribution of crowds in important protection areas.
Through comprehensive statistical analysis of location information from the spatial and temporal dimensions, the initial community spatiotemporal thermal distribution data is obtained, and the noise reduction processing is performed respectively, thereby obtaining more accurate spatiotemporal thermal distribution data of the target community. Specific steps include obtaining the location information of the target area, dividing rasters and time slices, counting thermal values, iteratively updating the difference matrix and gradient divergence, as well as wavelet decomposition and inverse wavelet transform.
It improves the accuracy of the thermal distribution of the crowd, can better reflect the tidal characteristics of the spatiotemporal thermal distribution of the community, corrects the thermal values of abnormal areas, and ensures the accuracy of the final generated thermal distribution.
Smart Images

Figure CN118733899A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for determining spatiotemporal thermal distribution of a community. Background Art
[0002] In some important event scenarios, people will gather in large numbers and quickly in indoor and outdoor areas such as stadiums and squares in a short period of time, which puts higher requirements on communication service guarantee and public safety guarantee. Whether it is communication service guarantee or public safety guarantee, it is necessary to clarify the distribution of people in important protection areas (spatial distribution) and the changes in the gathering of people in a short period of time (temporal distribution). Therefore, it is very necessary to obtain the spatiotemporal distribution of people in important protection areas.
[0003] Usually, the acquisition of crowd thermal distribution is mainly achieved in the following ways: determine the location of people in the area; generate crowd thermal distribution based on the statistics of people's location. However, the accuracy of the crowd thermal distribution obtained in this way depends on the accuracy of the acquired location of people, and the location of people is often estimated by algorithms and cannot be absolutely accurate. This may result in the crowd thermal values of some areas at the same time being significantly higher or lower than those of nearby similar areas, or the crowd thermal values of the same area may suddenly change in continuous time, and the crowd thermal values at a certain moment are significantly higher or lower than those at adjacent moments, resulting in the accuracy of the finally generated crowd thermal distribution cannot be guaranteed.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method and device for determining spatiotemporal thermal distribution of a community, so as to at least solve the technical problem in the related art that the thermal distribution of people is inaccurate due to the deviation in the estimation of their positions.
[0006] According to one aspect of an embodiment of the present application, a method for determining a community spatiotemporal thermal distribution is provided, comprising: obtaining location information of all objects in a target area within a target time period; performing statistical analysis on the location information from a spatial dimension and a temporal dimension to obtain initial community spatiotemporal thermal distribution data, wherein the initial community spatiotemporal thermal distribution data includes multiple groups of first community spatial thermal distribution data with a time sequence; performing noise reduction processing on the multiple groups of first community spatial thermal distribution data from a spatial dimension to obtain multiple groups of second community spatial thermal distribution data; performing noise reduction processing on the multiple groups of second community spatial thermal distribution data from a temporal dimension to obtain target community spatiotemporal thermal distribution data.
[0007] Optionally, the location information of all objects in the target area within the target time period is obtained, including: obtaining multiple frames of images of the target area within the target time period, and performing object position recognition on the multiple frames of images to obtain the location information of each object; or, obtaining the location information reported by a mobile terminal of each object in the target area within the target time period; or, using satellite positioning technology to determine the location information of each object in the target area within the target time period.
[0008] Optionally, the location information is statistically analyzed comprehensively from the spatial dimension and the temporal dimension to obtain initial community spatiotemporal thermal distribution data, including: dividing the target area into multiple grids of preset sizes, and dividing the target time period into multiple time slices of preset duration; for each time slice, according to the location information, respectively counting the average resident object data in each grid as the thermal value corresponding to the grid under the time slice, and taking the matrix composed of the thermal values corresponding to each grid as the first community spatial thermal distribution data corresponding to the time slice; and determining the initial community spatiotemporal thermal distribution data based on the first community spatial thermal distribution data corresponding to multiple time slices.
[0009] Optionally, the average resident object data in each grid is counted as the thermal value based on the position information under the time slice, including: for each grid, determining the first frequency of each object appearing in the grid under the time slice based on the position information, and determining the second frequency of each object appearing in the target area under the time slice, taking the ratio of the first frequency to the second frequency corresponding to each object as the object's occurrence frequency, and summing the occurrence frequencies corresponding to all objects, and taking the summed result as the thermal value corresponding to the grid.
[0010] Optionally, multiple groups of first community spatial thermal distribution data are denoised from a spatial dimension to obtain multiple groups of second community spatial thermal distribution data, including: for each time slice, a first matrix corresponding to the first community spatial thermal distribution data corresponding to the time slice is denoised to obtain a second matrix, a difference matrix between the second matrix and the first matrix is determined, and a gradient divergence of the second matrix is determined, the second matrix is iteratively updated according to the difference matrix and the gradient divergence, and the updated second matrix is used as the second community spatial thermal distribution data corresponding to the time slice.
[0011] Optionally, the second matrix is iteratively updated according to the difference matrix and the gradient divergence, including: in each iteration, the second matrix after the previous iteration update is used as the second matrix before the current iteration update, and the second matrix is updated according to the following formula: Q ′ =Q-α(G1+λG2), where Q represents the second matrix before this iteration update, Q ′represents the second matrix after this iterative update, α represents the preset learning rate parameter, λ represents the preset regularization parameter, in the first iteration, G1 represents the difference matrix between the second matrix before this iterative update and the first matrix, in subsequent iterations, G1 represents the difference matrix between the second matrix before this iterative update and the second matrix before the previous iterative update, G2 represents the gradient divergence of the second matrix before this iterative update; after executing a preset number of iterative updates, or when the second matrix after the iterative update meets the preset convergence condition, the iterative update is stopped, and the second matrix obtained by the last update is used as the second community space thermal distribution data corresponding to the time slice.
[0012] Optionally, multiple groups of second community spatial thermal distribution data are denoised from the time dimension to obtain target community spatiotemporal thermal distribution data, including: for each grid, extracting the thermal value corresponding to the grid from the second community spatial thermal distribution data corresponding to each time slice, and forming a first vector with the extracted multiple thermal values, performing wavelet decomposition of a preset level on the first vector to obtain approximate coefficients and detail coefficients of the preset level, screening out a target detail coefficient that meets preset conditions from the multiple detail coefficients, and performing an inverse wavelet transform based on the target detail coefficient and the approximate coefficient of the highest level to obtain a reconstructed second vector; updating the thermal values in multiple groups of second community spatial thermal distribution data based on the second vector corresponding to each grid to obtain the target community spatiotemporal thermal distribution data.
[0013] According to another aspect of an embodiment of the present application, a device for determining a community spatiotemporal thermal distribution is provided, including: an acquisition module, used to acquire location information of all objects in a target area within a target time period; an analysis module, used to perform statistical analysis on the location information from a spatial dimension and a temporal dimension to obtain initial community spatiotemporal thermal distribution data, wherein the initial community spatiotemporal thermal distribution data includes multiple groups of first community spatial thermal distribution data with a time sequence; a first noise reduction module, used to perform noise reduction processing on multiple groups of first community spatial thermal distribution data from a spatial dimension to obtain multiple groups of second community spatial thermal distribution data; and a second noise reduction module, used to perform noise reduction processing on multiple groups of second community spatial thermal distribution data from a temporal dimension to obtain target community spatiotemporal thermal distribution data.
[0014] According to another aspect of an embodiment of the present application, a computer program product is further provided, the computer program product comprising: a computer program, wherein when the computer program is executed by a processor, the above-mentioned method for determining the spatiotemporal thermal distribution of a community is implemented.
[0015] According to another aspect of an embodiment of the present application, an electronic device is further provided, comprising: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned method for determining the spatiotemporal thermal distribution of a community through the computer program.
[0016] In the embodiment of the present application, firstly, the position information of all objects in the target area within the target time period is obtained; then, the position information is statistically analyzed comprehensively from the spatial dimension and the time dimension to obtain the initial community spatiotemporal thermal distribution data, which includes multiple groups of first community spatial thermal distribution data with time sequence; then, multiple groups of first community spatial thermal distribution data are subjected to noise reduction processing from the spatial dimension to obtain multiple groups of second community spatial thermal distribution data; finally, multiple groups of second community spatial thermal distribution data are subjected to noise reduction processing from the time dimension to obtain the target community spatiotemporal thermal distribution data. Among them, by aggregating the object position information from the two dimensions of space and time, the tidal characteristics of the spatiotemporal thermal distribution of the community can be better reflected, and by correcting the thermal values of the abnormal areas in the community thermal distribution at each static moment from the spatial dimension, and then correcting the thermal values of the abnormal areas in the community thermal distribution of each area from the time dimension, the final community thermal distribution can be made more accurate, that is, the present application scheme effectively solves the technical problem of inaccurate personnel thermal distribution generated due to personnel position estimation deviation in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 is a flow chart of an optional method for determining spatiotemporal thermal distribution of a community according to an embodiment of the present application;
[0019] Figure 2 is a schematic structural diagram of an optional device for determining spatiotemporal thermal distribution of a community according to an embodiment of the present application;
[0020] Figure 3 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0022] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] Example 1
[0024] According to an embodiment of the present application, a method for determining the spatiotemporal thermal distribution of a community is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0025] Figure 1 is a flow chart of a method for determining spatiotemporal thermal distribution of a community provided in accordance with an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0026] Step S102, obtaining location information of all objects in the target area within a target time period;
[0027] Step S104, statistically analyzing the location information from the spatial dimension and the temporal dimension to obtain initial community spatiotemporal thermal distribution data, wherein the initial community spatiotemporal thermal distribution data includes multiple groups of first community spatiotemporal thermal distribution data with time series;
[0028] Step S106, performing noise reduction processing on the multiple sets of first community spatial thermal distribution data from a spatial dimension to obtain multiple sets of second community spatial thermal distribution data;
[0029] Step S108, performing noise reduction processing on multiple groups of second community spatial thermal distribution data from a time dimension to obtain target community spatiotemporal thermal distribution data.
[0030] The following describes the various steps of the method for determining the spatiotemporal thermal distribution of a community in conjunction with a specific implementation process.
[0031] It can be understood that in order to determine the spatiotemporal thermal distribution of a community in an area over a period of time, it is first necessary to obtain the accurate location information of all people in the area during the time period. In order to adapt to the needs of obtaining the location of people in different environmental scenarios, the embodiments of the present application provide the following optional methods for obtaining the location information of all objects in the target area within the target time period, among which the objects are mainly for people.
[0032] 1) Obtain multiple frames of images of the target area within the target time period, and perform object position recognition on the multiple frames to obtain the position information of each object. This method is suitable for indoor scenes such as event venues with multiple cameras, such as concerts. It should be noted that the image recognition here will not identify the specific identity of the person and other privacy information, but only the specific location of the person.
[0033] 2) Obtain the location information reported by the mobile terminals of each object in the target area during the target time period. Usually the location information reported by the mobile terminal is relatively more accurate, but this method cannot collect the location of some people who do not use mobile terminals. It can be considered to be used in conjunction with the first method.
[0034] 3) Use satellite positioning technology to determine the location information of each object in the target area within the target time period. Among them, satellite positioning technology can use GNSS (Global Navigation Satellite System), GPS (Global Positioning System), etc. This method is suitable for outdoor areas with good vision and signal, such as open-air stadiums.
[0035] In addition to the above methods, the personnel location information can also be obtained by using methods such as RFID (Radio Frequency Identification) positioning technology, WIFI (Wireless Fidelity) positioning technology, Bluetooth positioning technology, etc. It should be noted that the time of the personnel location obtained by the above methods is not necessarily aligned, nor does it necessarily have a fixed periodicity.
[0036] In order to better reflect the tidal characteristics of community thermal distribution, the embodiment of the present application, when performing thermal distribution analysis, specifically conducts statistical analysis on the location information from two dimensions, space and time, to obtain initial community spatiotemporal thermal distribution data.
[0037] As an optional implementation, the target area can be first divided into multiple grids of preset sizes, and the target time period can be divided into multiple time slices of preset duration; for each time slice, the average resident object data in each grid is counted according to the location information under the time slice as the thermal value corresponding to the grid, and the matrix composed of the thermal values corresponding to each grid is used as the first community spatial thermal distribution data corresponding to the time slice; the initial community spatiotemporal thermal distribution data is determined based on the first community spatial thermal distribution data corresponding to multiple time slices.
[0038] Among them, the rasterization processing method is not limited, and can be based on a Gaussian coordinate system, a Mercator coordinate system, or other coordinate systems. When the thermal value corresponding to each grid is counted according to the position information under the time slice, it can be performed in the following manner: for each grid, the first frequency of each object appearing in the grid under the time slice is determined according to the position information, and the second frequency of each object appearing in the target area under the time slice is determined, and the ratio of the first frequency to the second frequency corresponding to each object is used as the frequency of occurrence of the object, and the frequency of occurrence corresponding to all objects is summed, and the sum result is used as the thermal value corresponding to the grid.
[0039] For example, the target area can be divided into I×J grids of 10m×10m, and the target time period can be divided into K time slices of 5 minutes. In each time slice, considering that the same person may stay in one or more grids, the average number of people staying in each grid within 5 minutes can be counted as the thermal value corresponding to the grid. The specific calculation formula is as follows:
[0040]
[0041] In the formula, j represents the jth person, t j represents the second frequency of detecting person j in the target area within 5 minutes, g i represents the i-th grid, t j (g i ) indicates that the grid g i The first frequency of detecting person j in i ) represents the grid g within 5 minutes i The average number of residents in grid g i The corresponding thermal value, where the sum of the occurrence frequencies of the same person in all grids within 5 minutes is 1, that is,
[0042] At the same time slice, the thermal values corresponding to all grids are combined into a matrix to obtain the two-dimensional first community space thermal distribution. Arrange multiple two-dimensional matrices in time sequence to obtain the three-dimensional initial community space-time thermal distribution, which can be recorded as T∈R I×J×K .
[0043] In order to further improve the accuracy of the obtained community spatiotemporal thermal distribution, the embodiment of the present application performs noise reduction processing on the obtained initial community spatiotemporal thermal distribution data from the spatial dimension and the temporal dimension respectively.
[0044] As an optional implementation, multiple groups of first community spatial thermal distribution data can be subjected to denoising from the spatial dimension to obtain multiple groups of second community spatial thermal distribution data. Specifically, for each time slice, the first matrix corresponding to the first community spatial thermal distribution data corresponding to the time slice can be subjected to denoising to obtain a second matrix, wherein the denoising can be performed by data cleaning, data smoothing, and filter filtering; then, the difference matrix between the second matrix and the first matrix is determined, and the gradient divergence of the second matrix is determined, and the second matrix is iteratively updated based on the obtained difference matrix and gradient divergence, and the updated second matrix is used as the second community spatial thermal distribution data corresponding to the time slice.
[0045] Optionally, when the second matrix is iteratively updated according to the difference matrix and the gradient divergence, it can be performed in the following manner: in each iteration process, the second matrix after the previous iteration update is used as the second matrix before the current iteration update, and the second matrix is updated according to the following formula:
[0046] Q ′ =Q-α(G1+λG2)
[0047] In the formula, Q represents the second matrix before this iteration update, Q ′ represents the second matrix after this iterative update, α represents the preset learning rate parameter, which is used to control the step size of each iterative update, and the default value α=0.1, λ represents the preset regularization parameter, which is used to balance the influence of G1 and G2 in the update process, and the default value λ=0.1. In practical applications, α and λ can be adjusted according to needs. In the first iteration, G1 represents the difference matrix between the second matrix and the first matrix before this iterative update. In subsequent iterations, G1 represents the difference matrix between the second matrix before this iterative update and the second matrix before the previous iterative update, and G2 represents the gradient divergence of the second matrix before this iterative update.
[0048] After executing a preset number of iterative updates, or when the second matrix after the iterative update meets the preset convergence condition, the iterative update is stopped, and the second matrix obtained by the last update is used as the second community space thermal distribution data corresponding to the time slice.
[0049] Among them, when calculating the gradient divergence of the second matrix, it can be approximated by calculating the difference of the partial derivatives of the two-dimensional matrix, and the gradient divergence is recorded as It is used to reflect the trend and intensity of the change in population distribution after noise reduction. The specific calculation formula is as follows:
[0050]
[0051] By calculating the difference between adjacent elements in the matrix Q[x,y], we can get its gradient changes in all directions, and then summarize and analyze these gradient changes to estimate the overall divergence value. It should be noted that although this approximation method is simple and easy, it may have certain errors. Therefore, in practical applications, we can choose the appropriate difference step size and calculation method according to the specific situation to improve the accuracy and reliability of the divergence estimation.
[0052] In the above iterative update process, by introducing the difference matrix and gradient divergence, the specific impact of noise reduction processing on the spatial thermal distribution of the crowd can be clearly observed, and the noise reduction effect can be evaluated; by introducing appropriate learning rate parameters and regularization parameters, the accuracy of the final second community spatial thermal distribution data can be effectively guaranteed.
[0053] In addition, in order to implement the above iterative update process more efficiently, programming languages such as Python and their related libraries (such as NumPy, SciPy, etc.) can be used for programming implementation. These libraries provide rich mathematical operations and matrix operation functions, which can greatly simplify the code writing and calculation process.
[0054] Optionally, after the spatial noise reduction is completed, multiple groups of second community spatial thermal distribution data can be further subjected to noise reduction processing from the time dimension to obtain the target community spatiotemporal thermal distribution data. Specifically, for each grid, the thermal value corresponding to the grid can be extracted from the second community spatial thermal distribution data corresponding to each time slice, and the extracted multiple thermal values are combined into a first vector, and the first vector is subjected to a preset level of wavelet decomposition to obtain the preset level of approximate coefficients and detail coefficients, and the target detail coefficient that meets the preset conditions is selected from the multiple detail coefficients, and an inverse wavelet transform is performed based on the target detail coefficient and the highest level of approximate coefficient to obtain a reconstructed second vector; the thermal values in multiple groups of second community spatial thermal distribution data are updated based on the second vector corresponding to each grid to obtain the target community spatiotemporal thermal distribution data.
[0055] Among them, wavelet decomposition methods are widely used in signal processing, image processing, time series analysis and other fields. By performing multi-level wavelet decomposition on thermal time series vectors, we can have a deeper understanding of the dynamic changes of community heat and provide strong support for subsequent data mining and pattern recognition.
[0056] Specifically, for each grid, the thermal value of the grid in the second community spatial thermal distribution data corresponding to all time slices can be extracted, and a one-dimensional vector x is formed according to the time sequence, and then the one-dimensional vector x is subjected to multi-level wavelet decomposition. The specific formula is as follows:
[0057] x j (n) = A j (n)+D j (n)
[0058] In the formula, j represents the level of wavelet decomposition, and the total level J can be adjusted according to the needs. j is the approximate coefficient of the jth layer, which is used to reflect the approximate trend of vector x after decomposition at the jth layer. j is the detail coefficient of the jth layer, which is used to reflect the detail changes of vector x under the j-layer decomposition.
[0059] Optionally, in order to further highlight important detail features and reduce noise interference, the obtained detail coefficients can be threshold processed in the following manner: sort all the obtained detail coefficients from large to small, and then select a certain proportion (such as 30%) of the detail coefficients in front as the important features to be retained, that is, the target detail coefficients, and set the remaining detail coefficients to zero; or directly compare all the obtained detail coefficients with a preset threshold, and use the detail coefficients greater than or equal to the preset threshold as the target detail coefficients, and set the detail coefficients less than the preset threshold to zero. The detail coefficient after threshold processing can be denoted as D j_thresholded ,These coefficients not only retain the important detail features in the original data, but also reduce the redundancy and noise of the data to a certain extent.
[0060] After that, the processed detail coefficients can be used for inverse wavelet transform to complete the reconstruction of the vector. The specific formula is as follows:
[0061]
[0062] In the formula, A J (n) is the highest level approximate coefficient, which reflects the main trend and global structure of the thermal time series of human flow. All the detail coefficients D after threshold processing are j_thresholded Accumulation can restore local details and change characteristics, x denoised is the reconstructed second vector, that is, the community temporal thermal distribution data corresponding to the grid.
[0063] Finally, the thermal value in each group of the second community spatial thermal distribution data is updated according to the second vector corresponding to each grid, so as to obtain the final target community spatiotemporal thermal distribution data.
[0064] In the embodiment of the present application, firstly, the position information of all objects in the target area within the target time period is obtained; then, the position information is statistically analyzed comprehensively from the spatial dimension and the time dimension to obtain the initial community spatiotemporal thermal distribution data, which includes multiple groups of first community spatial thermal distribution data with time sequence; then, multiple groups of first community spatial thermal distribution data are subjected to noise reduction processing from the spatial dimension to obtain multiple groups of second community spatial thermal distribution data; finally, multiple groups of second community spatial thermal distribution data are subjected to noise reduction processing from the time dimension to obtain the target community spatiotemporal thermal distribution data. Among them, by aggregating the object position information from the two dimensions of space and time, the tidal characteristics of the spatiotemporal thermal distribution of the community can be better reflected, and by correcting the thermal values of the abnormal areas in the community thermal distribution at each static moment from the spatial dimension, and then correcting the thermal values of the abnormal areas in the community thermal distribution of each area from the time dimension, the final community thermal distribution can be made more accurate, that is, the present application scheme effectively solves the technical problem of inaccurate personnel thermal distribution generated due to personnel position estimation deviation in the related technology.
[0065] Example 2
[0066] According to an embodiment of the present application, a community spatiotemporal thermal distribution determination device for implementing the community spatiotemporal thermal distribution determination method in embodiment 1 is also provided. Figure 2 As shown, the device for determining the spatiotemporal heat distribution of a community at least includes: an acquisition module 21, an analysis module 22, a first noise reduction module 23 and a second noise reduction module 24, wherein:
[0067] An acquisition module 21 is used to acquire the location information of all objects in the target area within a target time period;
[0068] An analysis module 22 is used to comprehensively perform statistical analysis on the location information from the spatial dimension and the temporal dimension to obtain initial community spatiotemporal thermal distribution data, wherein the initial community spatiotemporal thermal distribution data includes multiple groups of first community spatiotemporal thermal distribution data with time sequence;
[0069] A first noise reduction module 23 is used to perform noise reduction processing on multiple groups of first community spatial thermal distribution data from a spatial dimension to obtain multiple groups of second community spatial thermal distribution data;
[0070] The second noise reduction module 24 is used to perform noise reduction processing on multiple groups of second community spatial thermal distribution data from a time dimension to obtain target community spatiotemporal thermal distribution data.
[0071] The functions of each module of the community spatiotemporal thermal distribution determination device are described below in conjunction with a specific implementation process.
[0072] It can be understood that in order to determine the spatiotemporal thermal distribution of a community in an area over a period of time, it is first necessary to obtain the accurate location information of all people in the area during the time period. In order to adapt to the needs of obtaining the location of people in different environmental scenarios, the acquisition module of the embodiment of the present application can obtain the location information of all objects in the target area within the target time period in the following ways, among which the objects are mainly for people.
[0073] Optionally, the acquisition module can acquire multiple frames of images of the target area within the target time period, and perform object position recognition on the multiple frames of images to obtain the position information of each object. This method is suitable for indoor scenes such as event venues with multiple cameras, such as concerts.
[0074] Optionally, the acquisition module can acquire the location information reported by the mobile terminals of each object in the target area within the target time period. Usually, the location information reported by the mobile terminal is relatively more accurate, but this method cannot collect the location of some people who do not use mobile terminals, so it can be considered to be used in conjunction with the first method.
[0075] Optionally, the acquisition module can also use satellite positioning technology to determine the location information of each object in the target area within the target time period. Among them, the satellite positioning technology can use GNSS, GPS, etc. This method is suitable for outdoor areas with good vision and signal, such as open-air stadiums, etc.
[0076] In addition to the above methods, the acquisition module can also use RFID positioning technology, WIFI positioning technology, Bluetooth positioning technology, etc. to obtain personnel location information. It should be noted that the time of the personnel location obtained by the above methods is not necessarily aligned, nor does it necessarily have a fixed periodicity.
[0077] In order to better reflect the tidal characteristics of community thermal distribution, the analysis module of the embodiment of the present application, when performing thermal distribution analysis, specifically performs statistical analysis on the location information from two dimensions, space and time, to obtain initial community spatiotemporal thermal distribution data.
[0078] As an optional implementation, the analysis module can first divide the target area into multiple grids of preset sizes, and divide the target time period into multiple time slices of preset lengths; for each time slice, the average resident object data in each grid is counted according to the location information under the time slice as the thermal value corresponding to the grid, and the matrix composed of the thermal values corresponding to each grid is used as the first community spatial thermal distribution data corresponding to the time slice; the initial community spatiotemporal thermal distribution data is determined based on the first community spatial thermal distribution data corresponding to multiple time slices.
[0079] Among them, the rasterization processing method is not limited, and can be based on a Gaussian coordinate system, a Mercator coordinate system, or other coordinate systems. When the analysis module counts the thermal value corresponding to each grid according to the position information under the time slice, it can be performed in the following manner: for each grid, the first frequency of each object appearing in the grid under the time slice is determined according to the position information, and the second frequency of each object appearing in the target area under the time slice is determined, and the ratio of the first frequency to the second frequency corresponding to each object is used as the frequency of occurrence of the object, and the frequency of occurrence corresponding to all objects is summed, and the sum result is used as the thermal value corresponding to the grid.
[0080] At the same time slice, the thermal values corresponding to all grids are combined into a matrix to obtain the two-dimensional first community spatial thermal distribution. By arranging multiple two-dimensional matrices in time sequence, the three-dimensional initial community spatiotemporal thermal distribution can be obtained.
[0081] In order to further improve the accuracy of the obtained community spatiotemporal thermal distribution, the embodiment of the present application performs denoising processing on the obtained initial community spatiotemporal thermal distribution data from the spatial dimension and the temporal dimension through the first denoising module and the second denoising module respectively.
[0082] As an optional implementation, the first noise reduction module can perform noise reduction processing on multiple groups of first community spatial thermal distribution data from a spatial dimension to obtain multiple groups of second community spatial thermal distribution data. Specifically, for each time slice, the first matrix corresponding to the first community spatial thermal distribution data corresponding to the time slice can be first subjected to noise reduction processing to obtain a second matrix, and the noise reduction processing here can be performed by data cleaning, data smoothing, and filter filtering; then, the difference matrix between the second matrix and the first matrix is determined, and the gradient divergence of the second matrix is determined, and the second matrix is iteratively updated according to the obtained difference matrix and gradient divergence, and the updated second matrix is used as the second community spatial thermal distribution data corresponding to the time slice.
[0083] Optionally, when the first denoising module iteratively updates the second matrix according to the difference matrix and the gradient divergence, it can be performed in the following manner: in each iteration process, the second matrix after the previous iteration update is used as the second matrix before the current iteration update, and the second matrix is updated according to the following formula:
[0084] Q ′ =Q-α(G1+λG2)
[0085] In the formula, Q represents the second matrix before this iteration update, Q ′ represents the second matrix after this iterative update, α represents the preset learning rate parameter, which is used to control the step size of each iterative update, and the default value α=0.1, λ represents the preset regularization parameter, which is used to balance the influence of G1 and G2 in the update process, and the default value λ=0.1. In practical applications, α and λ can be adjusted according to needs. In the first iteration, G1 represents the difference matrix between the second matrix and the first matrix before this iterative update. In subsequent iterations, G1 represents the difference matrix between the second matrix before this iterative update and the second matrix before the previous iterative update, and G2 represents the gradient divergence of the second matrix before this iterative update.
[0086] After executing a preset number of iterative updates, or when the second matrix after the iterative update meets the preset convergence condition, the iterative update is stopped, and the second matrix obtained by the last update is used as the second community space thermal distribution data corresponding to the time slice.
[0087] Among them, when calculating the gradient divergence of the second matrix, it can be approximated by calculating the difference of the partial derivatives of the two-dimensional matrix. By calculating the difference between adjacent elements in the matrix, its gradient changes in all directions are obtained, and then these gradient changes are summarized and analyzed to estimate the overall divergence value. It should be noted that although this approximation method is simple and easy, it may have certain errors. Therefore, in practical applications, the appropriate difference step size and calculation method can be selected according to the specific situation to improve the accuracy and reliability of the divergence estimation.
[0088] In the above iterative update process, by introducing the difference matrix and gradient divergence, the specific impact of noise reduction processing on the spatial thermal distribution of the crowd can be clearly observed, and the noise reduction effect can be evaluated; by introducing appropriate learning rate parameters and regularization parameters, the accuracy of the final second community spatial thermal distribution data can be effectively guaranteed.
[0089] Optionally, after the spatial noise reduction is completed, the second noise reduction module can further perform noise reduction processing on multiple groups of second community spatial thermal distribution data from the time dimension to obtain the target community spatiotemporal thermal distribution data. Specifically, for each grid, the thermal value corresponding to the grid can be extracted from the second community spatial thermal distribution data corresponding to each time slice, and the extracted multiple thermal values are combined into a first vector, and the first vector is subjected to a preset level of wavelet decomposition to obtain the preset level of approximate coefficients and detail coefficients, and the target detail coefficient that meets the preset conditions is selected from the multiple detail coefficients, and an inverse wavelet transform is performed based on the target detail coefficient and the highest level of approximate coefficient to obtain a reconstructed second vector; the thermal values in multiple groups of second community spatial thermal distribution data are updated based on the second vector corresponding to each grid to obtain the target community spatiotemporal thermal distribution data.
[0090] Among them, wavelet decomposition methods are widely used in signal processing, image processing, time series analysis and other fields. By performing multi-level wavelet decomposition on thermal time series vectors, we can have a deeper understanding of the dynamic changes of community heat and provide strong support for subsequent data mining and pattern recognition.
[0091] Specifically, for each grid, the thermal value of the grid in the second community spatial thermal distribution data corresponding to all time slices can be extracted, formed into a one-dimensional vector according to the time sequence, and then the one-dimensional vector is subjected to multi-level wavelet decomposition to obtain multi-level approximate coefficients and detail coefficients.
[0092] In order to highlight important detail features and reduce noise interference, the obtained detail coefficients can be threshold processed in the following ways: sort all the obtained detail coefficients from large to small, and then select a certain proportion (such as 30%) of the detail coefficients as the important features to be retained, that is, the target detail coefficients, and set the remaining detail coefficients to zero; or directly compare all the obtained detail coefficients with the preset threshold, and use the detail coefficients greater than or equal to the preset threshold as the target detail coefficients, and set the detail coefficients less than the preset threshold to zero. The detail coefficients after threshold processing not only retain the important detail features in the original data, but also reduce the redundancy and noise of the data to a certain extent.
[0093] After that, the inverse wavelet transform can be performed using the approximate coefficients of the highest level that reflect the main trend of the thermal time series of the flow of people and the global structure, as well as all the detail coefficients after threshold processing, to complete the reconstruction of the second vector, that is, to obtain the community time thermal distribution data corresponding to the grid. Finally, the thermal value in each group of the second community spatial thermal distribution data is updated according to the second vector corresponding to each grid, and the final target community spatiotemporal thermal distribution data can be obtained.
[0094] It should be noted that each module in the community spatiotemporal thermal distribution determination device in the embodiment of the present application corresponds one by one to each implementation step of the community spatiotemporal thermal distribution determination method in Example 1. Since a detailed description has been given in Example 1, some details not reflected in this embodiment can be referred to Example 1, and will not be repeated here.
[0095] Example 3
[0096] According to an embodiment of the present application, a computer program product is also provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method for determining the spatiotemporal thermal distribution of a community in Embodiment 1 is implemented.
[0097] According to an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the method for determining the spatiotemporal thermal distribution of a community in Example 1 by running the computer program.
[0098] According to an embodiment of the present application, a processor is further provided, the processor being used to run a computer program, wherein the method for determining the spatiotemporal thermal distribution of a community in Embodiment 1 is executed when the computer program is run.
[0099] According to an embodiment of the present application, an electronic device is also provided, which includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the method for determining the spatiotemporal thermal distribution of a community in Example 1 through the computer program.
[0100] Specifically, when the computer program is running, the following steps are executed: obtaining the location information of all objects in the target area within the target time period; performing a comprehensive statistical analysis on the location information from the spatial dimension and the temporal dimension to obtain initial community spatiotemporal thermal distribution data, wherein the initial community spatiotemporal thermal distribution data includes multiple groups of first community spatial thermal distribution data with time series; performing noise reduction processing on the multiple groups of first community spatial thermal distribution data from the spatial dimension to obtain multiple groups of second community spatial thermal distribution data; performing noise reduction processing on the multiple groups of second community spatial thermal distribution data from the temporal dimension to obtain target community spatiotemporal thermal distribution data.
[0101] As an optional implementation, the electronic device may be in the form of a mobile terminal, a computer terminal or a similar computing device. Figure 3 FIG. 1 shows a hardware structure block diagram of an electronic device for implementing a method for determining a community's spatiotemporal thermal distribution. Figure 3As shown, the electronic device 30 may include one or more (302a, 302b, ..., 302n are used to illustrate) processors 302 (the processor 302 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 304 for storing data, and a transmission device 306 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 3 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 3 More or fewer components as shown, or with Figure 3 Different configurations shown.
[0102] It should be noted that the one or more processors 302 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the electronic device 30. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0103] The memory 304 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for determining the spatiotemporal thermal distribution of a community in the embodiment of the present application. The processor 302 executes various functional applications and data processing by running the software programs and modules stored in the memory 304, that is, to implement the vulnerability detection method of the above-mentioned application. The memory 304 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 304 may further include a memory remotely arranged relative to the processor 302, and these remote memories may be connected to the electronic device 30 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0104] The transmission device 306 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the electronic device 30. In one example, the transmission device 306 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 306 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0105] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 30 .
[0106] The serial numbers of the above embodiments are only for description and do not represent the advantages or disadvantages of the embodiments.
[0107] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0108] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0109] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0110] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0111] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0112] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining spatiotemporal heat distribution of a community, characterized in that: include: Obtain the location information of all objects in the target area within the target time period; Performing a comprehensive statistical analysis on the location information from the spatial dimension and the temporal dimension to obtain initial community spatiotemporal thermal distribution data, wherein the initial community spatiotemporal thermal distribution data includes a plurality of groups of first community spatial thermal distribution data with time sequence; Performing noise reduction processing on multiple groups of spatial thermal distribution data of the first community from a spatial dimension to obtain multiple groups of spatial thermal distribution data of the second community; The multiple groups of the second community spatial thermal distribution data are subjected to noise reduction processing from the time dimension to obtain the target community spatiotemporal thermal distribution data.
2. The method according to claim 1, characterized in that Get the location information of all objects in the target area within the target time period, including: Acquire multiple frames of images of the target area within the target time period, and perform object position recognition on the multiple frames of images to obtain the position information of each object; or, Acquire the location information reported by the mobile terminals of each object in the target area within the target time period; or, The location information of each object in the target area within the target time period is determined using satellite positioning technology.
3. The method according to claim 1, characterized in that: The location information is statistically analyzed from the spatial dimension and the temporal dimension to obtain the initial community spatiotemporal thermal distribution data, including: Dividing the target area into a plurality of grids of preset sizes, and dividing the target time period into a plurality of time slices of preset lengths; For each time slice, according to the location information, respectively count the average resident object data in each grid as the thermal value corresponding to the grid under the time slice, and use the matrix composed of the thermal values corresponding to each grid as the first community space thermal distribution data corresponding to the time slice; The initial community spatiotemporal thermal distribution data is determined according to the first community spatial thermal distribution data corresponding to the multiple time slices.
4. The method according to claim 3, characterized in that Counting the average resident object data in each grid as a thermal value according to the location information at the time slice, including: For each grid, a first frequency of each object appearing in the grid at the time slice is determined based on the position information, and a second frequency of each object appearing in the target area at the time slice is determined, and a ratio of the first frequency to the second frequency corresponding to each object is used as the occurrence frequency of the object, and the occurrence frequencies corresponding to all objects are summed, and the sum result is used as the thermal value corresponding to the grid.
5. The method according to claim 3, characterized in that: Performing noise reduction processing on multiple groups of the first community spatial thermal distribution data from a spatial dimension to obtain multiple groups of second community spatial thermal distribution data, including: For each time slice, a first matrix corresponding to the first community spatial thermal distribution data corresponding to the time slice is subjected to denoising processing to obtain a second matrix, a difference matrix between the second matrix and the first matrix is determined, and a gradient divergence of the second matrix is determined, the second matrix is iteratively updated based on the difference matrix and the gradient divergence, and the updated second matrix is used as the second community spatial thermal distribution data corresponding to the time slice.
6. The method according to claim 5, characterized in that Iteratively updating the second matrix according to the difference matrix and the gradient divergence, comprising: In each iteration, the second matrix after the previous iteration update is used as the second matrix before the current iteration update, and the second matrix is updated according to the following formula: Q ′ =Q-α(G1+λG2) In the formula, Q represents the second matrix before this iteration update, Q ′ represents the second matrix after this iteration update, α represents the preset learning rate parameter, λ represents the preset regularization parameter, in the first iteration, G1 represents the difference matrix between the second matrix before this iteration update and the first matrix, in subsequent iterations, G1 represents the difference matrix between the second matrix before this iteration update and the second matrix before the previous iteration update, G2 represents the gradient divergence of the second matrix before this iteration update; After executing a preset number of iterative updates, or when the second matrix after iterative updates meets a preset convergence condition, the iterative updates are stopped, and the second matrix obtained by the last update is used as the second community spatial thermal distribution data corresponding to the time slice.
7. The method according to claim 3, characterized in that De-noising the plurality of sets of the second community spatial thermal distribution data from the time dimension to obtain the target community spatiotemporal thermal distribution data, including: For each grid, extract the thermal value corresponding to the grid from the second community spatial thermal distribution data corresponding to each time slice, and form a first vector with multiple extracted thermal values, perform wavelet decomposition of a preset level on the first vector to obtain approximate coefficients and detail coefficients of a preset level, select a target detail coefficient that meets a preset condition from the multiple detail coefficients, and perform an inverse wavelet transform based on the target detail coefficient and the approximate coefficient of the highest level to obtain a reconstructed second vector; The thermal values in multiple groups of the second community spatial thermal distribution data are updated according to the second vector corresponding to each grid to obtain the target community spatiotemporal thermal distribution data.
8. A device for determining spatiotemporal heat distribution of a community, characterized in that: include: An acquisition module is used to acquire the location information of all objects in the target area within a target time period; An analysis module is used to comprehensively perform statistical analysis on the location information from the spatial dimension and the temporal dimension to obtain initial community spatiotemporal thermal distribution data, wherein the initial community spatiotemporal thermal distribution data includes multiple groups of first community spatial thermal distribution data with time sequence; A first noise reduction module is used to perform noise reduction processing on multiple groups of the first community spatial thermal distribution data from a spatial dimension to obtain multiple groups of second community spatial thermal distribution data; The second noise reduction module is used to perform noise reduction processing on multiple groups of the second community spatial thermal distribution data from a time dimension to obtain the target community spatiotemporal thermal distribution data.
9. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, the method for determining the spatiotemporal thermal distribution of a community as described in any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the community spatiotemporal thermal distribution determination method according to any one of claims 1 to 7 through the computer program.
Citation Information
Cited By
Image processing method and device, equipment, storage medium and program product
CN121544905A
