Highway network vehicle moving trajectory operation method and system and computer storage medium
By collecting satellite positioning trajectory data to generate spatial vector information, and performing road coding and calculations, the problem of difficulty in judging road spatial relationships in existing technologies has been solved, and more efficient and accurate judgment of road spatial relationships has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-04-07
AI Technical Summary
Existing road spatial coding methods lack coding descriptions of road points, line segments, and other directions, making it impossible to perform spatial vector calculations and quantitative judgments of road spatial relationships.
By collecting satellite positioning trajectory data of target vehicles, spatial vector information is generated, encoded based on road traffic characteristics, and preset road spatial vector operations are performed to construct road topology space to determine road spatial relationships.
It enables accurate judgment of road spatial relationships, improves measurement accuracy and automation, and reduces the time and cost of on-site surveys and manual inspections.
Smart Images

Figure CN121807989A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of road traffic management technology, and in particular to a method, system, and computer storage medium for calculating the trajectory of vehicles in a highway network. Background Technology
[0002] Currently, in existing road space management, a dual-track coding system of "national standards + local standards" has been established, and many national standards and industry classification code standards related to road coding have been published, such as "Classification and Coding of Traffic Management Information Attributes," "Coding Rules for Traffic Management Geographic Information Entity Identification—Urban Roads," and "Naming and Numbering Rules for the National Expressway Network." Among these, the coding standards for highways and expressways have formed a relatively complete system, while the coding standards for urban roads are mainly supported by two national standards: "Classification and Coding of Traffic Management Information Attributes" and "Coding Rules for Traffic Management Geographic Information Entity Identification—Urban Roads," which stipulate the coding rules for urban road traffic and related information entities. This traditional road coding method numbers roads in a certain order within a predetermined urban zoning area and cannot perform road spatial vector calculations. Summary of the Invention
[0003] The purpose of this application is to provide a method, system, and computer storage medium for calculating the vehicle trajectory of a highway network, in order to solve the problems in the prior art where road spatial coding lacks coding descriptions of road points, line segments, and other directions, and is unable to perform spatial vector calculations and quantitative judgments of road spatial relationships.
[0004] The embodiments of this application adopt the following technical solutions: This application provides a method for calculating the trajectory of vehicles in a highway network, the method comprising: Collect satellite positioning-based trajectory data of the target vehicle; Based on the aforementioned trajectory data, spatial vector information is generated; Based on the traffic characteristics of the road, the spatial vector information is used to encode the running trajectory data to obtain directional trajectory point vector codes and trajectory basic line segment codes. Based on the trajectory point vector encoding and the trajectory basic line segment encoding, a preset road space vector operation is performed to obtain the operation result; A road topology space is constructed based on the calculation results, and the road topology space is used to determine the spatial relationships of roads.
[0005] This application embodiment also provides a highway network vehicle trajectory calculation system, the highway network vehicle trajectory calculation system comprising: The data acquisition module collects the target vehicle's trajectory data based on satellite positioning. The generation module generates spatial vector information based on the running trajectory data; The encoding module, based on the road traffic characteristics, uses the spatial vector information to encode the running trajectory data, obtaining directional trajectory point vector encoding and trajectory basic line segment encoding; The calculation module performs a preset road space vector operation based on the trajectory point vector code and the trajectory basic line segment code to obtain the calculation result; The construction module constructs a road topology space based on the calculation results, and uses the road topology space to determine the spatial relationships between roads.
[0006] This application also provides a computer storage medium, including a program for use in conjunction with an electronic device, the program being executed by a processor to complete the following steps: Collect satellite positioning-based trajectory data of the target vehicle; Based on the aforementioned trajectory data, spatial vector information is generated; Based on the traffic characteristics of the road, the spatial vector information is used to encode the running trajectory data to obtain directional trajectory point vector codes and trajectory basic line segment codes. Based on the trajectory point vector encoding and the trajectory basic line segment encoding, a preset road space vector operation is performed to obtain the operation result; A road topology space is constructed based on the calculation results, and the road topology space is used to determine the spatial relationships of roads.
[0007] Based on the vehicle trajectory calculation method, system, and computer storage medium of this application embodiment, spatial vector information is generated by collecting the target vehicle's trajectory data based on satellite positioning. Based on the road traffic characteristics, the collected trajectory data is encoded using the spatial vector information. According to the obtained directional trajectory point vector encoding and trajectory basic line segment encoding, a preset road spatial vector operation is performed. Based on the obtained operation results, a road topology space is constructed to determine the road spatial relationships.
[0008] In this way, road spatial coding can be carried out by utilizing the BeiDou positioning trajectory data of vehicle operation, solving the problem of computation of directed data of vehicle operation trajectory, proposing spatial coding rules for physical road networks and calculation rules for road spatial vectors, and realizing the judgment of spatial relationships between road spatial points and road segments based on computation (such as judging whether a point is on a line segment, judging whether two line segments intersect, etc.), and road alignment analysis (such as curves, steep slopes, long downhill slopes, and combinations of curves and slopes, etc.). It can more accurately reflect the geographical location and spatial relationships of roads, while traditional methods require on-site surveys and manual inspections, which are time-consuming, labor-intensive, and cannot guarantee measurement accuracy. Attached Figure Description
[0009] The accompanying drawings, which are included to provide a further understanding of the embodiments of this specification and form part of the embodiments of this specification, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a method for calculating the trajectory of vehicles in a highway network, provided as an embodiment of this application; Figure 2 A flowchart illustrating the specific application process of a method for calculating the vehicle trajectory of a highway network, provided in an embodiment of this application; Figure 3 This application provides a schematic diagram of the structure of a highway network vehicle trajectory calculation system. Figure 4 This is a schematic diagram of the structure of a computer storage medium corresponding to a method for calculating the trajectory of a vehicle in a highway network, as provided in an embodiment of this application. Detailed Implementation
[0010] In the existing technology, on the one hand, the existing road spatial coding is based on road entities and is carried out by sequential numbering, which requires actual measurement of the location of the road to be coded, and lacks coding description of road points, line segments and other directions, making it impossible to perform spatial vector calculation and quantitative judgment of road spatial relationships.
[0011] On the other hand, existing road coding methods are essentially static identifiers of road entities in sequence or grids. This coding method is like giving each road an "ID number". Although it achieves unique identification, it completely lacks a description of the direction of vehicle travel and cannot represent the spatial vector characteristics of the road. The spatial information is also constructed based on the static information of GIS, lacking the collection and calculation of dynamic operation information.
[0012] Therefore, this application provides a method, system, and computer storage medium for calculating the vehicle trajectory of a highway network. By collecting the target vehicle's trajectory data based on satellite positioning, spatial vector information is generated. Based on the road traffic characteristics, the collected trajectory data is encoded using the spatial vector information. According to the obtained directional trajectory point vector encoding and trajectory basic line segment encoding, a preset road spatial vector operation is performed. Based on the obtained operation results, a road topology space is constructed to determine the road spatial relationships.
[0013] In this way, road spatial coding can be carried out by utilizing the BeiDou positioning trajectory data of vehicle operation, solving the problem of computation of directed data of vehicle operation trajectory, proposing spatial coding rules for physical road networks and calculation rules for road spatial vectors, and realizing the judgment of spatial relationships between road spatial points and road segments based on computation (such as judging whether a point is on a line segment, judging whether two line segments intersect, etc.), and road alignment analysis (such as curves, steep slopes, long downhill slopes, and combinations of curves and slopes, etc.). It can more accurately reflect the geographical location and spatial relationships of roads, while traditional methods require on-site surveys and manual inspections, which are time-consuming, labor-intensive, and cannot guarantee measurement accuracy.
[0014] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0015] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0016] Please see Figure 1 This is a flowchart illustrating a method for calculating the trajectory of vehicles in a highway network, as provided in this application embodiment.
[0017] In the embodiments of this specification, the method for calculating the vehicle trajectory of a highway network may specifically include the following steps: S101: Collect satellite positioning-based trajectory data of the target vehicle; S103: Generate spatial vector information based on the aforementioned trajectory data; S105: Based on the traffic characteristics of the road, the spatial vector information is used to encode the running trajectory data to obtain the directional trajectory point vector code and the trajectory basic line segment code; S107: Based on the trajectory point vector code and the trajectory basic line segment code, perform a preset road space vector operation to obtain the operation result; S109: Construct a road topology space based on the calculation results, and use the road topology space to determine the spatial relationships of roads.
[0018] In the embodiments of this specification, by collecting the trajectory data of the target vehicle, spatial vector information is generated, and directional trajectory point vector codes and trajectory line segment codes are obtained. Calculations are then performed between trajectory points and trajectory line segments, which can more accurately reflect the geographical location and spatial relationships of the road. This method can be used to construct road spatial data for main roads such as highways, national roads, provincial roads, and urban expressways, meeting various business judgment needs of traffic management, such as determining whether roads intersect, judging the relationship between points and road segments, and judging road alignment.
[0019] As an application embodiment of this specification, step S101, which involves collecting the target vehicle's trajectory data based on satellite positioning, may specifically include: The location information and direction of travel of the target vehicle are collected in real time using BeiDou high-precision positioning.
[0020] In the embodiments of this specification, the target vehicle can be any vehicle traveling on the target road segment. By collecting data such as the target vehicle's driving position and direction of travel in real time, real basic data is provided for further construction of the road topology space.
[0021] The trajectory data may specifically include the vehicle's real-time location information, direction of travel, speed, etc., without being specifically limited here.
[0022] The real-time location information of the vehicle may include at least longitude, latitude and altitude, but no specific limitation is made here.
[0023] Furthermore, for step S103, generating spatial vector information based on the trajectory data may specifically include: Each trajectory point in the running trajectory data is used to generate a point with a vector. The point with a vector includes the position information and direction of the trajectory point. The running trajectory data is composed of multiple trajectory points arranged in sequence, and the direction of the trajectory point is the driving direction of the target vehicle. Different vector-bearing blocks are generated using the points with vectors, wherein the vector-bearing blocks are in matrix form, and each column of the vector-bearing blocks contains different spatial vector information.
[0024] In the embodiments of this specification, the running trajectory data is composed of multiple trajectory points arranged in sequence. By generating different points with vectors corresponding to each trajectory point, different vector blocks can be generated using each point with vectors. Each column of the vector block contains different spatial vector information.
[0025] Specifically, the vectorized points may include data such as longitude, latitude, direction, and altitude of the corresponding trajectory points. No specific limitation is made here. The trajectory points are vectorized using data such as longitude, latitude, direction, and altitude to facilitate subsequent calculations.
[0026] In addition, in practical application scenarios, each of the trajectory points can also have its own attribute information, which facilitates the search and location of the trajectory points. The attribute information of the trajectory points may specifically include the code of the road where the trajectory point is located and the kilometer marker of the road, etc., which are not specifically limited here.
[0027] Furthermore, as an application embodiment of this specification, for step S105, based on the road traffic characteristics, the spatial vector information is used to encode the running trajectory data to obtain directional trajectory point vector codes and trajectory basic line segment codes, which may specifically include: The trajectory points are encoded using their position information and orientation to obtain a directional trajectory point vector code. The basic trajectory segments are encoded using the trajectory point vector codes corresponding to the starting and ending trajectory points of each basic trajectory segment to obtain a directional basic trajectory segment code. The basic trajectory segment code is formed by selecting the starting and ending trajectory points from each trajectory point.
[0028] In the embodiments of this specification, by encoding the trajectory point using the collected position information and direction, the position and direction of the trajectory point can be clearly displayed, facilitating subsequent calculations.
[0029] In addition, the basic trajectory segment is a spatial vector calculation unit with direction. It can connect and organize the discrete and meaningless trajectory points in the original vehicle trajectory data into a continuous spatial entity with direction, length and topological relationship, realizing the leap from point to line and laying the foundation for subsequent calculation of the spatial characteristics of the road.
[0030] By generating basic trajectory segments, the original vehicle trajectory data can be structured into a digital road network model that supports directionality and can perform vector operations, which is to construct a road topology space. This provides spatial vector calculation units for subsequent automated and intelligent analysis and calculation of the road space.
[0031] The encoding of each basic trajectory segment can be achieved by combining the trajectory point vector encodings corresponding to the starting and ending trajectory points to obtain the directional basic trajectory segment encoding. In this way, each directed segment in the highway network has a globally unique encoding identifier that contains spatial and directional information, providing a basic guarantee for subsequent efficient calculations, fast retrieval, and relationship judgment.
[0032] Furthermore, the trajectory points are encoded using their corresponding position information and orientation to obtain directional trajectory point vector encoding, which may specifically include: The position information of the trajectory points is encoded to generate the position codes corresponding to the trajectory points; Based on the angle range of multiple direction angles rotating clockwise from north, each direction angle is matched with a corresponding code, and the direction corresponding to the trajectory point is matched with the angle range to generate the direction code corresponding to the trajectory point; The position code and the direction code are combined to obtain the directional trajectory point vector code.
[0033] In the embodiments of this specification, the position information and direction of the trajectory points are encoded separately, and then the obtained position codes and direction codes are combined to obtain the directional trajectory point vector code.
[0034] The encoding precision can be determined based on the actual encoding method used. For example, the location information of the trajectory points can be encoded by encoding the latitude and longitude of the trajectory points, which can be done using GeoHash encoding with a precision of 9 bits.
[0035] It should be noted that other encoding methods can also be used in practical applications, and no specific limitations are made here. The above embodiments are only used for illustration and do not limit this application.
[0036] The specific encoding rule for the direction encoding can be based on dividing 360 degrees clockwise from north into a preset number of direction angles. Each direction angle corresponds to a different angle range, and each direction angle is matched with a unique code. Thus, by matching the direction corresponding to the trajectory point with the angle range of each direction angle, the direction code corresponding to the trajectory point can be determined.
[0037] In practical applications, the specific number of the directional angles can be randomly preset according to actual needs, and no specific limitation is made here.
[0038] As an application embodiment of this specification, for step S107, based on the trajectory point vector code and the trajectory basic line segment code, a preset road space vector operation is performed to obtain the operation result, which may specifically include: For the trajectory points, perform distance calculations or equality checks between the trajectory points; For the trajectory point and the basic trajectory line segment, perform point-to-line distance calculation and determine whether the basic trajectory line segment contains the compression of the trajectory point and the midpoint of the line segment; For the basic line segments of the trajectory, addition, subtraction, intersection, and cross operations are performed.
[0039] In the embodiments of this specification, the preset road space vector operation can mainly include operations between trajectory points, operations between trajectory points and basic trajectory segments, and operations between basic trajectory segments. Since the operation objects are different, each operation method is different.
[0040] By performing the preset road space vector operation, the topological nodes and edges of the road topology space can be identified, thereby automatically constructing the road topology space.
[0041] Specifically, for the trajectory points, performing distance calculations or equality checks between them may include: For the distance calculation between the trajectory points, the distance between the two trajectory points along the basic line segment of the trajectory where the trajectory points are located is calculated. When the line segment between the two trajectory points is not a straight line, the distance between the two trajectory points is the distance along the non-straight line segment. For the equality judgment operation between the trajectory points, if the trajectory point vector codes corresponding to the two trajectory points are the same, then the two trajectory points are equal trajectory points.
[0042] Furthermore, for the trajectory point and the basic trajectory line segment, performing point-to-line distance calculations and determining whether the basic trajectory line segment contains the compression of the trajectory point and the midpoint of the line segment can specifically include: The point-to-line distance calculation is to calculate the distance between the trajectory point and the basic line segment of the trajectory along the road; The step of determining whether the basic line segment of the trajectory contains the trajectory point is to determine whether the trajectory point vector code corresponding to the trajectory point is in the trajectory point vector code dataset corresponding to the basic line segment of the trajectory. If so, the basic line segment of the trajectory contains the trajectory point. The compression of the midpoint of the line segment is to remove the repeated trajectory points encoded by the trajectory point vector on the basic trajectory line segment.
[0043] Furthermore, for the basic line segments of the trajectory, addition, subtraction, intersection, and cross operations are performed, which may specifically include: The addition operation is to merge two adjacent basic line segments of the trajectory into a new long line segment; The subtraction operation involves removing a preset number of basic trajectory segments from the beginning and / or end of the long line segment to obtain a new road segment. The intersection operation is to extract the common portion of two basic line segments of the trajectory; The crossover operation compares the trajectory point vector codes corresponding to each trajectory point in the two basic trajectory segments. If the position codes of the trajectory points are the same, it is determined that the two basic trajectory segments intersect, and the two trajectory points with the same position codes are the intersection trajectory points of the two basic trajectory segments.
[0044] In the embodiments described in this specification, the intersection trajectory points can be used to identify the location of at-grade intersections.
[0045] As an application embodiment of this specification, step S109, constructing a road topology space based on the calculation result, and using the road topology space to determine road spatial relationships, may specifically include: Based on the calculation results, the adjacency relationships between the topology nodes are identified; The road topology space is automatically constructed based on the topology nodes and the adjacency relationships between them.
[0046] In the embodiments described in this specification, the topology node can be identified based on the intersection trajectory point obtained from the intersection operation, which typically corresponds to a planar intersection in the real world.
[0047] The adjacency relationship between the topological nodes can be specifically determined by judging whether the two basic line segments of the trajectory where the topological node is located are connected end to end, that is, judging whether the vector code of the endpoint trajectory point and the vector code of the starting trajectory point are equal. For details, please refer to the specific calculation process of the trajectory point equality judgment in the above embodiment.
[0048] If it is confirmed that the two basic trajectory segments are connected end to end, they can be further merged into a longer road segment through addition. This new road segment constitutes a more complete topological boundary in the topological space.
[0049] In this way, by confirming each topological node and topological boundary, the road topology space can be automatically constructed.
[0050] Furthermore, using the road topology space to determine road spatial relationships can specifically include at least one of the following methods: Based on the longitude and latitude of each trajectory point in a long line segment containing multiple basic trajectory segments, the curve radius is fitted to determine the curved road segment. Calculate the average slope of the road based on the elevation of the starting and ending points of the long line segment to determine the sloping road segment. The intersection of the line segment code set corresponding to the curve and the line segment code set corresponding to the downhill section is used to determine the curve-slope combination section.
[0051] This specification provides a method for calculating the vehicle trajectory of a highway network. It collects the trajectory data of the target vehicle based on satellite positioning, generates spatial vector information, encodes the collected trajectory data using the spatial vector information based on the road traffic characteristics, performs a preset road spatial vector operation based on the obtained directional trajectory point vector code and trajectory basic line segment code, and constructs a road topology space based on the obtained operation result, so as to use the road topology space to determine the road spatial relationship.
[0052] In this way, road spatial coding can be carried out by utilizing the BeiDou positioning trajectory data of vehicle operation, solving the problem of computation of directed data of vehicle operation trajectory, proposing spatial coding rules for physical road networks and calculation rules for road spatial vectors, and realizing the judgment of spatial relationships between road spatial points and road segments based on computation (such as judging whether a point is on a line segment, judging whether two line segments intersect, etc.), and road alignment analysis (such as curves, steep slopes, long downhill slopes, and combinations of curves and slopes, etc.). It can more accurately reflect the geographical location and spatial relationships of roads, while traditional methods require on-site surveys and manual inspections, which are time-consuming, labor-intensive, and cannot guarantee measurement accuracy.
[0053] It should be noted that the specific method for calculating the vehicle trajectory of the highway network described above is merely a specific application example and does not limit the scope of the embodiments in this specification. Other specific embodiments may also be included, which will not be elaborated here.
[0054] Based on the same inventive concept, this specification also provides specific application examples of the above-described method for calculating the vehicle trajectory of a highway network.
[0055] like Figure 2 The diagram shown is a flowchart illustrating the specific application process of a method for calculating the vehicle trajectory of a highway network provided in an embodiment of this specification.
[0056] In the embodiments of this specification, the essence of a trajectory point is a point with a vector. The information in the trajectory point may specifically include: longitude x, latitude y, direction f, and altitude h, which are not specifically limited here.
[0057] Specifically, the attribute information of the trajectory point may include: the code of the road where the trajectory point is located, and the kilometer marker of the road.
[0058] The trajectory points are encoded using a combination of location and direction codes, totaling 10 bits. The location code employs latitude and longitude coding, such as GeoHash, with a precision of 9 bits. The direction code is based on eight directional angles rotated clockwise from north (see Table 1), with a precision of 1 bit.
[0059] It should be noted that the encoding precision and encoding method of the trajectory points can be selected according to the actual application scenario, and no specific limitation is made here. The above embodiments are only used for illustration and do not limit this application.
[0060] As shown in Table 1 below, the direction coding is specifically based on rotating clockwise from the north direction, dividing the 360-degree range into 8 direction angles. The direction angles correspond to the driving direction of the target vehicle, and the direction coding precision is 1 bit.
[0061] Table 1 Direction Encoding Table Serial number Angle range Encoding 1 0——45 1 2 45——90 2 3 90——135 3 4 135——180 4 5 180——225 5 6 225——270 6 7 270——315 7 8 315——360 8 In specific application scenarios, the direction encoding can also be based on rotating clockwise from the north direction, dividing the 360-degree range into different numbers of direction angles, without making specific limitations here.
[0062] The direction angle can also be divided into 12 or 36 more refined angles. This more refined division can be applied to judging traffic scenarios such as sharp curves or small turns.
[0063] Furthermore, in the embodiments of this specification, the basic line segment of the trajectory can be represented as L. ab The basic line segment information includes: starting trajectory point a and ending trajectory point b.
[0064] The basic line segment of the trajectory is encoded as follows: starting point code + ending point code, totaling 20 bits.
[0065] It should be noted that the encoding precision of the basic line segments of the trajectory changes with the accuracy of the trajectory point vector encoding, but no specific limitation is made here.
[0066] Specifically, the characteristics of the basic line segments of the trajectory can include: 1. It has a direction: the direction is from vector a to vector b; 2. Has length: The length is the straight-line distance between points a and b on the trajectory; 3. Long line segments containing multiple basic line segments of a trajectory have a linear shape: It is represented as (x1,y1,f1; x2,y2,f2......;xn,yn,fn).
[0067] For curved road sections, the radius of the curve can be fitted using the longitude x and latitude y of the n trajectory points on the road; for uphill or downhill road sections, the average slope of the road can be calculated using the slope f1 and fn of the starting and ending points on the road; for the line segment coding set A corresponding to the curve and the line segment coding set B corresponding to the downhill road section, their intersection is the line segment corresponding to the curved and downhill road section.
[0068] 4. A long line segment containing multiple basic trajectory line segments contains multiple trajectory points, forming a point dataset.
[0069] The attribute information of the basic line segment of the trajectory includes: the road number of the starting trajectory point, the kilometer marker of the starting trajectory point, the road number of the ending trajectory point, and the kilometer marker of the ending trajectory point.
[0070] Furthermore, the trajectory calculation method can specifically include the following approaches: Specifically, the operations between trajectory points can include: Point-to-point distance calculation method: Calculate the distance between two trajectory points along the basic line segment of their respective trajectories. When the basic line segment between the two trajectory points is not a straight line, the point-to-point distance is the distance along the non-straight line segment.
[0071] Method for determining equality of points: If the 10-bit codes of two trajectory points are the same, the two trajectory points are considered to be "equal".
[0072] Specifically, the operations between trajectory points and basic trajectory line segments can include: Point-to-line distance calculation method: Calculate the distance between trajectory points and basic trajectory line segments along the road.
[0073] The calculation method for whether a point is included is as follows: Determine whether the encoding of the trajectory point is within the trajectory point dataset of the basic trajectory segment. If it is, then the basic trajectory segment includes the trajectory point.
[0074] Compression method for midpoints of line segments: Remove trajectory points with repeated encoding on the basic line segments of the trajectory.
[0075] Specifically, the operations between basic line segments of a trajectory can include: Addition operation: two adjacent basic line segments L of the trajectory ab L cd They merge to form a new long line segment L. ad .
[0076] Subtraction operation: From the starting end or the ending end of the long line segment, remove M1 and M2 basic line segments of the trajectory respectively to form a new line segment.
[0077] Intersection operation: The common segment of two basic line segments of a trajectory is extracted, which is the result of the intersection operation between the basic line segments of the trajectory.
[0078] Crossover operation: By comparing the codes of the midpoints of the basic line segments of two trajectories, if the first 9 bits of the vector codes of the trajectory points are the same, it is determined that the two basic line segments of the trajectory intersect, and that point is the intersection point.
[0079] Based on the embodiments described above, the specific application process of the highway network vehicle trajectory calculation method can be described as follows: Step 1: Input the vehicle's BeiDou trajectory data; Step 2: Generate the basic geometric elements of the road; Specifically, the basic geometric elements of a road can include directional trajectory points and basic trajectory line segments. The directional trajectory points are blocks with directional codes, and the basic trajectory line segments are directed vectors.
[0080] Step 3: Perform vector space operations; Specifically, the vector space operations may include cross-comparison operations and equality operations.
[0081] Step 4: Identify topological nodes, such as intersection points; Step 5: Identify the adjacency relationships between the basic line segments of the trajectory, that is, determine the connectivity between the basic line segments of the trajectory and determine the topological boundary; Step 6: Automatically construct the topology space based on topology nodes and topology boundaries; Step 7: Output the road topology network model.
[0082] In the embodiments described in this specification, the trajectory point vector is the smallest unit with directional attributes, and the basic trajectory line segment is a candidate object that constitutes the "boundary" of the topological space.
[0083] Topological nodes and topological boundaries are mainly identified through the following vector operations: Cross-validation is used to identify "topology nodes": Method: The trajectory point vector codes of the trajectory point sets in any two basic trajectory segments can be compared. If the position code (such as the first 9 bits of GeoHash code) of a trajectory point is found to be the same, it is determined that the two basic trajectory segments intersect at that trajectory point.
[0084] Topology result: This intersection point is identified as a topology node, which usually corresponds to a plane intersection in the real world.
[0085] Equality checks and addition operations are used to establish connectivity at "topological boundaries": Method: Determine whether the basic line segments of two trajectories are connected end-to-end. That is, the basic line segment L of the trajectory... ab The encoding of the endpoint trajectory point b, and the basic line segment L of the trajectory. cd Are the encodings of the starting point c "equal" (the 10-bit encodings are exactly the same)?
[0086] Topological result: If they are equal, then the basic line segment L of the trajectory is determined. ab and L cd They are adjacent, and they can be merged into a longer line segment L by addition. ad This longer line segment constitutes a more complete "boundary" in the topological space.
[0087] The point-line inclusion operation can be used to enrich the internal structure of "topological boundaries": Method: Determine whether the encoding of a trajectory point exists in the trajectory point dataset of a certain basic line segment.
[0088] Topological results: This ensures that the "topological boundary" is composed of a series of ordered, oriented trajectory points, not just start and end points. This is crucial for subsequent linear analysis (such as curve radius fitting), as these properties are carried on the topological "boundary".
[0089] Thus, through the above vector operations, the embodiments of this specification can automatically discretize the entire road network into a series of key topological nodes (mainly composed of intersections), and abstract the pathways composed of basic trajectory line segments (and their fused long line segments) into topological boundaries connecting these nodes.
[0090] Ultimately, these topological nodes and boundaries, along with the connections established between them through vector operations, together constitute a complete, vectorized road topology spatial network.
[0091] Based on the practical application process of the highway network vehicle trajectory calculation method provided in the above embodiments, it can also be applied to other application scenarios such as automated updating of high-precision maps, early warning of dangerous road sections, and traffic simulation testing, without specific limitations.
[0092] Based on the summary of actual application or experimental processes, the method for calculating the vehicle trajectory of the highway network can improve the automation level of road vector space calculation by more than 90%, the accuracy of cross trajectory point recognition by 86%, and the timeliness of map updates by 30%.
[0093] The specific implementation process of the embodiments in this specification can be referred to the various implementation steps corresponding to the above embodiments, and will not be repeated here.
[0094] Based on the same inventive concept, embodiments of this specification also provide a highway network vehicle trajectory calculation system. For example... Figure 3 The diagram shown is a structural schematic of a highway network vehicle trajectory calculation system provided in an embodiment of this specification.
[0095] Specifically, the highway network vehicle trajectory calculation system may include: The acquisition module 301 acquires the target vehicle's trajectory data based on satellite positioning; The generation module 302 generates spatial vector information based on the running trajectory data; The encoding module 303, based on the traffic characteristics of the road, uses the spatial vector information to encode the running trajectory data to obtain directional trajectory point vector encoding and trajectory basic line segment encoding; The calculation module 304 performs a preset road space vector operation based on the trajectory point vector code and the trajectory basic line segment code to obtain the calculation result; The construction module 305 constructs a road topology space based on the calculation results, and uses the road topology space to determine the spatial relationships of roads.
[0096] based on Figure 3 The system described in this specification also provides some specific implementation schemes of the system, which will be described below.
[0097] Furthermore, the target vehicle's trajectory data based on satellite positioning is collected, including: The location information and direction of travel of the target vehicle are collected in real time using BeiDou high-precision positioning, wherein the location information includes longitude, latitude and altitude.
[0098] Furthermore, based on the aforementioned trajectory data, spatial vector information is generated, including: Each trajectory point in the running trajectory data is divided into points with vectors. The points with vectors include the position information and direction of the trajectory points. The running trajectory data is composed of multiple trajectory points arranged in sequence. The spatial vector information is generated using each of the points with vectors.
[0099] Furthermore, based on the road traffic characteristics, the spatial vector information is used to encode the trajectory data, resulting in directional trajectory point vector codes and basic trajectory line segment codes, including: The trajectory points are encoded using their position information and orientation to obtain a directional trajectory point vector code. The basic trajectory segments are encoded using the trajectory point vector codes corresponding to the starting and ending trajectory points of each basic trajectory segment to obtain a directional basic trajectory segment code. The basic trajectory segment code is formed by selecting the starting and ending trajectory points from each trajectory point.
[0100] Furthermore, the trajectory points are encoded using their corresponding position information and orientation to obtain directional trajectory point vector encoding, including: The position information of the trajectory points is encoded to generate the position codes corresponding to the trajectory points; Based on the angle range of multiple direction angles rotating clockwise from north, each direction angle is matched with a corresponding code, and the direction corresponding to the trajectory point is matched with the angle range to generate the direction code corresponding to the trajectory point; The position code and the direction code are combined to obtain the directional trajectory point vector code.
[0101] Furthermore, based on the trajectory point vector encoding and the trajectory basic line segment encoding, a preset road space vector operation is performed to obtain the operation result, including: For the trajectory points, perform distance calculations or equality checks between the trajectory points; For the trajectory point and the basic trajectory line segment, perform point-to-line distance calculation and compression of the midpoint of the line segment; For the basic line segments of the trajectory, addition, subtraction, intersection, and cross operations are performed.
[0102] Furthermore, for the trajectory points, distance calculations or equality checks are performed between the trajectory points, including: For the distance calculation between the trajectory points, the distance between the two trajectory points along the basic line segment of the trajectory where the trajectory points are located is calculated. When the line segment between the two trajectory points is not a straight line, the distance between the two trajectory points is the distance along the non-straight line segment. For the equality judgment operation between the trajectory points, if the trajectory point vector codes corresponding to the two trajectory points are the same, then the two trajectory points are equal trajectory points.
[0103] Furthermore, for the trajectory point and the basic trajectory line segment, point-to-line distance calculation is performed, and it is determined whether the basic trajectory line segment contains the compression of the trajectory point and the midpoint of the line segment, including: The point-to-line distance calculation is to calculate the distance between the trajectory point and the basic line segment of the trajectory along the road; The step of determining whether the basic line segment of the trajectory contains the trajectory point is to determine whether the trajectory point vector code corresponding to the trajectory point is in the trajectory point vector code dataset corresponding to the basic line segment of the trajectory. If so, the basic line segment of the trajectory contains the trajectory point. The compression of the midpoint of the line segment is to remove the repeated trajectory points encoded by the trajectory point vector on the basic trajectory line segment.
[0104] Furthermore, for the basic line segments of the trajectory, addition, subtraction, intersection, and cross operations are performed, including: The addition operation is to merge two adjacent basic line segments of the trajectory into a new long line segment; The subtraction operation involves removing a preset number of basic trajectory segments from the beginning and / or end of the long line segment to obtain a new road segment. The intersection operation is to extract the common portion of two basic line segments of the trajectory; The crossover operation compares the trajectory point vector codes corresponding to each trajectory point in the two basic trajectory segments. If the position codes of the trajectory points are the same, it is determined that the two basic trajectory segments intersect, and the two trajectory points with the same position codes are the intersection trajectory points of the two basic trajectory segments.
[0105] Furthermore, a road topology space is constructed based on the calculation results, and the road topology space is used to determine road spatial relationships, including: Based on the calculation results, the adjacency relationships between the topology nodes are identified; The road topology space is automatically constructed based on the topology nodes and the adjacency relationships between them.
[0106] Furthermore, the spatial relationships between roads are determined using the road topology space, including at least one of the following methods: Based on the longitude and latitude of each trajectory point in a long line segment containing multiple basic trajectory segments, the curve radius is fitted to determine the curved road segment. Calculate the average slope of the road based on the elevation of the starting and ending points of the long line segment to determine the sloping road segment. The intersection of the line segment code set corresponding to the curve and the line segment code set corresponding to the downhill section is used to determine the curve-slope combination section.
[0107] This specification provides a highway network vehicle trajectory calculation system that collects target vehicle trajectory data based on satellite positioning, generates spatial vector information, encodes the collected trajectory data using the spatial vector information based on road traffic characteristics, performs preset road spatial vector calculations based on the obtained directional trajectory point vector codes and trajectory basic line segment codes, constructs a road topology space based on the obtained calculation results, and uses the road topology space to determine road spatial relationships.
[0108] In this way, road spatial coding can be carried out by utilizing the BeiDou positioning trajectory data of vehicle operation, solving the problem of computation of directed data of vehicle operation trajectory, proposing spatial coding rules for physical road networks and calculation rules for road spatial vectors, and realizing the judgment of spatial relationships between road spatial points and road segments based on computation (such as judging whether a point is on a line segment, judging whether two line segments intersect, etc.), and road alignment analysis (such as curves, steep slopes, long downhill slopes, and combinations of curves and slopes, etc.). It can more accurately reflect the geographical location and spatial relationships of roads, while traditional methods require on-site surveys and manual inspections, which are time-consuming, labor-intensive, and cannot guarantee measurement accuracy.
[0109] Based on the same inventive concept, embodiments of this specification also provide an electronic device, including at least one processor and a memory, wherein the memory stores a program and is configured to be executed by the at least one processor in the following steps: Collect satellite positioning-based trajectory data of the target vehicle; Based on the aforementioned trajectory data, spatial vector information is generated; Based on the traffic characteristics of the road, the spatial vector information is used to encode the running trajectory data to obtain directional trajectory point vector codes and trajectory basic line segment codes. Based on the trajectory point vector encoding and the trajectory basic line segment encoding, a preset road space vector operation is performed to obtain the operation result; A road topology space is constructed based on the calculation results, and the road topology space is used to determine the spatial relationships of roads.
[0110] Other functions of the processor can be found in the above embodiments, and will not be repeated here.
[0111] Based on the same inventive concept, embodiments of this specification also provide a computer-readable storage medium, including a program for use in conjunction with an electronic device, the program being executable by a processor to perform the following steps: Collect satellite positioning-based trajectory data of the target vehicle; Based on the aforementioned trajectory data, spatial vector information is generated; Based on the traffic characteristics of the road, the spatial vector information is used to encode the running trajectory data to obtain directional trajectory point vector codes and trajectory basic line segment codes. Based on the trajectory point vector encoding and the trajectory basic line segment encoding, a preset road space vector operation is performed to obtain the operation result; A road topology space is constructed based on the calculation results, and the road topology space is used to determine the spatial relationships of roads.
[0112] Other functions of the processor can be found in the above embodiments, and will not be repeated here.
[0113] like Figure 4 As shown in the figure, this specification also provides a schematic diagram of the structure of a computer storage medium.
[0114] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0115] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0116] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams.Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0118] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0119] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0120] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0121] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0122] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0123] It should also be noted that 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 limitation, 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.
[0124] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0125] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0126] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of protection of the claims of this application.
Claims
1. A method for calculating the trajectory of vehicles in a highway network, characterized in that, The method includes: Collect satellite positioning-based trajectory data of the target vehicle; Based on the aforementioned trajectory data, spatial vector information is generated; Based on the traffic characteristics of the road, the spatial vector information is used to encode the running trajectory data to obtain directional trajectory point vector codes and trajectory basic line segment codes. Based on the trajectory point vector encoding and the trajectory basic line segment encoding, a preset road space vector operation is performed to obtain the operation result; A road topology space is constructed based on the calculation results, and the road topology space is used to determine the spatial relationships of roads.
2. The method as described in claim 1, characterized in that, Collect satellite positioning-based trajectory data of the target vehicle, including: The location information and direction of travel of the target vehicle are collected in real time using BeiDou high-precision positioning, wherein the location information includes longitude, latitude and altitude.
3. The method as described in claim 2, characterized in that, Based on the aforementioned trajectory data, spatial vector information is generated, including: Each trajectory point in the running trajectory data is used to generate a point with a vector. The point with a vector includes the position information and direction of the trajectory point. The running trajectory data is composed of multiple trajectory points arranged in sequence, and the direction of the trajectory point is the driving direction of the target vehicle. Different vector-bearing blocks are generated using the points with vectors, wherein the vector-bearing blocks are in matrix form, and each column of the vector-bearing blocks contains different spatial vector information.
4. The method as described in claim 3, characterized in that, Based on the road traffic characteristics, the spatial vector information is used to encode the trajectory data, resulting in directional trajectory point vector codes and basic trajectory line segment codes, including: The trajectory points are encoded using their position information and orientation to obtain a directional trajectory point vector code. The basic trajectory segments are encoded using the trajectory point vector codes corresponding to the starting and ending trajectory points of each basic trajectory segment to obtain a directional basic trajectory segment code. The basic trajectory segment code is formed by selecting the starting and ending trajectory points from each trajectory point.
5. The method as described in claim 4, characterized in that, The trajectory points are encoded using their corresponding position information and orientation to obtain a directional trajectory point vector encoding, including: The position information of the trajectory points is encoded to generate the position codes corresponding to the trajectory points; Based on the angle range of multiple direction angles rotating clockwise from north, each direction angle is matched with a corresponding code, and the direction corresponding to the trajectory point is matched with the angle range to generate the direction code corresponding to the trajectory point; The position code and the direction code are combined to obtain the directional trajectory point vector code.
6. The method as described in claim 5, characterized in that, Based on the trajectory point vector encoding and the trajectory basic line segment encoding, a preset road space vector operation is performed to obtain the operation result, including: For the trajectory points, perform distance calculations or equality checks between the trajectory points; For the trajectory point and the basic trajectory line segment, perform point-to-line distance calculation and compression of the midpoint of the line segment; For the basic line segments of the trajectory, addition, subtraction, intersection, and cross operations are performed.
7. The method as described in claim 6, characterized in that, For the trajectory points, perform distance calculations or equality checks between the trajectory points, including: For the distance calculation between the trajectory points, the distance between the two trajectory points along the basic line segment of the trajectory where the trajectory points are located is calculated. When the line segment between the two trajectory points is not a straight line, the distance between the two trajectory points is the distance along the non-straight line segment. For the equality judgment operation between the trajectory points, if the trajectory point vector codes corresponding to the two trajectory points are the same, then the two trajectory points are equal trajectory points.
8. The method as described in claim 6, characterized in that, For the trajectory point and the basic trajectory line segment, perform point-to-line distance calculation and determine whether the basic trajectory line segment contains the compression of the trajectory point and the midpoint of the line segment, including: The point-to-line distance calculation is to calculate the distance between the trajectory point and the basic line segment of the trajectory along the road; The step of determining whether the basic line segment of the trajectory contains the trajectory point is to determine whether the trajectory point vector code corresponding to the trajectory point is in the trajectory point vector code dataset corresponding to the basic line segment of the trajectory. If so, the basic line segment of the trajectory contains the trajectory point. The compression of the midpoint of the line segment is to remove the repeated trajectory points encoded by the trajectory point vector on the basic trajectory line segment.
9. The method as described in claim 6, characterized in that, For the basic line segments of the trajectory, addition, subtraction, intersection, and cross operations are performed, including: The addition operation is to merge two adjacent basic line segments of the trajectory into a new long line segment; The subtraction operation involves removing a preset number of basic trajectory segments from the beginning and / or end of the long line segment to obtain a new road segment. The intersection operation is to extract the common portion of two basic line segments of the trajectory; The crossover operation compares the trajectory point vector codes corresponding to each trajectory point in the two basic trajectory segments. If the position codes of the trajectory points are the same, it is determined that the two basic trajectory segments intersect, and the two trajectory points with the same position codes are the intersection trajectory points of the two basic trajectory segments.
10. The method as described in claim 1, characterized in that, Based on the calculation results, a road topology space is constructed, and the road topology space is used to determine road spatial relationships, including: Based on the calculation results, the adjacency relationships between the topology nodes are identified; The road topology space is automatically constructed based on the topology nodes and the adjacency relationships between them.
11. The method as described in claim 10, characterized in that, Using the road topology space, the spatial relationships between roads can be determined in at least one of the following ways: Based on the longitude and latitude of each trajectory point in a long line segment containing multiple basic trajectory segments, the curve radius is fitted to determine the curved road segment. Calculate the average slope of the road based on the elevation of the starting and ending points of the long line segment to determine the sloping road segment. The intersection of the line segment code set corresponding to the curve and the line segment code set corresponding to the downhill section is used to determine the curve-slope combination section.
12. A highway network vehicle trajectory calculation system, characterized in that, The highway network vehicle trajectory calculation system includes: The data acquisition module collects the target vehicle's trajectory data based on satellite positioning. The generation module generates spatial vector information based on the running trajectory data; The encoding module, based on the road traffic characteristics, uses the spatial vector information to encode the running trajectory data, obtaining directional trajectory point vector encoding and trajectory basic line segment encoding; The calculation module performs a preset road space vector operation based on the trajectory point vector code and the trajectory basic line segment code to obtain the calculation result; The construction module constructs a road topology space based on the calculation results, and uses the road topology space to determine the spatial relationships between roads.
13. A computer storage medium comprising a program for use in conjunction with an electronic device, the program being executable by a processor to perform the following steps: Collect satellite positioning-based trajectory data of the target vehicle; Based on the aforementioned trajectory data, spatial vector information is generated; Based on the traffic characteristics of the road, the spatial vector information is used to encode the running trajectory data to obtain directional trajectory point vector codes and trajectory basic line segment codes. Based on the trajectory point vector encoding and the trajectory basic line segment encoding, a preset road space vector operation is performed to obtain the operation result; A road topology space is constructed based on the calculation results, and the road topology space is used to determine the spatial relationships of roads.