A Spatial Scene Clustering Analysis Method and Device Based on Personnel Location Data
Patent Information
- Application Number
- CN202411112217.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2044-08-14
AI Technical Summary
[0003]本发明提供一种基于人员位置数据的空间场景聚类分析方法及装置,用以解决现有技术中存在的空间场景聚类分析方案局限性较高,从而导致空间场景聚类分析效率和准确性较差的缺陷
[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the spatial scene clustering analysis method based on personnel location data as described above.
Smart Images

Figure CN121600289B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer application technology, specifically to a method and apparatus for spatial scene clustering analysis based on personnel location data. It also relates to an electronic device, a non-transitory computer-readable storage medium, and a computer program product. Background Technology
[0002] In recent years, with the rapid development of IoT technology, various intelligent control applications within the built environment have become increasingly widespread. The different distribution and dwell times of people within a building environment create different actual building usage scenarios, leading to significant differences in energy consumption for lighting, air conditioning, and other building service systems in different spatial scenarios. Timely understanding of personnel distribution can improve the utilization efficiency of work and living spaces. However, in current built environments, acquiring spatial scene information typically relies on manual on-site surveys, which suffers from inefficiency and inaccuracy. With the introduction and gradual improvement of indoor personnel positioning systems based on vision technology, a non-contact, accurate, and continuous method for acquiring indoor personnel location information has been provided. Positioning methods using machine vision technology can utilize cameras combined with personnel recognition algorithms to acquire indoor personnel distribution information over a considerable period, measured in months. However, the scene clustering analysis of discrete, large-scale personnel location data acquired through vision technology has poor efficiency and accuracy, failing to provide crucial foundational data for the efficient design and operation of indoor environments. Therefore, designing an efficient spatial scene clustering analysis scheme based on personnel location data has become an urgent problem to be solved. Summary of the Invention
[0003] This invention provides a spatial scene clustering analysis method and apparatus based on personnel location data, which addresses the shortcomings of existing spatial scene clustering analysis schemes, which have high limitations, resulting in poor efficiency and accuracy of spatial scene clustering analysis.
[0004] This invention provides a spatial scene clustering analysis method based on personnel location data, including: Acquire the location data of people within the spatial scene; Based on the distance between the location points of a single target in the personnel location data over a continuous period of time, dynamic trajectories and static trajectories are separated to obtain a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory; Based on the first heatmap, it is determined whether the dynamic trajectory is associated with the spatial entrances and exits of the spatial scene. If so, the first heatmap is segmented according to different spatial scenes to obtain a first scene slice group; if not, the dynamic trajectory routes within the spatial scene are clustered based on the first heatmap to obtain a second scene slice group; wherein, the spatial entrances and exits are used to connect different spatial scenes. Based on the similarity between the second heatmaps of adjacent time slices, the second heatmaps of adjacent time slices are connected to obtain a third scene slice group; Global scene clustering is performed based on the first scene slice group, the second scene slice group, and the third scene slice group to obtain scene clustering results and distribution ratios.
[0005] According to the present invention, a spatial scene clustering analysis method based on personnel location data separates dynamic trajectories and static trajectories based on the distance between the location points of a single target in the personnel location data over a continuous time period, and obtains a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory, specifically including: Based on the distance between the location points of a single target in the personnel location data over a continuous period of time, dynamic trajectory and static trajectory are separated to obtain the dynamic trajectory data and static trajectory data of the personnel. Based on the dynamic trajectory data, a first heatmap of the dynamic trajectory is generated; Based on the static trajectory data, a second heatmap of the static trajectory is generated.
[0006] According to the present invention, a spatial scene clustering analysis method based on personnel location data separates dynamic trajectories and static trajectories based on the distance between the location points of a single target in the personnel location data over consecutive time periods, thereby obtaining dynamic trajectory data and static trajectory data of personnel. Specifically, the method includes: The distance between the location points of a single target over a continuous period of time is calculated based on the personnel location data; if the distance between the location points is less than or equal to the preset target distance within a unit of time, the trajectory formed between the location points is determined as a static trajectory; if the distance between the location points is greater than the preset target distance within a unit of time, the trajectory formed between the location points is determined as a dynamic trajectory.
[0007] According to the present invention, a spatial scene clustering analysis method based on personnel location data is provided, wherein determining whether the dynamic trajectory is associated with the spatial entrance / exit of the spatial scene based on the first heatmap specifically includes: Obtain the thermal distribution location of the first heatmap; wherein the thermal distribution location corresponds to the dynamic trajectory; Determine whether there is a correlation between the location of the thermal distribution and the location of the spatial entrance / exit. If there is a correlation between the locations of the thermal distribution and the spatial entrance / exit, determine that the dynamic trajectory is associated with the spatial entrance / exit of the spatial scene; if there is no correlation between the locations of the thermal distribution and the spatial entrance / exit, determine that the dynamic trajectory is not associated with the spatial entrance / exit of the spatial scene.
[0008] According to the present invention, a spatial scene clustering analysis method based on personnel location data is provided, wherein obtaining personnel location data within the spatial scene specifically includes: Use a binocular vision camera set up within the spatial scene to collect video data within the target time range; The video data is sliced according to a first unit time to obtain multiple video images corresponding to the first unit time; wherein, the video images contain personnel location data; and the target time range includes at least one of the first unit time.
[0009] According to the spatial scene clustering analysis method based on personnel location data provided by the present invention, the step of connecting the second heatmaps of adjacent time slices based on the similarity between the second heatmaps of adjacent time slices to obtain a third scene slice group specifically includes: The similarity between the second heatmaps of adjacent time slices is determined. If the similarity reaches a preset similarity threshold, the second heatmaps of adjacent time slices are connected to obtain a third scene slice group; wherein, the third scene slice group contains multiple connected second heatmaps.
[0010] The present invention also provides a spatial scene clustering analysis device based on personnel location data, comprising: The data acquisition unit is used to acquire personnel location data within the spatial scene; The heatmap acquisition unit is used to separate dynamic trajectories and static trajectories based on the distance between the location points of a single target in the personnel location data over a continuous time period, and to obtain a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory. The first heatmap processing unit is used to determine whether the dynamic trajectory is related to the spatial entrance / exit of the spatial scene based on the first heatmap. If so, the first heatmap is segmented according to different spatial scenes to obtain a first scene slice group; if not, the dynamic trajectory routes in the spatial scene are clustered based on the first heatmap to obtain a second scene slice group. The spatial entrance / exit is used to connect different spatial scenes. The second heatmap processing unit is used to connect the second heatmaps of adjacent time slices based on the similarity between the second heatmaps of adjacent time slices to obtain a third scene slice group. The scene clustering unit is used to perform global scene clustering based on the first scene slice group, the second scene slice group and the third scene slice group to obtain scene clustering results and distribution ratios.
[0011] According to the present invention, a spatial scene clustering analysis device based on personnel location data is provided, wherein the heatmap acquisition unit is specifically used for: Based on the distance between the location points of a single target in the personnel location data over a continuous period of time, dynamic trajectory and static trajectory are separated to obtain the dynamic trajectory data and static trajectory data of the personnel. Based on the dynamic trajectory data, a first heatmap of the dynamic trajectory is generated; Based on the static trajectory data, a second heatmap of the static trajectory is generated.
[0012] According to the present invention, a spatial scene clustering analysis device based on personnel location data separates dynamic trajectories and static trajectories based on the distance between the location points of a single target in the personnel location data over a continuous time period, thereby obtaining dynamic trajectory data and static trajectory data of personnel. Specifically, it includes: The distance between the location points of a single target over a continuous period of time is calculated based on the personnel location data; if the distance between the location points is less than or equal to the preset target distance within a unit of time, the trajectory formed between the location points is determined as a static trajectory; if the distance between the location points is greater than the preset target distance within a unit of time, the trajectory formed between the location points is determined as a dynamic trajectory.
[0013] According to the present invention, a spatial scene clustering analysis device based on personnel location data is provided, wherein the first heatmap processing unit is specifically used for: Obtain the thermal distribution location of the first heatmap; wherein the thermal distribution location corresponds to the dynamic trajectory; Determine whether there is a correlation between the location of the thermal distribution and the location of the spatial entrance / exit. If there is a correlation between the locations of the thermal distribution and the spatial entrance / exit, determine that the dynamic trajectory is associated with the spatial entrance / exit of the spatial scene; if there is no correlation between the locations of the thermal distribution and the spatial entrance / exit, determine that the dynamic trajectory is not associated with the spatial entrance / exit of the spatial scene.
[0014] According to the present invention, a spatial scene clustering analysis device based on personnel location data is provided, wherein the data acquisition unit is specifically used for: Use a binocular vision camera set up within the spatial scene to collect video data within the target time range; The video data is sliced according to a first unit time to obtain multiple video images corresponding to the first unit time; wherein, the video images contain personnel location data; and the target time range includes at least one of the first unit time.
[0015] According to the spatial scene clustering analysis device based on personnel location data provided by the present invention, the second heatmap processing unit is specifically used for: The similarity between the second heatmaps of adjacent time slices is determined. If the similarity reaches a preset similarity threshold, the second heatmaps of adjacent time slices are connected to obtain a third scene slice group; wherein, the third scene slice group contains multiple connected second heatmaps.
[0016] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the spatial scene clustering analysis method based on personnel location data as described above.
[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the spatial scene clustering analysis method based on personnel location data as described above.
[0018] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the spatial scene clustering analysis method based on personnel location data as described above.
[0019] The spatial scene clustering analysis method based on personnel location data provided by this invention separates dynamic and static trajectories by the distance between location points within a spatial scene, obtaining a first heatmap of dynamic trajectories and a second heatmap of static trajectories. Based on the first heatmap, it determines whether the dynamic trajectory is associated with a spatial entrance or exit of the spatial scene. If so, the first heatmap is segmented according to different spatial scenes to obtain a first scene slice group; otherwise, the dynamic trajectory routes within the spatial scene are clustered based on the first heatmap to obtain a second scene slice group. According to the similarity between the second heatmaps of adjacent time slices, the second heatmaps of adjacent time slices are connected to obtain a third scene slice group. Finally, global scene clustering is performed on the scene slices to obtain the scene clustering results and distribution ratio, which can effectively improve the efficiency and accuracy of spatial scene clustering analysis. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0021] Figure 1 This is one of the flowcharts illustrating the spatial scene clustering analysis method based on personnel location data provided by this invention.
[0022] Figure 2 This is the second flowchart of the spatial scene clustering analysis method based on personnel location data provided by the present invention.
[0023] Figure 3 This is a schematic diagram of the spatial scene clustering analysis device based on personnel location data provided by the present invention.
[0024] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0026] The following is combined Figures 1-4 This invention describes a spatial scene clustering analysis method and apparatus based on personnel location data, and provides a detailed description of its embodiments.
[0027] This invention provides a method for spatial scene clustering analysis based on personnel location data. By processing long-term collected data on real-time personnel positioning, it achieves the identification and clustering analysis of indoor spatial scenes, providing typical indoor usage scenarios along with the duration and frequency of different spatial scenes. For example, in a large company's office environment, understanding the location and behavioral distribution of personnel in detail can optimize workflows, improve spatial layout, or adjust equipment configurations, thereby increasing efficiency. In some commercial scenarios, such as hotels, hospitals, or restaurants, understanding the location and dynamics of personnel and customers can provide better customer service. Personalized services or suggestions can be provided by tracking customer movement paths within the spatial scene. For specific groups, such as the elderly, people with mental illnesses, or children, understanding their location and dynamics at home can provide better health monitoring. For example, by tracking these individuals' activity patterns and behaviors, early warning signs can be detected or relevant health advice can be provided. Therefore, spatial scene clustering analysis based on personnel location data is of great significance in providing key foundational data for the efficient design and operation of indoor environments.
[0028] Figure 1 This is a flowchart illustrating the spatial scene clustering analysis method based on personnel location data provided by the present invention, as shown below. Figure 1 As shown, the method includes the following: Step 101: Obtain the location data of people in the spatial scene.
[0029] Specifically, the spatial scenario can be a company's office scenario, a hotel, hospital, or restaurant's personnel activity scenario, or a home's indoor scenario, etc., without specific limitations.
[0030] In this embodiment of the invention, video data within a target time range (e.g., 2 hours) can be acquired using a binocular vision camera positioned within a spatial scene, employing machine vision technology for positioning. The video data is then sliced according to a first unit time (e.g., a minute-level time scale) to obtain multiple video images corresponding to each first unit time. Each video image contains personnel location data, and the target time range includes at least one of the first unit time periods. For example, video data can be sliced using a minute-level time scale to obtain a large number of video images, thereby acquiring real-time personnel location data at the minute-level. The personnel location data consists of a series of continuous location points.
[0031] Step 102: Based on the distance between the location points of a single target in the personnel location data over a continuous time period, separate the dynamic trajectory and the static trajectory to obtain a first heat map of the dynamic trajectory and a second heat map of the static trajectory.
[0032] In this embodiment of the invention, the dynamic trajectory and static trajectory are first separated based on the distance between the locations of a single target over a continuous period of time in the personnel location data, thus obtaining the dynamic trajectory data and static trajectory data of the personnel. Based on the dynamic trajectory data, a first heat map (i.e., a heat map describing the personnel movement) of the dynamic trajectory is generated using a preset programming tool (such as JS+Echarts) or BI tool (such as FineBI); based on the static trajectory data, a second heat map (i.e., a heat map describing the personnel's stopping positions) of the static trajectory is generated using a preset programming tool (such as JS+Echarts) or BI tool (such as FineBI).
[0033] The process of separating dynamic and static trajectories based on the distance between consecutive location points of a single target in the personnel location data to obtain dynamic and static trajectory data for the personnel includes: calculating the distance between consecutive location points of a single target based on the personnel location data; determining the trajectory formed between the location points as a static trajectory if the distance between the location points within a unit time (e.g., 1 second) is less than or equal to a preset target distance (e.g., 1 meter); and determining the trajectory formed between the location points as a dynamic trajectory if the distance between the location points within a unit time (e.g., 1 second) is greater than the preset target distance (e.g., 1 meter). In the process of separating dynamic and static trajectories based on the distance between location points, indoor personnel moving at a speed less than 1 meter / second can be defined as static targets.
[0034] Step 103: Based on the first heatmap, determine whether the dynamic trajectory is related to the spatial entrances and exits of the spatial scene. If so, cut the first heatmap according to different spatial scenes to obtain a first scene slice group; if not, cluster the dynamic trajectory routes in the spatial scene based on the first heatmap to obtain a second scene slice group; wherein, the spatial entrances and exits are used to connect different spatial scenes.
[0035] In this embodiment of the invention, the thermal distribution position of the first thermal map can be obtained based on the first thermal map; wherein the thermal distribution position corresponds to the dynamic trajectory.
[0036] By identifying the locations of the heat distribution and the spatial entrances / exits, it is determined whether there is a correlation between the locations of the heat distribution and the spatial entrances / exits (e.g., room entrances / exits). If there is a correlation between the locations of the heat distribution and the spatial entrances / exits, it is determined that the dynamic trajectory is associated with the spatial entrances / exits of the spatial scene. The first heat map is then segmented according to different spatial scenes (i.e., segmented for different scenes) to obtain a first scene slice group. If there is no correlation between the locations of the heat distribution and the spatial entrances / exits, it is determined that the dynamic trajectory is not associated with the spatial entrances / exits of the spatial scene. Based on the first heat map, the dynamic trajectory routes within the spatial scene are clustered (i.e., indoor circulation routes are clustered) to obtain a second scene slice group.
[0037] It should be noted that the first scene slice group and the second scene slice group each contain multiple scene slices (i.e., video data slices) with minute-level resolution. Where there is no locational correlation between the thermal distribution location and the location of the spatial entrance / exit, it can be assumed that the person is active in a single spatial scene and does not enter another spatial scene through the spatial entrance / exit. Therefore, the multiple scene slices with minute-level resolution in the second scene slice group are image slices obtained by clustering activity trajectory routes within the same spatial scene. Where there is a locational correlation between the thermal distribution location and the location of the spatial entrance / exit, it can be assumed that the person is active in different spatial scenes, i.e., may have entered another spatial scene through the spatial entrance / exit (e.g., from one room to another). Therefore, the multiple scene slices with minute-level resolution in the second scene slice group are image slices segmented according to dynamic routes within different spatial scenes.
[0038] Step 104: Based on the similarity between the second heatmaps of adjacent time slices, connect the second heatmaps of adjacent time slices to obtain a third scene slice group.
[0039] Specifically, the similarity between the second heatmaps of adjacent time slices can first be determined by calculating the similarity between the second heatmaps of adjacent time slices and performing reverse calculations. When the similarity reaches a preset similarity threshold, the second heatmaps of adjacent time slices are connected to obtain a third scene slice group; wherein, the third scene slice group contains multiple connected second heatmaps.
[0040] Step 105: Perform global scene clustering based on the first scene slice group, the second scene slice group, and the third scene slice group to obtain scene clustering results and distribution ratios.
[0041] In a complete implementation process, such as Figure 2As shown, after collecting personnel location information within the target time range, the data can be sliced at a minute-level time scale to obtain real-time personnel location data at the minute scale. At this point, the number of video data slices is very large. Based on the distance between various location points in the personnel location data, dynamic and static trajectories are separated. Indoor personnel moving at speeds less than 1 meter per second can be defined as static targets, and their corresponding location points form static trajectories. Heat maps are drawn for both types of trajectories. The heat map for the static trajectory can be used to assess the personnel's dwelling position, and by calculating the similarity between adjacent heat maps, nearby time slices can be connected, thus providing crucial basic data for the statistical analysis of spatial scene duration. It should be noted that the heat map records the length of time personnel remain in planar space within the slice time, which is quite similar to the information in photographs. Therefore, a similarity comparison algorithm for photographs can be used to calculate the similarity between adjacent heat maps; no specific limitations are made here.
[0042] For heat maps formed by dynamic trajectories, it's necessary to first determine if they are closely related to entrances and exits. Time segments closely related to entrances and exits indicate a significant change in the number of people within the space, which can be used to segment different spatial scenes. If it's merely a change in the activity patterns of people within the space, it can be used for indoor circulation clustering and assist in the overall clustering and analysis of indoor spatial scenes. This yields individual spatial scene slices with minute-level resolution. Repeating this operation throughout the sampling period yields groups of individual spatial scene slices for different time periods (i.e., the first scene slice group, the second scene slice group, or the third scene slice group). Based on this, using pre-set image clustering software, clustering is performed on different scene slice groups (i.e., the first scene slice group, the second scene slice group, and the third scene slice group), ultimately forming scene clustering results with minute-level resolution and the distribution ratio of scenes with minute-level resolution. This provides a more specific and parameterized understanding of room usage, offering crucial foundational data for the design of energy-saving measures and better environmental protection. For example, clustering scenarios within a meeting room could result in a distribution ratio representing the proportion of meeting scenes versus other scenarios; clustering scenarios within a public classroom could result in a distribution ratio representing the proportion of teaching sessions versus group discussions, etc., without specific limitations. The image clustering processing software mentioned is also not specifically limited.
[0043] This invention employs non-fixed time slices for slice analysis and merges and connects adjacent time slices based on the characteristics of the indoor scene, thus avoiding a series of problems caused by fixed-duration slices and providing clustering results based on scene duration. Furthermore, it distinguishes between dynamic and static trajectories, using the two types of trajectories for different purposes, improving the reliability of merging and connecting adjacent, short-duration slices. Simultaneously, it utilizes the correlation between dynamic trajectories and spatial entrances / exits to assist in scene segmentation, improving the accuracy of scene segmentation. By obtaining the distribution of typical working conditions, it can provide the duration of each typical working condition, the specific stay conditions of indoor personnel, and the distribution of indoor circulation routes, thereby assisting in the planning and design of room spaces and providing crucial information for the design and operation of indoor environmental protection systems.
[0044] The spatial scene clustering analysis method based on personnel location data described in this invention separates dynamic and static trajectories by the distance between location points within a spatial scene, obtaining a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory. Based on the first heatmap, it determines whether the dynamic trajectory is associated with a spatial entrance or exit of the spatial scene. If so, the first heatmap is segmented according to different spatial scenes to obtain a first scene slice group; otherwise, the dynamic trajectory routes within the spatial scene are clustered based on the first heatmap to obtain a second scene slice group. According to the similarity between the second heatmaps of adjacent time slices, the second heatmaps of adjacent time slices are connected to obtain a third scene slice group. Finally, global scene clustering is performed on the scene slices to obtain the scene clustering results and distribution ratio, which can effectively improve the efficiency and accuracy of spatial scene clustering analysis.
[0045] The spatial scene clustering analysis device based on personnel location data provided by the present invention is described below. The spatial scene clustering analysis device based on personnel location data described below and the spatial scene clustering analysis method based on personnel location data described above can be referred to in correspondence.
[0046] Please refer to Figure 3 The diagram shown is a structural schematic of a spatial scene clustering analysis device based on personnel location data provided in an embodiment of the present invention. The spatial scene clustering analysis device based on personnel location data according to the present invention includes the following parts: The data acquisition unit 301 is used to acquire personnel location data within the spatial scene.
[0047] The heat map acquisition unit 302 is used to separate dynamic trajectory and static trajectory based on the distance between the location points of a single target in the personnel location data over a continuous time period, and to obtain a first heat map of the dynamic trajectory and a second heat map of the static trajectory.
[0048] The first heatmap processing unit 303 is used to determine whether the dynamic trajectory is related to the spatial entrance and exit of the spatial scene based on the first heatmap. If so, the first heatmap is cut according to different spatial scenes to obtain a first scene slice group; if not, the dynamic trajectory route in the spatial scene is clustered based on the first heatmap to obtain a second scene slice group. The spatial entrance and exit are used to connect different spatial scenes.
[0049] The second heatmap processing unit 304 is used to connect the second heatmaps of adjacent time slices based on the similarity between the second heatmaps of adjacent time slices to obtain a third scene slice group.
[0050] Scene clustering unit 305 is used to perform global scene clustering based on the first scene slice group, the second scene slice group and the third scene slice group to obtain scene clustering results and distribution ratio.
[0051] According to the present invention, a spatial scene clustering analysis device based on personnel location data is provided, wherein the heatmap acquisition unit is specifically used for: Based on the distance between the location points of a single target in the personnel location data over a continuous period of time, dynamic trajectory and static trajectory are separated to obtain the dynamic trajectory data and static trajectory data of the personnel. Based on the dynamic trajectory data, a first heatmap of the dynamic trajectory is generated; Based on the static trajectory data, a second heatmap of the static trajectory is generated.
[0052] According to the present invention, a spatial scene clustering analysis device based on personnel location data separates dynamic trajectories and static trajectories based on the distance between the location points of a single target in the personnel location data over a continuous time period, thereby obtaining dynamic trajectory data and static trajectory data of personnel. Specifically, it includes: The distance between the location points of a single target over a continuous period of time is calculated based on the personnel location data; if the distance between the location points is less than or equal to the preset target distance within a unit of time, the trajectory formed between the location points is determined as a static trajectory; if the distance between the location points is greater than the preset target distance within a unit of time, the trajectory formed between the location points is determined as a dynamic trajectory.
[0053] According to the present invention, a spatial scene clustering analysis device based on personnel location data is provided, wherein the first heatmap processing unit is specifically used for: Obtain the thermal distribution location of the first heatmap; wherein the thermal distribution location corresponds to the dynamic trajectory; Determine whether there is a correlation between the location of the thermal distribution and the location of the spatial entrance / exit. If there is a correlation between the locations of the thermal distribution and the spatial entrance / exit, determine that the dynamic trajectory is associated with the spatial entrance / exit of the spatial scene; if there is no correlation between the locations of the thermal distribution and the spatial entrance / exit, determine that the dynamic trajectory is not associated with the spatial entrance / exit of the spatial scene.
[0054] According to the present invention, a spatial scene clustering analysis device based on personnel location data is provided, wherein the data acquisition unit is specifically used for: Use a binocular vision camera set up within the spatial scene to collect video data within the target time range; The video data is sliced according to a first unit time to obtain multiple video images corresponding to the first unit time; wherein, the video images contain personnel location data; and the target time range includes at least one of the first unit time.
[0055] According to the spatial scene clustering analysis device based on personnel location data provided by the present invention, the second heatmap processing unit is specifically used for: The similarity between the second heatmaps of adjacent time slices is determined. If the similarity reaches a preset similarity threshold, the second heatmaps of adjacent time slices are connected to obtain a third scene slice group; wherein, the third scene slice group contains multiple connected second heatmaps.
[0056] The spatial scene clustering analysis device based on personnel location data described in this invention separates dynamic and static trajectories by the distance between location points within a spatial scene, obtaining a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory. Based on the first heatmap, it determines whether the dynamic trajectory is associated with a spatial entrance or exit of the spatial scene. If so, the first heatmap is segmented according to different spatial scenes to obtain a first scene slice group; otherwise, the dynamic trajectory routes within the spatial scene are clustered based on the first heatmap to obtain a second scene slice group. According to the similarity between the second heatmaps of adjacent time slices, the second heatmaps of adjacent time slices are connected to obtain a third scene slice group. Finally, global scene clustering is performed on the scene slices to obtain scene clustering results and distribution ratios, effectively improving the efficiency and accuracy of spatial scene clustering analysis.
[0057] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a spatial scene clustering analysis method based on personnel location data. This method includes: acquiring personnel location data within a spatial scene; separating dynamic and static trajectories based on the distance between consecutive time points of a single target in the personnel location data to obtain a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory; determining, based on the first heatmap, whether the dynamic trajectory is associated with a spatial entrance or exit of the spatial scene; if so, segmenting the first heatmap according to different spatial scenes to obtain a first scene slice group; if not, clustering the dynamic trajectory routes within the spatial scene based on the first heatmap to obtain a second scene slice group; wherein the spatial entrance or exit is used to connect different spatial scenes; connecting the second heatmaps of adjacent time slices based on the similarity between them to obtain a third scene slice group; and performing global scene clustering based on the first scene slice group, the second scene slice group, and the third scene slice group to obtain scene clustering results and distribution ratios.
[0058] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0059] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the spatial scene clustering analysis method based on personnel location data provided by the above methods. The method includes: acquiring personnel location data within a spatial scene; separating dynamic trajectories and static trajectories based on the distance between the location points of a single target in the personnel location data over a continuous time period, obtaining a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory; and determining whether the dynamic trajectory is related to the first heatmap. If the spatial entrances and exits of a spatial scene are related, the first heatmap is segmented according to different spatial scenes to obtain a first scene slice group; otherwise, the dynamic trajectory routes within the spatial scene are clustered based on the first heatmap to obtain a second scene slice group; wherein, the spatial entrances and exits are used to connect different spatial scenes; the second heatmaps of adjacent time slices are connected according to the similarity between them to obtain a third scene slice group; global scene clustering is performed based on the first scene slice group, the second scene slice group, and the third scene slice group to obtain scene clustering results and distribution ratios.
[0060] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a spatial scene clustering analysis method based on personnel location data provided by the above methods. The method includes: acquiring personnel location data within a spatial scene; separating dynamic trajectories and static trajectories based on the distance between the location points of a single target in the personnel location data over consecutive time periods to obtain a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory; determining, based on the first heatmap, whether the dynamic trajectory is associated with a spatial entrance or exit of the spatial scene; if so, segmenting the first heatmap according to different spatial scenes to obtain a first scene slice group; if not, clustering the dynamic trajectory routes within the spatial scene based on the first heatmap to obtain a second scene slice group; wherein the spatial entrance or exit is used to connect different spatial scenes; connecting the second heatmaps of adjacent time slices based on the similarity between them to obtain a third scene slice group; and performing global scene clustering based on the first scene slice group, the second scene slice group, and the third scene slice group to obtain scene clustering results and distribution ratios.
[0061] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0062] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A spatial scene clustering analysis method based on personnel location data, characterized in that, include: Acquire location data of people within the spatial scene; Based on the distance between the location points of a single target in the personnel location data over a continuous period of time, dynamic trajectories and static trajectories are separated to obtain a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory; Based on the first heatmap, it is determined whether the dynamic trajectory is associated with the spatial entrances and exits of the spatial scene. If so, the first heatmap is segmented according to different spatial scenes to obtain a first scene slice group; if not, the dynamic trajectory routes within the spatial scene are clustered based on the first heatmap to obtain a second scene slice group; wherein, the spatial entrances and exits are used to connect different spatial scenes. Based on the similarity between the second heatmaps of adjacent time slices, the second heatmaps of adjacent time slices are connected to obtain a third scene slice group; Global scene clustering is performed based on the first scene slice group, the second scene slice group, and the third scene slice group to obtain scene clustering results and distribution ratios.
2. The spatial scene clustering analysis method based on personnel location data according to claim 1, characterized in that, Based on the distance between the location points of a single target over a continuous time period in the personnel location data, dynamic trajectories and static trajectories are separated to obtain a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory, specifically including: Based on the distance between the location points of a single target in the personnel location data over a continuous period of time, dynamic trajectory and static trajectory are separated to obtain the dynamic trajectory data and static trajectory data of the personnel. Based on the dynamic trajectory data, a first heatmap of the dynamic trajectory is generated; Based on the static trajectory data, a second heatmap of the static trajectory is generated.
3. The spatial scene clustering analysis method based on personnel location data according to claim 2, characterized in that, Based on the distance between the location points of a single target in the personnel location data over a continuous period of time, dynamic trajectory and static trajectory are separated to obtain the personnel's dynamic trajectory data and static trajectory data, specifically including: The distance between the location points of a single target over a continuous period of time is calculated based on the personnel location data; if the distance between the location points is less than or equal to the preset target distance within a unit of time, the trajectory formed between the location points is determined as a static trajectory; if the distance between the location points is greater than the preset target distance within a unit of time, the trajectory formed between the location points is determined as a dynamic trajectory.
4. The spatial scene clustering analysis method based on personnel location data according to claim 1, characterized in that, The step of determining whether the dynamic trajectory is related to the spatial entrances and exits of the spatial scene based on the first heat map specifically includes: Obtain the thermal distribution location of the first heatmap; wherein the thermal distribution location corresponds to the dynamic trajectory; Determine whether there is a correlation between the location of the thermal distribution and the location of the spatial entrance / exit. If there is a correlation between the locations of the thermal distribution and the spatial entrance / exit, determine that the dynamic trajectory is associated with the spatial entrance / exit of the spatial scene; if there is no correlation between the locations of the thermal distribution and the spatial entrance / exit, determine that the dynamic trajectory is not associated with the spatial entrance / exit of the spatial scene.
5. The spatial scene clustering analysis method based on personnel location data according to claim 1, characterized in that, The acquisition of personnel location data within the spatial scene specifically includes: Use a binocular vision camera set up within the spatial scene to collect video data within the target time range; The video data is sliced according to a first unit time to obtain multiple video images corresponding to the first unit time; wherein, the video images contain personnel location data; and the target time range includes at least one of the first unit time.
6. The spatial scene clustering analysis method based on personnel location data according to claim 1, characterized in that, The step of connecting the second heatmaps of adjacent time slices based on the similarity between them to obtain a third scene slice group specifically includes: The similarity between the second heatmaps of adjacent time slices is determined. If the similarity reaches a preset similarity threshold, the second heatmaps of adjacent time slices are connected to obtain a third scene slice group; wherein, the third scene slice group contains multiple connected second heatmaps.
7. A spatial scene clustering analysis device based on personnel location data, characterized in that, include: The data acquisition unit is used to acquire personnel location data within the spatial scene; A heatmap acquisition unit is used to separate dynamic trajectories and static trajectories based on the distance between the location points of a single target in the personnel location data over a continuous time period, and to obtain a first heatmap of the dynamic trajectory and a second heatmap of the static trajectory. The first heatmap processing unit is used to determine whether the dynamic trajectory is related to the spatial entrance / exit of the spatial scene based on the first heatmap. If so, the first heatmap is segmented according to different spatial scenes to obtain a first scene slice group; if not, the dynamic trajectory routes in the spatial scene are clustered based on the first heatmap to obtain a second scene slice group. The spatial entrance / exit is used to connect different spatial scenes. The second heatmap processing unit is used to connect the second heatmaps of adjacent time slices based on the similarity between the second heatmaps of adjacent time slices to obtain a third scene slice group. The scene clustering unit is used to perform global scene clustering based on the first scene slice group, the second scene slice group, and the third scene slice group to obtain scene clustering results and distribution ratios.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the spatial scene clustering analysis method based on personnel location data as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the spatial scene clustering analysis method based on personnel location data as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the spatial scene clustering analysis method based on personnel location data as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Traffic video stream data processing method, trajectory visualization method and analysis method
CN114926495A
Track data processing method and device, intelligent equipment and storage medium
CN115212577A