Battlefield entity trajectory real-time clustering method and system based on hexagonal lattice hash
By using a real-time clustering method for battlefield entity trajectories based on hexagonal lattice hashing, the problems of high computational complexity and insufficient tactical logic verification in wargaming simulations are solved. This method enables real-time processing and reliable tactical analysis of millions of entity trajectories, improving simulation efficiency and result reliability.
Patent Information
- Application Number
- CN202511346536.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2026-02-17
AI Technical Summary
Existing wargaming techniques suffer from high computational complexity when dealing with millions of entity trajectories, making it difficult to meet the requirements for real-time performance and accuracy. Furthermore, the lack of embedded verification of military rules leads to a high rate of misjudgment in the simulations, making it impossible to generate interpretable tactical intent analyses.
A real-time battlefield entity trajectory clustering method based on hexagonal grid hashing is adopted. By discretizing the continuous battlefield space into a hexagonal grid network, combining hash mapping to map trajectory points, and performing incremental clustering and tactical logic verification based on hexagonal grid hash buckets, the real-time rendering of battlefield entity trajectories is achieved.
It reduces the time complexity of neighborhood search from O(n2) to O(1), enabling real-time clustering of tens of thousands of trajectory points per second. This improves the response efficiency and tactical credibility of large-scale battlefield simulations, identifies and eliminates false association clusters that do not conform to actual combat logic, and reduces the problem of computing resource overload.
Smart Images

