Personnel positioning clustering analysis method based on DBSCAN spatiotemporal sequence fusion
By using the DBSCAN spatiotemporal sequence fusion method and combining location data from multiple time points for cluster analysis, the problems of temporal continuity and cluster level judgment in existing technologies for monitoring people gathering are solved, achieving more accurate cluster identification and efficient alarm management.
Patent Information
- Application Number
- CN202411602595.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-11-11
AI Technical Summary
Existing technologies lack continuous analysis over time in monitoring crowd gatherings, making it difficult to distinguish between short-term and continuous gatherings. The criteria for judging the level of gathering are singular, the alarm mechanism is imperfect, and it cannot adapt to different situations, leading to increased management complexity.
The DBSCAN-based spatiotemporal sequence fusion method is adopted to perform cluster analysis on location data at multiple time points to identify and track personnel gathering, distinguish different types of gathering behaviors, and combine the DBSCAN algorithm to perform clustering, calculate the center point and determine whether it is within the effective gathering area for alarm management.
It improves the accuracy and real-time performance of cluster identification, can refine cluster types, simplify the configuration process, has an efficient alarm mechanism, reduces false alarms and missed alarms, and improves the reliability and adaptability of the system.
Smart Images

Figure CN119537977B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of high-level clustering algorithm technology, specifically involving a method for personnel location clustering analysis based on DBSCAN spatiotemporal sequence fusion. Background Technology
[0002] In the current field of location data processing, especially in applications requiring real-time monitoring of crowd gatherings, such as security management of large events and crowd control in public places, accurately and promptly identifying crowd gathering phenomena has become a key technical challenge. Existing technologies typically rely on data analysis at a single point in time, lacking effective integration of data trends over time series, making it difficult to capture long-term gathering behavior patterns. Furthermore, they are inefficient at processing large-scale datasets and cannot adequately support real-time requirements.
[0003] During crowd gathering monitoring, the system needs to acquire and analyze the location information of people on site in real time. This data typically comes from various sensors and devices, such as Bluetooth beacons and Wi-Fi networks. Existing monitoring methods often rely on traditional manual inspections or fixed monitoring equipment, making it difficult to achieve real-time, dynamic assessment of crowd gathering and increasing management complexity.
[0004] The existing technical solution (or the closest technical solution) currently has the following disadvantages / deficiencies:
[0005] 1. Data processing is limited to a single point in time, ignoring the continuity in the time dimension and lacking an effective mechanism to distinguish between short-term, accidental gatherings and continuous gatherings of people.
[0006] 2. The criteria for judging the cluster level are singular, lacking flexibility and adaptability.
[0007] 3. The alarm mechanism is inadequate and cannot automatically adjust the response strategy according to different gathering situations. Summary of the Invention
[0008] To address the problems mentioned in the background, this invention proposes a personnel location and clustering analysis method based on DBSCAN spatiotemporal sequence fusion. By performing clustering analysis on location data at multiple time points, it can more accurately identify and track personnel clustering, improve system response speed, and effectively distinguish different types of clustering behavior, thereby achieving more refined safety management and crowd control strategies.
[0009] Technical Solution: To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0010] A method for personnel location and clustering analysis based on DBSCAN spatiotemporal sequence fusion is proposed. By using the DBSCAN algorithm to combine location information from multiple time points for clustering analysis, it identifies and tracks personnel clustering, distinguishes different types of clustering behavior, and realizes safety management and crowd control strategies.
[0011] As a preferred option, the specific implementation steps are as follows:
[0012] S1: Periodically collect personnel location information at multiple time points, and group all collected personnel location information according to predefined areas based on geographical location;
[0013] S2: Use the DBSCAN algorithm to perform the first cluster analysis on the personnel location data in each region and return the information of each cluster group;
[0014] S3: Calculate the center point of the candidate cluster and determine whether the center point is within the effective cluster area; if not, skip this candidate cluster; if it is, continue to the next step.
[0015] S4: Store eligible clusters and their related information in the database and continuously update the information;
[0016] S5: Traverse all active aggregation areas and obtain the aggregation slice records within the corresponding time period based on the current time and the preset aggregation duration;
[0017] S6: Use the DBSCAN algorithm to perform a second clustering analysis on the clustered slice records to obtain candidate clusters;
[0018] S7: Calculate the center point of the candidate cluster and determine whether the center point is within the effective cluster; if not, skip this candidate cluster; if it is, continue to the next step.
[0019] S8: Compare with alarm centers that are in the same cluster and are ongoing, and perform alarm management.
[0020] As a preferred option, in S2, the DBSCAN algorithm is used to perform the first cluster analysis on the personnel location data within each region, and the specific content of the information returned for each cluster group is as follows:
[0021] The DBSCAN algorithm is used to cluster a series of location data points within each region to form several potential population clusters. DBSCAN determines the clustering of the dataset by setting a minimum number of points in a neighborhood.
[0022] S21: Randomly select a location point P that has not been visited before;
[0023] S22: If P is a core point, start a new cluster and add P to this cluster; iteratively add all core points in the neighborhood of P to the same cluster;
[0024] S23: If P is not a core point, check if it is a boundary point or a noise point; if it is a boundary point, mark it as visited; if it is a noise point, ignore it.
[0025] S24: Repeat the above process until all points have been visited.
[0026] As a preferred method, the specific steps for determining whether a point is a core point, a boundary point, or a noise point are as follows:
[0027] For any two points P1 and P2, the distance D between them is calculated using the shortest path between two points on a sphere; given the Earth's radius R, and the longitude and latitude of the two points, the specific calculation formula is as follows:
[0028]
[0029]
[0030] Δα=α2-α1,
[0031] Δβ=β2-β1,
[0032] Where α represents latitude and β represents longitude; α2 represents the latitude of P2, α1 represents the latitude of P1, β2 represents the longitude of P2, β1 represents the longitude of P1, Δα represents the latitude difference between P1 and P2, and Δβ represents the longitude difference between P1 and P2.
[0033] Preferably, in S3, the center point of the candidate cluster is calculated, and it is determined whether the center point is within the effective cluster area; if not, the candidate cluster is skipped; if it is, the next step is executed as follows:
[0034] S31: Initialize variables: Initialize two accumulators sumX and sumY, which are used to accumulate the x and y coordinates of all points respectively;
[0035] S32: Accumulate coordinate values: Iterate through all points P i The x-coordinate of each point is accumulated to sumX, and the y-coordinate of each point is accumulated to sumY.
[0036] S33: Calculate the average: After the traversal is complete, use the total number of points n to average the accumulated values to obtain the x and y coordinates of the center;
[0037] Suppose we have a set P = {P1, P2, ..., Pn} containing n points. n}, each point P iCoordinates are (x i ,y i ), the coordinates of the center point C (C x C y The result is obtained through the following formula:
[0038]
[0039]
[0040] The x-coordinate of the center point C is the average of the x-coordinates of all points, and the y-coordinate of the center point C is the average of the y-coordinates of all points.
[0041] S34: Return result: Returns a Point object containing the coordinates of the center point;
[0042] S35: Cluster Validation: Check whether the center point of each cluster is located within a known valid cluster area.
[0043] Preferably, in S35, the cluster area verification: specifically checking whether the center point of each cluster group is located within a known valid cluster area, includes the following:
[0044] Define a center point P(x) p ,y p ) and a cluster A = {(x1,y1),(x2,y2),...,(x n ,y n )};
[0045] Construct a horizontal line: y = y p ;
[0046] Calculate the intersection: for each edge (x i ,y i )→(x i+1 ,y i+1 ), calculate the angle between this side and the horizontal line y = y p The intersection point, if the x-coordinate of the intersection point is greater than x p If the intersection point is 1, then it is counted as one intersection point;
[0047] Determine the number of intersection points: if the number of intersection points is odd, the point is inside the polygon; if the number of intersection points is even, the point is outside the polygon.
[0048] Preferably, in S5, all active aggregation regions are traversed, and the specific content of the aggregation slice record within the corresponding time period is obtained based on the current time and the preset aggregation duration:
[0049] View all currently active clusters and iterate through all cluster events over a past period; retrieve the current region cluster slice record with a slice time of x seconds ago.
[0050] As a preferred option, in S8, the specific content of comparing and managing alarms with continuous alarm centers within the same cluster is as follows:
[0051] The center point of the newly discovered cluster is compared with the center points of existing and ongoing alarm records. If the new cluster does not match any existing alarm records, it is added to the table as a new alarm event. All ongoing alarm records are checked. If no new UnionId is added to an alarm record in this loop, the alarm event ends and the alarm needs to be cleared.
[0052] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0053] (1) The present invention improves accuracy: by introducing a continuous consideration of time dimension, the identification of crowd gatherings becomes more accurate.
[0054] (2) The present invention enhances real-time performance: the optimized algorithm design ensures a fast response even when faced with a large amount of data.
[0055] (3) The present invention refines the types of aggregation: it can better distinguish between temporary aggregation and persistent aggregation, which helps to take differentiated intervention measures.
[0056] (4) The present invention simplifies the configuration process: users can adapt to different application scenario requirements by simply adjusting parameters, without having to understand the details of the underlying algorithm.
[0057] (5) This invention possesses a highly efficient alarm mechanism: it can not only issue early warnings quickly when potential risks are detected, but also automatically track and manage alarm status, reducing the possibility of false alarms and missed alarms. By comparing the old and new aggregation modes, it can intelligently determine when to activate new alarms and when to deactivate alarms that are no longer relevant, thereby improving the overall reliability and practicality of the system. Attached Figure Description
[0058] Figure 1 This is a flowchart of the clustering slice process of the personnel location clustering analysis method based on DBSCAN spatiotemporal sequence fusion of the present invention;
[0059] Figure 2 This is a flowchart of the aggregation alarm process for the personnel location aggregation analysis method based on DBSCAN spatiotemporal sequence fusion of the present invention. Detailed Implementation
[0060] The present invention will be further illustrated below with reference to specific embodiments. These embodiments are implemented based on the technical solutions of the present invention, and it should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention.
[0061] like Figure 1 As shown, the personnel location and clustering analysis method based on DBSCAN spatiotemporal sequence fusion provided in this embodiment, applied to a large chemical plant, can be set to collect employee location data every 5 seconds. Then, the method of this embodiment is used to automatically monitor for abnormal personnel density. Once a potential risk is detected, such as a sudden large-scale gathering of people in a specific area, an early warning is immediately issued to notify security personnel to intervene and investigate. Simultaneously, the historical review function every 30 seconds can help the plant understand which areas are more prone to overcrowding during work hours, thereby guiding future improvements in plant layout planning and safety management. Specifically, the following steps are included:
[0062] S1: Periodically collect personnel location information at multiple time points, and group all collected location information according to predefined areas based on geographical location;
[0063] The system performs cyclic processing at regular intervals (e.g., every 5 seconds), which can be adjusted as needed. The system obtains the latest location information from the devices of all relevant personnel and performs regional division and data preparation for the locations.
[0064] The zoning function is configurable and can be configured by the user according to the actual situation, generally centered around major hazard sources.
[0065] S2: Use the DBSCAN algorithm to perform the first cluster analysis on the personnel location data in each region and return the information of each cluster group;
[0066] The DBSCAN algorithm is used to cluster a series of location data points within each region to form several potential population clusters.
[0067] DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based spatial clustering algorithm that can discover clusters of arbitrary shapes from noisy datasets. Unlike algorithms such as K-means, which require pre-specifying the number of clusters, DBSCAN determines clusters in a dataset by setting a minimum number of points in a neighborhood.
[0068] DBSCAN Algorithm Flow Overview:
[0069] Define basic concepts:
[0070] Key point: Within a specified neighborhood (within a radius of ε centered on a certain person's location), there must be at least MinPts (neighborhood density threshold) other person locations.
[0071] Boundary point: A point whose neighborhood does not contain MinPts points, but falls within the neighborhood of one or more core points.
[0072] Noise points: Points that are neither core points nor boundary points.
[0073] S21: Randomly select a location point P that has not been visited before;
[0074] S22: If P is a core point, start a new cluster and add P to this cluster; iteratively add all core points in the neighborhood of P to the same cluster;
[0075] S23: If P is not a core point, check if it is a boundary point or a noise point; if it is a boundary point, mark it as visited; if it is a noise point, ignore it.
[0076] For any two points P1 and P2, the distance D between them can be calculated using the shortest path between two points on a sphere (great circle distance). Given the Earth's radius R, and the longitude and latitude of the two points (in radians), the calculation formula is as follows:
[0077]
[0078]
[0079] Δα=α2-α1,
[0080] Δβ=β2-β1,
[0081] Where α represents latitude and β represents longitude; α2 represents the latitude of P2, α1 represents the latitude of P1, β2 represents the longitude of P2, β1 represents the longitude of P1, Δα represents the latitude difference between P1 and P2, and Δβ represents the longitude difference between P1 and P2.
[0082] S24: Repeat the above process until all points have been visited.
[0083] S3: Calculate the center point of the candidate cluster and determine whether the center point is within the effective cluster area; if not, skip this candidate cluster; if it is, continue to the next step.
[0084] For each cluster generated by the DBSCAN algorithm, calculate the coordinates of its center point, that is, calculate its geometric center as the position representing the cluster.
[0085] S31: Initialize variables: Initialize two accumulators sumX and sumY, which are used to accumulate the x and y coordinates of all points respectively;
[0086] S32: Accumulate coordinate values: Iterate through all points P i The x-coordinate of each point is accumulated to sumX, and the y-coordinate of each point is accumulated to sumY.
[0087] S33: Calculate the average value: After the traversal is completed, average the accumulated value using the total number of points n to obtain the x and y coordinates of the centroid;
[0088] Suppose we have a set P = {P1, P2, ..., Pn} containing n points. n}, each point P i Coordinates are (x i ,y i ), the coordinates of the center point C (C x C y The result is obtained through the following formula:
[0089]
[0090]
[0091] The x-coordinate of the center point C is the average of the x-coordinates of all points, and the y-coordinate of the center point C is the average of the y-coordinates of all points.
[0092] S34: Return result: Returns a Point object containing the coordinates of the center point;
[0093] Cluster validation: Check if the center point of each cluster is located within a known valid cluster area. Only those clusters that fall within the specified range will be considered further. If not, skip this cluster group; if it is, proceed to the next step.
[0094] S35: Cluster Validation: Check whether the center point of each cluster is located within a known valid cluster area;
[0095] For a center point P(x) p ,y p ) and a cluster A = {(x1,y1),(x2,y2),...,(x n ,y n )};
[0096] Construct a horizontal line: y = y p ;
[0097] Calculate the intersection: for each edge (x i ,y i )→(xi+1 ,y i+1 ), calculate the angle between this side and the horizontal line y = y p The intersection point, if the x-coordinate of the intersection point is greater than x p If the intersection point is 1, then it is counted as one intersection point;
[0098] Determine the number of intersection points: if the number of intersection points is odd, the point is inside the polygon; if the number of intersection points is even, the point is outside the polygon.
[0099] S4: Store the eligible clusters and their related information in the database, and continuously update this information over time for subsequent analysis;
[0100] The information of the centroid of the eligible clusters and the information of the members within the clusters are stored in the cluster_slice table in the database, as shown in Table 1 below.
[0101] Table 1 cluster_slice
[0102] Column names Data types Notes id bigint(20) primary key cluster_id bigint(20) Clustered warning zone primary key cluster_alarm_id bigint(20) Aggregated alarm primary key union_id bigint(20) Clustered alarm joint ID; indicates that they are the same clustered alarm. area_id bigint(20) Region ID area_type int(11) Area type; 1-Factory area, 2-Building or site, 3-Floor or frame center_point varchar(100) Cluster center point; Format: longitude, latitude slice_time datetime Slicing time alarm_level int(11) Warning levels: 1 - Level 1 warning, 2 - Level 2 warning, 3 - Level 3 warning alarm_number int(11) Number of people gathered alarm_center_point varchar(100) Alarm center point; Format: longitude, latitude alarm_duration int(11) Duration; in seconds create_time datetime Creation time
[0103] In addition, over another longer time period (e.g., every 30 seconds), the persistent aggregation is monitored and compared with existing alarm records; specifically:
[0104] S5: Traverse all active aggregation areas and obtain the aggregation slice records within the corresponding time period based on the current time and the preset aggregation duration;
[0105] The system processes data in a 30-second cycle, which can be adjusted as needed. The system will view all currently active clusters and review all clustering events over a period of time. It will retrieve the current region's clustering slice record from x seconds ago (where x is the clustering duration).
[0106] S6: Use the DBSCAN algorithm to perform a second clustering analysis on the clustered slice records to obtain candidate clusters;
[0107] The DBSCAN algorithm takes cluster slice center points as input parameters and returns candidate clusters as return parameters to discover long-term clustering patterns spanning multiple short time periods.
[0108] Determine whether the people corresponding to the candidate clusters are continuous and consistent; if there are 3, they are considered a cluster, and so on.
[0109] Key point: The specified neighborhood (within a radius of ε centered on a certain person's location) must contain at least MinPts other person locations.
[0110] Boundary point: A point whose neighborhood does not contain MinPts points, but falls within the neighborhood of one or more core points.
[0111] Noise points: Points that are neither core points nor boundary points.
[0112] S61: Randomly select a location point P that has not been visited before;
[0113] S62: If P is a core point, start a new cluster and add P to this cluster; iteratively add all core points in the neighborhood of P to the same cluster;
[0114] S63: If P is not a core point, check if it is a boundary point or a noise point; if it is a boundary point, mark it as visited; if it is a noise point, ignore it.
[0115] For any two points P1 and P2, the distance D between them can be calculated using the shortest path between two points on a sphere (great circle distance). Given the Earth's radius R, and the longitude and latitude of the two points (in radians), the calculation formula is as follows:
[0116]
[0117]
[0118] Δα=α2-α1,
[0119] Δβ=β2-β1,
[0120] Where α represents latitude and β represents longitude; α2 represents the latitude of P2, α1 represents the latitude of P1, β2 represents the longitude of P2, β1 represents the longitude of P1, Δα represents the latitude difference between P1 and P2, and Δβ represents the longitude difference between P1 and P2.
[0121] S64: Repeat the above process until all points have been visited.
[0122] S7: Calculate the center point of the candidate cluster and determine whether the center point is within the effective cluster; if not, skip this candidate cluster; if it is, continue to the next step.
[0123] For each cluster generated by the DBSCAN algorithm, calculate the coordinates of its center point; check whether these center points are located within a valid cluster.
[0124] For a center point P(x) p ,y p ) and a cluster B = {(x1,y1),(x2,y2),...,(x n ,y n )};
[0125] Construct a horizontal line: y = y p ;
[0126] Calculate the intersection: for each edge (x i ,y i )→(x i+1 ,y i+1 ), calculate the angle between this side and the horizontal line y = y p The intersection point, if the x-coordinate of the intersection point is greater than x p If the intersection point is 1, then it is counted as one intersection point;
[0127] Determine the number of intersection points: if the number of intersection points is odd, the point is inside the polygon; if the number of intersection points is even, the point is outside the polygon.
[0128] S8: Compare with alarm centers that are in the same cluster and are ongoing, and perform alarm management;
[0129] The center point of the newly discovered cluster is compared with the center point of the existing alarm records that are in a continuous state. If the new cluster does not match any existing alarm records, it is added as a new alarm event to the cluster_alarm table, as shown in Table 2 below.
[0130] Table 2 cluster_alarm
[0131] Column names Data types Notes id bigint(20) primary key cluster_id bigint(20) Clustered warning zone primary key union_id bigint(20) Clustered alarm joint ID; indicates that they are the same clustered alarm. area_id bigint(20) Region ID area_type int(11) Area type; 1-Factory area, 2-Building or site, 3-Floor or frame type int(11) Zone type; 1-Warning zone, 2-Silent zone center_point varchar(100) Cluster center point; Format: longitude, latitude level int(11) Warning levels: 1 - Level 1 warning, 2 - Level 2 warning, 3 - Level 3 warning number int(11) Number of people gathered duration int(11) Duration; in seconds start_time datetime Alarm generation time end_time datetime Alarm clearing time status int(11) Status: 1 - In progress, 2 - Alarm deactivated
[0132] Check all ongoing alarm records; if no new member is added to an alarm record in this loop (i.e. no new UnionId is added), the alarm event ends and the alarm needs to be cleared.
[0133] UnionId is the ID of the clustered alarm. Each calculated alarm center point is compared with the continuous alarm center point in the same cluster area. If they are within 5m, they are considered the same alarm and have the same UnionId.
[0134] Alarm Management: Compare newly discovered long-term clustering patterns with existing active alarm records, update alarm status, including adding alarms and deactivating inactive alarms.
[0135] After completing one cycle, the process returns to the starting point, waiting for the next 30-second cycle to begin.
[0136] The personnel location and clustering analysis system based on DBSCAN spatiotemporal sequence fusion provided in this embodiment adopts the above-mentioned personnel location and clustering analysis method based on DBSCAN spatiotemporal sequence fusion. The system includes an area management module, a positioning device management module, a personnel and vehicle information management module, a clustering early warning management module, an alarm management module, and a configuration center module.
[0137] The area management module provides area management and location management functions, allowing you to build digital areas that mirror real-world factory or office locations. Based on these digital areas, it restores the location information of various positioning devices and special areas.
[0138] The area management system supports setting up three types of areas: factory areas, buildings, and floors. Each area is based on a two-dimensional floor plan, with its size fixed by setting a scale. Building areas must belong to a specific factory area; floor areas require specifying the building they belong to, as well as the floor ID and absolute height, to meet the vertical area application needs of personnel positioning scenarios (e.g., intelligent inspection point locations). The configured factory and floor plans support association with GIS geographic location information. The GIS location of an area can be fixed by selecting points on the map, and the system supports reverse lookup of area location information through GIS information to determine the location of personnel, vehicles, and special areas (special work areas, etc.). For aesthetic purposes, renderings of the areas can also be set, which will be displayed as renderings on the large screen. Buildings support plotting functionality, allowing the shape and location of buildings to be plotted on the factory floor plan, with the building name displayed at the plotted location on the large screen.
[0139] In location management, a floor plan of the regional system is displayed. Different regional floor plans can be switched through the regional tree, and various points on the corresponding regions are displayed. It supports searching for regions by region name and supports fuzzy matching.
[0140] You can view the distribution of different locations and areas such as base stations, beacons, inspection points, special operation areas, and cameras. Clicking on a device location will display the device information at that location; clicking on an inspection point will display the information of the inspection point; clicking on a special operation area will display the type of special operation and operation time information; clicking on a camera will display the camera equipment information.
[0141] Positioning device module: Used to access information about positioning devices in the system, such as base stations, beacons, and positioning cards, and to add business attributes to the devices, making it easier for administrators to manage them.
[0142] Personnel and Vehicle Information Management Module: Used to bind employee location card information, as well as register contractors, visitors, and vehicle information entering the park and bind their location cards.
[0143] The Gathering Early Warning Management Module monitors and describes the gathering of people in the park. In sensitive areas, when the gathering of people exceeds the threshold set by the company, a gathering alarm is issued.
[0144] Alarm Management Module: Stores alarm records from various sources such as areas, devices, and cluster alerts. It processes and records alarm information in the system for easy backtracking.
[0145] Configuration Center Module: Used to manage configuration items in the system, facilitating the implementation of various customized configurations.
[0146] This invention utilizes the DBSCAN algorithm combined with location information from multiple time points for cluster analysis, which can more accurately identify and track crowd gatherings, improve system response speed, and effectively distinguish different types of gathering behaviors, thereby enabling more refined safety management and crowd control strategies.
[0147] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A personnel positioning clustering analysis method based on DBSCAN spatiotemporal sequence fusion, characterized in that: By using DBSCAN algorithm combined with location information at multiple time points for clustering analysis, the personnel gathering situation is recognized and tracked, and different types of gathering behaviors are distinguished, so as to realize security management and people flow control strategy; The specific implementation steps are as follows: S1: periodically collect personnel location information at multiple time points, and group all collected personnel location information according to predefined areas according to geographical location; S2: use DBSCAN algorithm to perform first clustering analysis on personnel location data in each area, and return information of each gathering group; Use DBSCAN algorithm to cluster a series of location data points in each area to form a plurality of potential personnel gathering groups; DBSCAN determines clustering in the data set by setting a minimum number of points in a neighborhood; S21: randomly select a personnel location point P that has not been visited; S22: if P is a core point, start a new cluster and add P to the cluster; All core points in the neighborhood of P are iteratively added to the same cluster; S23: if P is not a core point, check whether it is a boundary point or a noise point; if it is a boundary point, mark it as visited; if it is a noise point, ignore it; S24: repeat the above process until all points are visited; S3: calculate the center point of the candidate gathering group, and judge whether the center point is in the effective gathering area; If not, skip this candidate gathering group; if yes, continue to the next step; S4: store the gathering group meeting the requirements and its related information to the database, and continuously update the information; S5: traverse all enabled gathering areas, and according to the current time and the preset gathering duration, obtain the gathering slice record in the corresponding time period; S6: use DBSCAN algorithm to perform second clustering analysis on the gathering slice record to obtain a candidate gathering cluster; S7: calculate the center point of the candidate gathering cluster, and judge whether the center point is in the effective gathering group; If not, skip this candidate gathering cluster; if yes, continue to the next step; For a center point P(x p ,y p ) and a cluster B = {(x1,y1),(x2,y2),...,(x n ,y n )}; Construct horizontal line: y = y p ; Compute intersection: For each edge (x i ,y i )→(x i+1 ,y i+1 ), compute the intersection of this edge with the horizontal line y = y p , and if the x-coordinate of the intersection is greater than x p , count it as an intersection. Determine the intersection point number: if the intersection point number is odd, the point is inside the polygon; if the intersection point number is even, the point is outside the polygon; S8: compare with the alarm center point in the same gathering group and in the continuous state, and perform alarm management; Compare the center point of the newly discovered gathering cluster with the center point in the existing alarm record in the continuous state; if the new gathering cluster does not match any existing alarm record, add it as a new alarm event to the table, and check all ongoing alarm records; if a certain alarm record does not appear in the new same UnionId in this cycle, the alarm event ends, and the alarm needs to be eliminated. 2.The personnel positioning clustering analysis method based on DBSCAN spatiotemporal sequence fusion according to claim 1, characterized in that: The specific content of determining whether it is a core point or a boundary point or a noise point is as follows: For any two points P1 and P2, the distance D between them is calculated using the shortest path between two points on a sphere; given the earth radius R and the longitude and latitude of the two points, the specific calculation formula is as follows: Δα=α2-α1, Δβ=β2-β1, Wherein, α represents latitude, β represents longitude; α2 represents P2 latitude, α1 represents P1 latitude, β2 represents P2 longitude, β1 represents P1 longitude, Δα represents P1P2 latitude difference, Δβ represents P1P2 longitude difference. 3.The personnel positioning clustering analysis method based on DBSCAN spatiotemporal sequence fusion according to claim 1, characterized in that: In S3, the center point of the candidate aggregation group is calculated, and it is judged whether the center point is in the effective aggregation area; if not, the candidate aggregation group is skipped; if yes, the specific content of the next step is continued to be executed: S31: initialization of variables: two accumulators sumX and sumY are initialized, which are used to accumulate the horizontal coordinates and vertical coordinates of all points respectively; S32: Accumulate coordinate values: iterate through all points P i Accumulate the x-coordinate of each point into sumX and the y-coordinate of each point into sumY; S33: calculation of average value: after the traversal is completed, the average value of the accumulated value is obtained by using the total number of points n, to obtain the horizontal coordinate and vertical coordinate of the center; Suppose we have a set P = {P1, P2, ..., Pn} containing n points. n }, each point P i Coordinates are (x i ,y i ), the coordinates of the center point C (C x C y The result is obtained through the following formula: The horizontal coordinate of the center point C is the average value of the horizontal coordinates of all points, and the vertical coordinate of the center point C is the average value of the vertical coordinates of all points; S34: return result: a Point object containing the center point coordinates is returned; S35: aggregation area verification: it is checked whether the center point of each aggregation group is located in the known effective aggregation area.
4. The personnel positioning cluster analysis method based on DBSCAN spatiotemporal sequence fusion according to claim 3, characterized in that: In S35, the aggregation area verification: the specific content that the center point of each aggregation group is checked whether it is located in the known effective aggregation area is: Set a center point P(x p ,y p ) and a cluster area A = {(x1,y1),(x2,y2),...,(x n ,y n )}; Construct horizontal line: y = y p ; Compute intersection: For each edge (x i ,y i )→(x i+1 ,y i+1 ), compute the intersection of this edge with the horizontal line y = y p , and if the x-coordinate of the intersection is greater than x p , count it as an intersection. Determine the intersection number: if the intersection number is odd, the point is inside the polygon; if the intersection number is even, the point is outside the polygon. 5.The personnel positioning clustering analysis method based on DBSCAN spatiotemporal sequence fusion according to claim 1, characterized in that: In S5, the specific content that all enabled aggregation areas are traversed, and the aggregation slice record in the corresponding time period is obtained according to the current time and the preset aggregation duration is: All aggregation groups in use are viewed, all aggregation events in the past period of time are traversed; the current area aggregation slice record before the slice time x seconds is obtained.
Citation Information
Patent Citations
A special crowd event early warning and monitoring method and device
CN109711447A
Real-time aggregation alarm method based on space-time positioning technology, server and medium
CN117435942A
Multi-source data fusion-based crowd travel accompanying identification method
CN117557953A