A road positioning data compression storage method and a terminal device
Patent Information
- Application Number
- CN202111434414.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2041-11-29
AI Technical Summary
按照传统方式,需要提前获取桥梁的所有定位经纬度信息并存储在终端或者云端设备中,并且在实时应用中需要不断对数据库进行访问存储,数据量大,耗时又耗空间
[0025]本发明的道路定位数据压缩存储方法可将桥梁、区间道路等道路宽度相对一致的路段的定位信息通过优化算法获取最佳分段数和分段点位置,将桥梁、区间道路通过少量的连续线段及线段对应扩展矩形四角点的坐标信息予以表示,可大大压缩道路定位数据,可大大减少对车载终端设备的存储空间的占用,及大大降低定位数据无线传输的数据量,且方便后续的车辆快速定位检索。
Smart Images

Figure CN114124104B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle networking, and in particular to a method for compressing and storing road positioning data and a terminal device. Background Technology
[0002] Bridges, as a key component of urban transportation hubs, play a vital role in handling large volumes of vehicular traffic across regions. With the widespread adoption of in-vehicle intelligent terminal devices and ADAS applications, improving vehicle positioning and determining whether a vehicle is on a designated bridge has become a crucial challenge. Existing in-vehicle terminal hardware is limited, and traditional methods of storing positioning data place high demands on wireless transmission, hardware storage, and positioning accuracy, leading to high costs and operational complexity.
[0003] In real-world projects, it's crucial to accurately determine whether a vehicle is on a designated bridge or its current location on the bridge. Traditionally, this requires acquiring all the bridge's latitude and longitude coordinates in advance and storing them on a terminal or cloud device. Furthermore, real-time applications necessitate continuous database access and storage, resulting in large data volumes, significant time and space consumption. Summary of the Invention
[0004] In view of the above-mentioned deficiencies of the prior art, the purpose of the present invention is to provide a method for compressing and storing bridge and road positioning data, compressing and storing the bridge and road positioning data on a terminal or cloud platform, and performing rapid vehicle positioning based on the data.
[0005] To achieve the above objectives, the present invention provides a method for compressing and storing bridge and road positioning data, comprising:
[0006] The starting and ending points of the bridge or road section are obtained. The coordinate transformation is performed on the starting and ending points of the bridge or road section and the discrete positioning points between them, and the latitude and longitude coordinates of each positioning point are converted into coordinate values in the Cartesian plane coordinate system.
[0007] The bridge or road section is represented as a function of multiple continuous line segments. An optimization algorithm is used to solve the problem. Based on the constraint of the maximum cost function value, the optimal number of segments and the location of the segment points of the bridge or road section are obtained.
[0008] The segmented line segments are expanded into rectangles according to the road width. The coordinates of the four corner points of the rectangles are obtained. The coordinates of the segment points and the coordinates of the four corner points of the corresponding rectangles are restored to obtain the latitude and longitude coordinates of the segment points and the four corner points of the corresponding rectangles.
[0009] Store the latitude and longitude coordinates of the starting point, ending point, and segmentation point of the bridge or road section, as well as the latitude and longitude coordinates of the four corner points of the rectangle corresponding to each segmentation line segment.
[0010] Furthermore, the bridge or section road positioning data is obtained by periodically sampling the positioning data of vehicles traveling on the road.
[0011] Furthermore, the coordinates are converted as follows: the latitude and longitude coordinates of the positioning points between the starting point and the ending point are converted to a Cartesian plane coordinate system with the starting point as the origin, with the east longitude as the positive x-axis and the north latitude as the positive y-axis.
[0012] Furthermore, the coordinates are converted as follows: the latitude and longitude coordinates of the positioning points between the starting point and the ending point are converted to a Cartesian plane coordinate system with the starting point as the origin, the direction from the origin to the ending point is taken as the positive x-axis, and the direction perpendicular to the x-axis upwards is taken as the positive y-axis.
[0013] Furthermore, the piecewise function is expressed as a matrix equation:
[0014]
[0015] in, It is an indicator function, representing that when x n ≤b k The value is 0 when x n >b k The value is 1; y n This represents the y-axis coordinate of the nth positioning point, where n represents the number of positioning points in the bridge or road section excluding the starting point.
[0016] The matrix equation can be simply expressed as: Aβ=y.
[0017] Furthermore, the optimization algorithm is a differential evolution algorithm.
[0018] Furthermore, the cost function is the sum of squared residuals (SSR), and the number of segments is selected based on the maximum cost function value, using the following formula:
[0019]
[0020] Among them, y i Represents the actual observed values, This represents the fitted value.
[0021] Furthermore, the storage format of the rectangle is as follows: the latitude and longitude coordinates of the four corner points of each rectangle are used as a group of data and stored in rows; the latitude and longitude coordinates of the four corner points are uniformly arranged in clockwise or counterclockwise order.
[0022] The present invention also provides the following technical solutions:
[0023] A terminal device includes a processor and a memory. The memory stores a road positioning dataset, which includes coordinate information of the road's starting point, ending point, segment points, and the four corner points of a rectangle. The coordinate information of the road's starting point, ending point, segment points, and the four corner points of the rectangle is generated by the road positioning data compression and storage method described in any of the above technical solutions. The processor is used to retrieve the road positioning dataset using the current positioning point information as a query condition, obtain the road where the current positioning point is located, and provide the location information of the current positioning point on that road.
[0024] This invention achieves the following technical effects:
[0025] The road positioning data compression and storage method of the present invention can obtain the optimal number of segments and segment point positions for the positioning information of road segments with relatively uniform road widths, such as bridges and inter-section roads, through optimization algorithms. Bridges and inter-section roads are represented by a small number of continuous line segments and the coordinate information of the four corner points of the corresponding extended rectangles. This method can greatly compress road positioning data, significantly reduce the storage space occupied by vehicle terminal equipment, and greatly reduce the amount of data transmitted wirelessly for positioning data. It also facilitates subsequent rapid vehicle positioning and retrieval.
[0026] The road positioning data compression and storage method based on the present invention can greatly reduce the requirements for wireless transmission, hardware storage, positioning accuracy and other equipment, reduce the hardware cost of vehicle terminals and optimize operation. Attached Figure Description
[0027] Figure 1 This is a flowchart of a method for compressing location data for bridges or sections of roads;
[0028] Figure 2 This is a flowchart of the DE algorithm;
[0029] Figure 3 This is an example of bridge or section road location data;
[0030] Figure 4 This is a graph showing the relationship between SSR / N and the number of segmentation points;
[0031] Figure 5 This is a schematic diagram of the optimized segmented line segments and extended rectangles of the bridge or road section location data in Example 1.
[0032] Figure 6 Example 2: Location data for bridges or sections of roads;
[0033] Figure 7 This is the coordinate transformation of Example 2;
[0034] Figure 8 This is an example of an extended rectangle generated after optimization of the Xiamen Jimei Bridge. Detailed Implementation
[0035] To further illustrate the various embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, primarily used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention.
[0036] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0037] like Figure 1 As shown, this invention proposes a method for compressing and storing bridge and road positioning data, the specific implementation process of which includes the following steps:
[0038] 1. Location data acquisition
[0039] In this embodiment, the bridge is used as the positioning object. The main body of the bridge has characteristics such as a constant number of lanes and a consistent road width, making it suitable for compression of positioning data. The bridge deck of the main body can be simplified into multiple sequentially connected rectangular frames. When the vehicle's latitude and longitude information is obtained through the vehicle terminal, the vehicle's position on the bridge can be quickly obtained by retrieving the rectangular frame containing the latitude and longitude information and positioning based on the rectangular frame.
[0040] In this embodiment, the location data is collected by the vehicle-mounted terminal device itself.
[0041] (1) Terminal equipment
[0042] In this embodiment, the bridge's location information is obtained through a terminal device. In this application, any commercially available terminal device capable of obtaining current latitude and longitude information is acceptable. It only needs to ensure that the latitude and longitude stability of the bridge when passing the same location is within an acceptable range, for example, allowing a maximum deviation of about 10 meters.
[0043] (2) Data Acquisition
[0044] This invention requires prior data collection. The starting and ending points of the bridge are selected, and the vehicle is driven along the bridge, following a fixed lane (maintaining the same lane throughout the journey to minimize errors). Data collection is performed at the highest frequency allowed by the current terminal equipment. Discrete positioning data of the bridge or the road section is obtained in this way, using latitude and longitude coordinates.
[0045] By using publicly available bridge data, the number of lanes and the standard width of each lane can be obtained. The bridge width can then be estimated using the number of lanes, the standard width of each lane, and the separation width between lanes in both directions. For the main body of the bridge (from the start point to the end point), the bridge width can be set to a constant.
[0046] 2. Data Processing
[0047] (1) Coordinate transformation of positioning data
[0048] First, the obtained positioning data of the bridge or road section is calibrated, and the latitude and longitude coordinates of the positioning point are transformed into a Cartesian plane coordinate system with the starting point as the origin, with the east longitude as the positive x-axis and the north latitude as the positive y-axis.
[0049] By transforming coordinates, the coordinates of each location data point on the bridge relative to the origin can be calculated.
[0050] (2) Find the optimal number of segments and the position of the segmentation points.
[0051] The optimal number of segments and segmentation points for a bridge or road section are obtained by using the Differential Evolutionary Algorithm (DE algorithm) based on the maximum cost function constraint. For example... Figure 3 As shown, the optimal number of segments for the bridge or road section in the example is 3. The x-coordinates of the two optimal segmentation points are obtained by differential evolution algorithm, namely x1 and x2.
[0052] Differential Evolution Algorithm:
[0053] In this embodiment, a bridge or section of road can be represented as a series of continuous line segments, which can be expressed by a function as follows:
[0054]
[0055] Here, b1 is the first breakpoint, b2 is the second breakpoint, and so on.
[0056] Since the line segments are continuous and the end point of the previous segment is the starting point of the next segment, the equation can be used to represent the number of segments as follows:
[0057]
[0058] This can be further expressed using matrix equations, as follows:
[0059]
[0060] in, It is an indicator function, representing that when x n ≤b k The value is 0 when xn >b k The value is 1; y n This represents the y-axis coordinate of the nth positioning point, where n represents the number of positioning points in the bridge or road section excluding the starting point.
[0061] The matrix equation can be simply expressed as: Aβ=y.
[0062] Where A, β, and y correspond to the three matrix variables in the above matrix equation.
[0063] By solving for the β variable in the matrix equation, we can obtain:
[0064] β=(A T A) -1 A T y
[0065] If β is solved at this point, the residual equation can be expressed as:
[0066] e = Aβ - y
[0067] The sum of squared residuals (SSR) is then:
[0068] SSR = e T e
[0069] Or it can be expressed as:
[0070]
[0071] Among them, y i Represents the actual observed values, This represents the fitted value.
[0072] Finally, using SSR as the cost function, under the constraint of the maximum cost function value, the optimal number of segmentation points can be determined, and the optimal parameters of β can be obtained through some optimization algorithms.
[0073] The optimal solution for the piecewise function described above can be found using the DE algorithm (Differential Evolution Algorithm). The DE algorithm is a highly efficient global optimization algorithm; it is a population-based heuristic search algorithm.
[0074] The basic flowchart for solving DE is as follows: Figure 2 As shown.
[0075] The DE algorithm is used for simulation to find the position of each segment point that minimizes the cost function under the constraint of a given number of segment points.
[0076] like Figure 3As shown, the optimal breakpoint positions x1 and x2 are finally obtained through the DE algorithm, so that the cost function error is minimized when the data is divided into 3 segments.
[0077] The above values were obtained under the constraint of a given number of segmentation points. To further improve the efficiency of data segmentation, the results need to be further optimized.
[0078] At different segmentation points, the SSR (Segmentation Rate) decreases. To find the most suitable segmentation point, this invention uses the average SSR / N as a screening criterion, representing the average error generated by each point. When SSR / N < 3 meters, the corresponding number of the first segmentation points is the desired value. Here, 3 meters is a variable parameter representing the desired average error after segmentation. Figure 4 As shown, the requirement is met when the segmentation point is 2.
[0079] 3. Restore Cartesian coordinates and select points within the rectangle.
[0080] This invention requires rectangular expansion of the segmented line segments, based on the known bridge width and the lanes of the bridge or section of road, to ensure that the positioning points of vehicles traveling on the bridge fall entirely within the rectangle. For example... Figure 5 As shown, each line segment generates 4 coordinate points, with the coordinate width being the width of the bridge, such as 15 meters.
[0081] The obtained bridge segment points and corresponding rectangle point coordinates need to be restored, that is, the Cartesian coordinates are restored relative to the original point coordinates to obtain latitude and longitude coordinates.
[0082] Ultimately, through the above operations, this invention only needs to store partial point coordinates for each bridge. For example, if a bridge is divided into 3 sections, this invention only needs to store 16 latitude and longitude coordinates, and can determine the approximate position of the vehicle on the bridge using the latitude and longitude coordinate values of the terminal device.
[0083] The following shows the latitude and longitude coordinates of the four corner points of three rectangles. Each rectangle is a group of data, stored as text on separate lines. The latitude and longitude coordinates of the four corner points are arranged in counter-clockwise (or clockwise) order: 24.582152 118.111982 24.576011 118.121467 24.576692 118.121832 24.582833 118.112347 24.576043 118.121425 24.573233 118.12463 24.573851 118.12507824.576661 118.121873 24.573273 118.12459 24.561253 118.134727 24.56179 118.135254 24.573811 118.125117
[0087] Figure 8 An example of the rectangles generated after optimization of the Xiamen Jimei Bridge is given, with five rectangles representing the main bridge section of the Jimei Bridge.
[0088] 4. Further expansion of bridge data processing.
[0089] Not all data can be optimized by using east longitude as the positive x-axis and north latitude as the positive y-axis. Therefore, this invention further adjusts the directions of the x-axis and y-axis.
[0090] like Figure 6 As shown, this data cannot provide the optimal solution, and the coordinate direction needs to be redefined.
[0091] Still using the starting point as the origin, the direction from the origin to the ending point as the positive direction of the x' axis, and the vertical upward direction of the x' axis as the positive direction of the y' axis. Therefore, after obtaining a set of Cartesian coordinate data with east longitude as the positive direction of the x-axis and north latitude as the positive direction of the y-axis, we need to perform another coordinate transformation. In the plane coordinate system, any point P(x1,y1), after rotating by an angle θ around a coordinate point Q(x2,y2), the new coordinates are set as follows: (The formula for calculating (x,y) is as follows:)
[0092] x=(x1-x2)*cos(θ)-(y1-y2)*sin(θ)+x2;
[0093] y=(x1-x2)*sin(θ)+(y1-y2)*cos(θ)+y2;
[0094] Where θ represents the deflection angle. For example... Figure 7 As shown.
[0095] After finding the bridge segment points through coordinate transformation, the coordinates are reversed and restored to Cartesian coordinates with east longitude as the positive x-axis and north latitude as the positive y-axis. Finally, the final bridge longitude and latitude segment coordinates are obtained by converting the latitude and longitude to the actual coordinates.
[0096] The road positioning data compression and storage method of the present invention can obtain the optimal number of segments and segment point positions for the positioning information of road segments with relatively uniform road widths, such as bridges and inter-section roads, through optimization algorithms. Bridges and inter-section roads are represented by a small number of continuous line segments and the coordinate information of the four corner points of the corresponding extended rectangles. This can greatly compress road positioning data, significantly reduce the storage space occupied by vehicle terminal equipment, greatly reduce the amount of wireless transmission of positioning data, and facilitate subsequent rapid vehicle positioning retrieval.
[0097] Example 2
[0098] The compressed road positioning data in Example 1 can be used by in-vehicle terminal devices for positioning identification and display. The terminal device includes a processor and a memory. The memory stores a road positioning dataset containing a large amount of coordinate information for the starting points, ending points, segment points, and four corner points of rectangles along bridges and road sections. This coordinate information is generated using the road positioning data compression storage method described in Example 1. During vehicle positioning, the processor uses the current positioning point information as a query condition to retrieve the road positioning dataset, obtain the bridge or road section where the current positioning point is located, and provide the current positioning point's location information within that road. This information can be used for navigation, trajectory recording, and other purposes.
[0099] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.
Claims
1. A method for compressing and storing road positioning data, characterized in that, include: The starting and ending points of the bridge or road section are obtained. The coordinates of the starting and ending points and the discrete positioning points between them are transformed to convert the latitude and longitude coordinates of each positioning point into coordinate values in the Cartesian plane coordinate system. The bridge or road section is represented as a function of multiple continuous line segments. An optimization algorithm is used to solve the problem. Based on the constraint of the maximum cost function value, the optimal number of segments and the location of the segment points of the bridge or road section are obtained. The segmented line segments are expanded into rectangles according to the road width. The coordinates of the four corner points of the rectangles are obtained. The coordinates of the segment points and the coordinates of the four corner points of the corresponding rectangles are restored to obtain the latitude and longitude coordinates of the segment points and the four corner points of the corresponding rectangles. Store the latitude and longitude coordinates of the starting point, ending point, and segmentation point of the bridge or road section, as well as the latitude and longitude coordinates of the four corner points of the rectangle corresponding to each segmentation line segment.
2. The road positioning data compression and storage method as described in claim 1, characterized in that, The location data of the bridge or section of road is obtained by periodically sampling the location of vehicles traveling on the road.
3. The road positioning data compression and storage method as described in claim 1, characterized in that, The coordinate conversion is as follows: the latitude and longitude coordinates of the positioning points between the starting point and the ending point are converted to a Cartesian plane coordinate system with the starting point as the origin, with the east longitude as the positive x-axis and the north latitude as the positive y-axis.
4. The road positioning data compression and storage method as described in claim 1, characterized in that, The coordinate conversion is as follows: the latitude and longitude coordinates of the positioning points between the starting point and the ending point are converted to a Cartesian plane coordinate system with the starting point as the origin, the direction from the origin to the ending point is taken as the positive x-axis, and the direction perpendicular to the x-axis upwards is taken as the positive y-axis.
5. The road positioning data compression and storage method as described in claim 1, characterized in that, The function representation of the multiple continuous line segments is a matrix equation: in, It is an indicator function, indicating that when xn≤bk, the value is 0, and when xn>bk, the value is 1; yn represents the y-axis coordinate of each nth positioning point, and n represents the number of positioning points in the bridge or section of road, excluding the starting point; The matrix equation can be simply expressed as: Aβ=y.
6. The road positioning data compression and storage method as described in claim 5, characterized in that, The optimization algorithm is the differential evolution algorithm.
7. The road positioning data compression and storage method as described in claim 5, characterized in that, The cost function is the sum of squared residuals (SSR). The number of segments is selected based on the maximum cost function value, and the formula is as follows: Among them, y i Represents the actual observed values, This represents the fitted value.
8. The road positioning data compression and storage method as described in claim 1, characterized in that, The storage format of the rectangle is as follows: each rectangle is stored in rows with the latitude and longitude coordinates of its four corner points as a group of data; the latitude and longitude coordinates of the four corner points are uniformly arranged in clockwise or counterclockwise order.
9. A terminal device, comprising a processor and a memory, characterized in that, The memory stores a road positioning dataset, which includes coordinate information of the road start point, end point, segment point, and four corner points of a rectangle. The coordinate information of the road start point, end point, segment point, and four corner points of a rectangle is generated by the road positioning data compression and storage method as described in any one of claims 1-7. The processor is used to retrieve the road positioning dataset using the current positioning point information as a query condition, obtain the road where the current positioning point is located, and provide the location information of the current positioning point on that road.
Citation Information
Patent Citations
Monitoring system for vehicles with GPS
CN1592918A
Method for compressing and reconstructing data sampled from continuous functions
US20150142990A1