Single spatial collision detection method based on prime product uniqueness principle
By utilizing the principle of the uniqueness of prime number products and grid matrix transformation, the problem of long detection time and low efficiency of UAV airspace conflict detection is solved, achieving efficient single-shot airspace conflict detection and significantly improving detection speed and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AIR FORCE UNIV PLA
- Filing Date
- 2023-12-22
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies are time-consuming and inefficient in detecting airspace conflicts involving drones, making them unsuitable for the high-density conflict detection requirements of aircraft.
Based on the principle of uniqueness of prime number product, a single spatial conflict detection is achieved by constructing a prime number multiplication table and a spatial grid matrix, using the grid model to transform latitude and longitude coordinates, and combining Hadamard product operation and prime number comparison.
It enables the detection of all conflict locations in a single computation in large-scale airspace scenarios, and detects temporarily added airspace conflicts in seconds, reducing the algorithm complexity to O(1) and improving detection efficiency.
Smart Images

Figure CN118035620B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of airspace conflict detection technology, specifically to a single-shot airspace conflict detection method based on the principle of the uniqueness of prime number product. Background Technology
[0002] With the continuous development of drone technology, the demand for airspace for low-altitude, slow-speed, small drones is growing rapidly, leading to frequent conflicts between drones and manned aircraft in airspace. Due to the large number of mission plans for aircraft and the lack of timely communication and coordination among drone companies, multiple airspaces at different altitudes, times, and spatial ranges can easily overlap, causing flight conflicts and greatly affecting the safety of low-altitude flights in cities.
[0003] The traditional solution for airspace conflict detection is to perform area overlap matching on the latitude and longitude range of the airspace. Although this method can accurately calculate the airspace usage plan conflict and the range of the conflicting airspace, it is time-consuming, has complex airspace representation, and low detection efficiency, making it unsuitable for conflict detection of high-density aircraft. Summary of the Invention
[0004] To address the aforementioned problems, this invention provides a single-stage spatial conflict detection method based on the principle of the uniqueness of prime product.
[0005] The technical solution adopted in this invention is as follows:
[0006] A single-step spatial conflict detection method based on the principle of the uniqueness of prime number products, characterized by the following steps:
[0007] Step 1: Based on the amount of airspace occupied by the aircraft, select prime numbers that match the amount of airspace to be detected to construct a prime number multiplication table;
[0008] Step 2: Represent the spatial domain using the given grid model, convert the spatial domain latitude and longitude coordinates into grid coordinates, construct the spatial domain occupancy grid matrix for the matrix composed of diamond grids, and assign the prime number value corresponding to the spatial domain to be detected to the spatial domain occupancy grid.
[0009] Step 3: Perform single spatial conflict detection based on the principle of the uniqueness of prime number products.
[0010] Furthermore, the specific steps of step 2 include:
[0011] Step 21: Represent the spatial domain using a grid model;
[0012] Step 22: Convert latitude and longitude coordinates to spherical rectangular coordinates using the coordinate transformation formula:
[0013]
[0014]
[0015]
[0016] Among them, latitude and longitude coordinates are λ is longitude. Let R be the latitude, the radius of the Earth's equator, and the corresponding spherical rectangular coordinates be C(X, Y, Z).
[0017] Step 23: Calculate the midpoints and side lengths of the rhombus grid.
[0018] Step 24: Determine the grid where the coordinate point is located based on the midpoint of the grid edge and the edge length;
[0019] Step 25: Connect the coordinates of the airspace boundary points to obtain the airspace occupancy grid, which yields the airspace occupancy grid matrix;
[0020] Step 26: Based on the spatial domain occupancy grid matrix, the row and column values (i, j) of the spatial domain occupancy grid are obtained. The prime values corresponding to the spatial domains to be detected are assigned to the spatial domain occupancy grid until the prime values of all spatial domains to be detected are assigned to the spatial domain occupancy grid.
[0021] Furthermore, the specific steps of step 2 include: The specific steps of step 23 include:
[0022] Step 231: Let O be the center of the Earth, R be the radius of the Earth, and let points A and B be the two vertices of one edge of a rhombus grid cell. The latitude and longitude coordinates of point A are... The spherical rectangular coordinates are (X1, Y1, Z1), and the latitude and longitude coordinates of point B are... The rectangular coordinates of the spherical surface are (X2, Y2, Z2);
[0023] Step 232: Set the arc M is one edge of a rhombic grid cell, where M is an arc. The midpoint of point C is the line connecting points A and B. The spherical rectangular coordinates of point C can be obtained by dividing the sphere by the great circle arc:
[0024]
[0025] Step 233: The polar coordinates of point c can be obtained from trigonometric relationships:
[0026]
[0027] make:
[0028]
[0029]
[0030]
[0031] The spherical rectangular coordinates of the midpoint M are then obtained as follows:
[0032]
[0033] Among them, λ, r are intermediate variables;
[0034] Step 234: Arc The formula for calculating the length L is:
[0035]
[0036] Furthermore, the specific steps of step 26 include:
[0037] Step 261: Sort the airspace in descending order of task priority;
[0038] Step 262: When a spatial domain occupies a grid, assign the prime value corresponding to the spatial domain to the occupied grid. If the spatial domain does not occupy a grid, assign the value 1 to the grid, so that each spatial domain corresponds to a matrix composed of 1 or the corresponding prime value.
[0039] Furthermore, step 3 includes the following specific steps:
[0040] Step 31: Perform Hadamard product operation on matrices A to M corresponding to the spatial domain to be detected in step 262. The combined matrix S is obtained;
[0041] Step 32: Compare the elements of the composite matrix S with the prime number multiplication table. If the value of a certain element in S is s... ij =a ij ×b ij This indicates that the grid in the i-th row and j-th column is simultaneously occupied by space domains A and B; if the value s of a certain element in S ij =c ij ×d ij ×e ij This indicates that the grid in the i-th row and j-th column is simultaneously occupied by spatial domains C, D, and E, then proceed to step 33; if any element s in matrix S... ij If it does not belong to the prime number multiplication table, then there is no conflict, and proceed to step 35;
[0042] Step 33: Perform altitude detection on the conflicting airspaces separately. By comparing the airspaces using the airspace altitude layer method, determine whether there is an altitude conflict. If there is an altitude conflict, proceed to step 34; otherwise, proceed to step 35.
[0043] Step 34: Compare whether there is any overlap between the time periods of each airspace. If there is a conflict, it means that there is an airspace conflict. If not, proceed to step 35.
[0044] Step 35: Exit the operation and classify the airspace as a conflict-free airspace;
[0045] Step 36: Output the airspace numbers with conflicts, along with the corresponding conflict grid, conflict time period, and conflict height layer.
[0046] A single-event airspace collision detection system, characterized in that it includes a prime number multiplication table establishment module, an airspace grid prime number assignment module, and a collision detection module;
[0047] The prime number multiplication table creation module is used to construct prime number multiplication tables.
[0048] The spatial grid prime number assignment module is used to construct spatial data matrices and assign prime number attributes;
[0049] The collision detection module is used to perform single-pass spatial collision detection based on the principle of the uniqueness of prime number products.
[0050] A readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, performs the method as described in any one of claims 1-5.
[0051] The beneficial effects of this invention are:
[0052] First, this invention assigns matrix attributes to the airspace, enabling the identification of all airspace conflict locations and their corresponding airspaces within the entire task scope with a single calculation even in large-scale airspace usage scenarios. Second, for temporarily added airspaces, this invention can detect the presence of conflicts in a single operation, achieving conflict detection within seconds. Given N airspaces to be detected, traditional conflict detection algorithms rely on pairwise boundary cross-comparisons based on latitude and longitude coordinates, resulting in a time complexity of O(N^2). 2 Compared with traditional algorithms, the computational complexity of this algorithm is reduced to O(1). This method can reduce the amount of computation, increase the speed of computation, and effectively improve the efficiency of conflict detection in the process of spatial planning. Attached Figure Description
[0053] Figure 1 This is a schematic representation of prime number squares in this invention.
[0054] Figure 2 This is a flowchart of the airspace conflict detection process proposed in this invention.
[0055] Figure 3 This is a computation time diagram of a spatial conflict detection algorithm based on matrix prime factorization.
[0056] Figure 4 This is a comparison chart of the simulation program runtime of this method. Detailed Implementation
[0057] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0058] This invention discloses a single-stage spatial conflict detection method based on the principle of the uniqueness of prime number products, comprising the following steps:
[0059] Step 1: Construct a prime number multiplication table;
[0060] Step 2: Construct the spatial data matrix and assign prime number attributes;
[0061] Step 3: Perform single spatial conflict detection based on the principle of the uniqueness of prime number products.
[0062] Furthermore, the specific steps for constructing a prime number multiplication table are as follows: sort the known prime numbers from smallest to largest; multiply any two prime numbers to construct a table of pairwise multiplication of a prime number, i.e., a prime number 2 multiplication table; multiply any three prime numbers to construct a prime number 3 multiplication table;
[0063] Based on the required number of airspace occupancy units for the aircraft, a prime number multiplication table is constructed using prime numbers that correspond to the number of airspace units to be detected. For example, if the required number of airspace units is 5, then the corresponding prime numbers are 2, 3, 5, 7, and 11. The airspace numbers are set according to the original plan and do not need to correspond one-to-one with the prime numbers. A table of prime number multiplication is constructed as follows: Figure 1 The prime number multiplication table shown, ( Figure 1 The prime number multiplication table shown is part of a list.
[0064] Furthermore, the specific steps for constructing the spatial data matrix and assigning prime number attributes include:
[0065] 1. Coordinate transformation of airspace boundary points
[0066] Given a grid model, the spatial domain is represented, and latitude and longitude coordinates are converted to spherical rectangular coordinates according to the coordinate transformation formula, as follows:
[0067]
[0068]
[0069]
[0070] Among them, latitude and longitude coordinates are λ is longitude. Let R be the latitude, the radius of the Earth's equator, and the corresponding spherical rectangular coordinates be c(X, Y, Z).
[0071] Except for the North and South Poles, the conversion formulas for spherical rectangular coordinates to latitude and longitude coordinates are as follows:
[0072]
[0073]
[0074] When X > 0 and Y > 0, λ is east longitude, and λ = α.
[0075] When X < 0 and Y > 0, λ is east longitude, and λ = α + 90°.
[0076] When X > 0 and Y < 0, λ is the west longitude, and λ = α.
[0077] When X < 0 and Y < 0, λ is the west longitude, and λ = α + 90°.
[0078] When Z > 0 North latitude,
[0079] When Z < 0 South latitude
[0080] Here, α and β are intermediate variables;
[0081] 2. Method for determining the midpoint of a rhombus grid
[0082] (1) Calculate the midpoint of the grid edge
[0083] Let O be the center of the Earth, and R be the radius of the Earth. Points A and B are the two vertices of one side of the rhombus element, and the latitude and longitude coordinates of point A are... The spherical rectangular coordinates are (X1, Y1, Z1), and the latitude and longitude coordinates of point B are... The rectangular coordinates of the sphere are (X2, Y2, Z2); the arc M is one edge of a rhombus cell, and M is an arc. Let c be the midpoint of the line connecting points A and B. Then, by dividing the sphere by the great circle arc, we can obtain the rectangular coordinates of point c on the sphere:
[0084]
[0085] The polar coordinates of point c are obtained from trigonometric relationships:
[0086]
[0087] make:
[0088]
[0089]
[0090]
[0091] Therefore, the spherical rectangular coordinates of point M are:
[0092]
[0093] Among them, λ, r are intermediate variables;
[0094] (2) Calculate the side length of the rhombus grid
[0095] Points A and B are the two vertices of one side of a rhombus element, and the latitude and longitude coordinates of point A are... The latitude and longitude coordinates of point B are Then arc The length L is calculated as follows:
[0096]
[0097] in, The length L is the side length of the rhombus grid.
[0098] 3. Determine the grid where the coordinate point is located.
[0099] The specific method includes: obtaining the three-dimensional coordinates of the known boundary points P1, P2, P3, and P4 of the rhombic grid and the three-dimensional coordinates of the point P to be determined, with the center of the sphere at point O; connecting the midpoints of opposite sides of the rhombic grid to obtain the midpoint coordinates M1, M2, M3, and M4; thus dividing the rhombic grid into four quadrants, and finding the normal vector of plane OM1M3. and the normal vector of plane OM2M4 The quadrant of a point is determined based on its relationship with the plane; a quadtree partition is performed on the rhombic grid of levels 1-10, and the quadrant of the rhombic grid in which point P is located is determined by the normal vector method, thus finally determining the grid position of point P.
[0100] 4. Assigning prime number attributes to spatial data matrices
[0101] The latitude and longitude coordinates of the airspace are converted into grid coordinates, and the diamond grid is considered a natural matrix. The grid coordinates are used to locate the position, and by connecting the coordinates of the airspace boundary points, the airspace occupancy grid is obtained, thus yielding the airspace occupancy grid matrix. After obtaining the airspace data matrix, the row and column values (i, j) of the airspace occupancy grid are determined. The prime values corresponding to the airspace are assigned to the airspace occupancy grid. This process is repeated for all airspaces to be detected.
[0102] This method performs conflict detection based on an existing grid. Specifically, the spatial domain is enclosed by an outer layer under the grid representation model grid, ensuring that the spatial domain grid meets the safety interval requirements.
[0103] Furthermore, the specific steps for conducting a single airspace conflict detection include:
[0104] 1. Range conflict detection
[0105] First, assign prime numbers to the spatial data matrix (i, j): Sort the spatial domains according to task priority from high to low. For example, the highest priority spatial domain is numbered 001. When a spatial domain occupies a grid cell, assign its prime value to the occupied grid cell; otherwise, assign 1 to the unoccupied grid cells. That is, assign the prime number 2 to the grid cells occupied by the first spatial domain, forming matrix A. Assign the prime number 3 to the grid cells occupied by the second spatial domain, forming matrix B. A = {a ij} and B = {b ij} are two matrices of the same order. Similarly, each spatial region corresponds to a matrix consisting of 1s (unoccupied) and their prime values. The spatial regions to be detected, A to M, are subjected to matrix Hadamard product operations. The combined matrix S is obtained;
[0106] S={s ij}, compare the elements in the composite matrix S with the prime number multiplication table, and when the value of a certain element is s ij =a ij ×b ij This indicates that the grid in the i-th row and j-th column is simultaneously occupied by spatial domains A and B, where a ij Let represent the element in the i-th row and j-th column of matrix A, which is a prime number in the constructed prime number table; if the value of a certain element is s ij =c ij ×d ij ×e ij This indicates that the grid in the i-th row and j-th column is simultaneously occupied by spatial domains C, D, and E, and the accurate location of the collision can be detected; if any element s in matrix S ij If it is not in the prime number multiplication table, then there is no conflict;
[0107] 2. High-level collision detection
[0108] After the previous step of detection, the pairs of conflicting airspaces are subjected to height detection. By comparing the airspace height layers, it is determined whether there is a height conflict. Airspaces with height conflicts are retained and proceed to the next step of detection; airspaces without height conflicts are excluded from the calculation.
[0109] 3. Time conflict detection
[0110] Compare the time periods of each airspace to see if they overlap. If a conflict exists, it indicates that there is a conflict between the airspaces; airspaces that do not conflict with other airspaces are excluded from the calculation and classified as conflict-free airspaces.
[0111] 4. Output the final result
[0112] Finally, the output shows the airspace number where a conflict occurs, along with the corresponding conflict grid, conflict time period, and conflict height layer.
[0113] Example
[0114] To further verify the effectiveness of the proposed method, a spatial conflict detection algorithm based on matrix prime factorization was compared with a traditional detection algorithm. The traditional detection algorithm calculates the area of each pair of spatial polygons formed by the latitude and longitude coordinates of the spatial boundary points. Under the same hardware conditions, the number of spatial domains to be detected started at 10, increasing by 10 each time until reaching 100. The conflict detection results of the proposed algorithm and the traditional algorithm were consistent. The detection time of the traditional algorithm increases geometrically with the number of spatial domains to be detected. Figure 3 The computation time of the spatial collision detection algorithm based on matrix prime factorization is given. Figure 4 This is a comparison chart of algorithm runtime. Compared to traditional algorithms, the computational complexity of this algorithm is reduced from O(N^2). 2 The efficiency of collision detection has been reduced to O(1), significantly improving the efficiency of collision detection.
[0115] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A single-shot spatial collision detection method based on the principle of uniqueness of prime number product, characterized in that, Includes the following steps: Step 1: Based on the amount of airspace occupied by the aircraft, select prime numbers that match the amount of airspace to be detected to construct a prime number multiplication table; Step 2: Represent the spatial domain using the given grid model, convert the spatial domain latitude and longitude coordinates into grid coordinates, construct the spatial domain occupancy grid matrix for the matrix composed of diamond grids, and assign the prime number value corresponding to the spatial domain to be detected to the spatial domain occupancy grid. Step 3: Perform single spatial conflict detection based on the principle of uniqueness of prime number product; Step 2 includes the following specific steps: Step 21: Represent the spatial domain using a grid model; Step 22: Convert latitude and longitude coordinates to spherical rectangular coordinates using the coordinate transformation formula: ; ; ; Among them, latitude and longitude coordinates are , Longitude The latitude is given by R, the radius of the Earth's equator, and the corresponding spherical rectangular coordinates are: ; Step 23: Calculate the midpoints and side lengths of the rhombus grid. Step 24: Determine the grid where the coordinate point is located based on the midpoint of the grid edge and the edge length; Step 25: Connect the coordinates of the airspace boundary points to obtain the airspace occupancy grid, which yields the airspace occupancy grid matrix; Step 26: Based on the spatial domain occupancy grid matrix, the row and column values (i, j) of the spatial domain occupancy grid can be obtained. Assign the prime values corresponding to the spatial domains to be detected to the spatial domain occupancy grid until the prime values of all spatial domains to be detected are assigned to the spatial domain occupancy grid. Step 26 includes the following specific steps: Step 261: Sort the airspace in descending order of task priority; Step 262: When a spatial domain occupies a grid, assign the prime value corresponding to the spatial domain to the occupied grid. If the spatial domain does not occupy a grid, assign the value 1 to the grid, so that each spatial domain corresponds to a matrix composed of 1 or the corresponding prime value. Step 3 includes the following specific steps: Step 31: Perform Hadamard product operation on matrices A to M corresponding to the spatial domain to be detected in step 262. The combined matrix S is obtained; Step 32: Compare the elements of the composite matrix S with the prime number multiplication table. If the value of a certain element in S is s... ij =a ij ×b ij This indicates that the grid in the i-th row and j-th column is simultaneously occupied by space domains A and B; if the value s of a certain element in S ij =c ij ×d ij ×e ij This indicates that the grid in the i-th row and j-th column is simultaneously occupied by spatial domains C, D, and E, then proceed to step 33; if the matrix Any element s ij If it does not belong to the prime number multiplication table, then there is no conflict, and proceed to step 35; Step 33: Perform altitude detection on the conflicting airspaces separately. By comparing the airspaces using the airspace altitude layer method, determine whether there is an altitude conflict. If there is an altitude conflict, proceed to step 34; otherwise, proceed to step 35. Step 34: Compare whether there is any overlap between the time periods of each airspace. If there is a conflict, it means that there is an airspace conflict. If not, proceed to step 35. Step 35: Exit the operation and classify the airspace as a conflict-free airspace; Step 36: Output the airspace numbers with conflicts, along with the corresponding conflict grid, conflict time period, and conflict height layer.
2. The single-shot spatial conflict detection method based on the principle of uniqueness of prime number product as described in claim 1, characterized in that, Step 2 includes the following specific steps: Step 23 includes the following specific steps: Step 231: Set O as the Earth's center and R as the Earth's radius, point and points These are the two vertices of an edge of a rhombus grid cell, points. The latitude and longitude coordinates are ( , ), spherical rectangular coordinates are ,point The latitude and longitude coordinates are ( , ), spherical rectangular coordinates are ; Step 232: Set the arc M is one edge of a rhombic grid cell, where M is an arc. The midpoint, for The midpoint of the line connecting the points can be obtained by dividing the great circle of the sphere. The spherical rectangular coordinates of a point: ; Step 233: From the trigonometric function relationships, we can obtain... Polar coordinates of a point: ; make: ; ; ; The spherical rectangular coordinates of the midpoint M are then obtained as follows: ; in, As an intermediate variable; Step 234: Arc length The calculation formula is: 。