Figure CN121542779A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer wargaming and military training simulation technology, and more specifically, to a real-time clustering method and system for battlefield entity trajectories based on hexagonal lattice hashing. Background Technology
[0002] Current mainstream wargaming simulations mostly employ traditional trajectory clustering algorithms and path planning methods, but their limitations are significant. Traditional density clustering algorithms (such as DBSCAN and TRACLUS) rely on calculating the Euclidean distance between all trajectory points, resulting in a time complexity as high as O(n^2). 2 This approach struggles to handle the real-time demands of hundreds of thousands of entity trajectories in division-level simulations, often resulting in simulation delays exceeding the tactical decision-making window. Furthermore, existing methods lack embedded validation of military rules; for example, they fail to constrain the tactical logic of reconnaissance preceding strike, easily generating isolated logistics unit trajectory clusters—results that violate common sense in actual combat, leading to a persistently high misjudgment rate. Spatial alignment and cross-modal association efficiency for heterogeneous trajectory data also face bottlenecks. Traditional hexagonal grid indexing, lacking optimized hash mapping mechanisms, increases the computation time for associating UAV tracks with armored vehicle movement paths by over 30%.
[0003] The aforementioned shortcomings reveal the pressing technical contradictions in the field of wargaming: first, how to overcome the computational bottleneck of traditional density clustering algorithms while ensuring the completeness of tactical logic, and achieve real-time processing and semantic clustering of millions of entity trajectories; second, how to eliminate trajectory patterns that violate battlefield common sense (such as deep assaults without reconnaissance support) through automated rule verification in dynamic simulations, and generate interpretable tactical intent analyses. Existing technologies fail to simultaneously address the dual capabilities of hexagonal grid space computational optimization and tactical causal constraint modeling, resulting in simulation efficiency and result reliability that cannot meet the stringent real-time and accuracy requirements of intelligent warfare. Summary of the Invention
[0004] The purpose of this invention is to provide a real-time battlefield entity trajectory clustering method and system based on hexagonal lattice hashing to improve the aforementioned problems. To achieve the above objective, the technical solution adopted by this invention is as follows:
[0005] Firstly, this application provides a real-time clustering method for battlefield entity trajectories based on hexagonal lattice hashing, including:
[0006] The continuous battlefield space is discretized into a hexagonal grid network. The trajectory points are mapped by combining the hexagonal grid network and hash mapping to obtain hexagonal hash buckets. Each hexagonal hash bucket stores the entity trajectory points with the same hash value.
[0007] Incremental clustering is performed based on the hexagonal hash buckets, and clusters are obtained through core grid identification and cluster expansion.
[0008] The clusters are subjected to tactical logic verification, and compliant clusters and abnormal clusters are marked by rule matching and spatiotemporal logic verification.
[0009] Real-time rendering is performed based on compliant and abnormal clusters to obtain visualization results of battlefield entity trajectories.
[0010] Secondly, this application also provides a real-time battlefield entity trajectory clustering system based on hexagonal lattice hashing, including:
[0011] The mapping module is used to discretize the continuous battlefield space into a hexagonal grid network, and combine the hexagonal grid network and hash mapping to map trajectory points to obtain hexagonal hash buckets. Each hexagonal hash bucket stores entity trajectory points with the same hash value.
[0012] The clustering module is used to perform incremental clustering based on the hexagonal hash buckets, and obtain clusters through core grid identification and cluster expansion;
[0013] The verification module is used to perform tactical logic verification on the clusters, and to mark compliant clusters and abnormal clusters through rule matching and spatiotemporal logic verification.
[0014] The rendering module is used for real-time rendering based on compliant and abnormal clusters to obtain visualization results of battlefield entity trajectories.
[0015] The beneficial effects of this invention are: This invention reduces the time complexity of neighborhood search from O(n^2) of traditional algorithms through a hexagonal hash mechanism. 2 The computation time is reduced to O(1), and combined with streaming processing design, real-time clustering of tens of thousands of trajectory points per second is achieved, effectively improving the response efficiency of large-scale battlefield simulations. At the same time, embedded tactical rule verification can identify and eliminate false association clusters that do not conform to the logic of actual combat (such as assault formations without accompanying cover), enhancing the tactical credibility of the clustering results and the consistency with the logic of actual combat. The synergistic effect of sliding time window and density increment calculation mechanism can adapt to the real-time changes of battlefield entity trajectories, avoid repeated scanning of the entire data, reduce the parameter drift and computational resource overload problems caused by data accumulation in traditional methods, and improve the stability of the algorithm in long-term simulations.
[0016] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the real-time battlefield entity trajectory clustering method based on hexagonal grid hashing described in this embodiment of the invention;
[0019] Figure 2 This is a schematic diagram of the axial coordinate system in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0021] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0022] Example 1:
[0023] This embodiment provides a real-time clustering method for battlefield entity trajectories based on hexagonal lattice hashing.
[0024] See Figure 1 The figure shows that the method includes steps S1, S2, S3 and S4.
[0025] Step S1: Discretize the continuous battlefield space into a hexagonal grid network, and combine the hexagonal grid network and hash mapping to map trajectory points to obtain hexagonal hash buckets. Each hexagonal hash bucket stores entity trajectory points with the same hash value.
[0026] In this embodiment, the trajectory point mapping process involves transforming the coordinates of the entity trajectory points, calculating their axial coordinates, performing hash calculations to generate hash values, storing the entity trajectory points into the corresponding hexagonal hash buckets using the hash values, preloading the adjacency offset table, and generating 6 adjacency hash values for the current hexagonal hash bucket for subsequent neighborhood searches.
[0027] Understandably, step S1 is the spatial indexing core of the trajectory clustering algorithm, responsible for discretizing the continuous battlefield space into a hexagonal grid network and achieving fast neighborhood search of trajectory points through a hash mapping mechanism. Its core value lies in reducing computational complexity, reducing the computational complexity of traditional Euclidean space nearest neighbor search from O(n^2) to O(n^2). 2 The time complexity is optimized to O(1), thereby supporting the real-time processing requirements of large-scale battlefield entity trajectories.
[0028] Step S1 includes:
[0029] Step S11: Divide the continuous battlefield space into a hexagonal grid according to the preset side length, and the coordinates of the center point of each hexagonal grid are represented by an axial coordinate system;
[0030] In this embodiment, the continuous battlefield space is uniformly divided into hexagonal grids with side length s (s is an adjustable parameter, typically 500m-2km). The coordinates of the center point of each hexagonal grid are represented using an axial coordinate system, as shown below. Figure 2 As shown.
[0031] Step S12: Obtain entity trajectory points;
[0032] Step S13: Calculate the axial coordinates of each entity trajectory point using the axial coordinate transformation formula;
[0033] In this embodiment, the entity trajectory points in the Cartesian coordinate system are converted into axial coordinates, and the formula is as follows:
[0034]
[0035] In the formula, x axial and y axial Let x and y represent the x and y coordinates of the entity trajectory points in the axial coordinate system, respectively. cart and y cart represents the x-coordinate and y-coordinate of the entity trajectory point in the Cartesian coordinate system, respectively, s represents the side length of the hexagonal grid, and [·] represents the rounding operation.
[0036] Step S14: Perform hash mapping on the axial coordinate mapping of the real-time trajectory points of the entity to obtain the hash value of each entity trajectory point;
[0037] In this embodiment, the formula for calculating the hash value is:
[0038] H(x axial ,y axial )=x axial +y axial ×K
[0039] In the formula, H(·) represents the hash value of the entity trajectory point with coordinates (·), and x axial and y axial These represent the horizontal and vertical coordinates of the entity trajectory point in the axial coordinate system, respectively. K represents the maximum number of grids parameter, which is a constant equal to the maximum number of horizontal grids on the battlefield plus 1, used to avoid coordinate overlap.
[0040] Step S15: Store the entity trajectory points into the corresponding hexagonal hash buckets using the hash values;
[0041] Step S16: Obtain the six adjacency hash values of each hexagonal hash bucket based on the adjacency offset table. The adjacency hash values are used to determine the adjacent buckets of the hexagonal hash bucket.
[0042] In this embodiment, the adjacency offset table, i.e., the axial coordinate offset Δ of the six adjacency directions of the predefined hexagonal hash bucket:
[0043] Δ={(1,0),(1,-1),(0,-1),(-1,0),(-1,1),(0,1)}
[0044] By using the axial coordinate offset Δ, the adjacency hash value of the hexagonal hash bucket to which each entity trajectory point belongs can be quickly calculated, thereby obtaining the adjacent buckets. The adjacency hash value can be obtained through H(x axial +Δ x ,y axial +Δ y ) Quick calculation, where Δ x Δ represents the coordinate offset in the x-direction. y This represents the coordinate offset in the y-direction.
[0045] As you can understand, a hexagonal hash bucket is a container for storing entity trajectory points. Each hexagonal hash bucket corresponds to a hexagonal grid area. Entity trajectory points with the same hash value are stored in the same hexagonal hash bucket. Storing them in the corresponding hash bucket means that all trajectory points with the same calculated hash value are placed in the same corresponding bucket.
[0046] If the hash value of the coordinates of Tank A is 3, then Tank A is stored in bucket number 3. Similarly, if the hash value of the coordinates of Drone B is also calculated, Drone B is also stored in bucket number 3. At this point, bucket number 3 contains two entity trajectory points (Tank A and Drone B). Each hexagonal hash bucket pre-records the numbers of its six adjacent buckets, so when searching for nearby units, there's no need to recalculate; you can simply look up the numbers of the adjacent buckets.
[0047] The core principle behind the adjacency hash value generation mechanism is based on fixed offset calculations using an axial coordinate system. The adjacency relationship of each hexagonal grid center point is determined by six predefined offsets in six directions, strictly adhering to the geometric characteristics of the hexagonal grid. Taking the axial coordinate (3,2) as an example, its six adjacent coordinates are automatically calculated: right (4,2), left (2,2), upper right (4,1), lower left (2,3), upper left (3,3), and lower right (3,1). In actual battlefield spatial indexing, when the maximum horizontal grid size parameter K is set to 15, these adjacent coordinates are converted into specific storage addresses using a unified hash function. For example, the hash value of the center grid (3,2) is 33, its right adjacent grid (4,2) corresponds to a hash value of 34, and its upper left adjacent grid (3,3) corresponds to a hash value of 48. Simultaneously, an intelligent boundary processing strategy is employed; when the coordinate offset exceeds the battlefield range, a circular correction is automatically performed to ensure spatial continuity.
[0048] Step S2: Perform incremental clustering based on the hexagonal hash buckets, and obtain clusters through core grid identification and cluster expansion;
[0049] In this embodiment, by integrating hexagonal grid spatial indexing and incremental calculation mechanism, streaming density clustering based on local update mechanism is realized, which solves the performance bottleneck problem faced by traditional density clustering algorithm when processing large-scale real-time data. At the same time, it ensures that the clustering results can reflect the real-time changes in the battlefield situation and can efficiently process continuously arriving trajectory data streams in dynamic simulation environment.
[0050] Step S2 includes:
[0051] Step S21: Obtain expired entity trajectory points and newly added entity trajectory points;
[0052] Step S22: Update the hexagonal hash bucket based on expired entity trajectory points and newly added entity trajectory points;
[0053] Step S22 includes:
[0054] Step S221: Configure the sliding window time according to the battlefield simulation rhythm, and slide the window according to the sliding window time;
[0055] Step S222: Obtain the timestamp queue of entity trajectory points within the current window, and identify expired entity trajectory points that are outside the current window range through the timestamp queue;
[0056] Step S223: Calculate the hash value of the newly added entity trajectory point;
[0057] Step S224: Map the newly added entity trajectory points to the corresponding hexagonal hash buckets using the hash values of the newly added entity trajectory points, and remove expired entity trajectory points from the corresponding hexagonal hash buckets to obtain the updated hexagonal hash buckets.
[0058] In this embodiment, the cluster expansion process employs an incremental update strategy, traversing only the adjacent hexagonal cells of the current core cell. If adjacent cells also satisfy the core condition, they are merged into the same cluster. This process is implemented by maintaining a core cell state table, avoiding redundant distance calculations in the traditional DBSCAN algorithm. Simultaneously, the module introduces a sliding time window mechanism. The window length is configured according to the simulation rhythm (typically 3-10 minutes). Expired entity trajectory points outside the window are automatically removed from the processing queue, ensuring that computational resources are concentrated on the latest battlefield situation. It is unnecessary to re-acquire entity trajectory points from the hexagonal hash buckets at every moment; instead, as the window slides, only expired entity trajectory points are retrieved from the timestamp queue, deleted from their respective hexagonal hash buckets, and their density is updated, without needing to re-acquire trajectory points from all buckets. The essence of the sliding window is time-range filtering; updating entity trajectory points is not equivalent to deletion and reconstruction, therefore, deleting old entity trajectory points is unnecessary. Not deleting old trajectory points ensures trajectory integrity, improves algorithm stability, reduces computational overhead, and supports incremental clustering updates.
[0059] Step S23: Obtain the six adjacent buckets of the updated hexagonal hash bucket;
[0060] Step S24: Calculate the updated hexagonal hash buckets and the cumulative density of each adjacent bucket based on the Gaussian kernel function;
[0061] In this embodiment, the cumulative density is directly related to the number of entity trajectory points within the hexagonal hash bucket, but it is essentially determined by the number of neighboring entity trajectory points and the distance weight. The formula for calculating the cumulative density is as follows:
[0062]
[0063] In the formula, f(L) i ) represents L i The cumulative density, L i L represents the current hexagonal hash bucket. j L represents i The j-th adjacent bucket, near(L i ) represents L i The neighborhood range, exp(·) represents the exponential function, dist(L i ,L j ) represents L i and L j The spatial distance, where σ represents the kernel function window width, is dynamically determined by minimizing the density estimation entropy, ensuring adaptability to data at different battlefield scales.
[0064] Step S25: If the cumulative density of the updated hexagonal hash bucket exceeds the preset density, then mark the updated hexagonal hash bucket as the core cell;
[0065] Step S26: Traverse the six adjacent buckets of each core cell. If the cumulative density of the adjacent buckets exceeds the preset density, merge the adjacent buckets with the corresponding core cell to obtain a cluster.
[0066] Understandably, this step utilizes a spatial indexing structure based on hexagonal hash buckets to group entity trajectory points according to their respective hexagonal grids. Each newly arriving entity trajectory point is quickly mapped to its corresponding hexagonal hash bucket using a hash function, subsequently triggering a local density update. Unlike traditional full-scale computation, only the cumulative density of the current hexagonal grid and its six neighboring grids needs to be updated. Hexagonal hashing, through regular spatial partitioning, constrains the ε-neighborhood of each point to a fixed number of hexagonal grids (the current grid and its six neighboring grids). Therefore, when a new entity trajectory point arrives, only the cumulative density of these seven grids needs to be updated to efficiently complete the local density calculation and update, avoiding the high cost of a full scan of historical points. This mechanism is the core idea of spatial index-optimized density clustering, significantly improving the processing efficiency of real-time or large-scale trajectory data.
[0067] Step S3: Perform tactical logic verification on the clusters, and mark compliant clusters and abnormal clusters through rule matching and spatiotemporal logic verification;
[0068] In this embodiment, the spatiotemporal logic of the clusters is verified through a formalized tactical rule base. Specifically, no constraints are imposed on a single hexagonal hash bucket, that is, the clustering results are verified, rather than the entity trajectory points within a single hexagonal hash bucket are subject to rule constraints.
[0069] Understandably, hexagonal hash buckets are tools used for spatial indexing and accelerating density calculations. If the cumulative density of a hexagonal hash bucket exceeds a preset density, it is marked as a core cell and triggers the cluster expansion process. If a core cell has no adjacent cells that also satisfy the core condition, it will form an independent cluster. Furthermore, tactical logic verification is performed on this formed cluster, not on individual core cells. Even if a cluster consists of only one core cell, tactical logic verification will still be performed as long as it is identified as a cluster.
[0070] Tactical logic verification can eliminate tactical contradictions caused by purely data-driven traditional algorithms (such as unprotected attacks and exposed logistics routes), encode domain knowledge into computable constraints, realize the transformation from data clustering to tactical semantics, and improve the credibility of inference results and decision-making reference value.
[0071] Step S3 includes:
[0072] Step S31: Set up a tactical rule base using linear temporal logic, wherein the tactical rule base includes temporal logic constraints and spatial logic constraints;
[0073] In this embodiment, the temporal logic constraints use Linear Temporal Logic (LTL) to describe the temporal order of tactical actions. For example, the requirement that reconnaissance actions must precede the start of a fire strike and continue until the strike ends can be formalized as follows: Where G(·) represents global, X(·) represents the next time step, and u represents until the logical operator.
[0074] Spatial logical constraints are implemented by defining geofencing and safety distance rules. For example, a logistics unit trajectory cluster must satisfy: Where p represents the logistics trajectory cluster C logistic For any point in the array, min represents taking the minimum value, and q represents the local reconnaissance cluster C. enemy_recon For any point in the array, dist(p,q) represents the spatial distance between p and q, and d safe This represents the minimum concealment distance, which is usually twice the side length of a hexagonal grid.
[0075] For example, the rule entries in the tactical rule base include R001 and R002, where R001 represents a temporal logic constraint, and its logical expression is: G(electronic jamming begins → F(firepower strike begins)), where F(·) represents the final logical operator. R002 represents a spatial logic constraint, and its logical expression is:
[0076] R001 indicates that the following condition is always met: if electronic jamming begins, then eventually (at some point in the future) a fire strike will begin, reflecting the tactical timing constraint that electronic jamming must be followed by a fire strike.
[0077] R002 indicates that the intersection of the logistics route and the enemy reconnaissance area is an empty set, meaning that the two do not overlap at all in space. This means that the planned routes of logistics units must completely avoid the enemy reconnaissance area, and no section of the route is allowed to enter the enemy's reconnaissance coverage area, reflecting tactical security constraints.
[0078] Step S32: Obtain the entity type within each cluster, and match the corresponding rule subset in the tactical rule base according to the entity type;
[0079] Step S33: Perform violation detection on the clusters based on rule subsets, and mark each cluster as a compliant cluster or an abnormal cluster;
[0080] Step S34: Mark the abnormality level of the abnormal cluster and record the violation rule entries.
[0081] In this embodiment, a subset of relevant rules is activated based on the entity type within a cluster (e.g., armor, air defense, logistics). A Büchi automaton or SPIN model is used to verify whether the cluster satisfies all rule entries. Abnormal clusters that violate the rules are marked with an anomalous level (e.g., warning, severe) and the specific rule entries violated are recorded.
[0082] It's important to note that real-time rule monitoring treats clusters as a whole, rather than verifying each entity trajectory point within a cluster individually. If a cluster includes multiple entity types, a subset of relevant rules is activated based on all entity types within the cluster. This means that if a cluster contains both tanks and drones, then tactical rules related to both tanks and drones will be activated and used to verify this mixed-type cluster.
[0083] Entity type refers to the type of battlefield entity that constitutes the trajectory. For example, there are entity types such as armored assault groups (tank battalions), drone squadrons, supply battalions, and electronic warfare companies. These entities carry type identifiers when generating trajectory data. Regarding the timing rule that reconnaissance actions must precede the start of the fire strike and continue until the strike ends, the time information is obtained through the timestamps attached to the trajectory points. The metadata of the clusters contains timestamp information, which is used to verify the timing logic during the tactical logic verification phase.
[0084] Step S4: Perform real-time rendering based on compliant clusters and abnormal clusters to obtain the visualization results of battlefield entity trajectories.
[0085] In this embodiment, clustering results and tactical rule verification information are transformed into an intuitive battlefield situation map, assisting commanders in quickly understanding entity movement patterns and tactical intentions. Through multi-layered graphics rendering and interactive design, a seamless connection from data clustering to decision support is achieved.
[0086] Step S4 includes:
[0087] Step S41: Draw the battlefield base map based on the hexagonal grid network, and fill the battlefield base map with color according to the cumulative density of the hexagonal grid hash buckets;
[0088] In this embodiment, basic situation rendering is first performed, which involves filling gradient colors with cumulative density, such as low-density blue to high-density red, to intuitively reflect the hot spots of troop distribution.
[0089] Step S42: Extract representative trajectory segments within each compliant cluster, wherein the line width of the representative trajectory segment is proportional to the sum of the cumulative densities of the hexagonal hash buckets within the compliant cluster;
[0090] In this embodiment, the line width of the representative trajectory segment is proportional to the sum of the cumulative densities of the hexagonal hash buckets within the compliant cluster. For example, the line width of the armored group trajectory is 3px, and the line width of the logistics unit is 1px. At the same time, the representative trajectory segment also uses a polygonal line with an arrow to indicate the direction of movement, and is finally rendered onto the battlefield base map.
[0091] It should be noted that when extracting representative trajectory segments, all entity trajectory points within the compliant cluster need to be sorted by timestamp to form serialized trajectory data. Then, a similarity standard for entity trajectory points is defined. Specifically, a spatial threshold is set (such as a distance threshold based on the side length of a hexagonal grid). When the spatial distance between two entity trajectory points is less than the spatial threshold, they are determined to be similar points, laying the foundation for the identification of common sub-trajectories.
[0092] The Longest Common Subsequence (LCS) algorithm is used to compare and analyze multiple trajectories within a compliant cluster, identifying consecutively similar segments in the trajectory point sequence as candidates for common sub-trajectories. For example, in the compliant cluster of an armored assault group, the LCS algorithm is used to find the path segment with the highest overlap among the trajectories of multiple tanks, which is then used as an initial candidate for common sub-trajectories.
[0093] For complex compliance clusters containing multiple maneuvering directions or paths, the extraction scope is expanded to include secondary common sub-trajectories (such as branch paths and detour paths) with significant motion characteristics, in addition to the longest common sub-trajectory, as candidates for common sub-trajectories. Furthermore, it is ensured that the extracted trajectories cover the main motion patterns within the compliance cluster, avoiding the problem that a single trajectory cannot fully reflect the entity's maneuvering characteristics.
[0094] The candidate common sub-trajectories are evaluated using a weighted average based on the cumulative density within the cluster. Sub-trajectories passing through high-density areas are given priority, as they are more representative of the core movement paths of troop concentration. For example, if the cumulative density of all hexagonal grids traversed by a common sub-trajectory is higher than the average density within the cluster, it is prioritized as a representative trajectory to ensure that the trajectory line highlights the area of troop activity.
[0095] Step S43: Highlight the abnormal clusters on the battlefield base map;
[0096] In this embodiment, tactical semantic enhancement is also performed, that is, the tactical constraint verification results are displayed by overlaying icons. Compliant clusters are marked with green checkmark icons at the endpoints of the trajectory lines, while abnormal clusters are marked with red exclamation marks. Clicking on them will bring up violation details, such as violation rule entry R003 (lack of air defense cover).
[0097] Simultaneously, a red semi-transparent mask is overlaid on the smallest outer rectangular area of the anomalous cluster, with transparency increasing according to the severity of the violation. For example, a severe violation is set to 60%, and a warning level is set to 30%.
[0098] Step S44: Map the battlefield base map onto the digital elevation model to obtain the visualization results of battlefield entity trajectories.
[0099] In this embodiment, a layered display control is also set up. By selecting layer controls (such as displaying air defense units and hiding logistics routes), the visualized content can be filtered by entity type to avoid information overload. Furthermore, three-dimensional situation fusion is implemented, enabling a three-dimensional terrain overlay mode to map two-dimensional trajectory lines onto a digital elevation model (DEM). Combined with slope and occlusion angle analysis, the tactical rationality of the maneuver route is evaluated.
[0100] Example 2:
[0101] In this embodiment, a rectangular battlefield space of 30 km × 20 km is defined in a simulated division-level offensive combat environment, and hexagonal grid discretization modeling is used (each grid has a side length of 1 km). The trajectory data streams of four types of combat entities are processed in real time: an armored assault group consisting of three tank battalions, two UAV squadrons responsible for battlefield reconnaissance, one supply battalion undertaking logistical support tasks, and one electronic warfare company performing spectrum jamming. All entities carry type identifiers and precise timestamps, and the sampling frequency reaches two entity trajectory points per second.
[0102] When mapping trajectory points, for example, when a tank unit of Armored Battalion A01 moves to coordinates (12500m, 7800m), the point is accurately mapped to axial coordinates (14, 5) using the axial coordinate system transformation formula. A horizontal grid expansion coefficient K = 31 (based on a conflict prevention design with a maximum horizontal division of 30 grids plus 1) is used to generate a unique hash value of 169, achieving millisecond-level positioning. Simultaneously, the six adjacent buckets of this hexagonal hash bucket are preloaded, i.e., the adjacent grid space indices (numbered 168, 170, 138, 139, 200, 201), establishing a topological foundation for subsequent neighborhood analysis.
[0103] As the UAV01 drone's new reconnaissance point arrived at hexagonal hash bucket #169, a local update mechanism based on streaming density clustering was triggered. This hexagonal hash bucket already had accumulated 3 armored unit trajectory points (cumulative density 3.8). The new reconnaissance point increased the cumulative density to 4.2, exceeding the preset density threshold of 4.0. At this point, a limited-range cluster expansion process was immediately initiated, scanning only the six predefined adjacent buckets. Grid #170 (where armored battalion A02 is located, with a cumulative density of 4.1), which met the density requirement, was merged into cluster C1. The entire process avoided full data scanning, completing real-time identification of the armored-reconnaissance cluster within 50 milliseconds. Simultaneously, a sliding time window mechanism (5-minute cycle) automatically eliminated expired entity trajectory points, ensuring the analysis focused on the latest battlefield situation.
[0104] For the formed cluster C1, the corresponding rule entries are activated: firstly, all fire strike actions must have prior and continuous reconnaissance coverage (R005); secondly, the armored group's movement direction must maintain a forward fan-shaped reconnaissance area (R004). Verification through the temporal logic engine revealed that although the armored units within cluster C1 all acted after the earliest reconnaissance point (satisfying R005), there was a 15-minute reconnaissance gap in the northwest direction, causing the attack path in that direction to violate the safety criterion R004. Therefore, this anomaly is automatically marked as a warning-level tactical defect, and a detailed violation report containing spatiotemporal coordinates is generated.
[0105] On the hexagonal battlefield map, areas 169-171 are displayed in a deep red gradient, visually indicating the density hotspots of the armored formations; black arrow-shaped trajectory lines (3px wide) mark the main attack direction; the northwest quadrant is covered by a 30% transparent red warning layer, marking areas where rules are violated. When the commander clicks on the anomaly marker, a structured prompt simultaneously pops up: Alert ID: R004-0215, the armored assault group has a 15-minute missing reconnaissance in the northwest direction. Recommendations: (a) Adjust the drone patrol radius, (b) Delay the assault in this direction until reconnaissance is in place.
[0106] Compared with traditional processing methods, the processing latency of the present invention is optimized from the second level (8.2 seconds) to the sub-second level (0.15 seconds), and the tactical misjudgment rate is reduced from 38% to below 6%. Especially in complex scenarios, the O(1) time complexity of hexagonal hashing is used to successfully maintain real-time processing capability for a scale of 100,000 entities, while the embedded rule verification effectively identifies tactical timing errors that traditional pure data-driven methods cannot detect.
[0107] Example 3:
[0108] This embodiment provides a real-time battlefield entity trajectory clustering system based on hexagonal lattice hashing, the system comprising:
[0109] The mapping module is used to discretize the continuous battlefield space into a hexagonal grid network, and combine the hexagonal grid network and hash mapping to map trajectory points to obtain hexagonal hash buckets. Each hexagonal hash bucket stores entity trajectory points with the same hash value.
[0110] The clustering module is used to perform incremental clustering based on the hexagonal hash buckets, and obtain clusters through core grid identification and cluster expansion;
[0111] The verification module is used to perform tactical logic verification on the clusters, and to mark compliant clusters and abnormal clusters through rule matching and spatiotemporal logic verification.
[0112] The rendering module is used for real-time rendering based on compliant and abnormal clusters to obtain visualization results of battlefield entity trajectories.
[0113] The mapping module includes:
[0114] A dividing unit is used to divide a continuous battlefield space into a hexagonal grid according to a preset side length, and the coordinates of the center point of each hexagonal grid are represented by an axial coordinate system.
[0115] The first acquisition unit is used to acquire entity trajectory points;
[0116] The first calculation unit is used to calculate the axial coordinates of each entity trajectory point using the axial coordinate transformation formula;
[0117] The mapping unit is used to perform hash mapping on the axial coordinates of the real-time trajectory points of the entity to obtain the hash value of each entity trajectory point.
[0118] Storage unit, used to store entity trajectory points into corresponding hexagonal hash buckets using hash values;
[0119] The second acquisition unit is used to acquire six adjacency hash values for each hexagonal hash bucket based on the adjacency offset table. The adjacency hash values are used to determine the adjacent buckets of the hexagonal hash bucket.
[0120] The clustering module includes:
[0121] The third acquisition unit is used to acquire expired entity trajectory points and newly added entity trajectory points;
[0122] The update unit is used to update the hexagonal hash bucket based on expired entity trajectory points and newly added entity trajectory points;
[0123] The fourth acquisition unit is used to acquire the six adjacent buckets of the updated hexagonal hash bucket;
[0124] The second computing unit is used to calculate the updated hexagonal hash buckets and the cumulative density of each adjacent bucket based on the Gaussian kernel function.
[0125] The first marking unit is used to mark the updated hexagonal hash bucket as a core cell if the cumulative density of the updated hexagonal hash bucket exceeds the preset density.
[0126] The merging unit is used to traverse the six adjacent buckets of each core cell. If the cumulative density of the adjacent buckets exceeds the preset density, the adjacent buckets are merged with the corresponding core cell to obtain a cluster.
[0127] The verification module includes:
[0128] A setting unit is used to set a tactical rule base using linear temporal logic, wherein the tactical rule base includes temporal logic constraints and spatial logic constraints.
[0129] The matching unit is used to obtain the entity type within each cluster and match the corresponding rule subset in the tactical rule base according to the entity type;
[0130] The detection unit is used to perform violation detection on the clusters based on a subset of rules, and to mark each cluster as a compliant cluster or an abnormal cluster;
[0131] The second marking unit is used to mark the anomaly level of the anomaly cluster and record the violation rule entries.
[0132] It should be noted that the specific methods by which each module performs operations in the system described in the above embodiments have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0133] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0134] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A hexagonal grid hash based real-time clustering method for battlefield entity trajectory, characterized in that, The method comprises the following steps: Discretize the continuous battlefield space into a hexagonal grid network, map the trajectory points by combining the hexagonal grid network and hash mapping to obtain a hexagonal grid hash bucket, and each hexagonal grid hash bucket stores entity trajectory points with the same hash value; Incremental clustering based on the hexagonal grid hash bucket, core grid identification and cluster expansion to obtain a clustering cluster; Tactical logic verification of the clustering cluster, rule matching and space-time logic verification to mark compliant clusters and abnormal clusters; Real-time rendering based on compliant clusters and abnormal clusters to obtain a battlefield entity trajectory visualization result.
2. The hexagon-based grid hash based battlefield entity trajectory real-time clustering method according to claim 1, characterized in that The incremental clustering based on the hexagonal grid hash bucket, the mapping of the trajectory points by combining the hexagonal grid network and the hash mapping to obtain the hexagonal grid hash bucket comprises the following steps: Divide the continuous battlefield space into a hexagonal grid network according to a preset side length, and the center point coordinates of each hexagonal grid network are represented by an axial coordinate system; Obtain entity trajectory points; Calculate the axial coordinates of each entity trajectory point by an axial coordinate conversion formula; Map the axial coordinates of the entity real-time trajectory points by hash mapping to obtain the hash value of each entity trajectory point; Store the entity trajectory points in the corresponding hexagonal grid hash bucket by the hash value; Obtain six adjacent hash values of each hexagonal grid hash bucket based on an adjacent offset table, and the adjacent hash values are used to determine the adjacent buckets of the hexagonal grid hash bucket.
3. The hexagon-based GH clustering method for real-time clustering of battlefield entity trajectories according to claim 1, characterized in that The core grid identification and cluster expansion to obtain the clustering cluster comprises the following steps: Obtain expired entity trajectory points and new entity trajectory points; Update the hexagonal grid hash bucket based on the expired entity trajectory points and the new entity trajectory points; Obtain six adjacent buckets of the updated hexagonal grid hash bucket; Calculate the cumulative density of the updated hexagonal grid hash bucket and each adjacent bucket based on a Gaussian kernel function, respectively; If the cumulative density of the updated hexagonal grid hash bucket exceeds a preset density, mark the updated hexagonal grid hash bucket as a core grid; Iterate through the six adjacent buckets of each core grid, and if the cumulative density of the adjacent bucket exceeds the preset density, merge the adjacent bucket with the corresponding core grid to obtain a clustering cluster.
4. The hexagon-based GH clustering method for battlefield entity trajectory real-time clustering according to claim 3, characterized in that The updating of the hexagonal grid hash bucket based on the expired entity trajectory points and the new entity trajectory points comprises the following steps: Configure a sliding window time according to the deduction rhythm of the battlefield, and slide the window according to the sliding window time; Obtain a timestamp queue of the entity trajectory points within the current window, and identify the expired entity trajectory points that are out of the range of the current window through the timestamp queue; Calculate the hash value of the new entity trajectory points; Map the new entity trajectory points to the corresponding hexagonal grid hash bucket by the hash value of the new entity trajectory points, and remove the expired entity trajectory points from the corresponding hexagonal grid hash bucket to obtain the updated hexagonal grid hash bucket.
5. The hexagon-based GH clustering method for battlefield entity trajectory real-time clustering according to claim 1, characterized in that The tactical logic verification of the clustering cluster, the rule matching and the space-time logic verification to mark the compliant clusters and the abnormal clusters comprise the following steps: Set up a tactical rule base by using linear temporal logic, and the tactical rule base comprises temporal logic constraints and spatial logic constraints; Obtain the entity types within each clustering cluster, and match the corresponding rule subset in the tactical rule base according to the entity types; Perform rule detection on the clustering cluster based on the rule subset, and mark each clustering cluster as a compliant cluster or an abnormal cluster. The anomaly cluster is marked with an anomaly level and a rule violation entry is recorded.
6. The hexagon-based GH clustering method for battlefield entity trajectory real-time clustering according to claim 1, characterized in that The compliant cluster and the anomaly cluster are rendered in real time to obtain a battlefield entity trajectory visualization result, including: A battlefield base map is drawn according to a hexagonal grid network, and the battlefield base map is color-filled according to the cumulative density of the hexagonal grid hash bucket; A representative trajectory segment in each compliant cluster is extracted, and the line width of the representative trajectory segment is proportional to the sum of the cumulative densities of the hexagonal grid hash buckets in the compliant cluster; The anomaly cluster is highlighted in the battlefield base map; The battlefield base map is mapped into a digital elevation model to obtain a battlefield entity trajectory visualization result.
7. A hexagonal grid hash based battlefield entity trajectory real-time clustering system, characterized in that, It comprises: A mapping module is used to discretize the continuous battlefield space into a hexagonal grid network, and the hexagonal grid network and hash mapping are combined to map the trajectory points to obtain a hexagonal grid hash bucket, each of which stores entity trajectory points with the same hash value; A clustering module is used to perform incremental clustering based on the hexagonal grid hash bucket, and a core grid is identified to obtain a clustered cluster through cluster expansion; A verification module is used to verify the clustered cluster based on the tactical logic, and a compliant cluster and an anomaly cluster are marked through rule matching and space-time logic verification; A rendering module is used to render the compliant cluster and the anomaly cluster in real time to obtain a battlefield entity trajectory visualization result.
8. The hexagon-based GHASH-based battlefield entity trajectory real-time clustering system of claim 7, wherein, The mapping module comprises: A division unit is used to divide the continuous battlefield space into a hexagonal grid network according to a preset side length, and the center point coordinates of each hexagonal grid network are represented in an axial coordinate system; A first acquisition unit is used to acquire entity trajectory points; A first calculation unit is used to calculate the axial coordinates of each entity trajectory point through an axial coordinate conversion formula; A mapping unit is used to map the axial coordinates of the entity trajectory points to obtain the hash values of each entity trajectory point through hash mapping; A storage unit is used to store the entity trajectory points in the corresponding hexagonal grid hash bucket through the hash values; A second acquisition unit is used to acquire six adjacent hash values of each hexagonal grid hash bucket based on an adjacent offset table, and the adjacent hash values are used to determine the adjacent buckets of the hexagonal grid hash bucket.
9. The hexagon-based GHASH-based battlefield entity trajectory real-time clustering system of claim 7, wherein, The clustering module comprises: A third acquisition unit is used to acquire expired entity trajectory points and new entity trajectory points; An update unit is used to update the hexagonal grid hash bucket based on the expired entity trajectory points and the new entity trajectory points; A fourth acquisition unit is used to acquire six adjacent buckets of the updated hexagonal grid hash bucket; A second calculation unit is used to calculate the cumulative densities of the updated hexagonal grid hash bucket and each adjacent bucket based on a Gaussian kernel function; A first marking unit is used to mark the updated hexagonal grid hash bucket as a core grid if the cumulative density of the updated hexagonal grid hash bucket exceeds a preset density; A merging unit is used to traverse the six adjacent buckets of each core grid, and if the cumulative density of an adjacent bucket exceeds a preset density, the adjacent bucket and the corresponding core grid are merged to obtain a clustered cluster.
10. The hexagon-based GHASH-based battlefield entity trajectory real-time clustering system of claim 7, wherein, The verification module comprises: A setting unit is used to set a tactical rule library using linear time sequence logic, and the tactical rule library includes time sequence logic constraints and space logic constraints; A matching unit is configured to acquire an entity type in each of the clustering clusters, and match a corresponding rule subset in a tactic rule library according to the entity type; A detection unit is configured to perform rule violation detection on the clustering clusters based on the rule subset, and mark each of the clustering clusters as a compliance cluster or an abnormal cluster; A second marking unit is configured to mark an abnormal level for the abnormal cluster and record a rule violation item.