A police scene-based multi-source heterogeneous data fusion analysis and processing method and system
By performing dynamic background culling on video frame sequences and text records in police scenarios, generating displacement perturbation vector chains and aligning them with text semantic anchors, the problem of cross-source collaborative analysis in police data fusion and analysis is solved, improving the accuracy and response efficiency of event perception and localization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN TUOBIDA TECH CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies struggle to effectively establish cross-source collaborative analysis mechanisms in police scenarios, leading to the fragmentation or loss of intrinsic connections between different data sources, which affects the spatiotemporal coherence and semantic consistency of the analysis results.
By receiving video frame sequences, text record entries, and positioning point coordinate sequences, dynamic background culling is performed to generate displacement perturbation vector chains and align them with text semantic anchors on the time axis. A spatiotemporal perturbation record set is constructed, candidate event hotspots are filtered, a set of event connectivity boundaries is generated and associated with them, and an event graph data stream is output.
It achieves an inherent correlation between video data and text data under a unified time reference, adaptively discovers event areas, and improves the accuracy and response efficiency of emergency event perception and positioning.
Smart Images

Figure CN122493366A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and more specifically, to a method and system for fusing and analyzing multi-source heterogeneous data in a police scenario. Background Technology
[0002] With the rapid development of big data and artificial intelligence technologies, various types of data generated in public security operations can be collected, integrated, and analyzed to support police decision-making and actions. Currently, this is typically done by processing each type of data source independently. For example, moving target detection is performed on video surveillance data, keyword extraction is performed on text alarm records, and path fitting is performed on location trajectory data. The processing results of various data types are then simply concatenated according to timestamps or spatial coordinates before being output. However, this approach struggles to establish an effective cross-source collaborative analysis mechanism at the underlying data level when faced with complex situations in actual policing scenarios, such as diverse data source types, inconsistent data formats, inconsistent data collection frequencies, and dynamic changes in the spatiotemporal boundaries of events. This leads to the fragmentation or loss of the inherent correlation information between different data sources, resulting in a lack of sufficient spatiotemporal coherence and semantic consistency in the final analysis results, thus affecting the practicality and reliability of police data fusion analysis. Summary of the Invention
[0003] In view of this, the present invention provides a method and system for fusion analysis and processing of multi-source heterogeneous data in police scenarios.
[0004] According to one aspect of the present invention, a method for fusing and analyzing multi-source heterogeneous data in a police scenario is provided, comprising: The system receives a first raw data packet, a second raw data packet, and a third raw data packet from multiple police data source terminals. The first raw data packet carries a video frame sequence and the acquisition timestamp corresponding to each frame. The second raw data packet carries text record entries and the entry timestamp of each entry. The third raw data packet carries a location point coordinate sequence, the location timestamp of each location point, and the identification of the police personnel or equipment corresponding to each location point. Dynamic background culling is performed on the video frame sequence in the first original data packet to separate the displacement perturbation field of the foreground moving target between consecutive frames. The displacement perturbation field is aligned with the entry timestamp of the text record entry in the second original data packet to generate a spatiotemporal perturbation record set carrying the displacement perturbation vector chain and the corresponding text semantic anchor point. The spatially dense region of displacement perturbation vector chain is extracted from the spatiotemporal perturbation record set. This spatially dense region is used as a candidate event hot zone. At the same time, a subset of positioning points that fall into the candidate event hot zone is selected from the positioning point coordinate sequence in the third original data packet. An event evolution time window sequence is constructed based on the time interval between adjacent positioning points in the positioning point subset. Within each event evolution time window, the displacement perturbation vector chain in the spatiotemporal perturbation record set is spatially superimposed with the coordinates of the location points in the location point subset. The event connected domain boundary set is generated by comparing the direction consistency of the displacement perturbation vector at each location point with the displacement perturbation vector between adjacent location points. The event connected domain boundary set is associated and matched with text semantic anchors. Each successfully matched event connected domain boundary is assigned an event type label, and the event graph data stream carrying the event type label and event connected domain boundary is output in the order of the event evolution time window sequence.
[0005] According to another aspect of the present invention, a computer system is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable code that, when executed by the processor, causes the processor to perform the method described above.
[0006] This invention receives video frame sequences, text record entries, and location point coordinate sequences. It performs dynamic background culling on the video frame sequences to separate the displacement perturbation field of the moving foreground target. This displacement perturbation field is then aligned with the timestamp of the text record entry, generating a spatiotemporal perturbation record set carrying displacement perturbation vector chains and corresponding text semantic anchors. This establishes an intrinsic connection between video and text data under a unified temporal reference. Densely distributed regions of displacement perturbation vector chains are extracted from the spatiotemporal perturbation record set as candidate event hotspots. A subset of location points falling within these hotspots is selected, and an event evolution time window sequence is constructed based on the time intervals between adjacent location points. This automatically focuses massive amounts of raw data onto anomaly-dynamic spatial ranges and temporal intervals. Within each event evolution time window, the displacement perturbation vector chains are spatially superimposed with the location point coordinates. The consistency of the direction of the displacement perturbation vector at a location point with that between adjacent location points generates a set of event connectivity boundaries. Based on data-driven spatiotemporal boundaries, event regions of different sizes and forms are adaptively discovered. By associating and matching the set of event connectivity boundaries with text semantic anchors, assigning event type labels to each event connectivity boundary, and outputting event graph data streams carrying event type labels and event connectivity boundaries in the order of event evolution time window sequence, police officers are provided with event analysis basis that integrates spatiotemporal range and semantic description, thereby improving the accuracy and response efficiency of emergency event perception and positioning. Attached Figure Description
[0007] Figure 1 This is a schematic diagram of an application scenario provided by the present invention; Figure 2 This is a flowchart illustrating a method for fusing and analyzing multi-source heterogeneous data in a police scenario, provided by the present invention. Figure 3This is a schematic diagram of the structure of a computer system provided in an embodiment of the present invention. Detailed Implementation
[0008] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0009] To facilitate a clearer understanding of this invention, we will first introduce the application scenarios of the police scenario-based multi-source heterogeneous data fusion analysis and processing method, such as... Figure 1 As shown, the application scenario of this invention includes a computer system 10 and a police data source terminal cluster. The police data source terminal cluster may include one or more police data source terminals; the number of police data source terminals will not be limited here. Figure 1 As shown, the police data source terminal cluster may specifically include police data source terminal 1, police data source terminal 2, ..., police data source terminal n; it can be understood that police data source terminal 1, police data source terminal 2, police data source terminal 3, ..., police data source terminal n can all be connected to the computer system 10 via network so that each police data source terminal can interact with the computer system 10 via network connection.
[0010] It is understood that computer system 10 can refer to a device that executes the police scenario-based multi-source heterogeneous data fusion analysis and processing method provided in the embodiments of the present invention. Computer system 10 can be, for example, a server, a single physical server, or a server cluster or distributed system consisting of at least two physical servers. Each police data source terminal and computer system 10 can be directly or indirectly connected via wired or wireless communication. Furthermore, the number of police data source terminals and computer systems 10 can be one or at least two; this invention does not impose any limitation on this.
[0011] Further, please see Figure 2 This is a flowchart illustrating a method for fusing and analyzing multi-source heterogeneous data in a police scenario, provided by an embodiment of the present invention. Figure 2 As shown, this method can be derived from... Figure 1 The computer system 10 in the system executes the following steps: Step S100: Receive a first raw data packet, a second raw data packet, and a third raw data packet from multiple police data source terminals. The first raw data packet carries a video frame sequence and the acquisition timestamp corresponding to each frame. The second raw data packet carries text record entries and the entry timestamp of each entry. The third raw data packet carries a location point coordinate sequence, the location timestamp of each location point, and the identification of the police personnel or equipment corresponding to each location point.
[0012] In this embodiment of the invention, the police data source terminal may include, for example, the encoding output interface of a fixed surveillance camera, the video stream output port of a police law enforcement recorder, the video push module of a vehicle-mounted panoramic camera system, and a text input interface and a location data transceiver unit on a police handheld terminal. The video frame sequence in the first raw data packet consists of a series of two-dimensional image frames arranged in ascending order of acquisition time. Each frame can use a YUV or RGB color space to store a pixel array. The acquisition timestamp is generated by the timing module within the terminal based on a network time protocol or a global positioning system time source, marking the absolute start or end time of the frame's exposure. The text record entries in the second raw data packet are encapsulated in a structured lightweight data exchange format. Each record includes fields such as incident number, incident type, brief description, and involved personnel. The input timestamp is obtained by the police terminal reading the system time when submitting the text content. The location point coordinate sequence in the third raw data packet is represented by a longitude and latitude binary tuple in a geographic coordinate system. The location timestamp marks the time when the location point was calculated by the satellite positioning receiver. The police personnel or equipment identifier uses a globally unique identification code, such as a police officer number or a terminal device serial number.
[0013] Step S200: Perform dynamic background culling on the video frame sequence in the first original data packet, separate the displacement perturbation field of the foreground moving target between consecutive frames, align the displacement perturbation field with the entry timestamp of the text record entry in the second original data packet on the time axis, and generate a spatiotemporal perturbation record set carrying the displacement perturbation vector chain and the corresponding text semantic anchor point.
[0014] Dynamic background culling refers to the process of separating relatively static background areas from moving foreground targets in a video frame sequence. In a video frame sequence, background areas such as buildings, roads, and fixed facilities in a monitored scene show slow pixel value changes or only periodic fluctuations between consecutive frames, while moving targets such as pedestrians and vehicles exhibit significant pixel position changes. The displacement perturbation field describes the set of positional offsets of foreground moving targets between adjacent frames; each displacement perturbation vector contains two components: direction of movement and step size. Time axis alignment refers to matching the acquisition timestamp of the video frame with the entry timestamp of the text record entry on a common time base, so that each displacement perturbation vector can be associated with the text description information closest in time. Text semantic anchors are keywords or phrases extracted from text record entries that can characterize the semantic information of the event at that moment. The spatiotemporal perturbation record set is a data structure that integrates spatial displacement information and temporal text annotation, where each record entry corresponds to a foreground moving target, recording the target's continuous displacement trajectory over a period of time and the associated text descriptions along the way.
[0015] In one implementation, step S200 involves performing dynamic background culling on the video frame sequence in the first original data packet to separate the displacement perturbation field of the foreground moving target between consecutive frames. The displacement perturbation field is then time-aligned with the entry timestamp of the text record entry in the second original data packet to generate a spatiotemporal perturbation record set carrying a displacement perturbation vector chain and corresponding text semantic anchor points. Specifically, this may include the following steps S210~S260: Step S210: Read consecutive first video frames and second video frames from the first raw data packet, determine the dynamic difference between the pixel value of each pixel in the first video frame and the pixel value of the same coordinate pixel in the second video frame, mark the pixel with dynamic difference exceeding the dynamic threshold as foreground pixel, and obtain the first foreground pixel set.
[0016] Dynamic difference determination refers to calculating the pixel value difference between the first and second video frames at the same spatial coordinates, pixel by pixel. For RGB color images, the red, green, and blue channel values at a certain coordinate in the first video frame and the same coordinate in the second video frame are extracted. The absolute values of the red, green, and blue channel differences are calculated, and the three absolute values are added together to obtain the total difference value of the pixel. For grayscale images, the absolute difference of the grayscale values is calculated directly. The dynamic threshold is calculated in real time based on the overall difference statistics of the current frame pair. Specifically, it iterates through the difference values of all pixels between the first and second video frames, calculates the arithmetic mean and standard deviation of these difference values, and sets the dynamic threshold to a preset multiple of the arithmetic mean plus the standard deviation. This multiple is set in the configuration file according to the degree of scene dynamic change. A larger multiple is used when the scene is dynamically changing drastically to suppress noise, and a smaller multiple is used when the scene is relatively static to improve sensitivity. The total difference value calculated for each pixel is compared with a dynamic threshold. If the total difference value is greater than the dynamic threshold, the pixel is identified as a foreground pixel, and its pixel value is set as the foreground marker value. If the total difference value is less than or equal to the dynamic threshold, it is identified as a background pixel. After traversing all coordinate positions of the entire image plane, all pixels marked as foreground pixels constitute the first foreground pixel set.
[0017] Step S220: Perform spatial adjacency merging on the first foreground pixel set, merge spatially adjacent foreground pixels into the same foreground moving target instance, extract the center coordinates of the first region in the first video frame and the center coordinates of the second region in the second video frame of the foreground moving target instance, and record the bounding rectangle area of the foreground moving target instance in the first video frame and the bounding rectangle area in the second video frame.
[0018] Spatial adjacency grouping aggregates foreground pixels in the first foreground pixel set that satisfy the 8-connectivity adjacency relationship into connected components. The 8-connectivity relationship includes four orthogonal directions (up, down, left, right) and four diagonal directions (upper left, upper right, lower left, lower right). A marker matrix with the same width and height as the video frame is created, and each element in the matrix is initialized to 0. Each pixel in the first foreground pixel set is traversed according to the raster scan order, i.e., scanning row by row from the upper left corner to the right, and starting from the next row after each row is scanned. For the currently traversed pixel, it is checked whether the value of its corresponding position in the marker matrix is 0. If it is 0, it means that the pixel has not yet been assigned a connected component identifier. At this time, a new connected component identifier is created and assigned to the current pixel's position in the marker matrix. Using this pixel as a seed, it is recursively checked whether the pixels in its 8 neighboring directions also belong to the first foreground pixel set. If they do, they are assigned the same connected component identifier, and these newly marked pixels are used as new seeds to continue expanding outward until no more neighboring pixels belonging to the first foreground pixel set can be found.
[0019] After the recursive expansion process described above, all pixels with the same connected component identifier constitute a foreground moving target instance. Each connected component corresponds to an independent moving entity in the scene. For each foreground moving target instance, its region center coordinates are calculated in the first and second video frames, respectively. Specifically, the row coordinate values of all foreground pixels within the instance are collected, and the arithmetic mean of these row coordinate values is calculated as the center row coordinate; the column coordinate values of all foreground pixels are collected, and the arithmetic mean of these column coordinate values is calculated as the center column coordinate; the center row coordinate and the center column coordinate together constitute the region center coordinate. The first region center coordinate is the center position calculated in the first video frame, and the second region center coordinate is the center position calculated in the second video frame.
[0020] The bounding rectangle is the smallest axis-aligned rectangle that completely contains all foreground pixels of the instance. Iterate through all foreground pixels within the instance, finding the smallest, largest, smallest, and largest row coordinates. Use the smallest row coordinate as the top boundary, the largest row coordinate as the bottom boundary, the smallest column coordinate as the left boundary, and the largest column coordinate as the right boundary to enclose the rectangular area. The area of the bounding rectangle is calculated by multiplying the rectangle's height by its width. The rectangle's height is the difference between the largest and smallest row coordinates, and its width is the difference between the largest and smallest column coordinates.
[0021] Step S230: The positional offset of the center coordinates of the second region relative to the center coordinates of the first region is used as the displacement perturbation vector. The displacement perturbation vector is associated with the acquisition timestamp of the second video frame and recorded. All adjacent frame pairs in the first original data packet are traversed to generate an ordered sequence of displacement perturbation vectors corresponding to each foreground moving target as the displacement perturbation vector chain.
[0022] For each instance of a moving foreground target, the center coordinates of the second region in the second video frame are subtracted from the center coordinates of the first region in the first video frame. The horizontal offset is obtained by subtracting the horizontal component of the first region's center coordinates from the horizontal component of the second region's center coordinates, and the vertical offset is obtained by subtracting the vertical component of the first region's center coordinates from the vertical component of the second region's center coordinates. The horizontal and vertical offsets together constitute the displacement perturbation vector. This displacement perturbation vector describes the positional change of the moving foreground target from the first video frame to the second video frame, where the sign of the horizontal offset indicates movement to the right or left, and the sign of the vertical offset indicates movement downwards or upwards. A key-value pair record is established between the calculated displacement perturbation vector and the acquisition timestamp of the second video frame. The acquisition timestamp serves as the key for time indexing, and the displacement perturbation vector serves as the value for motion analysis. The entire video frame sequence in the first original data packet is traversed, and the Kth frame and the (K+1)th frame are taken as adjacent frame pairs in turn, where K increases from 1 to the total number of video frames minus 1. For each pair of adjacent frames, all operations of extracting foreground moving target instances and calculating displacement perturbation vectors in steps S210 to S230 are repeated. During the traversal, the identity of the same physical target is kept consistent across different frame pairs. For the set of foreground moving target instances extracted from the Kth frame and the (K+1)th frame, and the set of foreground moving target instances extracted from the (K+1)th frame and the (K+2)th frame, the intersection-union ratio (IUGR) of the bounding rectangles of the instances in the (K+1)th frame and the bounding rectangles of the instances in the (K+2)th frame are calculated for matching. The IUGR can be calculated using existing techniques, for example, by dividing the area of the overlapping region of the two rectangles by the total area of the two rectangles minus the area of the overlapping region. When the IUGR is greater than a preset threshold, the two instances are determined to belong to the same foreground moving target. All displacement perturbation vectors identified as the same foreground moving target are arranged in ascending order of their acquisition timestamps to form an ordered sequence, which is called the displacement perturbation vector chain of that target. The displacement perturbation vector chain completely records the continuous motion trajectory of the moving target along the entire video timeline.
[0023] Step S240: Read the entry timestamp of each text record entry from the second raw data packet, perform time proximity matching between the acquisition timestamp and the entry timestamp corresponding to each displacement disturbance vector in the displacement disturbance vector chain, and if the absolute time distance between the acquisition timestamp and the entry timestamp is less than the alignment window, then bind the text content of the text record entry to the displacement disturbance vector as a text semantic anchor.
[0024] Specifically, for each displacement perturbation vector in the displacement perturbation vector chain, its associated acquisition timestamp is obtained as the query time point. The entry whose entry timestamp is closest to the query time point is searched among all text record entries in the second original data packet. The absolute time distance refers to the absolute value of the difference between two timestamps, reflecting the time interval between the video frame acquisition time and the text entry time. The alignment window is a preset time length threshold used to define the effective range of the match. When the absolute time distance between the entry timestamp and the acquisition timestamp of a text record entry is less than the alignment window, it indicates that the text record entry has a strong temporal correlation with the video frame. The text content of this entry is completely extracted, and after text cleaning to remove invalid characters and whitespace, it is used as a text semantic anchor to establish a bidirectional binding relationship with the displacement perturbation vector. The binding relationship is stored as a pointer reference or key-value mapping in a data structure, allowing access to the corresponding text semantic anchor through the displacement perturbation vector, and vice versa.
[0025] In one embodiment, step S240 may specifically include the following steps S241 to S246: Step S241: Establish a time proximity matching window. The length of the time proximity matching window is a preset time distance threshold. Use the acquisition timestamp of each displacement disturbance vector in the displacement disturbance vector chain as the central reference point. Search for the input timestamp in the second original data packet within half of the time proximity matching window before and after the acquisition timestamp.
[0026] The time proximity matching window is an interval symmetrically centered on the acquisition timestamp, extending half the window length in both the negative and positive directions along the time axis. The total length of the window is the preset time distance threshold, denoted as W. The left boundary of the window is the acquisition timestamp minus W / 2, and the right boundary is the acquisition timestamp plus W / 2. Within this interval, a range query is performed on all the entered timestamps in the second original data packet to filter out all entered timestamps greater than or equal to the left boundary and less than or equal to the right boundary, along with the corresponding complete text record entries.
[0027] Step S242: If at least one entry timestamp is located within the search range, the text record entry corresponding to the entry timestamp with the smallest absolute time distance from the collection timestamp is selected as the matching entry, and the text content of the matching entry is used as the text semantic anchor.
[0028] When one or more recording timestamps exist within the search range, the absolute difference between each recording timestamp and the acquisition timestamp is calculated. These absolute differences are compared, and the recording timestamp corresponding to the minimum value is identified. This recording timestamp is temporally closest to the acquisition time of the video frame; therefore, its corresponding text record entry is most likely to describe the police incident that occurred at that moment. The text content fields of this text record entry are extracted, formatted as necessary, and stored as text semantic anchors in the extended attributes of the current displacement perturbation vector.
[0029] Step S243: If no input timestamp is located within the search range, the displacement disturbance vector is marked as an anchorless displacement disturbance vector, and all anchorless displacement disturbance vectors are collected to form an anchorless vector set.
[0030] When no data entry timestamp is found within the search range, it means there are no text records entered by police officers near the collection time corresponding to the displacement disturbance vector, and the displacement disturbance vector lacks direct semantic association information. In this case, a special marker is added to the metadata field of the displacement disturbance vector, with a value indicating no anchor point. All displacement disturbance vectors carrying this marker are extracted from their respective displacement disturbance vector chains and placed into a separate container in ascending order of collection timestamps; this container is the set of anchor point-free vectors.
[0031] Step S244: For two adjacent anchorless displacement perturbation vectors in the anchorless vector set, obtain the time interval between their acquisition timestamps. If the time interval is less than the interpolation time window, obtain the bounding rectangle area of the foreground moving target instance corresponding to each of the two anchorless displacement perturbation vectors in the corresponding video frame. The bounding rectangle area is calculated by the rectangle enclosed by the minimum row coordinate, maximum row coordinate, minimum column coordinate, and maximum column coordinate of all foreground pixels of the foreground moving target instance in the video frame.
[0032] The set of anchorless vectors is traversed in ascending order of acquisition timestamps, and adjacent two anchorless displacement perturbation vectors are taken sequentially, denoted as the front vector and the back vector. The time interval is obtained by subtracting the acquisition timestamp of the front vector from the acquisition timestamp of the back vector. The interpolation time window is a preset time length threshold used to determine whether interpolation conditions are met between two anchorless displacement perturbation vectors. When the time interval is less than the interpolation time window, it indicates that the time interval between the two vectors is short, and the motion of the moving target during this period has good continuity and smoothness, making it suitable for interpolation. The area of the bounding rectangle of the foreground moving target instance to which the front vector belongs is obtained from the video frame corresponding to the front vector. Specifically, all foreground pixels of the foreground moving target instance in the corresponding frame are found, and these pixels are traversed to find the minimum row coordinate value, maximum row coordinate value, minimum column coordinate value, and maximum column coordinate value. The minimum row coordinate value and maximum row coordinate value are used to determine the height of the rectangle, and the minimum column coordinate value and maximum column coordinate value are used to determine the width of the rectangle. The product of the height and the width is the area of the bounding rectangle. Similarly, the area of the bounding rectangle of the foreground moving target instance to which the vector belongs is obtained from the video frame corresponding to the vector.
[0033] Step S245: Obtain the area ratio of the bounding rectangle area corresponding to the next anchorless displacement disturbance vector to the area of the bounding rectangle area corresponding to the previous anchorless displacement disturbance vector. If the area ratio is within the preset range, generate a virtual displacement disturbance vector between the two anchorless displacement disturbance vectors. Take the arithmetic mean of the acquisition timestamp of the previous anchorless displacement disturbance vector and the acquisition timestamp of the next anchorless displacement disturbance vector as the virtual acquisition timestamp. The movement pointing angle of the virtual displacement disturbance vector is the midpoint of the movement pointing angles of the two anchorless displacement disturbance vectors. The movement step size of the virtual displacement disturbance vector is the midpoint of the movement step size of the two anchorless displacement disturbance vectors.
[0034] The area ratio is obtained by dividing the area of the bounding rectangle corresponding to the subsequent vector by the area of the bounding rectangle corresponding to the previous vector. The area ratio is a preset numerical range with lower and upper thresholds to ensure that interpolation is performed only when the target size changes gradually. When the area ratio is between the lower and upper thresholds, interpolation between the two anchorless displacement disturbance vectors is considered possible. A virtual displacement disturbance vector is then generated between the previous and subsequent vectors. The virtual acquisition timestamp is calculated by adding the acquisition timestamps of the previous and subsequent vectors and dividing by 2. When calculating the movement direction angle of the virtual displacement disturbance vector, the movement direction angles of the previous and subsequent vectors are considered as two direction vectors on a unit circle. Each direction vector can be represented by its cosine and sine values. The corresponding components of the two direction vectors are added to obtain a composite vector, and the azimuth angle of the composite vector is calculated as the intermediate angle value. When calculating the movement step size of the virtual displacement disturbance vector, the movement step size of the previous and subsequent vectors is added and divided by 2.
[0035] Step S246: After associating the virtual displacement disturbance vector with the virtual acquisition timestamp, insert it into the displacement disturbance vector chain and mark the virtual displacement disturbance vector as the interpolation vector. At the same time, select the text content of the text record entry whose entry timestamp is closest to the virtual acquisition timestamp from the second original data packet as its text semantic anchor point, and update the displacement disturbance vector chain.
[0036] The virtual displacement perturbation vector generated in step S245 and its associated virtual acquisition timestamp are combined into a complete recording unit. Following the chronological order of the virtual acquisition timestamps, this recording unit is inserted between the original positions of the preceding and following vectors in the displacement perturbation vector chain. This insertion operation maintains the temporal order of the displacement perturbation vector chain, filling in any previously missing temporal gaps. An interpolation vector marker is added to the metadata field of the virtual displacement perturbation vector to distinguish it from the real displacement perturbation vector extracted directly from the video frame. The text record entry with the smallest absolute time distance between the input timestamp and the virtual acquisition timestamp is retrieved from the second original data packet. The text content of this entry is extracted and used as a semantic anchor point, which is then bound to the virtual displacement perturbation vector. After the insertion and binding operations are completed, the content of the displacement perturbation vector chain is updated, areas lacking semantic anchor points receive semantic information, and the motion trajectory becomes more continuous and complete on the timeline.
[0037] Step S250: Store the displacement perturbation vector chain bound to the text semantic anchors according to the foreground moving target identifier, and generate a spatiotemporal perturbation record set. Each record entry in the spatiotemporal perturbation record set contains the foreground moving target identifier, the displacement perturbation vector chain, and the text semantic anchor sequence bound to the displacement perturbation vector.
[0038] Iterate through all foreground moving target identifiers, each corresponding to a complete displacement perturbation vector chain. For each displacement perturbation vector chain, arrange all its contained displacement perturbation vectors in chronological order. Each displacement perturbation vector may be bound to 0, 1, or more text semantic anchors. Extract these text semantic anchors according to the chronological order of their bound displacement perturbation vectors, forming a text semantic anchor sequence of the same length as the displacement perturbation vector chain. Encapsulate the foreground moving target identifier, the displacement perturbation vector chain, and the text semantic anchor sequence into a single record entry. All record entries corresponding to foreground moving targets together constitute a spatiotemporal perturbation record set.
[0039] In one implementation, step S250 involves classifying and storing the displacement perturbation vector chain bound to the text semantic anchor point according to the foreground moving target identifier, thereby generating a spatiotemporal perturbation record set. This may specifically include the following steps S251-S256: Step S251: Obtain the displacement perturbation vector chain corresponding to each foreground moving target identifier in the spatiotemporal perturbation record set, traverse each displacement perturbation vector in the displacement perturbation vector chain, read the movement step size and movement pointing angle of the displacement perturbation vector, and use the movement step size and movement pointing angle as the motion attribute pair of the displacement perturbation vector.
[0040] Each record entry is sequentially retrieved from the spatiotemporal perturbation record set to obtain its displacement perturbation vector chain. This chain is then traversed, and for each vector, its step size and pointing angle are read. The step size reflects the distance the foreground moving target travels between two adjacent frames, and the pointing angle reflects the direction of the target's movement. These two values are combined into a motion attribute pair, associated with the displacement perturbation vector, and stored for subsequent motion pattern analysis.
[0041] Step S252: Calculate the extreme span of the movement step of all displacement disturbance vectors in the displacement disturbance vector chain, compare the extreme span with the preset span threshold, if the extreme span is greater than the preset span threshold, mark the displacement disturbance vector chain as a variable speed disturbance chain, if the extreme span is less than or equal to the preset span threshold, mark it as a uniform speed disturbance chain.
[0042] For the current displacement disturbance vector chain, collect the step size values of all displacement disturbance vectors, find the maximum and minimum values, and subtract the minimum value from the maximum value to obtain the extreme span. The extreme span reflects the magnitude of the velocity change of the moving target throughout the trajectory. The preset span threshold is a pre-configured tolerance value for step size changes. When the extreme span is greater than this threshold, it indicates that the target's velocity has changed significantly, with an acceleration or deceleration process, and the displacement disturbance vector chain is marked as a variable velocity disturbance chain. When the extreme span is less than or equal to this threshold, it indicates that the target's velocity change is small, and the overall motion velocity is relatively uniform, and the displacement disturbance vector chain is marked as a uniform velocity disturbance chain.
[0043] Step S253: For the displacement disturbance vector chain marked as the variable speed disturbance chain, traverse all adjacent displacement disturbance vectors in the chain, obtain the pointing angle difference between the pointing angles of two adjacent displacement disturbance vectors, and when the pointing angle difference exceeds the pointing change threshold, record the acquisition timestamps corresponding to the two adjacent displacement disturbance vectors as the pointing change time points.
[0044] For a displacement disturbance vector chain labeled as a variable-speed disturbance chain, traverse all adjacent displacement disturbance vector pairs in the chain, i.e., the I-th vector and the (I+1)-th vector. Calculate the difference in the pointing angles of these two vectors. Considering the cyclical nature of angles, normalize the difference to the range [-180°, 180°], and take the absolute value to obtain the pointing angle difference. The pointing abrupt change threshold is a preset angle value used to determine whether a change in direction constitutes an abrupt change. When the pointing angle difference exceeds the pointing abrupt change threshold, it indicates that the target has undergone a significant directional change within that time period. Record the acquisition timestamp of either the I-th or (I+1)-th vector at this time as the pointing abrupt change time point. The midpoint between the two timestamps can be recorded, or two separate timestamps can be recorded.
[0045] Step S254: For the displacement disturbance vector chain marked as a uniform disturbance chain, calculate the cyclic mean of the movement pointing angle of all displacement disturbance vectors in the chain as the reference pointing angle, and mark the displacement disturbance vector whose pointing deviation from the reference pointing angle is less than the stable pointing threshold as a pointing stable disturbance vector.
[0046] For a displacement perturbation vector chain labeled as a uniform perturbation chain, the pointing angles of all displacement perturbation vectors in the chain are collected. Since pointing angles have a cyclic characteristic, 0° and 360° represent the same direction, directly calculating the arithmetic mean would produce an error. When calculating the cyclic mean, each pointing angle is converted into a vector on a unit circle, with the x-coordinate of each vector being the cosine of the angle and the y-coordinate being the sine of the angle. The arithmetic mean of the x-coordinates and y-coordinates of all vectors is calculated to obtain an average vector. The azimuth angle of this average vector is then calculated as the reference pointing angle. For each displacement perturbation vector in the chain, the difference between its pointing angle and the reference pointing angle is calculated, and the absolute value is taken to obtain the pointing deviation. The stable pointing threshold is a preset small angle value. When the pointing deviation is less than the stable pointing threshold, the displacement perturbation vector is marked as a stable pointing perturbation vector, indicating that the target's direction of motion at that moment is consistent with the overall reference direction.
[0047] Step S255: Append the pointer to the abrupt change point to the record entry corresponding to the variable speed disturbance chain, and append the pointer to the stationary disturbance vector to the record entry corresponding to the uniform speed disturbance chain, and update the spatiotemporal disturbance record set.
[0048] In the spatiotemporal disturbance record set, for record entries marked as variable-speed disturbance chains, a list pointing to abrupt change points is added to their extended attribute fields. This list stores all abrupt change points recorded in step S253 in chronological order. For record entries marked as uniform-speed disturbance chains, a list pointing to stationary disturbance vectors is added to their extended attribute fields. This list stores the indices or copies of all stationary disturbance vectors marked in step S254. After completing these additional operations, the content of the spatiotemporal disturbance record set is updated, containing richer motion pattern information.
[0049] Step S256: Select all record entries marked as variable speed disturbance chains from the spatiotemporal disturbance record set and whose number of points to abrupt change time points exceeds the abrupt change frequency threshold, and store the foreground moving target identifiers corresponding to these record entries into the high dynamic disturbance target set.
[0050] Iterate through all records in the spatiotemporal disturbance record set, selecting those that simultaneously meet two conditions: first, the disturbance chain of the record is marked as a variable-speed disturbance chain; second, the number of directional abrupt change points recorded in the record is greater than a preset abrupt change frequency threshold. The abrupt change frequency threshold is used to define whether a target exhibits high-dynamic disturbance characteristics; for example, moving targets that undergo multiple directional abrupt changes per unit time typically exhibit abnormal behavior. Extract the foreground moving target identifiers corresponding to the records that meet the above conditions and store them in the high-dynamic disturbance target set.
[0051] Step S260: For displacement disturbance vector chains with the same foreground moving target identifier in the spatiotemporal disturbance record set, extract the acquisition timestamps corresponding to all displacement disturbance vectors in the displacement disturbance vector chain to form an acquisition timestamp sequence, and extract the recording timestamps corresponding to all text semantic anchors in the displacement disturbance vector chain to form an recording timestamp sequence.
[0052] In the spatiotemporal perturbation record set, for each displacement perturbation vector chain corresponding to a foreground moving target identifier, each displacement perturbation vector in the chain is traversed, and its associated acquisition timestamp is read. These acquisition timestamps are then extracted sequentially according to the order of the displacement perturbation vectors, forming an ordered sequence of acquisition timestamps. Simultaneously, for each text semantic anchor bound to a displacement perturbation vector, the entry timestamp of the text record from which the text semantic anchor originates is obtained. These entry timestamps are then extracted sequentially according to the order of the corresponding displacement perturbation vectors, forming an entry timestamp sequence. These two sequences respectively describe the sampling time point of the video frame and the time point of the text record.
[0053] Step S300: Extract the spatially dense region of displacement perturbation vector chain from the spatiotemporal perturbation record set, and use the spatially dense region as the candidate event hot zone. At the same time, select the subset of positioning points that fall into the candidate event hot zone from the positioning point coordinate sequence in the third original data packet, and construct the event evolution time window sequence according to the time interval between adjacent positioning points in the positioning point subset.
[0054] A densely distributed spatial region refers to an area in a two-dimensional plane where the spatial location points of displacement perturbation vectors are highly clustered. Each displacement perturbation vector in the displacement perturbation vector chain corresponds to a spatial location, that is, the geographic location of the center coordinates of the foreground moving target in the video frame after coordinate transformation. By statistically analyzing the distribution density of these spatial location points, hotspots where moving targets frequently pass through or linger can be identified. These areas often have a strong correlation with the location of police incidents and are therefore called candidate event hotspots. The location point coordinate sequence comes from a third raw data packet, recording the geographic location trajectory of police personnel or equipment. From this sequence, location points whose geographic coordinates fall within the boundary of the candidate event hotspot are selected, forming a subset of location points. After sorting the location points in the subset according to their location timestamps, the time interval between adjacent location points is calculated. Based on the distribution of these time intervals, consecutive location points are divided into different time windows, each window representing a relatively independent stage of event evolution, forming an event evolution time window sequence.
[0055] In one implementation, step S300 involves extracting densely distributed spatial regions of displacement perturbation vector chains from the spatiotemporal perturbation record set, using these densely distributed regions as candidate event hotspots, and simultaneously filtering a subset of positioning points falling within the candidate event hotspots from the positioning point coordinate sequence in the third original data packet. An event evolution time window sequence is then constructed based on the time intervals between adjacent positioning points in the subset of positioning points. Specifically, this may include the following steps S310~S360: Step S310: Read all displacement disturbance vector chains from the spatiotemporal disturbance record set, obtain the second region center coordinates corresponding to each displacement disturbance vector, transform the second region center coordinates to the same spatial coordinate system as the positioning point coordinates in the third original data packet through pre-calibrated coordinate transformation parameters, obtain spatialized center coordinates, project all spatialized center coordinates onto a two-dimensional spatial plane, and generate a center coordinate point cloud distribution.
[0056] The algorithm iterates through each displacement perturbation vector chain in the spatiotemporal perturbation record set, then iterates through each displacement perturbation vector in the chain to obtain the second region center coordinates used in the calculation for each displacement perturbation vector. The second region center coordinates are represented in the image coordinate system of the video frame, with the coordinate unit being pixels and the origin located at the upper left corner of the image. The positioning point coordinates are the longitude and latitude values in the geographic coordinate system, which are in different spatial reference systems. The pre-calibrated coordinate transformation parameters include the camera's intrinsic matrix, distortion coefficients, extrinsic rotation matrix, and translation vector. These parameters are obtained by calibrating the camera. The calibration process uses a checkerboard calibration board to acquire images in multiple poses and solve for the unknown parameters in the camera imaging model. Using these parameters, the second region center coordinates are transformed from the image coordinate system to the camera coordinate system, then from the camera coordinate system to the world coordinate system, and finally from the world coordinate system to the geographic coordinate system to obtain the spatialized center coordinates. The spatialized center coordinates corresponding to all displacement disturbance vectors are treated as a set of points. Their time and other attributes are ignored, and only their spatial location information is retained. This data is then projected onto a two-dimensional spatial plane to generate a center coordinate point cloud distribution.
[0057] Step S320: Perform spatial grid partitioning on the distribution of the central coordinate point cloud, divide the two-dimensional spatial plane into grid cells of equal size, count the number of spatialized central coordinate points falling in each grid cell, and mark the grid cells with the number of spatialized central coordinate points exceeding the density threshold as high-density grid cells.
[0058] Spatial grid partitioning refers to dividing a two-dimensional spatial plane into a series of identical square or rectangular grid cells according to fixed row and column spacing. Each grid cell is uniquely identified by its row and column numbers, and the spatial extent of a grid cell is defined by its minimum longitude, maximum longitude, minimum latitude, and maximum latitude. For each spatialized center point in the central coordinate cloud distribution, the grid cell column number is determined based on the point's longitude, and the grid cell row number is determined based on its latitude. A counter within that grid cell is then incremented by 1. After all points have been traversed, each grid cell has a count representing the number of spatialized center points falling within that cell. A density threshold is a preset counting threshold. The count of each grid cell is compared to the density threshold; if the count is greater than the density threshold, the grid cell is marked as a high-density grid cell.
[0059] Step S330: Perform connected region merging on all high-density grid cells, merge spatially adjacent high-density grid cells into a continuous region, calculate the geometric center position and outer boundary of each continuous region, and use the continuous region as a candidate event hotspot.
[0060] Connected region merging refers to aggregating spatially adjacent high-density grid cells into a connected region. Adjacency is defined using a four-connectivity rule, where grid cells sharing a common edge in the four directions (up, down, left, and right) are considered adjacent. Starting with a given high-density grid cell, all its adjacent high-density grid cells are recursively added to the same region until no further expansion is possible, forming a connected region. Each connected region consists of multiple high-density grid cells. The geometric center of the connected region is calculated by collecting the geometric center coordinates of all grid cells within the region. For each grid cell, the center longitude is the average of its minimum and maximum longitudes, and the center latitude is the average of its minimum and maximum latitudes. The arithmetic mean of the center longitudes of all grid cells is then taken as the region's center longitude, and the arithmetic mean of the center latitudes of all grid cells is taken as the region's center latitude. The outer boundary of the region is the smallest convex polygon or smallest bounding rectangle that can enclose all grid cells within the connected region. This boundary is obtained by traversing the boundary lines of all grid cells within the region and taking the union. Each connected region is considered a candidate event hotspot.
[0061] In one implementation, step S330 involves performing connected region merging on all high-density grid cells, merging spatially adjacent high-density grid cells into a continuous region, calculating the geometric center position and outer boundary of each continuous region, and using the continuous region as a candidate event hotspot. Specifically, this may include the following steps S331 to S336: Step S331: Obtain the row position number and column position number of all grid cells marked as high-density grid cells, establish an access mark sequence of the same length as the total number of grid cells, and initialize all elements of the access mark sequence to an unaccessed state.
[0062] Obtain information about all grid cells marked as high-density grid cells from the results of step S320, including the row and column numbers of each cell. Assuming the spatial grid partitioning produces M rows and N columns of grid cells, establish a one-dimensional access marker sequence of length M multiplied by N, or a two-dimensional access marker matrix of M rows and N columns. Initialize all elements in this sequence or matrix to an unaccessed state to record whether each grid cell has been processed during the connected component merging process.
[0063] Step S332: Traverse each high-density grid cell. If the access flag of the current high-density grid cell is unvisited, create a new connected component container, add the current high-density grid cell to the connected component container, and update the access flag of the high-density grid cell to visited.
[0064] For example, following the row numbers in ascending order, and then further following the column numbers in ascending order for each row, all high-density grid cells are traversed sequentially. For the currently traversed high-density grid cell, its corresponding flag value in the access flag sequence is checked. If the flag value is "unvisited," it means that the cell has not yet been assigned to any connected component. In this case, a new empty container, such as a dynamic array or list, is created to store grid cells belonging to the same connected component. The high-density grid cell is added to the newly created container, and its access flag is updated to "visited."
[0065] Step S333: Using the current high-density grid cell as the center reference, check the adjacent grid cells in its four orthogonal adjacency directions. If the adjacent grid cell is a high-density grid cell and the access mark is unvisited, add the adjacent grid cell to the current connected region container and mark it as visited. Recursively execute this expansion operation until no new high-density grid cells are added.
[0066] Starting with the current high-density grid cell, check its four adjacent positions: the row number above it minus 1, the row number below it plus 1, the column number to its left minus 1, and the column number to its right plus 1. For each adjacent position, first determine if its row number and column number are within the valid grid range, i.e., the row number is between 1 and M, and the column number is between 1 and N. If it is within the valid range, check if the grid cell at this adjacent position is a high-density grid cell, i.e., whether it was marked in step S320, and check if its access flag is unvisited. If both conditions are met, add the adjacent grid cell to the current connected region container and update its access flag to visited. Then, using the newly added grid cell as the center, repeat the above four-directional adjacency check process, recursively expanding outward. This recursive expansion can use a stack or queue to implement a non-recursive breadth-first search. For example, push the initial cell into the queue, pop the head cell when the queue is not empty, process its four adjacent directions, push the adjacent cells that meet the conditions into the queue, until the queue is empty. The expansion process of the current connected region terminates when no new high-density grid cells can be added.
[0067] Step S334: After completing the expansion of a connected region, extract the geometric center coordinates of all grid cells within the container of the connected region, calculate the center position of these geometric center coordinates as the geometric center of the connected region, and extract the outer boundary lines of all grid cells within the container of the connected region as the outer boundary of the region.
[0068] After the expansion of the current connected region is complete, the connected region container stores the row and column numbers of all high-density grid cells contained in the region. For each grid cell, its geometric center coordinates are calculated. Specifically, based on the row and column numbers of the grid cell and the step size set during grid partitioning, the longitude and latitude ranges covered by the grid cell can be determined. The center longitude is the average of the minimum and maximum values of the longitude range, and the center latitude is the average of the minimum and maximum values of the latitude range. After collecting the geometric center coordinates of all grid cells, the center position of these coordinates is calculated. The longitude of the geometric center is obtained by adding all the center longitudes and dividing by the total number of grid cells, and the latitude of the geometric center is obtained by adding all the center latitudes and dividing by the total number of grid cells. When extracting the outer boundary of the region, the outer boundary lines of all grid cells within the connected region are traversed. These boundary lines consist of the four edges of each grid cell. Since edges shared by adjacent grid cells are located within the region, they should not be considered as outer boundaries. Therefore, a boundary tracing algorithm is required. This involves traversing all edges of all grid cells. If an edge is adjacent to another grid cell that does not belong to the current connected region, or if there are no grid cells in that direction, then that edge is marked as part of the outer boundary. Connecting all marked outer boundary segments forms a closed outer boundary line of the region.
[0069] Step S335: Store the attribute information of the geometric center and the outer boundary of the region as candidate event hot zones, and at the same time count the total number of high-density grid cells in the connected region container as the hot zone intensity value of the candidate event hot zone.
[0070] The geometric center coordinates and outer boundary line of the region calculated in step S334 are associated with and stored in the connected region as spatial attributes of the candidate event hotspot. The total number of high-density grid cells within the container of the connected region is counted. This value reflects the density of moving targets in the region. The larger the value, the hotter the region. This value is stored as the hotspot intensity value.
[0071] Step S336: Repeat the above operation for all connected region containers to generate a set of candidate event hotspots. Each candidate event hotspot contains a geometric center, an outer boundary of the region, and a hotspot intensity value.
[0072] Specifically, the remaining high-density grid cells are traversed, and steps S332 to S335 are repeated until all high-density grid cells have been visited. Each connected region corresponds to a candidate event hotspot. All candidate event hotspots are collected into a set, called the candidate event hotspot set. Each candidate event hotspot is a data structure containing three basic attributes: geometric center coordinates, region outer boundary coordinate string, and hotspot intensity value.
[0073] Step S340: Read the location point coordinate sequence from the third original data packet, determine in turn whether each location point coordinate is located inside the outer boundary of any candidate event hot zone, extract the location point coordinates located inside the outer boundary, and generate a location point subset.
[0074] The complete sequence of location coordinates is read from the third raw data packet. Each location includes longitude, latitude, location timestamp, and the corresponding police officer or equipment identifier. For each location, all candidate event hotspots in the candidate event hotspot set are traversed to determine whether the location is located inside the outer boundary of the hotspot. The ray casting method can be used to determine if a point is inside a polygon: a ray is cast from the location in any direction, and the number of intersections between the ray and each edge of the outer boundary polygon is calculated. If the number of intersections is odd, the point is inside the polygon; if it is even, the point is outside. If a location is inside any candidate event hotspot, all its information, including coordinates, timestamp, and identifier, is extracted and added to the location subset. If a location is inside multiple hotspots, it can be copied multiple times and added to each hotspot, or the hotspot with the highest intensity value can be selected as the location.
[0075] Step S350: Sort the positioning points in the positioning point subset in ascending order of positioning timestamps, obtain the difference between the positioning timestamps of two adjacent positioning points as the time interval, and classify adjacent positioning points with time intervals less than the interval threshold into the same event evolution time window. When an adjacent positioning point with a time interval greater than or equal to the interval threshold is encountered, terminate the current event evolution time window and start the next event evolution time window, and construct the event evolution time window sequence in sequence.
[0076] All locations in the subset are sorted in ascending order of their timestamps to obtain an ordered time sequence. This ordered sequence is then iterated over. For the J-th and J+1-th locations, the timestamp of the J-th location is subtracted from the timestamp of the J+1-th location to obtain the time interval. The interval threshold is a preset time length value used to distinguish between continuous motion and discrete events. When the time interval is less than the threshold, it indicates that the two locations are temporally continuous and belong to the same continuous motion or event process; these two locations are then grouped into the same event evolution time window. When the time interval is greater than or equal to the threshold, it indicates that there is a longer interruption between the two locations, belonging to different event processes. In this case, the current event evolution time window is terminated, and the next location is used as the starting point of a new event evolution time window. After the iteration is complete, each event evolution time window contains a temporally continuous sequence of locations, and all time windows are arranged in chronological order to form the event evolution time window sequence.
[0077] Step S360: Obtain the first event evolution time window in the event evolution time window sequence, extract the minimum positioning timestamp among all positioning timestamps of all positioning points within the event evolution time window as the start time, extract the maximum positioning timestamp as the end time, filter out the displacement disturbance vectors whose acquisition timestamps fall between the start time and the end time from the spatiotemporal disturbance record set, associate these displacement disturbance vectors with the event evolution time window, and generate a time window disturbance vector set.
[0078] For the first time window in the event evolution time window sequence, traverse all the positioning points contained within the time window, find the smallest positioning timestamp as the start time of the time window, and find the largest positioning timestamp as the end time of the time window. The start time and end time together define the time boundary of the time window. Traverse all displacement disturbance vectors in all displacement disturbance vector chains in the spatiotemporal disturbance record set. For each displacement disturbance vector, obtain its associated acquisition timestamp and determine whether the acquisition timestamp is greater than or equal to the start time and less than or equal to the end time. If the condition is met, the displacement disturbance vector is extracted and added to a temporary set. This temporary set contains all displacement disturbance vectors that occurred within the time range of this time window, and is called the time window disturbance vector set.
[0079] In one implementation, step S360 involves obtaining the first event evolution time window in the event evolution time window sequence, extracting the minimum positioning timestamp from all positioning timestamps within the event evolution time window as the start time, extracting the maximum positioning timestamp as the end time, filtering displacement disturbance vectors whose acquisition timestamps fall between the start and end times from the spatiotemporal disturbance record set, and associating these displacement disturbance vectors with the event evolution time window to generate a time window disturbance vector set. Specifically, this may include the following steps S361~S366: Step S361: For each event evolution time window in the event evolution time window sequence, extract the location timestamps of all locations within the time window, find the minimum value of the location timestamps as the start time of the window, and find the maximum value of the location timestamps as the end time of the window.
[0080] Traverse the event evolution time window sequence, processing each event evolution time window sequentially. For the currently processed time window, obtain the location timestamps of all the locations it contains, forming a timestamp list. Traverse this list using a linear scan method, maintaining the minimum and maximum values encountered so far. After the scan is completed, the minimum value is used as the start time of the window, and the maximum value is used as the end time of the window.
[0081] Step S362: Using the start and end times of the window as time boundaries, traverse all displacement disturbance vectors in the spatiotemporal disturbance record set, and filter out displacement disturbance vectors whose acquisition timestamps are greater than or equal to the start time of the window and less than or equal to the end time of the window to form the original time window disturbance vector set.
[0082] Using the start time of the window as the lower boundary and the end time of the window as the upper boundary, a closed interval is formed. Each displacement perturbation vector chain in the spatiotemporal perturbation record set is traversed, and then each displacement perturbation vector in the chain is traversed. For each displacement perturbation vector, its associated acquisition timestamp is read, and it is determined whether the acquisition timestamp falls within the closed interval. If it does, the complete information of the displacement perturbation vector is copied and added to the original time window perturbation vector set. This set may contain multiple displacement perturbation vectors from different foreground moving targets and different time points.
[0083] Step S363: Obtain the foreground moving target identifier corresponding to each displacement perturbation vector in the original time window perturbation vector set, and perform a grouping operation on the original time window perturbation vector set according to the foreground moving target identifier to obtain the perturbation vector subsequence of each foreground moving target in the time window.
[0084] Iterate through each displacement perturbation vector in the original time window perturbation vector set and read the identifier of the foreground moving target to which it belongs. Create a mapping structure with the target identifier as the key and the list of displacement perturbation vectors as the value. For each displacement perturbation vector, find the corresponding list in the mapping based on its target identifier and append the vector to the list. If a target identifier does not yet exist in the mapping, create a new empty list first, and then add the vector. After processing all displacement perturbation vectors, each entry in the mapping corresponds to a foreground moving target, and its value list is a subsequence of all displacement perturbation vectors of that target within the current time window, sorted by the acquisition timestamp.
[0085] Step S364: For each perturbation vector subsequence corresponding to a foreground moving target, obtain the arithmetic center value of the movement step of all displacement perturbation vectors in the subsequence as the average perturbation step of the target in the time window, and obtain the cyclic center direction of the movement pointing angle of all displacement perturbation vectors in the subsequence as the synthetic perturbation pointing of the target in the time window.
[0086] For each foreground moving target's corresponding perturbation vector subsequence, the movement step size values of all displacement perturbation vectors in the subsequence are collected. The arithmetic mean of these values is calculated, i.e., the sum of all step sizes divided by the number of step sizes, yielding the average perturbation step size. For the movement pointing angle, due to the cyclical nature of angles, the arithmetic mean cannot be directly calculated. The movement pointing angle of each displacement perturbation vector in the subsequence is converted into a vector on a unit circle. The x-coordinate of each vector is the cosine of the angle, and the y-coordinate is the sine of the angle. The arithmetic mean of the x-coordinates and y-coordinates of all vectors are calculated to obtain the arithmetic and y-coordinates of the composite vector. Then, the azimuth angle of this composite vector is calculated, i.e., the angle calculated using the arctangent function as the ratio of the y-coordinate to the x-coordinate, yielding the composite perturbation pointing direction. The composite perturbation pointing direction reflects the overall movement trend direction of the target within the time window.
[0087] Step S365: Store the average perturbation step size and synthetic perturbation direction of all foreground moving targets into the extended attributes of the time window perturbation vector set according to the target identifier, and associate the time window perturbation vector set with the corresponding event evolution time window for storage.
[0088] Specifically, an extended attribute data structure is created, containing two mappings: the first mapping uses the target identifier as the key and the average perturbation step size as the value; the second mapping uses the target identifier as the key and the synthetic perturbation direction as the value. This extended attribute is appended to the original time window perturbation vector set to form an enhanced time window perturbation vector set. A bidirectional association is established between this enhanced set and the current event evolution time window; the corresponding perturbation vector set can be found through the time window, and the time window to which it belongs can be found through the perturbation vector set.
[0089] Step S366: Repeat the above operation until an associated set of time window perturbation vectors is generated for each time window in the event evolution time window sequence.
[0090] For the second, third, and finally the last event evolution time window in the event evolution time window sequence, steps S361 to S365 are repeated sequentially. Each time window independently generates its associated time window perturbation vector set, and the sets between different time windows are independent of each other. After processing all time windows, each event evolution time window has a corresponding perturbation vector set.
[0091] Step S400: Within each event evolution time window, the displacement perturbation vector chain in the spatiotemporal perturbation record set is spatially superimposed with the location point coordinates of the location point subset. The event connected domain boundary set is generated by comparing the direction consistency of the displacement perturbation vector at each location point with the displacement perturbation vector between adjacent location points.
[0092] Spatial overlay refers to the superposition, display, and analysis of spatial data from different sources within the same spatial region under the same coordinate system. In this step, the spatial positions corresponding to the displacement perturbation vectors in the displacement perturbation vector chain are plotted on the same spatial plane along with the coordinates of the positioning points in the positioning point subset. Each positioning point can be associated with a displacement perturbation vector through temporal proximity matching, and this vector carries the motion pointing angle information. After sorting the positioning points in the positioning point subset according to their positioning timestamps, the difference between the motion pointing angles of the displacement perturbation vectors associated with each adjacent positioning point is calculated sequentially. If the difference is small, it indicates that the motion directions of the two positioning points are consistent and belong to the same event connected domain; if the difference is large, it indicates that the motion direction has changed and they belong to different event connected domains. Through this direction consistency comparison, the positioning point sequence can be divided into several continuous segments, and the positioning points in each segment have a consistent motion direction. The minimum hull convex polygon of the positioning point coordinates in each segment is calculated to obtain the event connected domain boundary. The event connected domain boundaries corresponding to all segments constitute the event connected domain boundary set.
[0093] In one implementation, step S400 involves spatially superimposing the displacement perturbation vector chain in the spatiotemporal perturbation record set with the coordinates of the location points in the location point subset within each event evolution time window. The event connectivity boundary set is generated by comparing the directional consistency of the displacement perturbation vector at each location point with that between adjacent location points. Specifically, this may include the following steps S410-S470: Step S410: Select an event evolution time window from the event evolution time window sequence, obtain the location coordinates and location timestamp of each location point in the location point subset associated with the event evolution time window, and obtain the displacement disturbance vector chain in the spatiotemporal disturbance record set associated with the event evolution time window.
[0094] One time window is selected sequentially from the event evolution time window sequence as the current processing object. Based on the identifier of the time window, two datasets are obtained from the previously established association relationship. The first dataset is a subset of positioning points associated with the time window, which contains multiple positioning points, each with coordinates, a timestamp, and an identifier of the police officer or equipment. The second dataset is a chain of displacement perturbation vectors in the spatiotemporal perturbation record set associated with the time window, which contains multiple displacement perturbation vectors, each with a movement step size, movement pointing angle, acquisition timestamp, and the identifier of the foreground moving target to which it belongs.
[0095] Step S420: For each location point, obtain the identifier of the police officer or equipment to which the location point belongs, and search for the displacement disturbance vector chain corresponding to the foreground moving target with the same identifier from the spatiotemporal disturbance record set. In the displacement disturbance vector chain, find the displacement disturbance vector that is closest to the collection time stamp and the location time stamp of the location point as the associated displacement disturbance vector of the location point.
[0096] For each location point in the subset of location points associated with the current time window, the police officer or equipment identifier it carries is first read. This identifier is a field recorded along with the location point coordinates in the third raw data packet, used to identify the police officer carrying the positioning device or the positioning terminal installed on the police device. In the spatiotemporal disturbance record set, each foreground moving target also has an identifier, which is derived from the target identity information extracted from video analysis. The displacement disturbance vector chain corresponding to the foreground moving target with the same location point identifier is searched in the spatiotemporal disturbance record set. If a matching displacement disturbance vector chain is found, the displacement disturbance vector whose acquisition timestamp is closest to the location timestamp of the location point is searched in the chain. That is, the absolute difference between the acquisition timestamp and the location timestamp of each displacement disturbance vector is calculated, and the vector with the smallest difference is taken as the associated displacement disturbance vector of the location point.
[0097] In one embodiment, step S420, finding the displacement disturbance vector in the displacement disturbance vector chain that is closest to the acquisition timestamp and the positioning timestamp of the positioning point as the associated displacement disturbance vector of the positioning point, may specifically include the following steps S421~S427: Step S421: Obtain the acquisition timestamps of all displacement disturbance vectors in the displacement disturbance vector chain, take the absolute time distance between each acquisition timestamp and the positioning timestamp of the current positioning point as the time proximity, and select the displacement disturbance vector with the smallest time proximity as the candidate associated vector.
[0098] Iterate through each displacement disturbance vector in the matched displacement disturbance vector chain and read its acquisition timestamp. For each acquisition timestamp, calculate the absolute value of the difference between it and the current positioning timestamp to obtain the time proximity. Compare all the calculated time proximity values, find the minimum value, and use the displacement disturbance vector corresponding to the minimum value as the candidate association vector.
[0099] Step S422: If the time proximity is less than or equal to the maximum allowable time deviation, then the candidate associated vector is determined as the associated displacement disturbance vector of the positioning point, and the movement pointing angle and movement step size of the associated displacement disturbance vector are recorded.
[0100] The maximum allowable time deviation is a preset time length threshold used to filter out matches that are too far apart in time. It determines whether the minimum time proximity selected in step S421 is less than or equal to this maximum allowable time deviation. If the condition is met, the candidate associated vector is accepted as the valid associated displacement disturbance vector for the positioning point. The vector's pointing angle and step size are read and associated with the positioning point for storage.
[0101] Step S423: If the time proximity is greater than the maximum allowable time deviation, it is determined that the location point cannot find a valid associated displacement disturbance vector, and the location point is marked as an isolated location point.
[0102] When the minimum temporal proximity is greater than the maximum allowable time deviation, it indicates that there is no displacement disturbance vector in the displacement disturbance vector chain whose acquisition time stamp is sufficiently close to the positioning time stamp, making it impossible to establish a reliable association. In this case, the positioning point is marked as an isolated positioning point, indicating that it cannot be matched with any video moving target in time.
[0103] Step S424: Collect all isolated positioning points, obtain the positioning point coordinates of each isolated positioning point, calculate the spatial straight-line distance between adjacent isolated positioning points, and merge adjacent isolated positioning points whose spatial straight-line distance is less than the isolated point merging distance threshold into an isolated point cluster.
[0104] Collect all isolated points within the current event evolution time window into a set, and sort these isolated points in ascending order of their location timestamps. Traverse the sorted sequence; for any two adjacent isolated points, calculate the spatial straight-line distance between them based on their respective longitude and latitude coordinates. This distance can be calculated using the great circle distance between two points on the Earth's surface using the semi-sine formula. An isolated point merging distance threshold is a preset spatial distance value. If the calculated spatial straight-line distance is less than this threshold, the two isolated points are grouped into the same isolated point cluster. Continue traversing forward, adding isolated points whose distance to existing points in the cluster is less than the threshold to the current cluster. When a point with a distance greater than or equal to the threshold is encountered, terminate the expansion of the current cluster and begin constructing a new isolated point cluster.
[0105] Step S425: For each isolated point cluster, extract the median time of the location timestamps of all isolated locations in the isolated point cluster as the representative time. Search for the displacement disturbance vector chain with the same police personnel or equipment identifier as the isolated location from the spatiotemporal disturbance record set. In the chain, find the displacement disturbance vector whose collection timestamp is closest to the representative time as the proxy displacement disturbance vector of the isolated point cluster.
[0106] For each isolated point cluster, collect the location timestamps of all isolated points within the cluster. Sort these timestamps and take the median value as the median time, or calculate the arithmetic mean of all timestamps as the representative time. Search the spatiotemporal disturbance record set for displacement disturbance vector chains that share the same police officer or equipment identifier as the isolated points. If a matching chain is found, search within that chain for the displacement disturbance vector whose collected timestamp is closest to the representative time, and use this vector as the proxy displacement disturbance vector for that isolated point cluster.
[0107] Step S426: If the isolated positioning point is unmarked, traverse all displacement disturbance vector chains. For each displacement disturbance vector, transform the center coordinates of its corresponding second region to the same spatial coordinate system as the positioning point coordinates using pre-calibrated coordinate transformation parameters to obtain the transformed center coordinates. Then, sort the vectors according to the time proximity between the acquisition timestamp and the representative time, and select the displacement disturbance vector with the smallest time proximity as the candidate vector. If there are multiple candidate vectors with equal time proximity or a difference within the preset tolerance range, select the one with the closest spatial distance from these candidate vectors as the proxy displacement disturbance vector.
[0108] When an isolated location point does not carry police personnel or equipment identification, direct matching through identification is not possible. In this case, all displacement disturbance vectors in the displacement disturbance vector chain of the spatiotemporal disturbance record set are traversed. For each displacement disturbance vector, the second region center coordinates used in the calculation are first obtained. Using the same set of coordinate transformation parameters used in step S310, these coordinates are transformed to the geographic coordinate system to obtain the transformed center coordinates. The absolute time distance between the acquisition timestamp of the displacement disturbance vector and the representative time of the isolated point cluster is calculated as the time proximity. All displacement disturbance vectors are sorted according to their time proximity from smallest to largest. One or more displacement disturbance vectors with the smallest time proximity are selected. If only one vector has the smallest time proximity, it is directly used as a candidate vector. If multiple vectors have equal time proximity or their differences are within a preset very small tolerance range, for these candidate vectors, the Euclidean distance between their transformed center coordinates and the location coordinates of any isolated location point in the isolated point cluster is calculated. The displacement disturbance vector with the smallest Euclidean distance is selected as the surrogate displacement disturbance vector.
[0109] Step S427: Use the proxy displacement disturbance vector as the associated displacement disturbance vector of all isolated positioning points within the isolated point cluster, and record the movement pointing angle of the proxy displacement disturbance vector as the positioning point disturbance pointing angle of these isolated positioning points.
[0110] The proxy displacement perturbation vector obtained in step S425 or S426 is associated with each isolated location point in the isolated point cluster. The movement pointing angle is read from the proxy displacement perturbation vector and used as the location point perturbation pointing angle of each isolated location point in the cluster. In this way, the movement direction information of the originally unmatchable isolated location points is obtained through clustering and proxy matching.
[0111] Step S430: If the positioning point does not have a corresponding identifier, then traverse all displacement disturbance vector chains. For each displacement disturbance vector, transform the center coordinates of its corresponding second region to the same spatial coordinate system as the positioning point coordinates through the pre-calibrated coordinate transformation parameters to obtain the transformed center coordinates. Then, sort them according to the time proximity between the acquisition time stamp and the positioning time stamp, and select the displacement disturbance vector with the smallest time proximity as the candidate vector. If there are multiple candidate vectors with equal time proximity or the difference is within the preset tolerance range, select the one with the closest spatial distance from these candidate vectors as the associated displacement disturbance vector. The spatial distance is the Euclidean distance between the positioning point coordinates and the transformed center coordinates. Record the movement pointing angle of the associated displacement disturbance vector as the positioning point disturbance pointing angle.
[0112] For the current location point, if its police officer or equipment identification field is empty or a foreground moving target with the same identification cannot be found in the spatiotemporal disturbance record set, a strategy based on joint temporal and spatial matching is adopted. All displacement disturbance vectors in all displacement disturbance vector chains in the spatiotemporal disturbance record set are traversed. For each displacement disturbance vector, its second region center coordinates are transformed to the geographic coordinate system using coordinate transformation parameters to obtain the transformed center coordinates. The absolute time distance between the acquisition timestamp of the displacement disturbance vector and the location timestamp of the location point is calculated as the time proximity. All displacement disturbance vectors are sorted in ascending order of time proximity. The displacement disturbance vector with the smallest time proximity is selected as a candidate vector. If multiple vectors have equal time proximity or their differences are within a preset tolerance range, the Euclidean distance between the location point coordinates and the transformed center coordinates of each candidate vector is calculated, and the displacement disturbance vector with the smallest Euclidean distance is selected as the final associated displacement disturbance vector. The movement pointing angle is read from this vector and recorded as the location point disturbance pointing angle.
[0113] Step S440: Sort the positioning points in the positioning point subset in ascending order according to the positioning timestamp, traverse each positioning point and its adjacent next positioning point, obtain the positioning point perturbation pointing angle of the current positioning point as the first pointing angle, and obtain the positioning point perturbation pointing angle of the adjacent next positioning point as the second pointing angle.
[0114] Sort all locations in the subset of locations associated with the current event evolution time window in ascending order of their timestamps to obtain an ordered sequence. For each location in this sequence from the first to the second-to-last, designate it as the current location and obtain its next location as an adjacent location. Read the location perturbation pointing angle from the extended attributes of the current location, and denote it as the first pointing angle. Read the location perturbation pointing angle from the extended attributes of the adjacent location, and denote it as the second pointing angle. The first and second pointing angles represent the movement directions of the location points at two different times.
[0115] Step S450: Obtain the angle difference between the first pointing angle and the second pointing angle as the pointing difference angle. Compare the pointing difference angle with the direction consistency threshold. If the pointing difference angle is less than or equal to the direction consistency threshold, it is determined that the current positioning point and the adjacent positioning point are pointing in the same direction. The adjacent positioning point is then assigned to the same pointing consistency group as the current positioning point.
[0116] The difference between the first and second pointing angles is calculated. Considering the cyclical nature of angles, the difference is normalized to the range of [-180°, 180°], and then the absolute value is taken to obtain the pointing difference angle. The direction consistency threshold is a preset angle value used to determine whether two directions belong to the same direction interval. The calculated pointing difference angle is compared with this threshold. If the pointing difference angle is less than or equal to the direction consistency threshold, it indicates that the movement direction of the current positioning point is basically consistent with that of the adjacent positioning point, and both belong to the same continuous process of the same movement trend. The adjacent positioning point is then assigned to the same pointing consistency group as the current positioning point. For the first positioning point in the sequence, a new pointing consistency group is created and added to it.
[0117] Step S460: When the pointing difference angle is greater than the direction consistency threshold, terminate the current pointing consistency group and start a new pointing consistency group. After traversal, multiple pointing consistency groups are obtained, and each pointing consistency group contains a continuous sequence of pointing consistent positioning points.
[0118] During the traversal of the positioning point sequence, when the pointing difference angle between a pair of adjacent positioning points exceeds the direction consistency threshold, it indicates a significant change in the direction of motion. The previous continuous motion segment ends, and a new segment begins. At this point, the currently constructed direction-consistent grouping is terminated, and adjacent positioning points are no longer added to the current group. Then, using the next adjacent positioning point as the starting point, a new direction-consistent group is created, and that positioning point is added to the new group. This process continues traversing subsequent positioning points, repeating the above direction consistency judgment and grouping operations. After traversing all positioning points, multiple direction-consistent groups are obtained, each containing a continuous sequence of positioning points with consistent motion directions. Groups are separated by the point in time when the direction changes abruptly.
[0119] Step S470: For each consistent pointing group, extract the coordinates of all positioning points in the group, obtain the minimum circumferential convex polygon boundary of these positioning point coordinates, and use the minimum circumferential convex polygon boundary as the event connected domain boundary. The event connected domain boundaries corresponding to all consistent pointing groups constitute the event connected domain boundary set.
[0120] For each consistent pointing group, collect the coordinates of all points within the group. These coordinates constitute a point set in two-dimensional space. Calculate the minimum hull convex polygon of this point set, i.e., a convex polygon whose all interior angles are less than 180° and which contains all points in the point set. The vertices of the convex polygon are a subset of the point set, located on the convex hull of the point set. The boundary of the minimum hull convex polygon reflects the spatial extent covered by the consistent pointing group and is used as the boundary of the event connected domain. Collect the event connected domain boundaries corresponding to all consistent pointing groups into a set, which is called the event connected domain boundary set.
[0121] In one implementation, step S470 involves extracting the coordinates of all points within each consistent pointing group, obtaining the minimum bounding convex polygon boundary of these coordinates, and using the minimum bounding convex polygon boundary as the boundary of the event connected domain. Specifically, this may include the following steps S471~S476: Step S471: Obtain the coordinates of all positioning points within the consistent group. Find the point with the smallest x-coordinate value from these coordinates as the starting reference point. Use the starting reference point as the origin to obtain the polar angle values of all other points relative to the starting reference point.
[0122] The coordinates of each positioning point within a consistent group consist of two values: longitude and latitude. Longitude corresponds to the x-axis, and latitude corresponds to the y-axis. All points within the group are traversed, and the point with the smallest longitude value is found. If multiple points have the same minimum longitude, the point with the smallest latitude value is selected as the starting reference point. Using the starting reference point as the origin, for each other point within the group, the polar angle of that point relative to the starting reference point is calculated. Specifically, the lateral offset is obtained by subtracting the longitude of the starting reference point from the longitude of the point, and the longitudinal offset is obtained by subtracting the latitude of the starting reference point from the latitude of the point. Then, the arctangent of the ratio of the longitudinal offset to the lateral offset is calculated to obtain the polar angle value, which ranges from -180° to 180°.
[0123] Step S472: Sort all positioning point coordinates in ascending order of polar angle values to obtain a polar angle sorting sequence. Push the starting reference point into the convex hull container. Traverse each point in the polar angle sorting sequence. When the number of points in the convex hull container is greater than or equal to 2, check the turning attribute formed by the top two points of the container and the current point.
[0124] Sort the starting reference point and all other points in ascending order of polar angle values to obtain a polar angle sorting sequence. The starting reference point is at the beginning of the sequence. Create an empty convex hull container to store candidate vertices of the convex polygon. First, push the starting reference point into the convex hull container. Then, starting from the second point in the polar angle sorting sequence, traverse each point, and mark the currently traversed point as the current point. Check the number of points currently stored in the convex hull container. If the number is less than 2, push the current point into the convex hull container and continue processing the next point. If the number is greater than or equal to 2, remove the point at the top of the convex hull container and mark it as the top point, and remove the second point below the top of the convex hull container and mark it as the second-to-last top point. Check the turning attributes of the three points from the second-to-last top point to the top point and then to the current point. The turning attributes can be determined by calculating the cross product. Calculate the vector difference between the top point and the second-to-last top point, and the vector difference between the current point and the top point, and then calculate the two-dimensional cross product of these two vectors. The sign of the cross product indicates a left or right turn, and a cross product of 0 indicates that the three points are collinear.
[0125] Step S473: If the rotation attribute is clockwise or collinear, pop the top point of the container. Repeat this check until the rotation attribute is counterclockwise, and then push the current point into the convex hull container.
[0126] When the cross product calculated in step S472 is negative, it indicates that the direction of rotation from the second-highest point to the top point and then to the current point is clockwise, i.e., a right turn; when the cross product is 0, it indicates that the three points are collinear. In both cases, the point at the top of the convex hull container should not be used as a vertex of the convex hull and needs to be popped from the container. After popping the top point, the new top point and second-highest point of the convex hull container, together with the current point, re-form the three points, and the rotation attribute is checked again. This popping operation is repeated until the rotation attribute becomes counterclockwise, i.e., the cross product is positive. At this point, the current point is pushed into the convex hull container as a candidate vertex of the convex polygon.
[0127] Step S474: After traversal, the set of points stored in the convex hull container forms the vertex sequence of the minimum convex polygon boundary. Connect adjacent vertices in the order of the vertex sequence, and connect the last vertex with the first vertex to form a closed convex polygon boundary line.
[0128] After all points in the polar angle sorting sequence have been traversed, the final set of points stored in the convex hull container is the vertex set of the smallest convex polygon that points to the coordinates of all localized points within the consistent group. These vertices are arranged in a counter-clockwise or clockwise order. Following the storage order of the vertices in the container, adjacent vertices are connected sequentially to form an edge of the convex polygon. Simultaneously, the last vertex is connected to the first vertex to form a closed boundary line of the convex polygon.
[0129] Step S475: Use the boundary line of the convex polygon as the boundary of the event connected domain, and obtain the area of the closed region enclosed by the boundary line of the convex polygon as the area of the event connected domain, and obtain the total length of the boundary line of the convex polygon as the perimeter of the event connected domain.
[0130] The boundary line of the closed convex polygon generated in step S474 is used as the boundary of the event connected region. The area of the closed region enclosed by the convex polygon is calculated. For example, for a sequence of convex polygon vertices, the area can be calculated using the shoelace formula, which is half the sum of the cross products of the x and y coordinates of all adjacent vertices. The total length of the convex polygon boundary line is calculated. Specifically, all adjacent vertices are traversed, the Euclidean distance between each pair of adjacent vertices is calculated and accumulated, and then the distance between the last vertex and the first vertex is added to obtain the total perimeter. The area and perimeter of the event connected region describe the spatial scale characteristics of the event connected region.
[0131] Step S476: Attach the area and perimeter of the event connected domain to the attribute information of the event connected domain boundary, and group and store the event connected domain boundary with its corresponding pointer in the same way.
[0132] The area and perimeter of the event connected region calculated in step S475 are added as attribute fields to the data structure of the event connected region boundary. Simultaneously, a bidirectional association is established between the event connected region boundary and its source, consistent-pointing group, allowing tracing back to the original location point sequence through the event connected region boundary, and also enabling the retrieval of the corresponding event connected region boundary through the consistent-pointing group.
[0133] Step S500: Associate and match the set of event connected domain boundaries with text semantic anchors, assign event type labels to each successfully matched event connected domain boundary, and output the event graph data stream carrying event type labels and event connected domain boundaries in the order of the event evolution time window sequence.
[0134] The set of event connected component boundaries describes the spatial distribution of different events, while textual semantic anchors provide a temporal semantic description of the events. By associating and matching the two, specific type labels can be assigned to each event connected component, such as "crowd gathering," "chasing," and "fighting." The assignment of event type labels comprehensively considers textual semantic information, motion direction features, and consensus results from adjacent time windows. The event graph data stream is a structured data output format, where each data unit corresponds to an event evolution time window, containing all event connected component boundaries and their corresponding event type labels within that time window, and may also include evolutionary relationship information between time windows.
[0135] In one implementation, step S500 involves associating the set of event connected domain boundaries with text semantic anchors, assigning an event type label to each successfully matched event connected domain boundary, and outputting an event graph data stream carrying event type labels and event connected domain boundaries in the order of the event evolution time window sequence. Specifically, this may include the following steps S510~S560: Step S510: Read an event connected domain boundary from the event connected domain boundary set, obtain the location timestamps of all positioning points in the corresponding consistent group corresponding to the event connected domain boundary, and take the median time of these positioning timestamps as the representative time of the event connected domain boundary.
[0136] Each event connected component boundary is sequentially extracted from the event connected component boundary set. Based on the association established in step S476, the corresponding pointing-consistent group is found. The location timestamps of all positioning points are obtained from this pointing-consistent group. These timestamps are sorted chronologically, and the value at the middle position of the sorted sequence is taken as the median time, or the arithmetic mean of all timestamps is calculated as the representative time. This representative time is used to locate the event connected component boundary on the time axis.
[0137] Step S520: Find the recording timestamp corresponding to the text semantic anchor point from the spatiotemporal disturbance record set, obtain the absolute time distance between the recording timestamp of each text semantic anchor point and the representative time, and take the text semantic anchor point with the smallest absolute time distance as the candidate semantic anchor point of the boundary of the connected domain of the event.
[0138] Iterate through all text semantic anchors in the spatiotemporal perturbation record set. Each text semantic anchor is associated with an entry timestamp, which originates from the entry timestamp of the text record entry in the second original data packet. For each text semantic anchor, calculate the absolute difference between its entry timestamp and the representative time obtained in step S510 to obtain the absolute time distance. Compare the absolute time distances of all text semantic anchors, find the minimum value, and use the text semantic anchor corresponding to the minimum value as a candidate semantic anchor for the boundary of the connected domain of the event.
[0139] Step S530: Obtain the text content of candidate semantic anchors, perform word segmentation on the text content to obtain a word unit sequence, filter verb units representing actions and noun units representing entities from the word unit sequence, and combine verb units and noun units into event type candidate tags.
[0140] Natural language processing is performed on the text content of candidate semantic anchors. First, word segmentation is performed to divide the continuous text string into independent word units, resulting in a sequence of word units. For example, for the text content "the target moves north," word segmentation yields three word units: "target," "north," and "move." Then, part-of-speech tagging is performed on each word unit to identify verb units and noun units. Verb units represent actions or states, such as "move," "chase," and "gather"; noun units represent entities, such as "target," "vehicle," and "crowd." Verb units and noun units are then concatenated according to certain combination rules to form candidate labels for event types; for example, "move" and "target" are combined to form "target moves."
[0141] Step S540: Obtain the perturbation pointing angles of all positioning points within the consistent pointing group corresponding to the boundary of the event connected domain, obtain the cyclic mean of these perturbation pointing angles as the average pointing angle, and read the corresponding pointing event type from the pointing event type mapping table as a supplementary label based on the position of the average pointing angle in the preset pointing interval.
[0142] The perturbation pointing angles of all positioning points are obtained from the consistent pointing groups corresponding to the boundaries of the event connectivity domain. Since pointing angles have cyclic characteristics, the average pointing angle can be calculated using a cyclic mean. Each positioning point's perturbation pointing angle is converted into a vector on the unit circle, with the x-coordinate of each vector being the cosine of the angle and the y-coordinate being the sine of the angle. The arithmetic mean of the x-coordinates and y-coordinates of all vectors is calculated to obtain the average vector. The azimuth of this average vector is then calculated as the average pointing angle. The preset pointing interval divides the angle range [-180°, 180°] or [0°, 360°] into several consecutive intervals, each interval corresponding to a pointing event type. For example, [-45°, 45°] corresponds to "moving east," and [45°, 135°] corresponds to "moving north." The pointing event type mapping table is a predefined lookup table where the key is the pointing interval and the value is the pointing event type string. Based on the pointing interval entered according to the calculated average pointing angle, the corresponding pointing event type is read from the mapping table as a supplementary label.
[0143] Step S550: Perform a merge and deduplication operation on the candidate event type labels and supplementary labels to generate the event type labels for the boundary of the connected domain of the event.
[0144] The candidate event type labels obtained in step S530 and the supplementary labels obtained in step S540 are merged. If the two labels are the same or semantically equivalent, only one is retained; if the two labels are different, they can be combined into a composite label, or one of them can be selected as the final label according to priority.
[0145] In one implementation, step S550 involves merging and deduplicating the candidate event type labels and supplementary labels to generate event type labels for the boundary of the event's connected domain. This may specifically include the following steps S551 to S555: Step S551: Create an event type label container, add the event type candidate label as the first priority label to the event type label container, and add the supplementary label as the second priority label to the event type label container.
[0146] Create a container data structure, such as a set or list, to store event type labels. Add the event type candidate labels generated in step S530 to the container as first priority labels, and add the supplementary labels generated in step S540 to the container as second priority labels. The first priority label is higher than the second priority label. When the two conflict, the first priority label shall be used first.
[0147] Step S552: Obtain the coordinates of all positioning points within the consistent group corresponding to the boundary of the event's connected domain, obtain the geometric center of these positioning point coordinates as the event center point, and obtain the representative time of the boundary of the event's connected domain.
[0148] Traverse the coordinates of all points within the consistent group, calculate the geometric center of these coordinates, sum the longitude coordinates of all points and divide by the number of points to obtain the center longitude, sum the latitude coordinates of all points and divide by the number of points to obtain the center latitude. The center longitude and center latitude constitute the event center point. The event center point describes the centroid position of the connected domain of the event in space, and simultaneously obtains the representative time of the boundary of the connected domain of the event calculated in step S510.
[0149] Step S553: From the generated event graph data stream, find the boundaries of other connected domains whose representative times fall within the preset time neighborhood range before and after the current representative time, and extract the event type labels of the boundaries of other connected domains to form a neighborhood label set.
[0150] The event graph data stream is constructed progressively during processing, already containing the boundaries of connected components and their event type labels within the previously processed event evolution time windows. Centered on the representative moment of the current event connected component boundary, a time window is defined with a preset time neighborhood range of a time length threshold, for example, 5 minutes before and after the representative moment. Other event connected component boundaries whose representative moments fall within this time window are searched within the generated event graph data stream. For each found event connected component boundary, its assigned event type labels are extracted and collected into a set called the neighborhood label set.
[0151] Step S554: Obtain the frequency of each label in the neighborhood label set, and take the label with the highest frequency as the neighborhood consensus label. If the event type label container does not contain a neighborhood consensus label, add the neighborhood consensus label as the third priority label to the event type label container.
[0152] Count the frequency of each different label in the neighborhood label set and identify the label with the highest frequency as the neighborhood consensus label. If there are multiple labels with the highest frequency, one or all can be selected and retained. Check if the event type label container already contains the neighborhood consensus label. If it does not, add the neighborhood consensus label as a third-priority label to the event type label container. The third priority is lower than the first and second priorities.
[0153] Step S555: For all tags in the event type tag container, select the final tag as the event type tag of the event connected domain boundary in the order of first priority tag over second priority tag, and second priority tag over third priority tag.
[0154] The event type label container may contain multiple labels of different priorities. Labels are selected in descending order of priority. If a first-priority label exists, it is selected as the final event type label. If a first-priority label does not exist but a second-priority label exists, the second-priority label is selected. If neither the first nor the second priority label exists but a third-priority label exists, the third-priority label is selected. If no labels of any priority exist, a default label, such as "uncategorized event," can be used. The finally selected label is used as the event type label for the boundary of the event's connected domain.
[0155] Step S560: Traverse all event connected domain boundaries in the event connected domain boundary set, assign an event type label to each event connected domain boundary, and package and output the event connected domain boundaries and their event type labels within each time window according to the order of the time windows in the event evolution time window sequence to generate an event graph data stream.
[0156] For each event connected component boundary in the event connected component boundary set, steps S510 to S555 are repeated to assign an event type label to each boundary. Then, each time window is processed sequentially according to the chronological order of the time windows in the event evolution time window sequence. For each time window, all event connected component boundaries contained within that time window are collected, along with attributes such as the event type label, geometric information of the event connected component boundary, event center point, event connected component area, and event connected component perimeter. This information is packaged into a data unit. All data units from all time windows are arranged in chronological order to form an event graph data stream.
[0157] In one implementation, step S560 involves traversing all event connected domain boundaries in the event connected domain boundary set, assigning an event type label to each event connected domain boundary, and packaging and outputting the event connected domain boundaries and their event type labels within each time window according to the order of the time windows in the event evolution time window sequence to generate an event graph data stream. Specifically, this may include the following steps S561~S565: Step S561: Read all event connected domain boundaries within the first event evolution time window from the event graph data stream, extract the event type labels of these event connected domain boundaries, count the number of times each event type label appears, and take the event type label with the highest number of appearances as the main event type of the time window.
[0158] In the event graph data stream, the first event evolution time window may contain multiple event connected component boundaries, each assigned an event type label. Traverse all event connected component boundaries within this time window, extract the event type label for each boundary, and construct a label frequency statistics table. Identify the label with the highest frequency as the primary event type for that time window. If multiple labels have the same highest frequency, any one of them can be selected, or a selection can be made based on the semantic priority of the labels.
[0159] Step S562: Obtain the start and end times of the first event evolution time window, obtain the duration of the time window, filter out all event connected domain boundaries with the same event type label as the main event type from the event connected domain boundaries within the time window, and obtain the average coordinates of the event center points of these event connected domain boundaries as the main event center point.
[0160] The start and end times of the first event evolution time window are read from its attributes; the difference between the start and end times represents the duration of this time window. Within the event connected domain boundaries of this time window, those boundaries whose event type labels equal the main event type are selected. For each selected event connected domain boundary, the coordinates of its event center point are obtained. The arithmetic mean of these center point coordinates is calculated. The average center longitude is obtained by adding the longitude coordinates of all center points and dividing by the number of center points; the average center latitude is obtained by adding the latitude coordinates of all center points and dividing by the number of center points. The average center longitude and average center latitude constitute the main event center point. The main event center point reflects the spatial clustering location of the main event types within this time window.
[0161] Step S563: Read all event connected domain boundaries within the second event evolution time window from the event graph data stream, and repeat the main event type statistics and main event center point acquisition operations to obtain the main event type and main event center point of the second event evolution time window.
[0162] For the second event evolution time window in the event graph data stream, perform the same operations as steps S561 and S562: count the frequency of event type labels of all event connected domain boundaries within the time window to determine the main event type; filter out the event connected domain boundaries with labels that are the same as the main event type, and calculate the average coordinates of their event center points as the main event center point.
[0163] Step S564: Obtain the spatial offset vector between the main event center point of the second event evolution time window and the main event center point of the first event evolution time window. Calculate the time difference between the center time of the first event evolution time window and the center time of the second event evolution time window. The center time of each event evolution time window is the average of the start and end times of that time window. Then, divide the magnitude of the spatial offset vector by the time difference to obtain the event center migration rate.
[0164] Specifically, when calculating the spatial offset vector, the longitude offset is obtained by subtracting the longitude of the main event center point of the first event evolution time window from the longitude of the main event center point of the second event evolution time window, and the latitude offset is obtained by subtracting the latitude of the main event center point of the first event evolution time window from the latitude of the main event center point of the second event evolution time window. The magnitude of the spatial offset vector is the square root of the sum of the squares of the longitude and latitude offsets, multiplied by the conversion coefficient between longitude / latitude and actual distance to obtain the actual spatial distance. The center time of the first event evolution time window is calculated by adding its start and end times and dividing by 2; the center time of the second event evolution time window is calculated in the same way. The difference between the two center times is the time difference. The event center migration rate is equal to the magnitude of the spatial offset vector divided by the time difference, reflecting the spatial movement speed of the main event between time windows.
[0165] Step S565: Add the main event type, main event center point, and event center migration rate between adjacent time windows of each event evolution time window as time window evolution attributes to the event graph data stream, and output the event graph data stream with time window evolution attributes.
[0166] For each event evolution time window in the event graph data stream, its main event type and main event center point are appended to the data stream as metadata for that time window. For two adjacent time windows, the calculated event center migration rate is appended to the data stream as an edge attribute connecting the two time windows. The final output event graph data stream contains the boundaries of the connected domains within each time window and their event type labels, as well as the overall evolution attributes of each time window, forming a multi-level data structure from micro-event boundaries to macro-event evolution.
[0167] This invention also provides a computer system, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements the steps in the police scenario-based multi-source heterogeneous data fusion analysis and processing method provided in this invention.
[0168] Please see details. Figure 3 This is a schematic diagram of the structure of a computer system provided in an embodiment of the present invention. Figure 3 As shown, the computer system 1000 described above may include: a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer system 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to implement communication between these components. The user interface 1003 may include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 3 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.
[0169] exist Figure 3 In the computer system 1000 shown, the network interface 1004 provides network communication functions; the user interface 1003 is mainly used to provide an input interface; and the processor 1001 can be used to call the device control application stored in the memory 1005 to implement the methods provided in the above embodiments.
[0170] It should be understood that the computer system 1000 described in the embodiments of the present invention can execute the foregoing text. Figure 2 The implementation principle and beneficial effects of the method for fusing and analyzing multi-source heterogeneous data in police scenarios described in the corresponding embodiments will not be elaborated here.
Claims
1. A method for fusing and analyzing multi-source heterogeneous data in a police scenario, characterized in that, include: The system receives a first raw data packet, a second raw data packet, and a third raw data packet from multiple police data source terminals. The first raw data packet carries a video frame sequence and a collection timestamp for each frame. The second raw data packet carries text record entries and an entry timestamp for each entry. The third raw data packet carries a location point coordinate sequence, a location timestamp for each location point, and the identification of the police officer or equipment corresponding to each location point. Dynamic background culling is performed on the video frame sequence in the first original data packet to separate the displacement perturbation field of the foreground moving target between consecutive frames. The displacement perturbation field is aligned with the entry timestamp of the text record entry in the second original data packet to generate a spatiotemporal perturbation record set carrying the displacement perturbation vector chain and the corresponding text semantic anchor point. The spatially dense region of displacement perturbation vector chain is extracted from the spatiotemporal perturbation record set, and the spatially dense region is used as a candidate event hot zone. At the same time, a subset of positioning points falling into the candidate event hot zone is selected from the positioning point coordinate sequence in the third original data packet. An event evolution time window sequence is constructed based on the time interval between adjacent positioning points in the positioning point subset. Within each event evolution time window, the displacement perturbation vector chain in the spatiotemporal perturbation record set is spatially superimposed with the coordinates of the location points in the location point subset. The event connectivity boundary set is generated by comparing the direction consistency of the displacement perturbation vector at each location point with the displacement perturbation vector between adjacent location points. The event connected domain boundary set is associated and matched with the text semantic anchor point. Each successfully matched event connected domain boundary is assigned an event type label, and the event graph data stream carrying the event type label and event connected domain boundary is output in the order of the event evolution time window sequence.
2. The method according to claim 1, characterized in that, The process involves performing dynamic background culling on the video frame sequence in the first original data packet to separate the displacement perturbation field of the foreground moving target between consecutive frames. This displacement perturbation field is then time-aligned with the entry timestamps of text record entries in the second original data packet to generate a spatiotemporal perturbation record set carrying a displacement perturbation vector chain and corresponding text semantic anchors. This includes: Read consecutive first and second video frames from the first original data packet, determine the dynamic difference between the pixel value of each pixel in the first video frame and the pixel value of the pixel with the same coordinates in the second video frame, and mark the pixels with dynamic differences exceeding the dynamic threshold as foreground pixels to obtain the first foreground pixel set. Spatial adjacency merging is performed on the first foreground pixel set to merge spatially adjacent foreground pixels into the same foreground moving target instance. The center coordinates of the first region in the first video frame and the center coordinates of the second region in the second video frame of the foreground moving target instance are extracted, and the bounding rectangle area of the foreground moving target instance in the first video frame and the bounding rectangle area in the second video frame are recorded. The positional offset of the center coordinates of the second region relative to the center coordinates of the first region is used as the displacement perturbation vector. The displacement perturbation vector is associated with the acquisition timestamp of the second video frame and recorded. All adjacent frame pairs in the first original data packet are traversed to generate an ordered sequence of displacement perturbation vectors corresponding to each foreground moving target as a displacement perturbation vector chain. Read the entry timestamp of each text record entry from the second original data packet, perform time proximity matching between the acquisition timestamp corresponding to each displacement disturbance vector in the displacement disturbance vector chain and the entry timestamp, and if the absolute time distance between the acquisition timestamp and the entry timestamp is less than the alignment window, then bind the text content of the text record entry to the displacement disturbance vector as a text semantic anchor. The displacement perturbation vector chain bound to the text semantic anchor points is classified and stored according to the foreground moving target identifier to generate a spatiotemporal perturbation record set. Each record entry in the spatiotemporal perturbation record set contains the foreground moving target identifier, the displacement perturbation vector chain, and the text semantic anchor point sequence bound to the displacement perturbation vector. For the displacement disturbance vector chains with the same foreground moving target identifier in the spatiotemporal disturbance record set, extract the acquisition timestamps corresponding to all displacement disturbance vectors in the displacement disturbance vector chain to form an acquisition timestamp sequence, and extract the recording timestamps corresponding to all text semantic anchors in the displacement disturbance vector chain to form an recording timestamp sequence.
3. The method according to claim 2, characterized in that, The step of classifying and storing the displacement perturbation vector chain bound to the text semantic anchor points according to the foreground moving target identifier to generate a spatiotemporal perturbation record set includes: Obtain the displacement perturbation vector chain corresponding to each foreground moving target identifier in the spatiotemporal perturbation record set, traverse each displacement perturbation vector in the displacement perturbation vector chain, read the movement step size and movement pointing angle of the displacement perturbation vector, and use the movement step size and movement pointing angle as the motion attribute pair of the displacement perturbation vector; The extreme span of the movement step of all displacement disturbance vectors in the displacement disturbance vector chain is counted. The extreme span is compared with a preset span threshold. If the extreme span is greater than the preset span threshold, the displacement disturbance vector chain is marked as a variable speed disturbance chain. If the extreme span is less than or equal to the preset span threshold, it is marked as a uniform speed disturbance chain. For a displacement disturbance vector chain marked as a variable speed disturbance chain, traverse all adjacent displacement disturbance vectors in the chain, obtain the pointing angle difference between the pointing angles of two adjacent displacement disturbance vectors, and when the pointing angle difference exceeds the pointing change threshold, record the collection timestamps corresponding to the two adjacent displacement disturbance vectors as the pointing change time points. For a displacement disturbance vector chain labeled as a uniform disturbance chain, the cyclic mean of the movement pointing angles of all displacement disturbance vectors in the chain is calculated as the reference pointing angle. Displacement disturbance vectors whose pointing deviation from the reference pointing angle is less than the stable pointing threshold are marked as pointing stable disturbance vectors. The abrupt change point is appended to the record entry corresponding to the variable speed disturbance chain, and the stationary disturbance vector is appended to the record entry corresponding to the uniform speed disturbance chain, thereby updating the spatiotemporal disturbance record set. From the spatiotemporal disturbance record set, select all record entries marked as variable speed disturbance chains and whose number of points to abrupt change time points exceeds the abrupt change frequency threshold, and store the foreground moving target identifiers corresponding to these record entries into the high dynamic disturbance target set.
4. The method according to claim 2, characterized in that, The step of reading the entry timestamp of each text record entry from the second original data packet and performing time proximity matching between the acquisition timestamp corresponding to each displacement disturbance vector in the displacement disturbance vector chain and the entry timestamp includes: Establish a time proximity matching window, the length of which is a preset time distance threshold. Use the acquisition timestamp of each displacement disturbance vector in the displacement disturbance vector chain as the central reference point, and search for the recording timestamp in the second original data packet within half of the time proximity matching window before and after the acquisition timestamp. If at least one input timestamp is located within the search range, the text record entry corresponding to the input timestamp with the smallest absolute time distance from the collection timestamp is selected as the matching entry, and the text content of the matching entry is used as the text semantic anchor. If no input timestamp is located within the search range, the displacement disturbance vector is marked as an anchorless displacement disturbance vector, and all anchorless displacement disturbance vectors are collected to form an anchorless vector set. For two adjacent anchorless displacement perturbation vectors in the anchorless vector set, the time interval between their acquisition timestamps is obtained. If the time interval is less than the interpolation time window, the bounding rectangle area of the foreground moving target instance corresponding to each of the two anchorless displacement perturbation vectors in the corresponding video frame is obtained. The bounding rectangle area is calculated by the rectangle enclosed by the minimum row coordinate, maximum row coordinate, minimum column coordinate, and maximum column coordinate of all foreground pixels of the foreground moving target instance in the video frame. Obtain the area ratio of the bounding rectangle area corresponding to the next anchorless displacement disturbance vector to the area of the bounding rectangle area corresponding to the previous anchorless displacement disturbance vector. If the area ratio is within a preset range, generate a virtual displacement disturbance vector between the two anchorless displacement disturbance vectors. Take the arithmetic mean of the acquisition timestamp of the previous anchorless displacement disturbance vector and the acquisition timestamp of the next anchorless displacement disturbance vector as the virtual acquisition timestamp. The movement pointing angle of the virtual displacement disturbance vector is the midpoint of the movement pointing angles of the two anchorless displacement disturbance vectors. The movement step size of the virtual displacement disturbance vector is the midpoint of the movement step size of the two anchorless displacement disturbance vectors. The virtual displacement disturbance vector is associated with the virtual acquisition timestamp and inserted into the displacement disturbance vector chain. The virtual displacement disturbance vector is marked as an interpolation vector. At the same time, the text content of the text record entry whose entry timestamp is closest to the virtual acquisition timestamp is selected from the second original data packet as its text semantic anchor point, and the displacement disturbance vector chain is updated.
5. The method according to claim 1, characterized in that, The process of extracting densely distributed spatial regions of displacement perturbation vector chains from the spatiotemporal perturbation record set, using these densely distributed spatial regions as candidate event hotspots, and simultaneously filtering a subset of location points falling within the candidate event hotspots from the location point coordinate sequence in the third original data packet, and constructing an event evolution time window sequence based on the time intervals between adjacent location points in the subset of location points, includes: Read all displacement disturbance vector chains from the spatiotemporal disturbance record set, obtain the second region center coordinates corresponding to each displacement disturbance vector, transform the second region center coordinates to the same spatial coordinate system as the positioning point coordinates in the third original data packet through pre-calibrated coordinate transformation parameters to obtain spatialized center coordinates, and project all spatialized center coordinates onto a two-dimensional spatial plane to generate a center coordinate point cloud distribution. Spatial grid partitioning is performed on the distribution of the central coordinate point cloud, dividing the two-dimensional spatial plane into grid cells of equal size, counting the number of spatialized central coordinate points falling in each grid cell, and marking grid cells with the number of spatialized central coordinate points exceeding the density threshold as high-density grid cells. Perform connected region merging on all high-density grid cells, merge spatially adjacent high-density grid cells into a continuous region, calculate the geometric center position and outer boundary of each continuous region, and use the continuous region as a candidate event hotspot. Read the location point coordinate sequence from the third original data packet, and determine in turn whether each location point coordinate is located inside the outer boundary of any candidate event hot zone. Extract the location point coordinates located inside the outer boundary to generate a location point subset. The positioning points in the subset of positioning points are arranged in ascending order of positioning timestamps. The difference between the positioning timestamps of two adjacent positioning points is obtained as the time interval. Adjacent positioning points with time intervals less than the interval threshold are grouped into the same event evolution time window. When an adjacent positioning point with a time interval greater than or equal to the interval threshold is encountered, the current event evolution time window is terminated and the next event evolution time window is started. The event evolution time window sequence is constructed in sequence. Obtain the first event evolution time window in the event evolution time window sequence, extract the minimum positioning timestamp among all positioning timestamps of all positioning points within the event evolution time window as the start time, extract the maximum positioning timestamp as the end time, filter out displacement disturbance vectors whose acquisition timestamps fall between the start time and the end time from the spatiotemporal disturbance record set, associate these displacement disturbance vectors with the event evolution time window, and generate a time window disturbance vector set.
6. The method according to claim 5, characterized in that, The process of merging connected regions for all high-density grid cells, combining spatially adjacent high-density grid cells into a continuous region, calculating the geometric center and outer boundary of each continuous region, and using the continuous region as a candidate event hotspot includes: Obtain the row and column position numbers of all grid cells marked as high-density grid cells, establish an access mark sequence of the same length as the total number of grid cells, and initialize all elements of the access mark sequence to an unaccessed state; Iterate through each high-density grid cell. If the access flag of the current high-density grid cell is unvisited, create a new connected component container, add the current high-density grid cell to the connected component container, and update the access flag of the high-density grid cell to be visited. Using the current high-density grid cell as the center reference, check the adjacent grid cells in its four orthogonal adjacency directions. If the adjacent grid cell is a high-density grid cell and the access is marked as unvisited, add the adjacent grid cell to the current connected region container and mark it as visited. Recursively execute this expansion operation until no new high-density grid cells are added. After expanding a connected region, extract the geometric center coordinates of all grid cells within the container of the connected region, calculate the center position of these geometric center coordinates as the geometric center of the connected region, and extract the outer boundary lines of all grid cells within the container of the connected region as the outer boundary of the region. The geometric center and the outer boundary of the region are stored as attribute information of the candidate event hot zone, and the total number of high-density grid cells in the connected region container is counted as the hot zone intensity value of the candidate event hot zone. Repeat the above operation for all connected region containers to generate a set of candidate event hotspots. Each candidate event hotspot contains a geometric center, an outer boundary of the region, and a hotspot intensity value.
7. The method according to claim 5, characterized in that, The process involves obtaining the first event evolution time window in the event evolution time window sequence, extracting the minimum positioning timestamp from all positioning timestamps within the event evolution time window as the start time, extracting the maximum positioning timestamp as the end time, filtering displacement disturbance vectors whose acquisition timestamps fall between the start and end times from the spatiotemporal disturbance record set, and associating these displacement disturbance vectors with the event evolution time window to generate a time window disturbance vector set, including: For each event evolution time window in the event evolution time window sequence, extract the location timestamps of all locations within the time window, find the minimum value of the location timestamps as the window start time, and find the maximum value of the location timestamps as the window end time. Using the start and end times of the window as time boundaries, all displacement disturbance vectors in the spatiotemporal disturbance record set are traversed, and displacement disturbance vectors with acquisition timestamps greater than or equal to the start time and less than or equal to the end time of the window are selected to form the original time window disturbance vector set. Obtain the foreground moving target identifier corresponding to each displacement perturbation vector in the original time window perturbation vector set, and perform a grouping operation on the original time window perturbation vector set according to the foreground moving target identifier to obtain the perturbation vector subsequence of each foreground moving target in the time window; For each foreground moving target, the arithmetic center value of the movement step of all displacement perturbation vectors in the subsequence is obtained as the average perturbation step of the target in the time window, and the cyclic center direction of the movement pointing angle of all displacement perturbation vectors in the subsequence is obtained as the synthetic perturbation pointing of the target in the time window. The average perturbation step size and synthetic perturbation direction of all foreground moving targets are stored in the extended attribute of the time window perturbation vector set according to the target identifier, and the time window perturbation vector set is associated with the corresponding event evolution time window for storage; Repeat the above operations until an associated set of time window perturbation vectors is generated for each time window in the event evolution time window sequence.
8. The method according to claim 1, characterized in that, Within each event evolution time window, the displacement perturbation vector chain in the spatiotemporal perturbation record set is spatially superimposed with the coordinates of the location points in the location point subset. An event connectivity boundary set is generated by comparing the directional consistency of the displacement perturbation vector at each location point with that between adjacent location points, including: Select an event evolution time window from the event evolution time window sequence, obtain the location coordinates and location timestamps of each location point in the location point subset associated with the event evolution time window, and obtain the displacement perturbation vector chain in the spatiotemporal perturbation record set associated with the event evolution time window; For each location point, obtain the identifier of the police officer or equipment to which the location point belongs, and search for the displacement disturbance vector chain corresponding to the foreground moving target with the same identifier from the spatiotemporal disturbance record set. In the displacement disturbance vector chain, find the displacement disturbance vector that is closest to the collection time stamp and the location time stamp of the location point as the associated displacement disturbance vector of the location point. If the location point does not have a corresponding identifier, then all displacement disturbance vector chains are traversed. For each displacement disturbance vector, the center coordinates of the corresponding second region are transformed to the same spatial coordinate system as the location point coordinates through pre-calibrated coordinate transformation parameters to obtain the transformed center coordinates. Then, the vectors are sorted according to the time proximity between the acquisition time stamp and the location time stamp, and the displacement disturbance vector with the smallest time proximity is selected as the candidate vector. If there are multiple candidate vectors with equal time proximity or a difference within a preset tolerance range, the vector with the closest spatial distance is selected from these candidate vectors as the associated displacement disturbance vector. The spatial distance is the Euclidean distance between the location point coordinates and the transformed center coordinates. The movement pointing angle of the associated displacement disturbance vector is recorded as the location point disturbance pointing angle. The positioning points in the subset of positioning points are sorted in ascending order according to the positioning timestamp. Each positioning point and its adjacent next positioning point are traversed. The positioning point perturbation pointing angle of the current positioning point is obtained as the first pointing angle, and the positioning point perturbation pointing angle of the adjacent next positioning point is obtained as the second pointing angle. The angle difference between the first pointing angle and the second pointing angle is obtained as the pointing difference angle. The pointing difference angle is compared with the direction consistency threshold. If the pointing difference angle is less than or equal to the direction consistency threshold, it is determined that the current positioning point and the adjacent positioning point are pointing in the same direction. The adjacent positioning point is then assigned to the same pointing consistency group as the current positioning point. When the pointing difference angle is greater than the direction consistency threshold, the current pointing consistent group is terminated and a new pointing consistent group is started. After traversal, multiple pointing consistent groups are obtained, and each pointing consistent group contains a continuous sequence of pointing consistent positioning points. For each consistent pointing group, extract the coordinates of all positioning points within the group, obtain the minimum bounding convex polygon boundary of these positioning point coordinates, and use the minimum bounding convex polygon boundary as the event connected domain boundary. The event connected domain boundaries corresponding to all consistent pointing groups constitute the event connected domain boundary set.
9. The method according to claim 8, characterized in that, The step of finding the displacement disturbance vector in the displacement disturbance vector chain that is closest to the acquisition time stamp and the positioning time stamp of the positioning point as the associated displacement disturbance vector of the positioning point includes: Obtain the acquisition timestamps of all displacement disturbance vectors in the displacement disturbance vector chain, take the absolute time distance between each acquisition timestamp and the positioning timestamp of the current positioning point as the time proximity, and select the displacement disturbance vector with the smallest time proximity as the candidate associated vector. If the time proximity is less than or equal to the maximum allowable time deviation, then the candidate associated vector is determined as the associated displacement disturbance vector of the positioning point, and the movement pointing angle and movement step size of the associated displacement disturbance vector are recorded. If the time proximity is greater than the maximum allowable time deviation, it is determined that the location point cannot find a valid associated displacement disturbance vector, and the location point is marked as an isolated location point. Collect all isolated points, obtain the coordinates of each isolated point, calculate the spatial straight-line distance between adjacent isolated points, and merge adjacent isolated points whose spatial straight-line distance is less than the isolated point merging distance threshold into an isolated point cluster. For each isolated point cluster, the median time of the location timestamps of all isolated locations in the isolated point cluster is extracted as the representative time. The displacement disturbance vector chain with the same police personnel or equipment identifier as the isolated location is searched from the spatiotemporal disturbance record set. The displacement disturbance vector with the collection timestamp closest to the representative time is searched in the chain as the proxy displacement disturbance vector of the isolated point cluster. If the isolated positioning point is unmarked, all displacement disturbance vector chains are traversed. For each displacement disturbance vector, the center coordinates of the corresponding second region are transformed to the same spatial coordinate system as the positioning point coordinates through the pre-calibrated coordinate transformation parameters to obtain the transformed center coordinates. Then, the vectors are sorted according to the time proximity between the acquisition timestamp and the representative time. The displacement disturbance vector with the smallest time proximity is selected as the candidate vector. If there are multiple candidate vectors with equal time proximity or the difference is within the preset tolerance range, the vector with the closest spatial distance is selected from these candidate vectors as the proxy displacement disturbance vector. The proxy displacement disturbance vector is used as the associated displacement disturbance vector of all isolated positioning points within the isolated point cluster, and the movement pointing angle of the proxy displacement disturbance vector is recorded as the positioning point disturbance pointing angle of these isolated positioning points.
10. A computer system, characterized in that, include: processor; And a memory, wherein the memory stores computer-readable code that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 9.