Regularized target trajectory simulation generation system and method based on regional adjacency constraints
Patent Information
- Application Number
- CN202610895310.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-10-13
AI Technical Summary
[0005]本发明的目的在于克服现有技术的不足,提供一种基于区域邻接约束的规则化目标轨迹仿真生成系统及方法,解决了现有轨迹数据获取困难、清洗繁琐、仿真轨迹缺乏区域连续性和飞行属性适配性的问题,可高效生成贴合真实场景、格式规范的仿真轨迹数据,降低轨迹数据获取与预处理成本,提升轨迹仿真的真实性和实用性,为轨迹模型的训练和测试提供可靠数据支撑
[0016]本发明的有益效果包括:
Smart Images

Figure CN122904478A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of trajectory simulation, and more specifically, to a system and method for generating regularized target trajectories based on regional adjacency constraints. Background Technology
[0002] With the rapid development of artificial intelligence and deep learning technologies, tasks such as target trajectory recognition, prediction, and classification increasingly rely on deep learning models. Deep learning architectures such as Recurrent Neural Networks (RNNs), Long Short-Term Memory Networks (LSTMs), and Transformers have demonstrated significant advantages in trajectory sequence modeling, automatically extracting the spatiotemporal features of trajectories and achieving end-to-end target behavior recognition and prediction. However, the performance of deep learning models is highly dependent on the scale, quality, and diversity of the training data; large-scale, high-quality labeled trajectory data is a prerequisite for training high-performance deep learning models.
[0003] However, in practical applications, obtaining high-quality target trajectory data faces many difficulties: First, the acquisition of real trajectory data relies on sensor equipment such as radar and ADS-B, which is costly and has limited coverage; second, raw trajectory data usually contains a lot of noise, missing values, and outliers, making data cleaning and preprocessing a large undertaking; third, target trajectories often span multiple regions, involving long-distance and long-term spatial movements, which are difficult to fully cover with a single data source; and finally, there is a lack of trajectory data for specific mission scenarios (such as specific flight modes or specific combinations of regions), resulting in trajectory models that are not highly targeted and lack generalization ability.
[0004] Currently, commonly used trajectory simulation methods mostly employ simple random walk models or state transition models based on Markov chains. The trajectories generated by these methods lack physical plausibility and cannot realistically reflect the target's flight characteristics (such as straight-line flight, circular hovering, runway hovering, continuous turns, etc.), and it is difficult to guarantee the continuity and plausibility of the trajectory in the spatial region. Therefore, there is an urgent need for a method that can efficiently generate simulated target trajectories with physical plausibility and regional continuity to support the training and testing of trajectory models. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a regular target trajectory simulation generation system and method based on regional adjacency constraints. This solves the problems of difficulty in acquiring trajectory data, cumbersome cleaning, lack of regional continuity and flight attribute adaptability of the simulation trajectory. It can efficiently generate simulation trajectory data that fits the real scene and has a standardized format, reduce the cost of trajectory data acquisition and preprocessing, improve the realism and practicality of trajectory simulation, and provide reliable data support for the training and testing of trajectory models.
[0006] The objective of this invention is achieved through the following solution: A regularized target trajectory simulation and generation system based on regional adjacency constraints, comprising: The region adjacency graph construction module is used to construct a path region adjacency graph based on the latitude and longitude of the polygon vertices of a predefined region using a spatial relationship calculation method, and save the adjacency graph as a format file; the adjacency graph is used to ensure that the target simulation trajectory passes through continuous regions and avoids the trajectory skipping intermediate regions; The trajectory mode initialization module is used to randomly initialize the simulation mode of the target trajectory. The simulation mode includes three types: mode 1 is a cross-region flight mode with different starting and ending areas; mode 2 is a single-region flight mode with the starting and ending areas in the same area; and mode 3 is a round-trip flight mode with the starting and ending areas in the same area but passing through other areas and then returning. The trajectory parameter determination module is used to randomly determine the trajectory start area, end area, number of trajectory points, latitude and longitude of the start and end points, number of areas passed through, and characteristic parameters of the trajectory based on the initialized trajectory pattern. The flight attribute definition module is used to define the flight attributes of the target simulation trajectory, and to define the corresponding rule functions and parameters for each flight attribute; The original trajectory generation module is used to generate the original target trajectory by sequentially calling the corresponding rule functions based on the number of segments of the randomly initialized target trajectory and the flight attributes of each segment. The timestamp generation module is used to determine the time difference between each trajectory point based on the trajectory generated by the rule function, randomly initialize the starting point timestamp, and obtain the timestamp of each trajectory point. The noise addition module is used to add random noise interference to the original target trajectory; The trajectory output module is used to number the final target trajectory after noise is added and save it as a format file as sample data for model training and testing.
[0007] Furthermore, the method of constructing a path region adjacency graph using spatial relationship calculation specifically includes: calculating the spatial relationship between any two regions and determining whether they are intersecting, containment, or non-intersecting; for two intersecting or containment regions, they are directly determined to be adjacent; for two non-intersecting regions, it is further determined whether there are other regions between them. If there are no other regions that allow both regions to intersect with each other, they are determined to be adjacent; otherwise, they are determined to be non-adjacent; and a region adjacency graph is constructed based on all adjacency relationships, where nodes represent regions and edges represent adjacency relationships between regions.
[0008] Furthermore, in the trajectory parameter determination module, the step of randomly determining the trajectory start region, end region, number of trajectory points, latitude and longitude of the start and end points, number of pathway regions, and trajectory feature parameters according to the initialized trajectory mode specifically includes: for mode one, randomly selecting different start and end regions, using a breadth-first search algorithm based on the region adjacency graph to determine the sequence of pathway regions from the start region to the end region, and randomly determining the number of pathway regions; for mode two, randomly selecting one region as the start and end region; for mode three, randomly selecting one region as the start and end region, determining the round-trip path from the start region based on the region adjacency graph, and randomly determining the number of pathway regions.
[0009] Furthermore, the flight attributes include four types: straight flight, circular hovering, runway hovering, and continuous turning. Among them, the parameters for straight flight include flight speed and flight distance; the parameters for circular hovering include hovering radius, hovering direction, number of hovering circles, and flight speed; the parameters for runway hovering include hovering radius, hovering direction, number of hovering circles, straight segment distance, and flight speed; and the parameters for continuous turning include the number of turns and turning radius.
[0010] Furthermore, in the original trajectory generation module, the step of generating the original target trajectory by sequentially calling the corresponding rule function based on the randomly initialized target trajectory segment number and the flight attribute of each segment includes: randomly determining the number of trajectory segments, randomly assigning one of the four flight attributes to each segment, connecting the beginning and end of each trajectory segment in space, and using the end coordinate of the previous segment as the starting coordinate of the next segment to ensure the spatial continuity of the trajectory.
[0011] Furthermore, in the timestamp generation module, the process of determining the time difference between each trajectory point based on the trajectory generated by the rule function, randomly initializing the starting point timestamp, and obtaining the timestamp of each trajectory point specifically includes: for adjacent trajectory points, calculating the spherical distance between the two points using the Haversine formula based on their latitude and longitude coordinates, calculating the time difference between adjacent trajectory points based on the target flight speed and time difference formula, and sequentially accumulating each segment of time difference from the starting point timestamp to obtain the timestamp of each trajectory point.
[0012] Furthermore, in the noise addition module, the noise includes process noise and observation noise; wherein, process noise simulates the flight path deviation during flight, and zero-mean Gaussian white noise is added to the latitude and longitude coordinates of the trajectory points; observation noise simulates the measurement error during sensor measurement, and zero-mean Gaussian white noise is further superimposed on the latitude and longitude coordinates of the trajectory points.
[0013] Furthermore, the format file is a JSON file; each trajectory record in the JSON file contains a trajectory number and a sequence of trajectory points, wherein each trajectory point in the sequence of trajectory points contains a timestamp, longitude, and latitude information.
[0014] A method for simulating and generating regularized target trajectories based on regional adjacency constraints, based on the regularized target trajectory simulation and generation system based on regional adjacency constraints as described in any of the preceding claims, includes the following steps: S1: Divide the predefined regions and calculate the spatial relationships between them, construct and save the region adjacency graph, and ensure that the regions traversed by the trajectory are continuous; S2: Randomly initialize the trajectory mode, randomly select one from a variety of preset trajectory modes as the basic mode for this trajectory simulation; S3: Initialize the core trajectory parameters and determine the core feature parameters of the trajectory based on the selected trajectory mode; S4: Initialize basic flight parameters, randomly set the target flight speed and trajectory start timestamp, and provide a basis for trajectory generation and timestamp calculation; S5: Initialize trajectory segmentation and flight attributes, determine the number of trajectory segments, and randomly assign corresponding flight attributes to each trajectory segment; S6: Generate the original target trajectory. Based on the rule function corresponding to the flight attributes and combined with the initialized parameters, calculate the longitude and latitude of each trajectory point to form the original trajectory data. S7: Add random noise interference to add noise to the trajectory points of the original target trajectory data to simulate path deviation and measurement error in real-world scenarios; S8: Trajectory data organization and storage. The noisy trajectory data is numbered and verified, and saved as a file in a specified format as a sample for model training and testing.
[0015] Furthermore, the core feature parameters include the starting region, the ending region, and the number of trajectory points.
[0016] The beneficial effects of this invention include: (1) The embodiments of the present invention construct a region adjacency graph, combine the Shapely library to calculate the region spatial relationship, strictly determine the region adjacency rules, ensure that the generated simulation trajectory passes through continuous regions, avoid unreasonable situations of crossing intermediate regions, improve the realism and rationality of trajectory simulation, and solve the problem of insufficient continuity of existing simulation trajectory regions.
[0017] (2) The embodiments of the present invention define four common flight attributes, construct corresponding rule functions for each attribute and initialize relevant parameters, and design three trajectory modes, which can flexibly adapt to the simulation requirements of different flight scenarios. The generated trajectory data is highly targeted and diverse, which can meet the training and testing requirements of various trajectory models and solve the problem of weak targeting of existing simulation methods.
[0018] (3) The embodiments of the present invention simulate path deviation and sensor measurement error in real flight scenarios by adding process noise and observation noise, so that the generated simulation trajectory is closer to the real trajectory data. No additional data cleaning is required, which reduces the cost of acquiring and preprocessing trajectory data and solves the problem of existing real trajectory data being difficult to acquire and clean.
[0019] (4) The embodiments of the present invention refine the trajectory generation process into multiple steps and sub-steps. The logic is clear and the operability is strong. It can efficiently generate complete trajectory data containing timestamps, longitude and latitude. The trajectory data format is standardized and easy to call, which significantly improves the efficiency and practicality of trajectory simulation. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating the overall steps of the regularized target trajectory simulation generation method based on region adjacency constraints according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating a specific method according to an embodiment of the present invention; Figure 3 This is a sample image of the target simulation trajectory generated in an embodiment of the present invention. Detailed Implementation
[0022] All features disclosed in all embodiments of this specification, or steps in all methods or processes implied in the disclosure, may be combined and / or extended or replaced in any way, except for mutually exclusive features and / or steps.
[0023] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0024] In a preferred embodiment, more specifically, it relates to a regularized target trajectory simulation generation scheme based on regional adjacency constraints, which is particularly suitable for trajectory model training and testing scenarios. It can efficiently generate target trajectory data that conforms to real-world scenarios, solving problems such as the difficulty in obtaining actual trajectory data.
[0025] As a first aspect of the present invention, a regularized target trajectory simulation generation system based on regional adjacency constraints is provided, comprising the following modules: The region adjacency graph construction module is used to construct a path region adjacency graph based on the latitude and longitude of polygon vertices in a predefined region, using a spatial relationship calculation method, and save the adjacency graph as a JSON file. The adjacency graph ensures that the target simulation trajectory passes through continuous regions, preventing the trajectory from skipping intermediate regions. The spatial relationship calculation method includes: calculating the spatial relationship between any two regions, determining whether they are intersecting, contained, or non-intersecting; for two intersecting or contained regions, they are directly determined to be adjacent; for two non-intersecting regions, it is further determined whether there are other regions between them. If no other region exists that allows both regions to intersect with it, they are determined to be adjacent; otherwise, they are determined to be non-adjacent; a region adjacency graph is constructed based on all adjacency relationships, where nodes represent regions and edges represent adjacency relationships between regions. The trajectory mode initialization module is used to randomly initialize the simulation mode of the target trajectory. The simulation mode includes three types: Mode 1 is a cross-region flight mode where the starting area and the ending area are different. The target starts from the starting area, passes through several areas, and arrives at the ending area. Mode 2 is a single-region flight mode where the starting and ending areas are the same. Mode 3 is a round-trip flight mode where the starting and ending areas are the same, but the target passes through other areas and then returns. The target starts from the starting area, passes through other areas, and then returns to the starting area. The trajectory parameter determination module is used to randomly determine the trajectory's starting and ending regions, number of trajectory points, latitude and longitude of the starting and ending points, number of transit regions, and main characteristic parameters based on the initialized trajectory mode. Specifically, for mode 1, different starting and ending regions are randomly selected, and a breadth-first search algorithm is used based on the region adjacency graph to determine the sequence of transit regions from the starting region to the ending region, and the number of transit regions is randomly determined. For mode 2, one region is randomly selected as the starting and ending region. For mode 3, one region is randomly selected as the starting and ending region, and a round-trip path from the starting region is determined based on the region adjacency graph, and the number of transit regions is randomly determined. The flight attribute definition module is used to define the flight attributes of the target simulation trajectory. These flight attributes include four types: straight flight, circular hovering, runway hovering, and continuous turning. Corresponding rule functions and parameters are defined for each flight attribute. Specifically, the parameters for straight flight include flight speed and flight distance; the parameters for circular hovering include hovering radius, hovering direction, number of hovering rotations, and flight speed; the parameters for runway hovering include hovering radius, hovering direction, number of hovering rotations, straight segment distance, and flight speed; and the parameters for continuous turning include the number of turns and turning radius. The original trajectory generation module is used to generate the original target trajectory by calling the corresponding rule functions in sequence according to the number of segments of the randomly initialized target trajectory and the flight attributes of each segment. The number of segments of the trajectory is randomly determined, and one of the four flight attributes is randomly assigned to each segment. The trajectory segments are connected end to end in space, and the end coordinates of the previous segment are used as the starting coordinates of the next segment to ensure the spatial continuity of the trajectory. The timestamp generation module is used to determine the time difference between each trajectory point based on the trajectory generated by the rule function, randomly initialize the starting point timestamp, and obtain the timestamp of each trajectory point. Specifically, for adjacent trajectory points, the spherical distance between the two points is calculated using the Haversine formula based on their latitude and longitude coordinates, and the time difference between adjacent trajectory points is calculated based on the target flight speed and time difference formula. The timestamp of each trajectory point is obtained by sequentially accumulating the time differences of each segment from the starting point timestamp. The noise addition module is used to add random noise interference to the original target trajectory. The noise includes process noise and observation noise. The process noise simulates the flight path deviation caused by external factors such as wind and airflow during flight, and zero-mean Gaussian white noise is added to the latitude and longitude coordinates of the trajectory points. The observation noise simulates the measurement error caused by equipment accuracy during sensor measurement, and zero-mean Gaussian white noise is added to the latitude and longitude coordinates of the trajectory points. The trajectory output module is used to number the final target trajectory after noise is added and save it as a JSON file as sample data for model training and testing. Each trajectory record in the JSON file contains a trajectory number, a sequence of trajectory points, etc., and each trajectory point in the sequence of trajectory points contains a timestamp, longitude and latitude information.
[0026] The present invention addresses the problems of existing trajectory data being difficult to acquire, difficult to clean, lacking specificity, and trajectory simulation lacking regional continuity and poor adaptability to flight attributes. By constructing a regional adjacency graph, defining flight attribute rule functions, and optimizing the trajectory generation process, a high-quality simulation trajectory containing timestamps, longitude, and latitude is generated, providing reliable data support for the training and testing of trajectory models.
[0027] As a second aspect of the present invention, a method for simulating and generating regularized target trajectories based on regional adjacency constraints is provided, which, based on the above system, specifically includes the following steps: S1: Define the route area and construct the region adjacency graph. Divide the predefined areas and calculate the spatial relationships between the areas. Construct and save the region adjacency graph to ensure the continuity of the areas traversed by the trajectory. S2: Randomly initialize the trajectory mode, randomly select one of the three preset trajectory modes as the basic mode for this trajectory simulation; S3: Initialize the core trajectory parameters. Based on the selected trajectory mode, determine the core feature parameters of the trajectory, such as the starting area, ending area, and number of trajectory points. S4: Initialize basic flight parameters, randomly set the target flight speed and trajectory start timestamp, and provide a basis for trajectory generation and timestamp calculation; S5: Initialize trajectory segmentation and flight attributes, determine the number of trajectory segments, and randomly assign corresponding flight attributes to each trajectory segment; S6: Generate the original target trajectory. Based on the rule function corresponding to the flight attributes and combined with the initialized parameters, calculate the longitude and latitude of each trajectory point to form the original trajectory data. S7: Add random noise interference to the trajectory points of the original target trajectory to simulate path deviation and measurement error in real scene; S8: Trajectory data organization and storage. The noisy trajectory data is numbered, verified, and saved as a file in a specified format as a sample for model training and testing.
[0028] Specifically, step S1 includes the following sub-steps: S11: Predefined region division. Based on actual simulation requirements, multiple irregular polygonal regions are divided, the boundary range of each region is defined, the longitude and latitude coordinates of all vertices of each polygonal region are recorded, and the vertices are arranged in order of their longitude and latitude coordinates to form a region boundary dataset, ensuring that the region boundaries are clearly identifiable.
[0029] S12: Calculate the spatial relationship between regions. The Shapely library is used to load the region boundary dataset. The spatial relationship between any two predefined regions is calculated one by one, and the spatial relationship between all region pairs is recorded. The spatial relationship includes three types: intersecting, containing, and non-intersecting. S13: Region Adjacency Determination and Adjacency Determination Rules: Based on the calculated spatial relationships, clear adjacency determination rules are established to determine the adjacency relationships of each region, ensuring that adjacent regions are not separated by intermediate barriers. Specifically, if the spatial relationship between two regions is intersecting or containing, then the two regions are determined to be adjacent; if the spatial relationship between two regions is not intersecting, then it is further determined whether there are other predefined regions between the two regions. If there are no other predefined regions, then the two regions are determined to be adjacent; if there are other predefined regions, then the two regions are determined to be non-adjacent. S14: Construction of regional adjacency graph. Using each predefined region as a node and the adjacency relationship between regions as edges, construct a regional adjacency graph, clarify the adjacent node information corresponding to each node, and store it in the form of an adjacency table for easy and quick query of adjacent regions later. S15: Adjacency Graph Saving. The constructed region adjacency graph is serialized in JSON format and saved as a JSON file, recording the identifier of each region, the coordinates of the boundary vertices, and the identifiers of adjacent regions, for use in subsequent trajectory generation.
[0030] Specifically, step S2 includes the following sub-steps: S21: Preset trajectory modes, clearly defining three trajectory modes, specifically specifying the core constraints of the starting area, ending area, and transit area for each mode, covering common scenarios such as cross-region, single-region, and round-trip cross-region: Mode 1 is where the starting area and ending area of the target trajectory are not the same; Mode 2 is where the target trajectory moves only within the same area, with both the starting and ending points within that area; Mode 3 is where the starting and ending points of the target trajectory are in the same area, and the trajectory returns to the starting area after passing through at least one other area during its movement. S22: Random selection of the mode. A random number is generated within a preset range (e.g., 1-3) using a random number generation algorithm. Based on the mapping relationship corresponding to the random number, one of the three trajectory modes is randomly selected as the target mode for this trajectory simulation, and the mode identifier is recorded.
[0031] Specifically, step S3 includes the following sub-steps: S31: Mode determination. Read the mode identifier recorded in step S2 to determine the currently selected trajectory mode type. Specifically, based on the trajectory mode selected in step S2, determine the current mode type (mode 1, mode 2, or mode 3). S32: Based on the mode type, select the corresponding start and end regions from the predefined regions. Specifically, the start and end regions are initialized as follows: If it is mode 1, two different regions are randomly selected from the predefined regions to serve as the start and end regions, respectively; if it is mode 2, one region is randomly selected from the predefined regions to serve as both the start and end regions; if it is mode 3, one region is randomly selected from the predefined regions to serve as both the start and end regions, and at least one region is selected from the remaining predefined regions as the path region. S33: Combining the accuracy requirements of model training and testing, randomly determine the total number of trajectory points within a preset range to ensure a balance between trajectory continuity and accuracy, avoiding too many or too few points. Specifically, the number of trajectory points is initialized by presetting a range of values for the number of trajectory points according to simulation requirements. A random number generation algorithm is then used to randomly determine the total number of trajectory points within this range, ensuring that the number of trajectory points meets the accuracy requirements of model training and testing. S34: Within the selected starting and ending regions, randomly generate the latitude and longitude coordinates of corresponding points. After generation, verify that the points are located within the regions, serving as the starting and ending references for the trajectory. Specifically, initialize the latitude and longitude of the starting and ending points. Based on the boundary coordinates of the starting and ending regions, randomly select a point within the region as the starting point and determine its latitude and longitude. If it is mode 1 or mode 3, randomly select a point within the ending region as the ending point and determine its latitude and longitude. If it is mode 2, the ending point can coincide with the starting point, or another point can be randomly selected within the same region as the ending point. S35: For modes 1 and 3, determine the number of path regions within a preset range, select path regions that meet the adjacency requirements, and record their order to ensure continuous trajectory connectivity. Specifically, initialize the path region parameters. For mode 1 or mode 3, preset the range of values for the number of path regions according to simulation requirements, randomly determine the number of path regions, and select the corresponding number of regions as path regions from the adjacent regions of the starting and ending regions to ensure that the path regions satisfy the adjacency relationship with the starting region, ending region, and adjacent path regions.
[0032] Specifically, step S4 includes the following sub-steps: S41: Based on the target flight type, randomly determine the target flight speed within the actual flight speed range, with the unit uniformly set to km / h, and record the speed value for subsequent adjustments. Specifically, for flight speed initialization, based on the speed range of the actual flight scenario, preset a range of target flight speed values, and randomly determine the target flight speed within this range using a random number generation algorithm, with the speed unit uniformly set to km / h; S42: Initialize the starting timestamp. Use a timestamp format (such as Unix timestamp) to randomly generate a starting timestamp within a preset time range as the time information of the trajectory starting point, ensuring the rationality and randomness of the timestamp and conforming to the trajectory time distribution in the real scene.
[0033] Specifically, step S5 includes the following sub-steps: S51: Based on the total number of trajectory points and simulation accuracy requirements, randomly determine the number of trajectory segments within a preset range, and reasonably allocate the total number of trajectory points to each segment. Specifically, initialize the number of trajectory segments. Based on the total number of trajectory points and simulation accuracy requirements, preset the range of values for the number of segments, and randomly determine the number of segments for this trajectory to ensure that each trajectory segment contains a reasonable number of trajectory points, facilitating subsequent allocation of flight attributes and trajectory generation. S52: Defines four flight attributes: straight flight, circular hovering, runway hovering, and continuous turns. Predetermines the core parameters and value ranges for each attribute to ensure they closely match realistic flight characteristics. Specifically, the flight attribute definitions specify the parameters for each attribute: straight flight parameters include flight speed and distance; circular hovering parameters include hovering radius, hovering direction (clockwise / counterclockwise), number of hovering rotations, and flight speed; runway hovering parameters include hovering radius, hovering direction (clockwise / counterclockwise), number of hovering rotations, straight segment distance, and flight speed; continuous turns parameters include number of turns, turning radius, and flight speed. S53: Randomly assign a flight attribute to each trajectory segment. Within the parameter value range of the corresponding attribute, randomly initialize each core parameter and record the attribute and parameter information of each segment. Specifically, for flight attribute allocation, randomly assign a flight attribute to each trajectory segment. At the same time, for the assigned flight attribute, randomly initialize all parameters corresponding to that attribute within the preset parameter value range to ensure that the flight characteristics of each trajectory segment have randomness and diversity.
[0034] Specifically, step S6 includes the following sub-steps: S61: For each trajectory segment's flight attributes, construct corresponding rule functions, clarify the calculation logic for trajectory point coordinates, and ensure that the calculation results closely match the flight characteristics of that attribute. Specifically, segmented trajectory parameter calculation: For each trajectory segment, based on its assigned flight attributes and corresponding parameters, construct rule functions for that flight attribute: The straight-line flight rule function calculates the changes in longitude and latitude of trajectory points based on flight speed and distance; the circular hovering rule function calculates the coordinates of each point on the hovering trajectory based on the hovering radius, hovering direction, number of hovering circles, and flight speed; the runway hovering rule function combines the straight-line segment distance and circular hovering parameters to calculate the coordinates of the runway-style hovering trajectory; the continuous turning rule function calculates the coordinates of each trajectory point during the turning process based on the number of turns, turning radius, and flight speed. S62: Call the corresponding rule function and, in conjunction with the region boundary constraints, generate the latitude and longitude of the trajectory points for each trajectory segment one by one. Specifically, the trajectory point coordinate generation process involves calling the rule function corresponding to each trajectory segment in sequence according to the order of trajectory segmentation. Combining the latitude and longitude of the starting point and the boundary constraints of the route region, the latitude and longitude of each trajectory point in each trajectory segment are calculated to ensure that the trajectory points fall within the corresponding region and that the coordinate changes between adjacent trajectory points conform to the flight attribute characteristics. S63: Integrate all segmented trajectory points in chronological order to form a complete original target trajectory dataset and temporarily save it. Specifically, the original trajectory integration involves integrating the trajectory points of all segmented trajectories in chronological order to form a complete original target trajectory, recording the sequence number, longitude, and latitude information of each trajectory point to ensure the continuity and logic of the trajectory.
[0035] Specifically, step S7 includes the following sub-steps: S71: Preset the value range and distribution type of process noise and observation noise, where process noise simulates flight path deviation and observation noise simulates sensor measurement error. The parameter settings are close to the real scene. Specifically, the noise parameters are initialized, the value range and distribution type of process noise and observation noise are preset, process noise corresponds to flight path deviation, and observation noise corresponds to sensor measurement error. The deviation range and distribution type (such as normal distribution) of the two types of noise are set respectively. S72: Add process noise to each trajectory point of the original trajectory, and record the original coordinates and the coordinates after adding noise. Specifically, for each trajectory point in the original trajectory, generate a random deviation value according to the preset process noise parameters, and add the deviation value to the longitude and latitude of the trajectory point to simulate the path deviation during flight. S73: Based on the process noise, observation noise is superimposed on each trajectory point to simulate sensor measurement error, further approximating the actual collected trajectory data. Specifically, after the process noise is added, for each trajectory point, a random measurement error value is generated according to preset observation noise parameters and superimposed on the longitude and latitude of that trajectory point to simulate the error in the sensor measurement process; S74: Noise verification. Verify the coordinates of the trajectory points after noise addition to ensure that the coordinates still fall within the corresponding area. Avoid the trajectory points from deviating from the reasonable range due to excessive noise. If there is a deviation, adjust the noise deviation value and re-add noise.
[0036] Specifically, step S8 includes the following sub-steps: S81: Assign a unique identifier to each simulation trajectory, using a fixed format to ensure the number is unique and identifiable, facilitating the management and retrieval of trajectory samples. Specifically, the trajectory data is numbered, assigning a unique identifier to each generated simulation trajectory. The numbering format follows a preset rule (e.g., "Track Type - Generation Time - Serial Number"), facilitating the management and retrieval of trajectory samples. S82: Verify the completeness and rationality of the noisy trajectory data, check for issues such as missing trajectory points and abnormal coordinates, and correct abnormal data in a timely manner. Specifically, the trajectory data verification involves performing a completeness check on the noisy trajectory data to check for issues such as missing trajectory points, abnormal coordinates, and abnormal timestamps. If any abnormalities are found, they are corrected or regenerated. S83: Calculate the timestamp of each trajectory point based on the initialized start point timestamp and the time difference between each trajectory point. Specifically, the trajectory point timestamp calculation is based on the initialized start point timestamp and the time difference between each trajectory point. S84: The trajectory data is standardized and formatted, serialized into JSON format, and saved as a file according to a fixed naming convention. The storage path is consistent with the previously generated area-related files for easy later retrieval. For details on trajectory data saving, please refer to [link / reference]. Figure 3 The trajectory data is organized according to the format of "identifier number, trajectory point number, longitude, latitude, and timestamp" to unify the data format. Then, the organized trajectory data is serialized into JSON format and saved as a JSON file. Each file can contain one or more trajectory data, which is convenient for subsequent training and testing of the trajectory model.
[0037] The technical solution of the present invention will be further described clearly and completely below with reference to other specific embodiments; specifically, this embodiment takes aviation target trajectory simulation as a scenario, follows all the above steps and sub-steps, and intuitively presents the complete process of trajectory simulation generation. (See reference...) Figure 1 and Figure 2 The specific steps are as follows: Step S1: Define the pathway region and construct the region adjacency graph S11: Predefine five regions A, B, C, D, and E, collect the latitude and longitude of each vertex in each region, arrange them clockwise, and save them as "area_boundary.json"; S12: Call the Shapely library to build a polygon model and calculate spatial relationships. The results are as follows: A intersects with B, B intersects with C, B intersects with D, D intersects with E, A and C do not intersect (with a gap of B), A and D do not intersect (with a gap of B), C and D do not intersect (with a gap of B), C and E do not intersect (with a gap of D), A and E do not intersect (with gaps of B and D). S13: Determine adjacency relationships: A's adjacent region is B; B's adjacent regions are A, C, and D; C's adjacent region is B; D's adjacent regions are B and E; E's adjacent region is D; S14: Construct an adjacency list. Taking region B as an example, the adjacency list records are: "Identifier: B; Vertex coordinates: [(116.397128,39.908823), (116.407128, 39.908823), (116.407128, 39.918823), (116.397128,39.918823)]; Adjacent regions: [{'Identifier':A, 'Adjacency type':Intersecting adjacency}, {'Identifier':C, 'Adjacency type':Intersecting adjacency}, {'Identifier':D, 'Adjacency type':Intersecting adjacency}]"; S15: The serialized adjacency graph is "area_adjacency_graph.json", and the save path is the same as "area_boundary.csv".
[0038] Step S2: Randomly initialize the trajectory mode S21: Use the three preset modes: Mode 1 (cross-region), Mode 2 (single-region), and Mode 3 (round trip across regions). S22: Generate a random integer of 2, corresponding to mode 2 (single area trajectory), and record the mode identifier as "mode 2-single area trajectory".
[0039] Step S3: Initialize the core trajectory parameters S31: Read the mode identifier and determine it to be mode 2 (single area). No need to select the path area. S32: Randomly select region B as the starting and ending regions; S33: The total number of randomly generated trajectory points is 200; S34: Generate the latitude and longitude of the starting point (116.402128, 39.913823) within region B, and the latitude and longitude of the ending point coincide with the starting point (randomly generated 0, corresponding to the coincidence). Step S4: Initialize basic flight parameters S41: Randomly generated flight speed is 108.5 km / h (unit: km / h); S42: Randomly generate a start timestamp of 1715001200 (corresponding to Beijing time 2024-05-07 10:33:20).
[0040] Step S5: Initialize trajectory segmentation and flight attributes S51: Randomly determine the number of segments to be 4, and randomly allocate the number of trajectory points in each segment to ensure that the total number of trajectory points is 200; S52: Assign flight attributes and parameters to the four trajectory segments, with the following results: Section 1: Straight flight, flight speed 108.5km / h, flight distance 1000m; Section 2: Circular circling, circling radius 450m, circling direction clockwise, circling 1 time, flight speed 86.8km / h; Section 3: Continuous turns, 2 turns, turning radius 300m, flight speed 97.7km / h; Section 4: Straight flight, flight speed 108.5km / h, flight distance 1000m (return to the starting point).
[0041] Step S6: Generate the original target trajectory S61: Construct the rule functions corresponding to the attributes of each segment; S62: Generate trajectory points segment by segment. Taking the first segment as an example, starting from the starting point (116.402128, 39.913823), generate 20 trajectory points according to the straight-line flight rule. All of them are located within region B. The coordinates of some trajectory points are as follows: Point 1 (116.402128, 39.913823), Point 2 (116.403128, 39.914823), Point 3 (116.404128, 39.915823)... Point 20 (116.412128, 39.923823); The subsequent three segments are generated according to the corresponding rules, ensuring that the trajectory points are all within region B. S63: Integrate 4 trajectory points, numbered 1-200, with no abrupt changes at the junctions, and save them as "original_trajectory.csv". The coordinates of the 200th trajectory point coincide with the starting point (116.402128, 39.913823).
[0042] Step S7: Add random noise interference S71: Process noise deviation ±0.0001, observation noise deviation ±0.00005, both are normally distributed; S72: Add process noise to each trajectory point. Taking point 1 as an example, the original coordinates are (116.402128, 39.913823), the added process noise is (longitude +0.00003, latitude -0.00002), and the coordinates after adding noise are (116.402158, 39.913803). S73: Superimposed observation noise. Taking the above noisy coordinates as an example, superimposed observation noise (longitude +0.000005, latitude -0.000002) results in final coordinates (116.402163, 39.913798). S74: Verify that all 200 trajectory points are located within region B without deviation; verification is successful.
[0043] Step S8: Trajectory Data Processing and Saving S81: The assigned trajectory identifier number is "sample-001"; S82: Verify trajectory data; 200 trajectory points are complete, with no coordinate anomalies or missing fields. S83: Calculate the timestamp of each trajectory point, starting with a timestamp of 1715001200. The time difference between adjacent trajectory points is 2.1 seconds. The timestamps are accumulated sequentially. For example, the timestamp of point 2 is 1715001202, the timestamp of point 3 is 1715001204, and so on, with the timestamp of point 200 being 1715002818. Organize the core fields and remove redundant information. S84: Serialize to JSON format and save as "simulation_trajectory_001.json". The save path is the same as the previous area-related files.
[0044] It should be noted that, within the scope of protection defined in the claims of this invention, the following embodiments can be combined and / or extended or replaced in any logical manner from the above specific embodiments, such as the disclosed technical principles, disclosed technical features or implicitly disclosed technical features.
[0045] Example 1 A regularized target trajectory simulation and generation system based on regional adjacency constraints, comprising: The region adjacency graph construction module is used to construct a path region adjacency graph based on the latitude and longitude of the polygon vertices of a predefined region using a spatial relationship calculation method, and save the adjacency graph as a format file; the adjacency graph is used to ensure that the target simulation trajectory passes through continuous regions and avoids the trajectory skipping intermediate regions; The trajectory mode initialization module is used to randomly initialize the simulation mode of the target trajectory. The simulation mode includes three types: mode 1 is a cross-region flight mode with different starting and ending areas; mode 2 is a single-region flight mode with the starting and ending areas in the same area; and mode 3 is a round-trip flight mode with the starting and ending areas in the same area but passing through other areas and then returning. The trajectory parameter determination module is used to randomly determine the trajectory start area, end area, number of trajectory points, latitude and longitude of the start and end points, number of areas passed through, and characteristic parameters of the trajectory based on the initialized trajectory pattern. The flight attribute definition module is used to define the flight attributes of the target simulation trajectory, and to define the corresponding rule functions and parameters for each flight attribute; The original trajectory generation module is used to generate the original target trajectory by sequentially calling the corresponding rule functions based on the number of segments of the randomly initialized target trajectory and the flight attributes of each segment. The timestamp generation module is used to determine the time difference between each trajectory point based on the trajectory generated by the rule function, randomly initialize the starting point timestamp, and obtain the timestamp of each trajectory point. The noise addition module is used to add random noise interference to the original target trajectory; The trajectory output module is used to number the final target trajectory after noise is added and save it as a format file as sample data for model training and testing.
[0046] Example 2 Based on Example 1, the method of constructing a path region adjacency graph using spatial relationship calculation specifically includes: calculating the spatial relationship between any two regions and determining whether they are intersecting, contained, or non-intersecting; for two intersecting or contained regions, they are directly determined to be adjacent; for two non-intersecting regions, it is further determined whether there are other regions between them. If there are no other regions that allow both regions to intersect with each other, they are determined to be adjacent; otherwise, they are determined to be non-adjacent; and a region adjacency graph is constructed based on all adjacency relationships, where nodes represent regions and edges represent adjacency relationships between regions.
[0047] Example 3 Based on Example 1, in the trajectory parameter determination module, the step of randomly determining the trajectory start area, end area, number of trajectory points, latitude and longitude of the start and end points, number of pathway areas, and trajectory feature parameters according to the initialized trajectory mode specifically includes: For mode one, randomly selecting different start and end areas, using a breadth-first search algorithm based on the region adjacency graph to determine the sequence of pathway areas from the start area to the end area, and randomly determining the number of pathway areas; For mode two, randomly selecting one area as the start and end area; For mode three, randomly selecting one area as the start and end area, determining the round-trip path from the start area based on the region adjacency graph, and randomly determining the number of pathway areas.
[0048] Example 4 Based on Example 1, the flight attributes include four types: straight flight, circular hovering, runway hovering, and continuous turning. Among them, the parameters for straight flight include flight speed and flight distance; the parameters for circular hovering include hovering radius, hovering direction, number of hovering circles, and flight speed; the parameters for runway hovering include hovering radius, hovering direction, number of hovering circles, straight segment distance, and flight speed; and the parameters for continuous turning include the number of turns and turning radius.
[0049] Example 5 Based on Example 1, in the original trajectory generation module, the step of generating the original target trajectory by sequentially calling the corresponding rule function according to the number of segments of the randomly initialized target trajectory and the flight attributes of each segment includes: randomly determining the number of segments of the trajectory, and randomly assigning one of the four flight attributes to each segment. The trajectory segments are connected end to end in space, and the end coordinates of the previous segment are used as the starting coordinates of the next segment to ensure the spatial continuity of the trajectory.
[0050] Example 6 Based on Example 1, in the timestamp generation module, the step of determining the time difference between each trajectory point according to the trajectory generated by the rule function, randomly initializing the starting point timestamp, and obtaining the timestamp of each trajectory point specifically includes: for adjacent trajectory points, calculating the spherical distance between the two points using the Haversine formula based on their latitude and longitude coordinates, calculating the time difference between adjacent trajectory points based on the target flight speed and time difference formula, and sequentially accumulating each segment of time difference from the starting point timestamp to obtain the timestamp of each trajectory point.
[0051] Example 7 Based on Example 1, in the noise addition module, the noise includes process noise and observation noise; wherein, process noise simulates the flight path deviation during flight, and zero-mean Gaussian white noise is added to the latitude and longitude coordinates of the trajectory points; observation noise simulates the measurement error during sensor measurement, and zero-mean Gaussian white noise is further superimposed on the latitude and longitude coordinates of the trajectory points.
[0052] Example 8 Based on Example 1, the format file is a JSON file; each trajectory record in the JSON file contains a trajectory number and a sequence of trajectory points, wherein each trajectory point in the sequence of trajectory points contains a timestamp, longitude and latitude information.
[0053] Example 9 A method for simulating and generating regularized target trajectories based on regional adjacency constraints, based on any one of Examples 1 to 8, includes the following steps: S1: Divide the predefined regions and calculate the spatial relationships between them, construct and save the region adjacency graph, and ensure that the regions traversed by the trajectory are continuous; S2: Randomly initialize the trajectory mode, randomly select one from a variety of preset trajectory modes as the basic mode for this trajectory simulation; S3: Initialize the core trajectory parameters and determine the core feature parameters of the trajectory based on the selected trajectory mode; S4: Initialize basic flight parameters, randomly set the target flight speed and trajectory start timestamp, and provide a basis for trajectory generation and timestamp calculation; S5: Initialize trajectory segmentation and flight attributes, determine the number of trajectory segments, and randomly assign corresponding flight attributes to each trajectory segment; S6: Generate the original target trajectory. Based on the rule function corresponding to the flight attributes and combined with the initialized parameters, calculate the longitude and latitude of each trajectory point to form the original trajectory data. S7: Add random noise interference to add noise to the trajectory points of the original target trajectory data to simulate path deviation and measurement error in real-world scenarios; S8: Trajectory data organization and storage. The noisy trajectory data is numbered and verified, and saved as a file in a specified format as a sample for model training and testing.
[0054] Example 10 Based on Example 9, the core feature parameters include the starting region, the ending region, and the number of trajectory points.
[0055] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0056] According to one aspect of the present invention, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described above.
[0057] In another aspect, embodiments of the present invention also provide a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
Claims
1. A regularized target trajectory simulation and generation system based on regional adjacency constraints, characterized in that, include: The region adjacency graph construction module is used to construct a path region adjacency graph based on the latitude and longitude of the polygon vertices of a predefined region using a spatial relationship calculation method, and save the adjacency graph as a format file; the adjacency graph is used to ensure that the target simulation trajectory passes through continuous regions and avoids the trajectory skipping intermediate regions; The trajectory mode initialization module is used to randomly initialize the simulation mode of the target trajectory. The simulation mode includes three types: mode 1 is a cross-region flight mode with different starting and ending areas; mode 2 is a single-region flight mode with the starting and ending areas in the same area; and mode 3 is a round-trip flight mode with the starting and ending areas in the same area but passing through other areas and then returning. The trajectory parameter determination module is used to randomly determine the trajectory start area, end area, number of trajectory points, latitude and longitude of the start and end points, number of areas passed through, and characteristic parameters of the trajectory based on the initialized trajectory pattern. The flight attribute definition module is used to define the flight attributes of the target simulation trajectory, and to define the corresponding rule functions and parameters for each flight attribute; The original trajectory generation module is used to generate the original target trajectory by sequentially calling the corresponding rule functions based on the number of segments of the randomly initialized target trajectory and the flight attributes of each segment. The timestamp generation module is used to determine the time difference between each trajectory point based on the trajectory generated by the rule function, randomly initialize the starting point timestamp, and obtain the timestamp of each trajectory point. The noise addition module is used to add random noise interference to the original target trajectory; The trajectory output module is used to number the final target trajectory after noise is added and save it as a format file as sample data for model training and testing.
2. The regularized target trajectory simulation generation system based on regional adjacency constraints according to claim 1, characterized in that, The method of constructing a path region adjacency graph using spatial relationship calculation specifically includes: calculating the spatial relationship between any two regions and determining whether they are intersecting, containment, or non-intersecting; for two intersecting or containment regions, they are directly determined to be adjacent; for two non-intersecting regions, it is further determined whether there are other regions between them. If there are no other regions that allow both regions to intersect with each other, they are determined to be adjacent; otherwise, they are determined to be non-adjacent; and a region adjacency graph is constructed based on all adjacency relationships, where nodes represent regions and edges represent adjacency relationships between regions.
3. The regularized target trajectory simulation generation system based on regional adjacency constraints according to claim 1, characterized in that, In the trajectory parameter determination module, the process of randomly determining the trajectory start region, end region, number of trajectory points, latitude and longitude of the start and end points, number of pathway regions, and trajectory feature parameters based on the initialized trajectory mode specifically includes: For mode one, randomly selecting different start and end regions, using a breadth-first search algorithm based on the region adjacency graph to determine the sequence of pathway regions from the start region to the end region, and randomly determining the number of pathway regions; For mode two, randomly selecting one region as the start and end region; For mode three, randomly selecting one region as the start and end region, determining the round-trip path from the start region based on the region adjacency graph, and randomly determining the number of pathway regions.
4. The regularized target trajectory simulation generation system based on regional adjacency constraints according to claim 1, characterized in that, The flight attributes include four types: straight flight, circular hovering, runway hovering, and continuous turns. Among them, the parameters for straight flight include flight speed and flight distance; the parameters for circular hovering include hovering radius, hovering direction, number of hovering circles, and flight speed; the parameters for runway hovering include hovering radius, hovering direction, number of hovering circles, straight segment distance, and flight speed; and the parameters for continuous turns include the number of turns and turning radius.
5. The regularized target trajectory simulation generation system based on regional adjacency constraints according to claim 1, characterized in that, In the original trajectory generation module, the original target trajectory is generated by sequentially calling the corresponding rule function based on the number of segments of the randomly initialized target trajectory and the flight attributes of each segment. Specifically, this includes: randomly determining the number of segments of the trajectory, and randomly assigning one of the four flight attributes to each segment. The trajectories are connected end to end in space, and the end coordinates of the previous segment are used as the starting coordinates of the next segment to ensure the spatial continuity of the trajectory.
6. The regularized target trajectory simulation generation system based on regional adjacency constraints according to claim 1, characterized in that, In the timestamp generation module, the process of determining the time difference between each trajectory point based on the trajectory generated by the rule function, randomly initializing the starting point timestamp, and obtaining the timestamp of each trajectory point specifically includes: for adjacent trajectory points, calculating the spherical distance between the two points using the Haversine formula based on their latitude and longitude coordinates, calculating the time difference between adjacent trajectory points based on the target flight speed and time difference formula, and sequentially accumulating each segment of time difference from the starting point timestamp to obtain the timestamp of each trajectory point.
7. The regularized target trajectory simulation generation system based on regional adjacency constraints according to claim 1, characterized in that, In the noise addition module, the noise includes process noise and observation noise; wherein, process noise simulates the flight path deviation during flight, and zero-mean Gaussian white noise is added to the latitude and longitude coordinates of the trajectory points; observation noise simulates the measurement error during sensor measurement, and zero-mean Gaussian white noise is further superimposed on the latitude and longitude coordinates of the trajectory points.
8. The regularized target trajectory simulation generation system based on regional adjacency constraints according to claim 1, characterized in that, The format file is a JSON file; each trajectory record in the JSON file contains a trajectory number and a sequence of trajectory points, wherein each trajectory point in the sequence of trajectory points contains a timestamp, longitude and latitude information.
9. A method for simulating and generating regularized target trajectories based on regional adjacency constraints, characterized in that, The regularized target trajectory simulation and generation system based on region adjacency constraints according to any one of claims 1 to 8 includes the following steps: S1: Divide the predefined regions and calculate the spatial relationships between them, construct and save the region adjacency graph, and ensure that the regions traversed by the trajectory are continuous; S2: Randomly initialize the trajectory mode, randomly select one from a variety of preset trajectory modes as the basic mode for this trajectory simulation; S3: Initialize the core trajectory parameters and determine the core feature parameters of the trajectory based on the selected trajectory mode; S4: Initialize basic flight parameters, randomly set the target flight speed and trajectory start timestamp, and provide a basis for trajectory generation and timestamp calculation; S5: Initialize trajectory segmentation and flight attributes, determine the number of trajectory segments, and randomly assign corresponding flight attributes to each trajectory segment; S6: Generate the original target trajectory. Based on the rule function corresponding to the flight attributes and combined with the initialized parameters, calculate the longitude and latitude of each trajectory point to form the original trajectory data. S7: Add random noise interference to add noise to the trajectory points of the original target trajectory data to simulate path deviation and measurement error in real-world scenarios; S8: Trajectory data organization and storage. The noisy trajectory data is numbered and verified, and saved as a file in a specified format as a sample for model training and testing.
10. The method for simulating and generating regularized target trajectories based on regional adjacency constraints according to claim 9, characterized in that, The core feature parameters include the starting region, the ending region, and the number of trajectory points.