Map data processing method and vehicle

By introducing target accuracy coefficient and difference data calculation in map data processing, the problem of low map data compression efficiency is solved, and more efficient data compression and processing are achieved.

CN120632004APending Publication Date: 2025-09-12EACON TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510725000.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The existing general lossless compression technology has a low compression ratio when processing map data, resulting in low map data processing efficiency. In addition, the compression process consumes a lot of time, affecting real-time performance.

Method used

By obtaining an initial map data set, converting it into a target map data set using a target accuracy coefficient, adjusting abnormal map data, calculating difference data between adjacent map data, forming a difference data set, encoding, and generating an encoding result to determine the compression result of the initial map data.

Benefits of technology

It significantly improves the compression efficiency of map data, reduces data volume, and improves processing speed and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632004A_ABST
    Figure CN120632004A_ABST
Patent Text Reader

Abstract

The invention discloses a map data processing method and a vehicle. The method comprises the following steps: acquiring a to-be-processed initial map data set; according to a target precision coefficient, the initial map data set is converted into a target map data set, the target precision coefficient is used for representing the precision degree which the target map data needs to reach, and the data size of the target map data set is smaller than that of the initial map data set; based on abnormal map data in the target map data set, adjusting the target map data set, and obtaining difference data between adjacent map data in the adjusted target map data set to obtain a difference data set; encoding the difference data set to obtain an encoding result; and determining a compression result corresponding to the initial map data set based on the coding result. The technical problem that the processing efficiency of the map data is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of vehicle technology and data processing technology, and in particular to a map data processing method and a vehicle. Background Art

[0002] With the rapid development of Geographic Information Systems (GIS) and internet mapping services, the management and transmission of map data has become an increasingly severe challenge. Map data can contain a large amount of geometric and attribute information, such as road networks, building outlines, terrain elevations, image textures, and location attributes. The sheer size of map data not only consumes significant server storage space but also significantly increases the cost and latency of transmitting map data across networks.

[0003] To address the above-mentioned issues, the industry has widely adopted general lossless compression technologies, such as the original Zipping In Place (zip), the free software network compression (GNUzip, gzip), and the standard compression (Zstandard, Zstd), aiming to reduce the storage space and network transmission resource consumption of map data. However, although these general lossless compression technologies can maintain the integrity of map data in actual applications, due to the special properties of map data, such as redundant geometric information and complex attribute characteristics, general lossless compression technologies can often only achieve low compression ratios and fail to effectively relieve storage and bandwidth pressure. Because complex analysis of map data is required to find a suitable compression mode, the compression process of general lossless compression technologies consumes a lot of time when processing large-scale map data, reducing the speed and real-time performance of map data processing. Therefore, the technical problem of low map data processing efficiency still exists.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] Embodiments of the present invention provide a method and a vehicle for processing map data, so as to at least solve the technical problem of low efficiency in processing map data.

[0006] According to one aspect of an embodiment of the present invention, a method for processing map data is provided, comprising: obtaining an initial map dataset to be processed; converting the initial map dataset into a target map dataset according to a target accuracy coefficient, wherein the target accuracy coefficient is used to represent the degree of accuracy required for the target map data, and the data volume of the target map dataset is smaller than that of the initial map dataset; adjusting the target map dataset based on abnormal map data in the target map dataset, and obtaining difference data between adjacent map data in the adjusted target map dataset to obtain a difference dataset, wherein data compression performance corresponding to the adjusted target map dataset is higher than that corresponding to the target map dataset before adjustment; encoding the difference dataset to obtain an encoding result; and determining a compression result corresponding to the initial map dataset based on the encoding result.

[0007] According to one aspect of an embodiment of the present invention, another method for processing map data is provided, comprising: obtaining a compression result corresponding to an initial map dataset; decompressing the compression result to obtain encoded data; decoding the encoded data to obtain a difference dataset, wherein the difference dataset includes difference data between adjacent map data in an adjusted target map dataset, the data compression performance corresponding to the adjusted target map dataset is higher than the data compression performance corresponding to the target map dataset before adjustment, and the adjusted target map dataset is obtained by adjusting the target map dataset before adjustment based on abnormal map data in the target map dataset before adjustment; restoring the difference dataset to the target map dataset before adjustment, wherein the data volume of the target map dataset is smaller than the data volume of the initial map dataset; and converting the target map dataset according to a target accuracy coefficient to obtain a decompression result corresponding to the compression result, wherein there is a difference between the decompression result and the initial map dataset.

[0008] According to another aspect of an embodiment of the present invention, a map data processing device is provided, comprising: a first acquisition unit for acquiring an initial map data set to be processed; a first conversion unit for converting the initial map data set into a target map data set according to a target accuracy coefficient, wherein the target accuracy coefficient is used to represent the degree of accuracy required to be achieved by the target map data, and the data volume of the target map data set is smaller than the data volume of the initial map data set; an adjustment unit for adjusting the target map data set based on abnormal map data in the target map data set, and acquiring difference data between adjacent map data in the adjusted target map data set to obtain a difference data set, wherein the data compression performance corresponding to the adjusted target map data set is higher than the data compression performance corresponding to the target map data set before the adjustment; an encoding unit for encoding the difference data set to obtain an encoding result; and a determination unit for determining a compression result corresponding to the initial map data set based on the encoding result.

[0009] According to another aspect of an embodiment of the present invention, another map data processing device is provided, comprising: a second acquisition unit for acquiring a compression result corresponding to an initial map dataset; a decompression module for decompressing the compression result to obtain encoded data; a decoding unit for decoding the encoded data to obtain a difference dataset, wherein the difference dataset comprises difference data between adjacent map data in an adjusted target map dataset, the data compression performance corresponding to the adjusted target map dataset is higher than the data compression performance corresponding to the target map dataset before adjustment, and the adjusted target map dataset is obtained by adjusting the target map dataset before adjustment based on abnormal map data in the target map dataset before adjustment; a restoration unit for restoring the difference dataset to the target map dataset before adjustment, wherein the data volume of the target map dataset is smaller than the data volume of the initial map dataset; and a second conversion unit for converting the target map dataset according to a target accuracy coefficient to obtain a decompression result corresponding to the compression result, wherein there is a difference between the decompression result and the initial map dataset.

[0010] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing any one of the above methods.

[0011] According to another aspect of an embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above methods.

[0012] According to another aspect of an embodiment of the present invention, a vehicle is further provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above methods.

[0013] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, it can be used to perform any one of the above methods.

[0014] In an embodiment of the present invention, if map data compression is required, an initial map dataset to be processed can be obtained. Based on a target accuracy coefficient corresponding to the target map data's desired accuracy, the larger initial map dataset can be converted into a smaller target map dataset. Abnormal map data can be obtained from the target map dataset and used to adjust the target map dataset with low data compression performance, resulting in an adjusted target map dataset with high data compression performance. Difference data between adjacent map data in the adjusted target map dataset can be obtained to obtain a difference dataset. The difference dataset can be encoded to obtain an encoding result. Based on the encoding result, a compression result corresponding to the initial map dataset is determined. In this embodiment, the target accuracy coefficient is introduced to convert the initial map dataset into a more streamlined target map dataset, effectively reducing the data volume. The abnormal map data is used to optimize and adjust the target map dataset, and the differences between adjacent map data are calculated to form a difference dataset. This process significantly improves data compression performance. This method combines accuracy adjustment, data optimization, and encoding techniques, significantly improving map data compression efficiency compared to conventional lossless compression techniques. This method solves the technical problem of low map data processing efficiency and achieves the technical effect of improving map data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0016] Figure 1 is a flowchart of a method for processing map data according to an embodiment of the present invention;

[0017] Figure 2 is a flowchart of another method for processing map data according to an embodiment of the present invention;

[0018] Figure 3 is a schematic structural diagram of a map data processing device according to an embodiment of the present invention;

[0019] Figure 4 is a schematic structural diagram of another map data processing device according to an embodiment of the present invention;

[0020] Figure 5 FIG. 4 is a schematic diagram of an electronic device for a method for processing map data according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0023] According to an embodiment of the present invention, an embodiment of a method for processing map data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0024] Figure 1 is a flow chart of a method for processing map data according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0025] Step S102: obtaining an initial map data set to be processed.

[0026] In the technical solution provided in the above step S102 of the embodiment of the present invention, the initial map data set may refer to the geometric coordinate information in the map data, including but not limited to the exact positions of the points, lines, and surfaces of the geographical elements on the map, that is, the coordinate data included in the initial map data set may be multi-dimensional data, for example, points correspond to one-dimensional data, lines and surfaces correspond to two-dimensional data, etc. The above coordinate data (coordinate points) may be stored in the form of floating-point numbers to accurately describe the position of each geographical element on the map data. The coordinate data is stored in the form of floating-point numbers because floating-point numbers can provide high-precision coordinate representation. Floating-point numbers can handle digits after the decimal point, which is necessary for coordinate data in maps that need to be accurate to meters or even smaller units. For example, a point on a map may be represented as floating-point coordinates such as longitude 116.404212 and latitude 39.915123.

[0027] It should be noted that the coordinate data and corresponding data dimensions included in the above-mentioned initial map data set are only for illustration and are not specifically limited here. The map data to be compressed in the embodiment of the present invention may be multi-dimensional data.

[0028] In this embodiment, if map data compression is required, an initial map data set corresponding to the map data to be compressed may be obtained.

[0029] The initial map dataset can be obtained in a variety of ways. It can be read from an existing map database, extracted from scanned topographic maps, satellite imagery, or aerial survey data using GIS software, or generated from real-time sensor data, such as Global Positioning System (GPS) data from unmanned vehicles and drones. Regardless of the source of the initial map dataset, it is important to ensure the integrity and accuracy of the data in the initial map dataset.

[0030] It should be noted that the above-described method and process for obtaining an initial map dataset are merely illustrative and not intended to be limiting. The source of the compressed initial map dataset in the embodiments of the present invention can be tailored to the intended use, and can be used for applications such as autonomous vehicle navigation, geographic information system updates, and network transmission of map data. Different application scenarios have varying requirements for the accuracy and storage size of the initial map dataset, and these factors should be considered when obtaining the initial map dataset.

[0031] Step S104 : converting the initial map dataset into a target map dataset according to the target accuracy coefficient.

[0032] In the technical solution provided in step S104 of the embodiment of the present invention, the target accuracy coefficient can be used to indicate the accuracy level (accuracy requirement) required for the target map data. The data volume of the target map data set is smaller than that of the initial map data set.

[0033] Optionally, the target precision factor can be a scale used to adjust the accuracy level of map data. It can define the decimal places to which coordinate values ​​will be retained during the conversion of the initial map dataset to the target map dataset, or in other words, the number by which coordinate values ​​will be multiplied before being converted to integers. This directly determines the accuracy and compression effect of the final data. The target precision factor can also be called the precision factor parameter.

[0034] Alternatively, the target map dataset may be generated by quantizing and transforming the initial map dataset using a target precision coefficient. During the transformation, the coordinate data may be adjusted to a predetermined precision level and converted to integer form, thereby directly reducing the storage space required.

[0035] In this embodiment, after the initial map dataset to be processed is obtained, the initial map dataset may be converted into a target map dataset according to a target accuracy coefficient.

[0036] Optionally, converting the initial map dataset into the target map dataset according to the target accuracy coefficient is a key step in the map data compression process. The core of the above step is to reduce the size of the initial map dataset by quantizing the coordinate values ​​while maintaining the practical accuracy of the map data as much as possible.

[0037] Optionally, each coordinate value in the initial map dataset can be quantized according to a target precision coefficient. The basic idea of ​​quantization is to convert high-precision floating-point coordinates into integer form to reduce data storage requirements.

[0038] Optionally, when selecting a target accuracy coefficient, the actual requirements of the application scenario for map data accuracy can be considered. For example, for high-precision maps used by self-driving cars, accuracy to several decimal places can be maintained; while for wide-area topographic maps or travel guide maps, accuracy to the ten-meter or hundred-meter level can be maintained.

[0039] It should be noted that the selection process and size of the above-mentioned target accuracy coefficient are for illustrative purposes only and are not specifically limited here. As long as the target accuracy coefficient can be used to convert the initial map dataset into a target map dataset with a smaller data volume, it is within the scope of protection of the embodiments of the present invention. The selection of the target accuracy coefficient is directly related to the accuracy of the compressed map dataset. A lower target accuracy coefficient may result in a greater loss of accuracy, but it will also significantly reduce the amount of data and improve the compression rate. Although a higher target accuracy coefficient can better preserve data accuracy, the compression effect may be relatively weak.

[0040] For example, if the target precision factor is set to 10^5 (1 in 100,000), each floating-point coordinate will be multiplied by 10^5 and rounded to an integer. For example, (116.404212, 39.915123) will be converted to (11640421, 3991512). This conversion process is a quantization process based on the required accuracy. The target precision factor is a key parameter for selecting the accuracy of the compressed data; its size determines the accuracy of the quantized coordinate values. For example, if the target precision factor is set to 10^6, the original floating-point coordinate value will be multiplied by 10^6 and rounded to an integer.

[0041] Optionally, by using the target precision coefficient to convert the initial map data set into a quantization process of the target map data set, the floating-point coordinate values ​​can be converted into integer coordinate values, and the data representation length of each coordinate point is significantly reduced, thereby greatly reducing the volume of the entire data set, which is crucial for the storage and transmission of map data.

[0042] It should be noted that the target precision coefficient is not only applicable to the quantization of two-dimensional coordinate data, but also to three-dimensional coordinate data or higher-dimensional data sets. For example, for three-dimensional coordinates (x, y, z), the corresponding integer coordinate values ​​can be obtained by converting them according to the same target precision coefficient. In addition to geometric coordinates, map datasets may also contain other attribute data, such as altitude, feature type, timestamp, etc. Although the processing method of the above attribute data may be different from that of geometric coordinates, it is also possible to consider quantizing or converting the above attribute data according to its specific needs to adapt to subsequent difference calculations and encoding optimization.

[0043] Optionally, the converted target map dataset (i.e., the quantized coordinate values) is more suitable for difference calculation because the incremental value obtained after the difference calculation is smaller than the initial map dataset (original coordinate values), which is beneficial for subsequent encoding and compression, achieving a higher compression ratio.

[0044] In an embodiment of the present invention, by setting and applying a target precision coefficient, the coordinate data in the initial map dataset is quantized and converted to generate a target map dataset. The above process not only reduces the overall size of the initial map dataset, but also provides necessary preparations for subsequent steps such as difference calculation, encoding optimization and lossless compression, and is a key step in realizing efficient map data compression technology. Selecting an appropriate target precision coefficient is an important factor in balancing data accuracy and compression efficiency, and can be weighed and adjusted according to specific application scenarios. Due to the use of the target precision coefficient for quantization, the target map dataset significantly reduces the amount of data compared to the initial map dataset while retaining the necessary accuracy. The target map dataset is not limited to the compression of two-dimensional coordinate point data, but is also applicable to the compression of three-dimensional coordinate data, digital elevation model (DEM) data, point attribute data and data of other dimensions, demonstrating a strong adaptability to multi-type and multi-dimensional map data.

[0045] Step S106 : adjusting the target map dataset based on the abnormal map data in the target map dataset, and obtaining difference data between adjacent map data in the adjusted target map dataset to obtain a difference dataset.

[0046] In the technical solution provided in the above step S106 of the embodiment of the present invention, the data compression performance corresponding to the adjusted target map dataset is higher than the data compression performance corresponding to the target map dataset before the adjustment.

[0047] Alternatively, abnormal map data may refer to data points in the target map dataset that are discontinuous or duplicate with surrounding data points, such as jump coordinates or duplicate coordinates. Jump coordinates refer to coordinate values ​​that have a large jump from the previous coordinate value, which may be due to errors in the data collection process or map characteristics (e.g., a sudden turn in the road). Duplicate coordinates may refer to the same coordinate value that appears in the dataset, which may be due to data redundancy or repeated representation of specific geographic entities (e.g., building boundaries on the map).

[0048] Alternatively, adjacent map data can refer to geographical feature data points that are consecutively or logically adjacent within the target map dataset. For example, it can refer to coordinate points arranged sequentially along a path. During map data compression, processing adjacent map data is crucial for improving the compression ratio. By performing interpolation calculations on adjacent data points, data redundancy can be significantly reduced, as the resulting increments are smaller than the original coordinate values, particularly in areas with densely populated data points or where data changes are gradual.

[0049] Optionally, the difference data refers to the incremental data (incremental value) obtained by calculating the difference between adjacent map data in the target map dataset. The difference data may refer to a geometric difference, that is, the difference between adjacent coordinate points. Taking the two-dimensional coordinate (x, y) as an example, assuming that the adjacent coordinate points in the target map dataset are (x1, y1) and (x2, y2), the calculated difference data (incremental value) is (x2-x1, y2-y1). The above process can be applied to coordinate data of other dimensions, and even in the case of attribute data, the attribute values ​​can be calculated for difference. The difference calculation can encode the relationship between data points as an incremental value, which is much smaller than the original coordinate value, thereby reducing the complexity of data representation and providing favorable conditions for subsequent encoding compression.

[0050] Alternatively, a difference dataset may refer to a set of difference data between adjacent map data in the target map dataset after difference calculation. For example, assuming that several consecutive coordinate points in the target map dataset are (100, 200), (101, 201), and (102, 202), after difference calculation, the difference dataset may be (100, 200), (1, 1), and (1, 1). The above difference dataset shows that, except for the first data point, the subsequent incremental values ​​are very small, which makes it possible to adopt a more compact encoding method.

[0051] In this embodiment, after the initial map dataset is converted into a target map dataset according to the target accuracy coefficient, the target map dataset can be adjusted based on the abnormal map data in the target map dataset. Furthermore, the difference data between adjacent map data in the adjusted target map dataset can be obtained to obtain a difference dataset.

[0052] Alternatively, the target map dataset may contain abnormal map data due to errors during data collection, terrain peculiarities, or data redundancy. If left unaddressed, this abnormal map data can lead to inefficiencies in the encoding and compression process, and even affect the accuracy of the decompressed map data. Therefore, to improve map data compression efficiency, the abnormal map data can be extracted from the target map data.

[0053] For example, jump coordinates are sudden large jumps between coordinate values, which may be due to misreading during data collection or sudden changes in terrain. For the above situations, filtering or smoothing algorithms can be used to make the jump coordinates closer to the values ​​of the coordinate points before and after them, thereby reducing the impact of outliers when calculating the difference, and completing the adjustment of the target map dataset based on the jump coordinates. For repeated coordinates, data deduplication can be used to retain only one repeated coordinate instance, and a special mark is used to indicate the number of repetitions to complete the adjustment of the target map dataset based on the repeated coordinates. Through the above operations, the amount of data can be significantly reduced and the compression efficiency can be improved.

[0054] It should be noted that the above process and method for adjusting abnormal map data are only examples and are not specifically limited here. Any method that can improve the compression efficiency of map data by processing abnormal map data is within the scope of protection of the embodiments of the present invention.

[0055] Optionally, after adjusting the target map dataset using the abnormal map data, a difference calculation can be performed on the adjusted target map dataset to obtain the difference data between adjacent map data, thereby generating a difference dataset. The above method aims to reduce data redundancy by encoding changes in geometric data rather than original coordinate values.

[0056] For example, for two-dimensional coordinate data points (x1, y1) and (x2, y2), the geometric difference (Δx, Δy) between them is calculated, that is, (Δx = x2 - x1, Δy = y2 - y1). The above calculation can be extended to three-dimensional coordinate points or more complex multidimensional data, such as (x1, y1, z1) and (x2, y2, z2), in which case the calculated difference data is (Δx, Δy, Δz).

[0057] Optionally, by calculating the difference between adjacent map data points, a difference dataset consisting of incremental values ​​can be obtained. For example, for a series of coordinate points, the difference dataset consists of the incremental values ​​between each coordinate point and the previous coordinate point. The difference dataset is smaller than the original coordinate dataset because the incremental values ​​are often much smaller than the original coordinate values, especially in areas where the geographic data changes slowly. The generation of the difference dataset greatly facilitates subsequent encoding and compression. The distribution of incremental values ​​is more concentrated, and compared to the original coordinate values, the difference dataset is easier to further compress using efficient encoding technologies such as variable-length encoding, because incremental values ​​in the decimal range can be represented by fewer bits, thereby further reducing the amount of data.

[0058] In an embodiment of the present invention, through the above method, after the target map dataset undergoes abnormal data adjustment and difference calculation, the generated difference dataset not only has a significantly reduced size, thereby achieving a higher level of data compression, but also ensures the integrity and accuracy of the map data.

[0059] Step S108: Encode the difference data set to obtain an encoding result.

[0060] In the technical solution provided in step S108 of the embodiment of the present invention, the encoding result can be the result obtained by performing a variable-length encoding (Variable-Length Encoding) method on the difference data set, so as to further reduce the storage requirements and transmission bandwidth of the data. Variable-length encoding is a coding technology based on variable length of data values, and can allocate coding bits of different lengths according to the size of the data value. The above encoding method is particularly suitable for processing difference data sets with a large number of decimal values, because decimals can be represented using fewer bits, while larger values ​​use more bits. This is very consistent with the characteristics of the difference data set, because after the difference calculation, the changes between adjacent data points are small, which is suitable for being represented by a shorter code.

[0061] In this embodiment, after obtaining the difference data between adjacent map data in the adjusted target map data set to obtain the difference data set, the difference data set may be encoded to obtain an encoding result.

[0062] Optionally, the generated difference data set is encoded to further reduce the size of the data set. In the embodiment of the present invention, variable length coding technology is adopted.

[0063] Optionally, due to its characteristics, the incremental values ​​in the difference data set are suitable for data representation using variable-length coding. Specifically, for an incremental value Δ, the encoding process can be as follows: map the signed incremental value to an unsigned integer. This is because the encoding of unsigned integers is simpler and more efficient than that of signed integers. For example, for negative incremental values, they can be converted into positive numbers before encoding. Determine the minimum number of encoding bits required for the incremental value Δ. This depends on the maximum absolute value of Δ, that is, determine a sufficiently large encoding window so that each value within this encoding window can be uniquely represented. Use variable-length coding to encode each incremental value Δ into a bit string. The smaller the value, the shorter its encoding bit string. For example, a small incremental value may only require 1 to 3 bits, while a large incremental value may require more bits to represent.

[0064] In this embodiment of the present invention, variable-length coding is used to efficiently encode the difference dataset. Based on the statistical properties of the data, high-frequency small increments are represented with fewer bits, while larger values ​​are represented with an appropriate number of bits. This significantly reduces the size of the difference dataset while ensuring data integrity.

[0065] Step S110: Determine the compression result corresponding to the initial map dataset based on the encoding result.

[0066] In the technical solution provided in the above step S110 of the embodiment of the present invention, after encoding the difference dataset to obtain the encoding result, the compression result corresponding to the initial map dataset can be determined based on the encoding result.

[0067] Optionally, the encoding result of the difference dataset and other related auxiliary information can be encapsulated in a structured container, such as a binary file or a data packet in a specific format, to obtain a compressed result. The compression result is generated to facilitate transmission and storage, ensuring that necessary data is kept together and not lost.

[0068] The embodiment of the present invention is described in detail below in conjunction with the above steps.

[0069] As an optional embodiment, step S104, converting the initial map dataset into a target map dataset according to the target accuracy coefficient, includes: converting the initial map dataset from an initial data type to a target data type according to the target accuracy coefficient to obtain a target map dataset, wherein there is a compression ratio between the initial map dataset of the initial data type and the target map dataset of the target data type, and the compression ratio is negatively correlated with the target accuracy coefficient.

[0070] In this embodiment, a compression ratio is defined between an initial map dataset of an initial data type and a target map dataset of a target data type. The initial data type may be a floating point type. The target data type may be an integer type. The compression ratio is negatively correlated with the target precision coefficient. Specifically, a larger target precision coefficient results in a smaller compression ratio, and a smaller target precision coefficient results in a larger compression ratio.

[0071] Optionally, this embodiment converts the initial map data set from an initial data type (such as floating point type) to a target data type (such as integer type) by setting a target precision coefficient. The above conversion process is the basis of the map data compression method of the embodiment of the present invention, and directly affects the subsequent encoding and compression efficiency.

[0072] Optionally, the map dataset stores raw coordinate information and attribute data in floating-point data format. Floating-point data can accurately represent values ​​after the decimal point, which is essential for high-precision representation of geographic data. In this embodiment of the present invention, the target data type is an integer. Integer data does not contain a decimal portion and therefore occupies fewer bits when stored. Converting from floating-point to integer data facilitates data compression.

[0073] Optionally, the target precision coefficient is used to control the degree of data precision loss during the conversion process. It determines the degree of quantization of the data point during the conversion process, that is, how the floating-point value of the data point is converted into an integer value. Each floating-point coordinate value is multiplied by the target precision coefficient to amplify the decimal part of the coordinate value so that a certain degree of precision can be retained when the floating-point value is converted into an integer value. The amplified floating-point value is rounded and converted to an integer value. This step realizes the conversion from floating-point to integer, but also introduces quantization error. After completing the above steps, the data type in the target map dataset is changed from floating-point to integer, laying the foundation for further data processing and compression.

[0074] In an embodiment of the present invention, integer values ​​are easier to encode and compress than floating-point values, especially when using differential coding and variable-length coding techniques. The converted target map data set can achieve a higher compression ratio in subsequent processing. The selection of the target precision coefficient provides flexibility for data compression, allowing the compression strategy to be adjusted according to different application requirements (such as the accuracy requirements of map data, storage or transmission resource limitations). Although there may be a certain degree of precision loss during the data compression process, by retaining the target precision coefficient, the integer value can be converted back to a floating-point value according to the target precision coefficient when the data is decompressed, thereby restoring the original data within the specified precision range.

[0075] As an optional embodiment, the initial data type includes a floating-point type, the target data type includes an integer type, and the initial map dataset is converted from the initial data type to the target data type according to a target precision coefficient to obtain a target map dataset, including: adjusting the floating-point geometric data in the initial map dataset according to the target precision coefficient to obtain an integer target map dataset, wherein the geometric data is used to represent the geometric features of geographic objects.

[0076] In this embodiment, the geometric data can be used to represent geometric features of geographic objects, and can be geometric coordinates. Optionally, this embodiment describes converting floating-point initial map data into integer target map data sets to support subsequent data compression and storage.

[0077] Optionally, map data may contain a large number of floating-point geometric coordinates (such as latitude and longitude, elevation, etc.), which take up a large amount of space when stored and transmitted over the network. By converting to integers, fewer storage bits can be used to represent the data, thereby reducing the amount of data. For each floating-point coordinate value in the initial map data set, multiply it by the set precision coefficient to achieve the conversion from floating-point numbers to integers. The above conversion operation can map the coordinate value to an integer range while retaining sufficient precision. After multiplying the above floating-point number by the target precision coefficient, the result is rounded to obtain an integer target map data set. Rounding is to map the result to the nearest integer, which is a basic requirement for integer data.

[0078] Optionally, the converted integer data can still represent the geometric features of the geographic object, although these features may be slightly altered due to the selected precision factor. This means that the converted data can be used for map display and spatial analysis, but may differ from the original data in detail. During the conversion process, due to the conversion from floating-point to integer, some precision is lost. The converted data takes up less storage space because integer data is more compact than floating-point data.

[0079] As an optional embodiment, converting the initial map dataset into the target map dataset according to the target accuracy coefficient includes: adjusting the target accuracy coefficient in response to an adjustment instruction for the target accuracy coefficient; and converting the initial map dataset into the target map dataset according to the adjusted target accuracy coefficient.

[0080] This embodiment describes a process of dynamically adjusting the target accuracy coefficient of data conversion according to the real-time accuracy requirements of the user or system in map data compression, thereby achieving a balance between data quality and data quantity.

[0081] Optionally, in some application scenarios, users may have different accuracy requirements for map data. For example, when conducting preliminary map browsing, lower accuracy is sufficient, while when conducting detailed geological exploration or high-precision navigation, higher accuracy is required. When processing large amounts of data, you may encounter memory or bandwidth limitations. At this time, you need to lower the accuracy coefficient to reduce the amount of data, thereby reducing the system load. Once an adjustment instruction for the target accuracy coefficient is received, the system responds immediately and begins to adjust the accuracy coefficient currently in use. The adjustment can be to increase the accuracy coefficient (increase accuracy, but increase the amount of data) or to reduce the accuracy coefficient (reduce accuracy, but reduce the amount of data). After the target accuracy coefficient is adjusted, the initial map data set is reconverted, that is, the floating-point coordinate values ​​are converted to integer values ​​based on the new accuracy coefficient.

[0082] In this embodiment, by dynamically adjusting and responding to changes in the target accuracy coefficient, map data compression technology demonstrates its high flexibility, enabling it to operate effectively in a variety of environments. Adjusting the target accuracy coefficient not only allows compression technology to better adapt to actual needs but also optimizes data transmission and storage efficiency. Users can independently determine the target accuracy coefficient based on current task requirements, thereby finding the right balance between data accuracy and compressed data volume.

[0083] As an optional embodiment, the target map dataset includes an initial coordinate sequence, and the initial coordinate sequence includes jump coordinates and / or repeated coordinates. Step S106 adjusts the target map dataset based on abnormal map data in the target map dataset, including: identifying jump coordinates and / or repeated coordinates from the initial coordinate sequence in the target map dataset; and adjusting the initial coordinate sequence based on the jump coordinates and / or repeated coordinates to obtain a target coordinate sequence.

[0084] This embodiment focuses on processing abnormal map data in the target map dataset. This abnormal map data primarily includes skipped coordinates and duplicate coordinates. The goal is to optimize the initial coordinate sequence by identifying and appropriately processing abnormal map data (abnormal coordinates), thereby generating a more compact and efficient target coordinate sequence. The initial coordinate sequence can be a raw coordinate sequence.

[0085] Optionally, it is important to identify whether there are jump coordinates and duplicate coordinates in the initial coordinate sequence of the target map dataset. For example, the difference between consecutive coordinate values ​​is used to determine whether there are jump coordinates. If the difference exceeds a preset threshold, it is determined to be a jump coordinate. The coordinate values ​​are sorted, and then duplicate coordinates are identified by comparing adjacent coordinates. It should be noted that the above process and method for determining jump coordinates and duplicate coordinates are only illustrative and are not specifically limited here. After identifying abnormal map data, the abnormal map data can be adjusted to optimize the initial coordinate sequence and obtain the target coordinate sequence.

[0086] For example, a smoothing algorithm can be used for jump coordinates, such as the averaging method or the median method, to make the jump coordinates closer to the previous and next coordinate points, reduce numerical jumps, and avoid the occurrence of excessive incremental values ​​in the difference calculation, which is beneficial to subsequent encoding compression. Duplicate coordinates can be processed by a deduplication algorithm, retaining only one instance, and recording the number of repeated occurrences. The above method can greatly reduce the amount of data and improve compression efficiency. It should be noted that the above process and method for processing jump coordinates and duplicate coordinates are only for illustration, and no specific restrictions are made here. As long as the above process and method can be used to process the above abnormal map data to reduce the data volume of the initial coordinate sequence, they are within the scope of protection of the embodiments of the present invention and will not be explained one by one here.

[0087] Optionally, after the above processing, a target coordinate sequence is obtained. This target coordinate sequence is more suitable as input for subsequent encoding and compression. The characteristics of this target coordinate sequence are: it reduces the impact of jump coordinates, making the differences between adjacent coordinates more continuous and smooth, which is conducive to efficient differential encoding. It also removes duplicate coordinates, reduces unnecessary data redundancy, further reduces the size of the dataset, and improves the overall compression ratio.

[0088] In embodiments of the present invention, by reducing jump coordinates and deleting duplicate coordinates, a more compact coordinate sequence can be obtained, providing favorable conditions for subsequent encoding and compression, thereby improving overall compression efficiency. Processing abnormal coordinates helps reduce noise and redundancy in the data, improving the overall quality of the dataset and ensuring that the map data, after compression, still meets the requirements of high-precision applications. Optimizing the coordinate sequence can reduce uncertainty during the decoding process and avoid decoding errors caused by jump coordinates or duplicate coordinates.

[0089] As an optional embodiment, the initial coordinate sequence is adjusted based on the jump coordinates to obtain a target coordinate sequence, including: determining, in the initial coordinate sequence, coordinate change information between a first coordinate sequence located before the jump coordinates and a second coordinate sequence located after the jump coordinates, wherein the coordinate change information is used to represent a change trend of multiple coordinates in the first coordinate sequence and multiple coordinates in the second coordinate sequence; generating an interpolation coordinate sequence based on the coordinate change information, wherein the interpolation coordinate sequence includes multiple interpolation coordinates to be interpolated; and inserting the interpolation coordinate sequence into the position corresponding to the jump coordinates in the initial coordinate sequence to obtain a target coordinate sequence.

[0090] In this embodiment, the first coordinate sequence may be a coordinate sequence before the jump coordinate (jump point). The second coordinate sequence may be a coordinate sequence after the jump point. The coordinate change information may be used to indicate a change trend between the first coordinate sequence and the second coordinate sequence, i.e., a coordinate trend before and after the jump point.

[0091] Optionally, this embodiment describes adjusting an initial coordinate sequence containing jump coordinates to generate a smoother and more continuous target coordinate sequence. Jump coordinates may be caused by sudden changes in the data acquisition process, equipment failure, or noise. Jump coordinates may significantly deviate from the normal trend, thereby affecting data integrity and subsequent compression.

[0092] Optionally, by analyzing the numerical differences between coordinate points in the initial coordinate sequence, points with significant numerical jumps relative to surrounding points can be identified. Jump coordinates may appear as having a much larger-than-normal numerical difference from the previous or next coordinate point. Before and after the jump coordinate, two coordinate sequences are determined, namely a first coordinate sequence and a second coordinate sequence. By determining the change trends of the coordinate points in these two coordinate sequences, coordinate change information between the two coordinate sequences is obtained. This coordinate change information reflects how the coordinates evolve in the time series before and after the jump point. Linear regression, polynomial fitting, or other statistical models can be used to estimate and express this change trend.

[0093] Optionally, based on the coordinate change information, an interpolated coordinate sequence is generated to fill in the gaps caused by the jump coordinates. The generation of the interpolated coordinate sequence depends on the change trend of the previous and subsequent coordinate sequences. The algorithms used include, but are not limited to, linear interpolation and cubic spline interpolation. The goal is to make the newly generated coordinate sequence as smooth as possible, eliminating the effects of the original jump coordinates.

[0094] Optionally, the number of interpolated coordinates to insert depends on the jump amplitude and the desired degree of smoothness. The coordinate values ​​of each interpolated coordinate point are calculated based on the terminal coordinate values ​​of the first and second coordinate sequences, as well as the change trend between the two coordinate sequences. The resulting interpolated coordinate sequence is inserted into the position corresponding to the jump coordinate in the initial coordinate sequence, replacing the jump coordinate and any potentially affected coordinate points before and after it, thereby constructing the target coordinate sequence.

[0095] In this embodiment of the present invention, the interpolated coordinates can more accurately reflect the changing trends of the actual coordinates, avoiding the impact of jump coordinates on compression technologies such as differential coding and variable-length coding, thereby improving coding accuracy and compression ratios. The generation of interpolated coordinate sequences based on the actual coordinate changing trends helps maintain the authenticity and consistency of the data sequence, avoids the loss of important information, and ensures that the decompressed map data meets application requirements. Processing jump coordinates enhances data stability, compensating for abnormal jumps through interpolation, and making the entire coordinate sequence smoother, which facilitates the accuracy of subsequent data processing and analysis.

[0096] As an optional embodiment, in the initial coordinate sequence, determining coordinate change information between a first coordinate sequence located before the jump coordinate and a second coordinate sequence located after the jump coordinate includes: determining a first average direction vector of the first coordinate sequence in the initial coordinate sequence, and determining a second average direction vector of the second coordinate sequence in the initial coordinate sequence, wherein the first average direction vector is used to represent an average change direction between adjacent coordinates in the first coordinate sequence, and the second average direction vector is used to represent an average change direction between adjacent coordinates in the second coordinate sequence; determining an angle between the first average direction vector and the second average direction vector; and in response to the angle being less than a first angle threshold, The coordinate change information is determined to be the first coordinate change information, wherein the first coordinate change information is used to indicate that the change trend is a trend of changing in a straight line mode; in response to the angle being greater than or equal to the first angle threshold and less than or equal to the second angle threshold, the coordinate change information is determined to be the second coordinate change information, wherein the second coordinate change information is used to indicate that the change trend is a trend of changing in a gentle bend mode; in response to the angle being greater than the second angle threshold and the curvature corresponding to the jump coordinate in the initial coordinate sequence being greater than the curvature threshold, the coordinate change information is determined to be the third coordinate change information, wherein the third coordinate change information is used to indicate that the change trend is a trend of changing in a sharp turn mode.

[0097] In this embodiment, the first angle threshold can be preset to 15°. The second angle threshold can be preset to 45°. The first coordinate change information can be used to indicate that the change trend is changing in a straight line pattern. The second coordinate change information can be used to indicate that the change trend is changing in a roundabout pattern. The third coordinate change information can be used to indicate that the change trend is changing in a sharp turn pattern. The values ​​of the first angle threshold and the second angle threshold described above are for illustrative purposes only and are not specifically limited herein.

[0098] Optionally, this embodiment describes a method for fine-tuning coordinates by analyzing the changing trends of coordinate sequences when processing jumps in a map dataset. This method categorizes the changing trends of coordinate sequences into three modes: straight line mode, gentle curve mode, and sharp turn mode. Interpolated coordinates are generated based on these modes to smooth out unusual jumps and optimize data compression.

[0099] Optionally, a first average direction vector and a second average direction vector are calculated for the coordinate sequences before and after the coordinate jump. The average direction vector is obtained by averaging the direction vectors between adjacent coordinate points in the sequence and can reflect the general direction and trend of the coordinate sequence. The directional change before and after the coordinate jump is assessed by calculating the angle between the first and second average direction vectors. The size of this angle reflects the consistency or difference in the directions of the two coordinate sequences.

[0100] Optionally, if the angle is less than the preset first angle threshold, it means that the change trend of the coordinate sequence before and after the jump coordinate is relatively consistent, and it can be considered to be developing along a straight line. At this time, the generated interpolation coordinate sequence will be created based on the linear interpolation algorithm to fill the data gap caused by the jump coordinate, and the generated coordinate points will be distributed along the straight line trend. If the angle is greater than or equal to the first angle threshold, and less than or equal to the second angle threshold, it indicates that the change trend is a relatively gentle bending shape. At this time, the interpolation algorithm in the gentle bend mode, such as polynomial fitting or spline interpolation, is used, and the generated coordinate points will follow this gentle bend trend. When the angle is greater than the second angle threshold and the curvature corresponding to the jump coordinate is greater than the curvature threshold, it means that the change trend is extremely drastic, forming a sharp turn. In the above case, a more complex algorithm, such as Bezier curve interpolation, will be used to generate the interpolation coordinate sequence to capture the characteristics of the sharp turn.

[0101] In an embodiment of the present invention, a map dataset containing jump coordinates is intelligently adjusted to generate a smoother and more continuous target coordinate sequence. This method not only effectively handles data anomalies, but also uses appropriate interpolation algorithms based on the characteristics of different change trends, thereby ensuring data quality and improving the efficiency of subsequent data compression. Subdividing the coordinate change trend into three modes: straight lines, gentle bends, and sharp turns, can more accurately match the actual situation and provide a more customized processing solution. Based on the analysis results of the change trend, different interpolation algorithms are intelligently selected to better restore the natural changes of the coordinate sequence. In particular, for the sharp turn mode, the use of advanced interpolation algorithms can capture details more finely.

[0102] As an optional embodiment, an initial coordinate sequence is used to form a target trajectory, and an interpolation coordinate sequence is generated based on coordinate change information, including: in response to the coordinate change information being first coordinate change information, determining a front-end speed and a rear-end speed of the jump coordinate, wherein the front-end speed is used to represent the change speed of adjacent coordinates in a first trajectory located before the jump coordinate in the target trajectory, and the rear-end speed is used to represent the change speed of adjacent coordinates in a second trajectory located after the jump coordinate in the target trajectory; determining speed change information based on the front-end speed and the rear-end speed, wherein the speed change information is used to represent the speed change trend of the coordinates in the first trajectory and the coordinates in the second trajectory; weighting the interpolation factors in the interpolation factor sequence according to the speed change information, wherein the distance between two adjacent interpolation factors in the interpolation factor sequence is the same, and the number of interpolation factors is associated with the number of interpolation coordinates in the interpolation coordinate sequence to be generated; generating an interpolation coordinate sequence based on the end coordinate of the first trajectory, the weighted interpolation factors, and a unit direction vector, wherein the unit direction vector is used to represent the unit direction from the end coordinate of the first trajectory to the start coordinate of the second trajectory.

[0103] In this embodiment, the initial coordinate sequence can form a target trajectory. The front-end speed can be used to represent the change speed of adjacent coordinates in the first trajectory located before the jump coordinate in the target trajectory. The rear-end speed can be used to represent the change speed of adjacent coordinates in the second trajectory located after the jump coordinate in the target trajectory. The speed change information can be used to represent the speed change trend of the coordinates in the first trajectory and the coordinates in the second trajectory. The distance between two adjacent interpolation factors in the interpolation factor sequence is the same, and the number of interpolation factors is associated with the number of interpolation coordinates in the interpolation coordinate sequence to be generated. The interpolation factor sequence can generate an equally spaced interpolation factor sequence between 0 and 1 according to the number of points to be inserted. The unit direction vector can be used to represent the unit direction of the end coordinate of the first trajectory pointing to the starting coordinate of the second trajectory.

[0104] Optionally, this embodiment describes the generation of interpolated coordinate sequences and proposes a dynamic weighted interpolation strategy based on velocity change information and direction vectors. This strategy not only considers the coordinate change trend but also incorporates the dynamic factor of velocity change, thereby more accurately reproducing the natural flow and dynamic characteristics of the target trajectory.

[0105] Optionally, the front and rear velocities of the jump coordinates are analyzed to capture the basic characteristics of the speed change in the target trajectory. The front and rear velocities are calculated by the distance and time interval between adjacent coordinates in the two trajectories before and after the jump coordinates, respectively, reflecting the speed of the trajectory in a specific area. Based on the front and rear velocities, the speed change information is determined, which reflects the speed change trend between the first trajectory (before the jump coordinates) and the second trajectory (after the jump coordinates). By comparing the speeds, it can be inferred whether the speed at the jump coordinates changes suddenly, as well as the degree and direction of this change.

[0106] Optionally, after determining the speed change trend, an interpolation factor sequence is generated. This sequence consists of equally spaced interpolation factors, and the number of interpolation factors matches the number of interpolation coordinates in the interpolation coordinate sequence to be generated. The interpolation factor ranges from 0 to 1, where 0 represents the end coordinate of the first trajectory and 1 represents the starting coordinate of the second trajectory. The interpolation factors in the interpolation factor sequence are weighted according to the speed change information. The purpose of weighting is to reflect the impact of speed changes on coordinate generation, ensuring that the generated interpolation coordinate sequence is denser in areas with large speed changes and sparser in areas with small speed changes, so as to better adapt to the actual dynamic characteristics of the trajectory.

[0107] Optionally, interpolation calculations are performed based on a weighted interpolation factor sequence and a unit direction vector of the coordinates of the end point of the first track and the starting point of the second track. The unit direction vector indicates the direction of the coordinate change, while the weighted interpolation factor guides the location and density of the interpolation points.

[0108] For example, the coordinates of the interpolation point can be calculated by adding the coordinates of the previous end point to the product of the unit direction vector, the weighted interpolation factor, and the total distance.

[0109] In this embodiment of the present invention, dynamic adjustment of the interpolation factor based on speed change information allows for flexible response to varying speed variations, ensuring more interpolated coordinates are generated in areas with significant speed variations, while appropriately reducing the number of interpolation points in areas with more stable speeds. This improves compression while maintaining trajectory continuity and fluidity. This method exhibits excellent adaptability, automatically adjusting the interpolation strategy based on different application scenarios and data characteristics, effectively handling both high-speed unmanned vehicle trajectories and slowly changing geographic features.

[0110] As an optional embodiment, the initial coordinate sequence is used to form a target trajectory, and an interpolation coordinate sequence is generated based on the coordinate change information, including: in response to the coordinate change information being the second coordinate change information, determining the end coordinates of a first trajectory located before the jump coordinates in the target trajectory and the starting coordinates of a second trajectory located after the jump coordinates in the target trajectory, and determining the first intermediate coordinates and the second intermediate coordinates based on the direction vector of the first trajectory and the direction vector of the second trajectory; determining the end coordinates of the first trajectory, the starting coordinates of the second trajectory, the first intermediate coordinates, and the second intermediate coordinates as control points of the Bezier curve respectively; generating an interpolation coordinate sequence based on the interpolation factors in the interpolation factor sequence and the Bezier curve, wherein the distance between two adjacent interpolation factors in the interpolation factor sequence is the same, and the number of interpolation factors is associated with the number of interpolation coordinates in the interpolation coordinate sequence.

[0111] In this embodiment, a Bezier curve interpolation algorithm is used to generate a smooth interpolated coordinate sequence, which is particularly suitable for processing the trend of gentle curve patterns indicated by coordinate change information. Bezier curves are suitable for map data processing because they can create continuous and smooth transition paths, especially when dealing with sudden changes or gentle curves.

[0112] Optionally, in gentle bend mode, the direction vectors of the first and second trajectories have a large angle, meaning the two trajectories do not extend in a simple straight line, but instead change direction in a curved manner. To generate an interpolated coordinate sequence that conforms to the gentle bend trend, two intermediate coordinate points are determined to assist in constructing a Bezier curve: the first intermediate coordinate and the second intermediate coordinate.

[0113] Optionally, the first intermediate coordinate is a coordinate point calculated based on the direction vector of the first trajectory, between the end coordinates of the first trajectory and the starting coordinates of the second trajectory. This point is selected so that the Bezier curve can smoothly continue from the end of the first trajectory at the beginning, maintaining a certain degree of continuity. The second intermediate coordinate is calculated based on the direction vector of the second trajectory. This point is intended to ensure that the Bezier curve can smoothly transition to the beginning of the second trajectory at the end, ensuring that the end of the curve is consistent with the beginning of the second trajectory.

[0114] Optionally, once the first intermediate coordinate and the second intermediate coordinate are determined, the four control points required to form the Bezier curve are added to the end coordinate of the first trajectory and the starting coordinate of the second trajectory. The above control points are used to guide the shape of the Bezier curve, ensuring that the generated interpolation coordinate sequence can smoothly connect the two trajectories while reflecting the changing trend of the gentle bending mode. The interpolation factor sequence is a sequence arranged at equal intervals between 0 and 1, which is used to determine a series of interpolation coordinate points on the Bezier curve. Each interpolation factor in the sequence represents the relative position of a series of points from the end coordinate of the first trajectory to the starting coordinate of the second trajectory. The number of interpolation factors is directly related to the number of coordinate points in the interpolation coordinate sequence expected to be generated, ensuring that the coordinate points generated at the jump coordinate position are dense enough to capture the details of the gentle bending trend.

[0115] Alternatively, a Bezier curve interpolation algorithm can be used to generate an interpolation coordinate sequence based on the four control points and interpolation factor sequence determined above. The mathematical description of a Bezier curve relies on Bezier polynomials, and the coordinates of any point on the curve can be calculated using these control points and interpolation factors.

[0116] In an embodiment of the present invention, the smooth and fluent characteristics of the Bezier curve can provide a natural transition from a straight line to a gentle bend mode at the jump coordinate position, avoiding the angle mutation that may be caused by the use of linear interpolation, and improving the overall smoothness of the target trajectory. By accurately calculating the control points of the Bezier curve, it is ensured that the generated interpolation coordinate sequence can accurately reflect the speed and direction changes in the gentle bend mode, thereby improving the accuracy of data processing. The generated interpolation coordinate sequence will reflect more continuous and regular changes during encoding, which helps to improve the efficiency of subsequent encoding and compression processes. In particular, when processing map data, it can significantly reduce the additional encoding costs caused by data mutations, thereby improving the overall compression ratio.

[0117] As an optional embodiment, an initial coordinate sequence is used to form a target trajectory, and an interpolation coordinate sequence is generated based on the coordinate change information, including: in response to the coordinate change information being the third coordinate change information, a circumscribed rectangle is constructed based on the first target coordinate located before the jump coordinate and the second target coordinate located after the jump coordinate in the initial coordinate sequence; the diagonal midpoint of the circumscribed rectangle is determined as the center of the target arc to be constructed, and the starting angle of the target arc to be constructed is determined based on the vector from the first target coordinate to the center, and the ending angle of the target arc to be constructed is determined based on the vector from the second target coordinate to the center; the target arc is constructed based on the center, the starting angle and the ending angle; and an interpolation coordinate sequence is generated based on the interpolation factors in the interpolation factor sequence and the constructed target arc, wherein the distance between two adjacent interpolation factors in the interpolation factor sequence is the same, and the number of interpolation factors is associated with the number of interpolation coordinates in the interpolation coordinate sequence.

[0118] This embodiment addresses situations where the map dataset contains coordinate jumps during sharp turns, i.e., coordinate change information is third-order coordinate change information. To smooth these jumps, a circular interpolation strategy is employed. By determining a bounding rectangle, the target arc's center point, and the starting and ending angles, a circular path is constructed that accurately reflects the rapid turn.

[0119] Optionally, the purpose of constructing the circumscribed rectangle is to find the minimum rectangle that can accommodate the two target coordinate points before and after the jump coordinate, so as to determine a suitable center position and thus construct the arc. Find the jump coordinate in the initial coordinate sequence. Get a coordinate point before the jump coordinate as the first target coordinate, and a coordinate point after the jump coordinate as the second target coordinate. With the first target coordinate and the second target coordinate as the diagonal points, construct a minimum circumscribed rectangle that includes these two points. The boundary of this rectangle is parallel to the coordinate axis, ensuring that the spatial position relationship between the two target coordinate points can be intuitively reflected.

[0120] Optionally, the midpoint of the diagonal of the circumscribed rectangle becomes the center of the target arc. This is because the midpoint is the position that best represents the internal spatial distribution of the rectangle in geometry, and it is also the basic point for constructing the arc. Based on the vector from the first target coordinate to the center of the circle, the angle between this vector and the horizontal axis (for example, the X-axis) is calculated as the starting angle of the target arc; similarly, based on the vector from the second target coordinate to the center of the circle, the end angle is calculated. The calculation of these two angles uses the inverse tangent function to return an angle between -π and π, ensuring the correctness of the angle.

[0121] Optionally, once the center, starting angle, and ending angle are known, a target arc can be constructed. The radius of the target arc is determined by the distance from the first or second target coordinate to the center of the circle, while the starting and ending points of the arc are the intersections of the line connecting the center of the circle with the first or second target coordinate, respectively. This way, the target arc can precisely connect the two target coordinate points and follow the changing trend of the sharp turn pattern.

[0122] Optionally, the interpolation factor sequence consists of a series of equally spaced values ​​in the range of 0 to 1, which are used to evenly distribute the interpolation coordinate points on the target arc. The number of interpolation factors is directly related to the number of coordinate points in the interpolation coordinate sequence to be generated, thereby ensuring that the generated coordinate sequence can fully reflect the arc path. The parameters of the target arc are determined based on the center point, the starting angle, and the ending angle. Using each factor in the interpolation factor sequence, an angle interpolation is performed between the starting angle and the ending angle to obtain each interpolation angle. Each interpolation angle is mapped to the arc, and the corresponding interpolation coordinate point is generated using the polar coordinate to Cartesian coordinate conversion formula using the center point coordinates, radius, and angle.

[0123] In an embodiment of the present invention, by constructing an arc, a sharp turn path can be accurately simulated visually and physically, avoiding the abrupt turns that may occur with linear interpolation. The target arc is constructed based on the diagonal midpoints of the circumscribed rectangle, as well as the first and second target coordinate points, ensuring the consistency of the interpolated path with the actual sharp turn path. The smooth interpolation coordinate sequence can reduce abnormal data points in subsequent processing, thereby improving compression efficiency and the accuracy of decompressed data during differential encoding and data compression.

[0124] As an optional embodiment, the interpolated coordinate sequence is inserted into the position corresponding to the jump coordinate in the initial coordinate sequence to obtain a target coordinate sequence, including: in response to the number of interpolated coordinates in the interpolated coordinate sequence being greater than or equal to a quantity threshold, smoothing the interpolated coordinate sequence; inserting the smoothed interpolated coordinate sequence into the position corresponding to the jump coordinate in the initial coordinate sequence to obtain a target coordinate sequence.

[0125] In this embodiment, it is described how to restore the jump coordinates in the compression process by inserting an interpolated coordinate sequence while maintaining data consistency, so as to achieve the purpose of compressing data and maintaining the integrity of map information.

[0126] Optionally, during the compression process of map data, certain algorithms (such as differential coding, etc.) can be used to reduce the amount of data, which may involve retaining key coordinate points and omitting non-key points or points with small continuous changes, that is, generating jump coordinates. The above-mentioned omitted coordinate point information can be approximately restored by a subsequent interpolation algorithm to achieve a balance between data compression and information recovery. The quantity threshold is a pre-set value used to determine whether the number of interpolated coordinates in the interpolated coordinate sequence has reached the standard required for smoothing. The setting of the quantity threshold depends on the specific application requirements, such as the accuracy requirements of the map, the data compression ratio, and the final map usage scenario. When the number of interpolated coordinates in the interpolated coordinate sequence exceeds or equals the quantity threshold, it will automatically respond and smooth the entire interpolated coordinate sequence.

[0127] Smoothing is optionally performed to reduce irregularities or outliers in the interpolated coordinate sequence, preventing abrupt coordinate changes during data recovery that could lead to errors in map display or data interpretation. Smoothing can be performed using a variety of algorithms, such as moving average, exponentially weighted moving average, and spline interpolation. These algorithms adjust the position of each interpolated coordinate point based on the distribution of surrounding coordinate points, bringing it closer to the actual trend of change.

[0128] Optionally, the smoothed interpolated coordinate sequence is inserted into the initial coordinate sequence, specifically at the locations corresponding to the skip coordinates (i.e., coordinate points omitted during the compression process). This compensates for the information omitted during the data compression process and restores the coherence of the map data. By inserting the smoothed interpolated coordinates, the target coordinate sequence can more accurately represent the continuous changes in geographic objects, such as terrain and routes, thereby ensuring the integrity and accuracy of the map data while maintaining the compression effect.

[0129] In an embodiment of the present invention, by setting a quantity threshold and applying smoothing, a balance can be found between accuracy requirements and data compression efficiency. When the quantity threshold is low, smoothing is performed more frequently, and the recovery accuracy is higher, but the data volume reduction effect may not be so significant; conversely, when the quantity threshold is high, the data volume reduction effect is more obvious, but the recovery accuracy may decrease. The adaptability of map data compression technology is enhanced, enabling it to flexibly respond to scenarios with different accuracy requirements and data volume limitations, such as limited network transmission bandwidth, limited device storage space, etc. As an optional embodiment, based on repeated coordinates, the initial coordinate sequence is adjusted to obtain a target coordinate sequence, including: performing run-length encoding on repeated coordinates in the initial coordinate sequence to obtain a target coordinate sequence.

[0130] In this embodiment, during the process of adjusting the initial coordinate sequence based on the repeated coordinates, run-length encoding (RLE) may be performed on the repeated coordinates in the initial coordinate sequence to obtain a target coordinate sequence.

[0131] Alternatively, in the context of map data processing, if there are duplicate coordinates in the initial coordinate sequence, applying RLE can significantly reduce data storage requirements and also simplify the data transmission process.

[0132] Optionally, the entire initial coordinate sequence is traversed to identify consecutively repeated coordinate points. Repeated coordinate points refer to coordinate data that appear consecutively in the sequence and have the same position. For each detected repeated coordinate sequence, the number of consecutive occurrences of the coordinate point is recorded. The consecutively repeated coordinate points are replaced with a single coordinate point and a count value indicating the number of repetitions. For example, if five identical coordinate points (x_1, y_1) appear consecutively, then in the target coordinate sequence, these five points will be replaced by (x_1, y_1, 5), where the third value "5" indicates that the coordinate point is repeated four times plus itself once.

[0133] Optionally, after completing the above encoding process, the encoded coordinate points and their repeat count values ​​are sequentially combined to form a target coordinate sequence. It is worth noting that even if there are no repeated coordinate points, they should be retained in the target coordinate sequence as is, but without the repeat count value.

[0134] Optionally, RLE significantly reduces the size of the data by eliminating the actual storage of repeated elements. This is particularly important for applications with limited storage space or network bandwidth. Encoded data can be restored to its original form through a simple reverse operation, eliminating the need for complex algorithms and reducing the time cost of the decoding process.

[0135] Alternatively, in map data, some geographic features may remain constant over time, such as roads temporarily closed for maintenance or large, undeveloped areas with identical coordinates in satellite imagery. RLE can effectively compress this type of data, reducing unnecessary redundant storage. However, if the data sequence rarely contains consecutively repeated elements, RLE's compression effect will be limited and may even increase the data size due to the addition of count values ​​during the encoding process.

[0136] Optionally, the target coordinate sequence encoded by RLE can be further compressed using other compression algorithms, such as difference coding or Huffman coding, to achieve a higher compression ratio. When the compressed data needs to be restored or processed, interpolation or other data interpolation techniques can be used to refine the coordinate sequence for repeated coordinate points represented in the encoding, making the map data smoother or meeting specific application requirements.

[0137] In this embodiment of the present invention, data redundancy caused by duplicate coordinates is effectively eliminated, saving storage space and transmission bandwidth. RLE encoding and decoding operations are simple and fast, eliminating the need for complex calculations and reducing processing time. Although encoding compression is performed, RLE is a lossless compression technology, so decoding fully restores the original data without compromising data integrity.

[0138] As an optional embodiment, obtaining difference data between adjacent map data in the adjusted target map dataset includes: normalizing the coordinates in the adjusted target map dataset; obtaining difference data between adjacent map data in the normalized target map dataset; or performing high-order differential encoding on the adjacent map data in the adjusted target map dataset to obtain the difference data.

[0139] In this embodiment, a method for obtaining difference data between adjacent map data in map data compression is described. The method is implemented through coordinate normalization processing or high-order differential coding, aiming to further improve data compression efficiency and reduce data volume.

[0140] Optionally, the purpose of normalization is to unify the coordinate values ​​in the map data into a standard scale range, which facilitates subsequent difference data calculation and data compression. Determine a suitable normalization range, which may be based on the global coordinate range of the map dataset or the coordinate range of a specific area. Each coordinate value in the adjusted target map dataset is calculated according to the normalization range and converted into a value within a specified scale (such as between 0 and 1). The above process involves dividing by the maximum coordinate value or the maximum value of the coordinate range. The normalized coordinate values ​​are more suitable as the basis for subsequent calculation of difference data, because the normalized coordinate values ​​can more accurately reflect the relative changes between coordinates at the same scale.

[0141] Optionally, the difference calculation is performed on adjacent map data (i.e., coordinate values) in the normalized target map dataset to obtain the difference between each coordinate and the previous coordinate. This process can be regarded as a form of incremental encoding, which greatly reduces the number of absolute coordinate values ​​that need to be stored and transmitted. In addition to simple first-order differences (i.e., the difference between adjacent coordinates), high-order differential encoding takes into account higher-order changes between adjacent coordinates, such as second-order differences (differences of differences). Through high-order differential encoding, the system not only calculates the differences between adjacent coordinates, but also further calculates the changes between these differences to obtain a higher-order differential sequence. This step can capture more subtle changes in the data and is suitable for situations where there are complex change patterns within the data set.

[0142] In the embodiments of the present invention, whether obtaining difference data based on normalized coordinates or high-order differential coding, the goal is to reduce the amount of data that needs to be stored and transmitted, because difference data occupies less storage space than the original coordinate values. Through differential coding methods, data compression efficiency can be optimized. Normalized coordinate values ​​and difference data obtained through high-order differential coding are more suitable as inputs to compression algorithms because they can contain smaller values ​​and may exhibit stronger regularity, which facilitates the efficient execution of compression algorithms.

[0143] In practical applications, the choice between normalization and high-order differential encoding can be based on a comprehensive consideration of the specific characteristics of the data (such as rate of change and data distribution) and application requirements (such as accuracy requirements and computing resource constraints). For data that changes steadily or has a clear linear trend, simple normalization and first-order differential encoding may be sufficient. When the data changes more complexly, contains nonlinear trends or high-frequency fluctuations, high-order differential encoding may be more effective, although this increases computational complexity.

[0144] As an optional embodiment, step S106, obtaining difference data between adjacent map data in the adjusted target map dataset, includes: an obtaining step, in the target map dataset, in response to the map data in the target map dataset being non-first map data, obtaining incremental data of the map data relative to the previous map data in the target map dataset that is adjacent to the map data, and determining the incremental data as difference data in the difference dataset, the difference data being smaller than the map data, and the difference data being smaller than the previous map data; and a determining step, in response to the target map dataset including the next map data adjacent to the map data, determining the next map data as the map data, and returning to executing the obtaining step until the target map dataset no longer includes the next map data adjacent to the map data.

[0145] In this embodiment, the incremental data may be an incremental value, a signed integer may be a signed difference value, or an unsigned integer may be an unsigned difference value.

[0146] Optionally, the key to the acquisition step is to calculate and use the incremental value (i.e., difference) between adjacent map data to replace the original data points to reduce the size of the data. Make sure that the map data currently being processed is not the first data point in the dataset. Because there is no previous data point as a reference, the first data point cannot be incrementally calculated and can only be stored in its entirety. For non-first map data points, calculate the difference (incremental value) between it and the previous data point. This can be the numerical difference between the data point and the previous data point in various dimensions (such as X, Y, Z coordinates, or other attributes). For example, for sequentially arranged coordinate points (x_i, y_i) and (x_{i-1}, y_{i-1}), the incremental value can be expressed as (x_i-x_{i-1}, y_i-y_{i-1}). The incremental data is smaller than the value of the original data point because the incremental data reflects the amount of change rather than the absolute value. The calculated incremental value is stored as an element in the difference dataset.

[0147] Optionally, the determining step is a loop process that ensures that all non-first data points in the data set are taken into account, with the goal of completely converting the entire data set into an incremental data representation. Check whether there is a next data point adjacent to the current data point in the target map data set. If there is a next data point adjacent to the current data point, treat the current data point as the previous data point, treat the next data point as the current data point, and then repeat the obtaining step. The above process can continue until the end of the data set, that is, when there is no next data point in the data set, the loop stops. This means that every non-first data point in the data set will be converted into an incremental value relative to the previous point and stored in the difference data set.

[0148] It's important to note that delta values ​​can be signed or unsigned integers. This depends on the nature of the data and the encoding requirements: Signed delta values ​​are suitable for situations where positive or negative changes need to be represented. For example, if one coordinate point moves 10 units east and another moves 10 units west, signed integers can represent them as +10 and -10, respectively. Unsigned delta values ​​are suitable for situations where changes are always positive or when negative numbers are not considered in the encoding. Using unsigned integers avoids wasting bits to represent negative signs in storage and processing, further optimizing storage efficiency.

[0149] In embodiments of the present invention, after applying incremental encoding technology, data points in the target map dataset are converted to their changes relative to the previous point, significantly reducing the dataset size. This approach is particularly effective for map data where the changes between data points are continuous and relatively small (for example, coordinate points in a vehicle's travel path). The stored or transmitted difference dataset is not only smaller than the original dataset but also easily restored to the original dataset during decoding, achieving efficient data compression and decompression, which is particularly beneficial for the real-time transmission and processing of map data.

[0150] As an optional embodiment, step S108 encodes the difference data set to obtain an encoding result, including: mapping the difference data set from a signed integer to an unsigned integer; and performing variable-length encoding on the unsigned integer difference data set according to a protocol buffer format (Protocol) to obtain an encoding result.

[0151] In this embodiment, the calculated incremental data (difference data set) is further encoded for more efficient storage and transmission. The protocol buffer format may be a Protocol Buffers (ProtocolBuffers, referred to as Protobuf) format.

[0152] Optionally, signed integers include both positive and negative numbers, while unsigned integers only represent non-negative numbers. Converting the difference data from a signed integer to an unsigned integer can more efficiently utilize the bits of the digital encoding, thereby saving space during storage and transmission, because unsigned integers require fewer bits to represent non-negative numbers of the same size. Assuming that each element in the difference data set is a signed integer, since when calculating the increment, a negative number means that the next value is smaller than the previous one, and a positive number means that the next value is larger than the previous one.

[0153] For example, conversion to an unsigned integer can be accomplished in several ways: offset conversion, which adds a fixed offset to each signed increment value to map the negative range to the positive range; and absolute value conversion, which takes the absolute value of each signed difference data and adds a bit to indicate the sign of the original value.

[0154] Optionally, after conversion to an unsigned integer, even larger signed integer data may occupy fewer bits after offset processing, which prepares the conditions for the subsequent variable-length encoding.

[0155] Alternatively, Protobuf provides a variable-length encoding (VLE) that is an efficient way to encode non-negative integers. This represents an integer as a series of bytes, where each byte contains not only the numeric value but also uses the highest bit to indicate whether there are subsequent bytes. This approach is particularly efficient for representing decimals, as they require only a few bytes. Large numbers, while requiring more bytes, are generally more space-efficient than fixed-length encoding.

[0156] Optionally, during the encoding process, the unsigned integer delta data can be converted to its binary representation. The binary number is divided into a series of 7-bit byte segments, with the highest bit (8th bit) of each byte used to indicate whether more bytes follow. If the byte segment is the last 7 bits of the number, the highest bit is set to 0; otherwise, it is set to 1. These bytes are concatenated in ascending order to form a variable-length code.

[0157] In this embodiment of the present invention, the signed integer difference data is mapped to an unsigned integer and then subjected to Protobuf variable-length encoding. This process significantly reduces the storage and transmission requirements of map data, and is particularly efficient when processing large amounts of continuously changing numerical data. This encoding method not only reduces the data bit requirements but also further reduces storage space through variable-length encoding, while maintaining the simplicity of data decoding and ensuring high speed and accuracy during compression and decompression.

[0158] As an optional embodiment, step S110 determines the compression result corresponding to the initial map dataset based on the encoding result, including: obtaining attribute data from the initial map dataset, wherein the attribute data is used to represent the attributes of the scene to which the geometric data in the initial map dataset belongs, and the geometric data is used to represent the geometric features of the geographic object; serializing the attribute data and the encoding result to obtain a serialization result; and losslessly compressing the duplicate data in the serialization result to obtain a compression result.

[0159] In this embodiment, it is described how to further compress and serialize the entire data set in combination with the attribute data after completing the difference encoding of the geometric data to form the final compression result.

[0160] Optionally, the attribute data includes scene information about geographic objects in the initial map dataset, such as road type, building usage, terrain features, etc.

[0161] Optionally, attribute information associated with each geometric data point is identified by traversing or parsing the initial map dataset. This attribute information is collected to form an attribute data set, which can be represented in a text format, such as a lightweight data exchange format (JavaScript Object Notation, abbreviated as JSON). Correct extraction and organization of attribute data is crucial for subsequent serialization and compression processes, as it affects the data structure and whether it can be effectively compressed.

[0162] Serialization, optionally, refers to the process of converting a data structure or object state into a format that can be stored or transmitted. For compressed map data, serialization converts the encoded geometry and attribute data into a unified, easily transmittable binary stream. You can choose JSON, Protobuf, or another serialization format. The encoded geometry and attribute data are converted according to the rules of the chosen serialization format to form a serialized binary data stream. In Protobuf, this involves defining the data structure and field types, and using the Protobuf compiler to generate the corresponding serialization and deserialization code.

[0163] Optionally, the serialized result is a binary string containing the encoded geometry and corresponding attribute information, organized in the selected format. Repeating patterns are found and eliminated in the serialized data to further reduce the data size. Lossless compression ensures that after decompression, the data can be completely restored to its original state without any loss of information.

[0164] Optionally, analyze the serialized data stream to identify recurring patterns. These patterns might be repeated strings or numbers in attribute data, or repeated sequences in geometry data. Compress the data stream using a lossless compression algorithm, such as gzip or Zstandard. The resulting lossless compressed binary data is smaller than the serialized data, but can be decompressed to restore the information.

[0165] Figure 2 is a flow chart of a method for processing map data according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:

[0166] Step S202: Obtain the compression result corresponding to the initial map dataset.

[0167] Step S204: decompress the compressed result to obtain encoded data.

[0168] In this embodiment, the step of decompressing the compression result to obtain the encoded data is the reverse process of the compressed data processing, and its main purpose is to restore the data structure before compression to facilitate further analysis and use.

[0169] Optionally, the original serialized data, i.e., the encoded data, is restored from the lossless compression result. Lossless compression algorithms do not lose any information during compression, so the data should be accurately restored after decompression. According to the compression algorithm used (such as gzip), select the corresponding decompression library or tool for decompression. The compression algorithm will provide a corresponding decompression mechanism. The compression result is input into the decompression function, which will identify the compression pattern and repeated encoding in the compressed data, and replace the compressed result back to the original serialized data. The result of decompression is a serialized binary data stream, i.e., the encoded data, which contains geometric data processed by incremental encoding, unsigned conversion, and variable-length encoding, as well as the attribute data associated with it.

[0170] Step S206: decode the encoded data to obtain a difference data set.

[0171] In this embodiment, the data that has been previously encoded and compressed is restored to its original or nearly original state.

[0172] Optionally, select a decoding algorithm based on the encoding type used during the previous encoding, such as variable-length encoding, converting signed integers to unsigned integers, etc. For Protobuf, the decoding process is automatic, handling internal unsigned integers and variable-length encoding. Read the data from the encoded data stream and restore the difference data set through the decoding algorithm. For example, use a variable-length decoding algorithm to recover the original incremental values ​​from the binary stream. The result of the decoding is a difference data set related to the original map data set, which contains the incremental information of each data point, rather than the direct coordinate value or attribute data.

[0173] Step S208 : restoring the difference data set to the target map data set before adjustment, wherein the data volume of the target map data set is smaller than the data volume of the initial map data set.

[0174] In this embodiment, after decoding and decompression, the primary geometric information of the original data is recovered from the difference dataset and combined with any attribute information to form a pre-adjusted target map dataset. This dataset is optimized in terms of data size and is smaller than the original (initial) dataset, while retaining the same amount of information, thus meeting the basic goal of data compression.

[0175] Optionally, an initial value is set, which is the coordinate of the first point in the original map dataset. This point has not undergone any differential processing, so it can be used directly. For each subsequent data point, the incremental value in the difference dataset is accumulated with the coordinate value of the previous data point, and the original coordinates of each data point are gradually restored. For example, if the coordinates of the previous point are (x[i-1], y[i-1]) and the increment of the current point is (dx, dy), then the coordinates of the current point (x[i], y[i]) can be calculated by the following formula: x[i] = x[i-1] + dx, y[i] = y[i-1] + dy. In addition to restoring geometric information, attribute information of data points such as speed, direction, elevation, etc. can also be restored. These attribute information are stored in the serialization stage, and after decompression and deserialization, they can be recombined with the geometric information to form complete data point information.

[0176] In step S210 , the target map dataset is converted according to the target accuracy coefficient to obtain a decompression result corresponding to the compression result, wherein there is a difference between the decompression result and the initial map dataset.

[0177] In this embodiment, the compressed and decompressed dataset (ie, the target map dataset) is converted back to a state close to the initial map dataset. However, due to the influence of the precision coefficient, there may be some differences between the decompression result and the initial map dataset.

[0178] Optionally, during the compression process, in order to reduce the amount of data, the floating-point coordinates in the initial map dataset are converted to integer coordinates and rounded based on the precision coefficient. After decompression, the reverse operation is performed and the integer coordinates are converted back to floating-point coordinates based on the target precision coefficient. Since the coordinates were rounded using the precision coefficient during the compression process, there will be a certain loss of precision in the decompressed coordinates. This means that even if the decompression and restoration processes are completely reversed, there will still be a slight difference between the decompressed result and the initial map dataset. After completing the reverse conversion, the decompressed result is a dataset adjusted according to the precision coefficient, which contains the approximate coordinates of the map data points. The decompressed result can be compared with the original initial map dataset to assess the degree of precision loss.

[0179] In the technical solution provided in steps S202 to S210 of the embodiment of the present invention, a compression result corresponding to the initial map dataset is obtained; the compression result is decompressed to obtain encoded data; the encoded data is decoded to obtain a difference dataset; the difference dataset is restored to the target map dataset before adjustment; and the target map dataset is converted according to the target accuracy coefficient to obtain a decompression result corresponding to the compression result. This solves the technical problem of low map data processing efficiency and achieves the technical effect of improving map data processing efficiency.

[0180] The above technical solution is described in detail below.

[0181] An embodiment of the present invention proposes a method for encoding and compressing map data. This method can set the precision of geometric data based on a specific precision scale. Geometric data is encoded using incremental encoding and variable-length encoding. The serialized map data is then recompressed using a general lossless compression technique to further reduce the data volume. Compared to general lossless compression algorithms, when converting coordinates to integers, integers of varying sizes are obtained based on the set precision. The lower the precision requirement, the smaller the resulting integer value. Further calculation of the difference can further reduce the value. After variable-length encoding, smaller values ​​occupy less space. Further compression using a general lossless compression method can further reduce the data volume. Because the data processing rules in the pre-lossless compression steps are simple, computational efficiency is high, and the amount of data generated is small, recompression using a lossless compression algorithm can be even faster. Therefore, this technology offers faster compression speeds compared to general lossless compression techniques. This solves the technical problem of low map data processing efficiency and achieves the technical effect of improving map data processing efficiency.

[0182] The following is a further introduction to this method.

[0183] In this embodiment, floating-point coordinates can be converted to integer coordinates. Map data coordinates and other attribute information are generally recorded in floating-point format. The floating-point coordinate values ​​are first multiplied by a set precision factor, rounding the floating-point coordinates to integers. This method does not perform any other conversions on the data. The size of the precision factor determines the accuracy retained in the data. The larger the coefficient, the higher the precision, but the lower the compression ratio. The smaller the coefficient, the lower the precision, but the higher the compression ratio. This precision factor parameter can be adjusted during use to meet different accuracy requirements.

[0184] In this embodiment, incremental differences can be calculated. For each dimension of each coordinate, except the first, the difference is calculated with the value of the corresponding dimension of the previous adjacent coordinate. This difference calculation yields an incremental value, which is generally smaller than the original value. Smaller values ​​are more conducive to subsequent compression. This method can support multi-dimensional data.

[0185] For example, for one-dimensional data, the difference before and after calculation can be as follows: before the difference calculation is x[1]; x[2]; ...; x[n]; after the difference calculation is x[1], x[2]-x[1], ..., x[n]-x[n-1]. The above method can be used to compress dem elevation data. For two-dimensional data, the difference before and after calculation can be as follows: before the difference calculation is x[1]y[1]; x[2]y[2]; ...; x[n]y[n]; after the difference calculation is x[1], y[1], x[2]-x[1], y[2]-y[1], ..., x[n]-x[n-1], y[n]-y[n-1]. The above method can be used to compress general two-dimensional data. For 3D data, the difference calculation can be as follows: before the difference calculation, it is x[1]y[1]z[1]; x[2]y[2]z[2]; ...; x[n]y[n]z[n]; after the difference calculation, it is x[1],y[1],z[1],x[2]-x[1],y[2]-y[1],z[2]-z[1],..,x[n]-x[n-1],y[n]-y[n-1],z[n]-z[n-1]. The above method can be used for compression of general 3D data.

[0186] As an optional example, for m-dimensional data, the difference before and after calculation can be as follows: before the difference calculation is

[0187] d[1][1]d[1][2]d[1][3]...d[1][m]; d[2][1]d[2][2]d[2][3]...d[2][m];...;d[n] [1]d[n][2]d[n][3]...d[n][m]; after difference calculation, d[1][1], d[1][2], d[1][3],..., d[1][m], d[2 ][1]-d[1][1],d[2][2]-d[1][2],d[2][3]-d[1][3],...,d[2][m]-d[1][m],...,d[n ][1]-d[n-1][1],d[n][2]-d[n-1][2],d[n][3]-d[n-1][3],...,d[n][m]-d[n-1][m]. The above method can be used for scenarios where a coordinate point has multiple additional attributes (such as speed, direction, etc.).

[0188] Optionally, when calculating the incremental difference, some special situations may be encountered, which can be handled specially. For example, the coordinate jump problem, when there is a sudden jump in the coordinates in the map data (such as the map data splicing or abnormal data), the directly calculated incremental difference may be too large, which is not conducive to compression. At this time, the anomaly detection algorithm can be used to identify the jump point, and then interpolation processing is performed based on the coordinate trend before and after the jump point to generate reasonable intermediate coordinates, and then the incremental difference is recalculated to make the difference smoother and facilitate subsequent compression. For the problem of repeated coordinates, for repeated coordinates that appear continuously, deduplication operations can be performed before calculating the incremental difference, and the number of repeated coordinates can be recorded. The run-length encoding (RLE) is used to encode the number of repeated coordinates during compression encoding to further improve compression efficiency.

[0189] Optionally, to make the incremental values ​​smaller and more conducive to subsequent compression, the following optimization methods can be used: Coordinate normalization. This involves normalizing the original coordinates before calculating the incremental difference, mapping the coordinate values ​​to a smaller range (e.g., [0, 1]). This is then multiplied by a precision coefficient for integer conversion and incremental calculation. This can reduce the magnitude of the coordinate values, thereby reducing the incremental values ​​accordingly. Differential coding optimization involves using higher-order differential coding, such as second-order differentials (calculating the difference between adjacent incremental values), in addition to simple adjacent coordinate difference calculations. This can further reduce data redundancy and yield smaller encoded values ​​in some cases. Furthermore, predictive coding techniques can be combined to predict the incremental value of the current coordinate based on historical coordinate data. Only the difference between the actual incremental value and the predicted value is stored, improving compression.

[0190] Optionally, the coordinate jump problem interpolation processing step may include: a jump point detection step, a trajectory pattern recognition step, a difference return method step, a smoothing processing step, and an integrated application step.

[0191] Optionally, during the jump point detection step, the coordinate sequence is traversed, and the incremental differences between adjacent coordinates are calculated to form a difference sequence. The standard deviation and mean of the difference sequence are calculated as a basis for determining anomalies. The coordinate sequence is traversed again, and for each coordinate, the incremental difference between it and the previous coordinate is calculated. The current incremental difference is compared with the mean and standard deviation. If the absolute value of the difference between the current incremental difference and the mean is greater than three times the standard deviation (the threshold can be adjusted according to actual conditions), the coordinate is determined to be a jump point. The index position of the jump point is recorded, and the three coordinates before and after the jump point (if any) are extracted as context information for subsequent processing. The jump point and its context information are stored in a list and returned.

[0192] Optionally, during the step of identifying the trajectory pattern, the coordinate sequence before and after the jump point is received as input. The average direction vectors of the coordinate sequence before and after the jump point are calculated respectively, and are obtained by calculating the difference between adjacent coordinates and averaging them. Calculate the angle between the front and back average direction vectors, calculate the cosine value using the vector dot product formula, and then obtain the angle using the inverse cosine function. Calculate the curvature near the jump point (a simplified algorithm can be used, for example, calculating the approximate curvature through three adjacent points). Determine the trajectory pattern based on the angle and curvature: if the angle is less than 15°, it is determined to be a straight line mode. If the angle is between 15°-45°, it is determined to be a gentle bend mode. If the angle is greater than 45° or the curvature changes drastically, it is determined to be a sharp turn mode. Return the identified trajectory pattern.

[0193] Optionally, in the process of selecting the interpolation method, a corresponding interpolation method is selected according to the identified trajectory pattern.

[0194] For the straight line mode, the speed of the segments before and after the jump point can be calculated by calculating the distance between adjacent coordinates. Determine the speed change trend, that is, the ratio of the speed of the latter segment to the speed of the former segment (if the speed of the former segment is 0, the ratio is set to 1). Calculate the direction vector from the end point of the former segment to the starting point of the latter segment and normalize it. According to the number of points to be inserted, generate a sequence of equally spaced interpolation factors between 0 and 1 (excluding 0 and 1). For each interpolation factor, weight it according to the speed change trend to obtain the weighted interpolation factor. Calculate the coordinates of the interpolation point by adding the coordinates of the former end point to the product of the unit direction vector, the weighted interpolation factor and the total distance, and store all the interpolation point coordinates in a list and return them.

[0195] For the gentle bend mode, the four control points of the Bezier curve are determined: the endpoint (starting point) of the front segment, the starting point (end point) of the back segment, and two intermediate control points calculated from the direction vectors of the front and back segments. Based on the number of points to be interpolated, a sequence of equally spaced parameters t is generated between 0 and 1 (excluding 0 and 1). For each parameter t, the coordinates of the interpolated points are calculated according to the Bezier curve formula, stored in a list, and returned.

[0196] For sharp turns, a simplified method can be used to estimate the arc's center. For example, the midpoint of the diagonal of the circumscribed rectangle formed by the coordinates before and after the jump point is used as the estimated center. The vectors from the coordinates before and after the jump point to the center of the circle are calculated to determine the angles of the start and end points. The arc's rotation direction (clockwise or counterclockwise) is determined using the vector cross product, and the end angle is adjusted to be within the same period as the start angle. Based on the number of points to be interpolated, a sequence of equally spaced parameters t is generated between 0 and 1 (excluding 0 and 1). For each parameter t, the angle and radius corresponding to the interpolated point are calculated, taking into account the speed decay factor (generated using a sine function to slow down the speed at the turn). The interpolated point coordinates are obtained by adding the center coordinate to the product of the radius and the cosine and sine of the angle. All interpolated point coordinates are stored and returned in a list.

[0197] Optionally, during the smoothing step, determine whether the number of interpolation points is less than the smoothing window length (e.g., 3). If so, return the interpolation point sequence directly without smoothing. For each dimension (the x and y dimensions of a two-dimensional coordinate or the x, y, and z dimensions of a three-dimensional coordinate), extract the values ​​of the interpolation point in that dimension to form a list. Apply a filter to the list of values ​​in each dimension for smoothing, setting an appropriate window length and polynomial order (e.g., a window length of 3 and a polynomial order of 1). Reassemble the smoothed dimensional values ​​into coordinates to form a smoothed interpolation point sequence and return it.

[0198] Optionally, during the integration application step, input the original coordinate sequence and the jump point detection threshold (default is 3.0, adjustable). Call the jump point detection step to obtain a list of jump points and their context information. If no jump point is detected, return the original coordinate sequence directly. Traverse the jump point list, and for each jump point, extract the coordinates before and after the jump point as context. Call the trajectory pattern identification step to determine the trajectory pattern. According to the trajectory pattern, call the corresponding interpolation method selection step to generate an interpolation point sequence. Call the smoothing step on the interpolation point sequence to obtain the smoothed interpolation point. Insert the smoothed interpolation point into the corresponding jump point position in the original coordinate sequence and update the coordinate sequence. Record the number of inserted interpolation points and update the index offset of subsequent insertion operations. Return the processed coordinate sequence to complete the processing of the jump points in the original coordinate sequence.

[0199] In this embodiment, variable-length encoding can be performed. The signed difference is mapped into an unsigned integer difference and encoded using variable-length encoding. The previous steps generally obtain smaller integer values. After variable-length encoding, the bytes occupied by the geometric information are smaller. This step is not suitable for all data specifications. For example, when organizing data in Protobuf format and defining the geometry field as a repeatable integer, the Protobuf format can automatically perform variable-length encoding. However, the JSON format does not support this encoding method.

[0200] In this embodiment, the result obtained by variable-length encoding can be serialized. Select a commonly used storage specification, set other attribute information, etc., and perform serialization. The above steps are mainly for encoding geometric data. In addition to geometric information, general map data also has some attribute information, and its content varies with different data specifications. The geometric information and other attributes are organized according to specific storage specifications and then serialized. Storage specifications such as JSON, Protobuf, etc., each storage specification has its corresponding way of organizing attributes and geometric information, as well as its corresponding serialization method.

[0201] In this embodiment, the serialized result can be compressed again. The serialized data is compressed again using a general lossless compression algorithm. General lossless compression algorithms such as zip, gzip, and Zstandard can be used to compress the binary data serialized in the previous step again. The reason for further compression is that the map generated in the previous step has repeated attributes, and these repeated information can be compressed using a general lossless compression algorithm. Under specific accuracy, after calculating the incremental difference, the coordinate increment value will show a repeated characteristic, and these repeated information can be further compressed. The general compression algorithm can further optimize the data encoding method, such as using Huffman coding (a variable-length coding based on statistical frequency) to further reduce the amount of data.

[0202] In this embodiment, the compressed map data can be decompressed. The decompression process is the reverse of the above process and includes the following steps: decompressing the compressed data using a decompression algorithm corresponding to the general compression algorithm; deserializing the data according to the selected format. In Protobuf, variable-length encoding and decoding are automatically performed; the original values ​​are restored based on the geometric difference; and the integer coordinate values ​​are divided by the set precision coefficient to obtain floating-point coordinate values.

[0203] Figure 3 FIG. 1 is a schematic diagram of a map data processing device according to an embodiment of the present invention. Figure 3 As shown, the apparatus may include: a first acquiring unit 302 , a first converting unit 304 , an adjusting unit 306 , an encoding unit 308 and a determining unit 310 .

[0204] The first acquisition unit 302 is configured to acquire an initial map dataset to be processed. The first conversion unit 304 is configured to convert the initial map dataset into a target map dataset according to a target accuracy coefficient. The adjustment unit 306 is configured to adjust the target map dataset based on abnormal map data in the target map dataset and obtain difference data between adjacent map data in the adjusted target map dataset to obtain a difference dataset. The encoding unit 308 is configured to encode the difference dataset to obtain an encoding result. The determination unit 310 is configured to determine a compression result corresponding to the initial map dataset based on the encoding result.

[0205] Figure 4 FIG. 1 is a schematic diagram of the structure of another map data processing device according to an embodiment of the present invention. Figure 4 As shown, the apparatus may include: a second acquiring unit 402 , a decompressing unit 404 , a decoding unit 406 , a restoring unit 408 and a second converting unit 410 .

[0206] The second acquisition unit 402 is configured to obtain a compression result corresponding to the initial map dataset. The decompression unit 404 is configured to decompress the compression result to obtain encoded data. The decoding unit 406 is configured to decode the encoded data to obtain a difference dataset. The restoration unit 408 is configured to restore the difference dataset to the target map dataset before adjustment. The second conversion unit 410 is configured to convert the target map dataset according to the target accuracy coefficient to obtain a decompression result corresponding to the compression result.

[0207] The above-mentioned device may further include a processor and a memory, and the above-mentioned units are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to implement corresponding functions.

[0208] The processor includes a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured to gracefully shut down devices of the same device type by adjusting kernel parameters.

[0209] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0210] The processor includes a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured, and kernel parameters can be adjusted to improve trader efficiency. Memory may include non-permanent storage in a computer-readable medium, RAM, and / or non-volatile memory such as ROM or flash memory, and includes at least one memory chip.

[0211] According to an embodiment of the present invention, a computer-readable storage medium is further provided, on which a program is stored. When the program is executed by a processor, the above method is implemented.

[0212] According to an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein the above method is executed when the program is run.

[0213] Figure 5 is a schematic diagram of an electronic device for a method for processing map data according to an embodiment of the present invention. Figure 5 As shown, an embodiment of the present invention further provides an electronic device 500, which includes a processor 501, a memory 502, and a program stored in the memory and executable by the processor. When the processor executes the program, the method of any of the above embodiments is implemented, which will not be described in detail here. The device herein can be a server, a personal computer (PC), a tablet computer (PAD), a mobile phone, etc.

[0214] The present invention also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program initialized with any of the above method steps.

[0215] According to another aspect of an embodiment of the present invention, a vehicle is further provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform any method step.

[0216] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A method for processing map data, characterized in that: include: Get the initial map dataset to be processed; converting the initial map data set into a target map data set according to a target accuracy coefficient, wherein the target accuracy coefficient is used to indicate the degree of accuracy required for the target map data, and the data volume of the target map data set is smaller than the data volume of the initial map data set; adjusting the target map dataset based on the abnormal map data in the target map dataset, and obtaining difference data between adjacent map data in the adjusted target map dataset to obtain a difference dataset, wherein data compression performance corresponding to the adjusted target map dataset is higher than data compression performance corresponding to the target map dataset before the adjustment; Encoding the difference data set to obtain an encoding result; Based on the encoding result, a compression result corresponding to the initial map dataset is determined.

2. The method according to claim 1, characterized in that The converting the initial map dataset into a target map dataset according to the target accuracy coefficient includes: According to the target accuracy coefficient, the initial map dataset is converted from an initial data type to a target data type to obtain the target map dataset, wherein there is a compression ratio between the initial map dataset of the initial data type and the target map dataset of the target data type, and the compression ratio is negatively correlated with the target accuracy coefficient.

3. The method according to claim 1, characterized in that The target map data set includes an initial coordinate sequence, wherein the initial coordinate sequence includes jump coordinates and / or repeated coordinates. Adjusting the target map data set based on abnormal map data in the target map data set includes: identifying the jump coordinates and / or the repeated coordinates from the initial coordinate sequence in the target map data set; Based on the jump coordinates and / or the repeated coordinates, the initial coordinate sequence is adjusted to obtain a target coordinate sequence.

4. The method according to claim 3, characterized in that The adjusting the initial coordinate sequence based on the jump coordinates to obtain a target coordinate sequence includes: In the initial coordinate sequence, determining coordinate change information between a first coordinate sequence located before the jump coordinate and a second coordinate sequence located after the jump coordinate, wherein the coordinate change information is used to represent a change trend of multiple coordinates in the first coordinate sequence and multiple coordinates in the second coordinate sequence; generating an interpolation coordinate sequence based on the coordinate change information, wherein the interpolation coordinate sequence includes a plurality of interpolation coordinates to be interpolated; The interpolated coordinate sequence is inserted into the position corresponding to the jump coordinate in the initial coordinate sequence to obtain the target coordinate sequence.

5. The method according to claim 4, characterized in that Determining, in the initial coordinate sequence, coordinate change information between a first coordinate sequence located before the jump coordinate and a second coordinate sequence located after the jump coordinate includes: Determining a first average direction vector of the first coordinate sequence in the initial coordinate sequence, and determining a second average direction vector of the second coordinate sequence in the initial coordinate sequence, wherein the first average direction vector is used to represent an average change direction between adjacent coordinates in the first coordinate sequence, and the second average direction vector is used to represent an average change direction between adjacent coordinates in the second coordinate sequence; determining an angle between the first average direction vector and the second average direction vector; In response to the angle being less than a first angle threshold, determining that the coordinate change information is first coordinate change information, wherein the first coordinate change information is used to indicate that the change trend is a trend of changing in a straight line mode; In response to the angle being greater than or equal to the first angle threshold and less than or equal to the second angle threshold, determining that the coordinate change information is second coordinate change information, wherein the second coordinate change information is used to indicate that the change trend is a trend of changing according to a gentle bending mode; In response to the angle being greater than the second angle threshold and the curvature corresponding to the jump coordinate in the initial coordinate sequence being greater than the curvature threshold, the coordinate change information is determined to be third coordinate change information, wherein the third coordinate change information is used to indicate that the change trend is a trend of changing in a sharp turn mode.

6. The method according to claim 5, characterized in that The initial coordinate sequence is used to form a target trajectory, and based on the coordinate change information, an interpolated coordinate sequence is generated, including: In response to the coordinate change information being the first coordinate change information, determining a front-end speed and a rear-end speed of the jump coordinate, wherein the front-end speed is used to represent a change speed of adjacent coordinates in a first trajectory in the target trajectory that is located before the jump coordinate, and the rear-end speed is used to represent a change speed of adjacent coordinates in a second trajectory in the target trajectory that is located after the jump coordinate; Determining speed change information based on the front-end speed and the rear-end speed, wherein the speed change information is used to represent a speed change trend of the coordinates in the first trajectory and the coordinates in the second trajectory; weighting the interpolation factors in the interpolation factor sequence according to the speed change information, wherein a distance between two adjacent interpolation factors in the interpolation factor sequence is the same, and the number of the interpolation factors is associated with the number of interpolation coordinates in the interpolation coordinate sequence to be generated; The interpolation coordinate sequence is generated based on the end point coordinates of the first trajectory, the weighted interpolation factor, and a unit direction vector, wherein the unit direction vector is used to indicate a unit direction from the end point coordinates of the first trajectory to the start point coordinates of the second trajectory.

7. The method according to claim 5, characterized in that The initial coordinate sequence is used to form a target trajectory, and based on the coordinate change information, an interpolated coordinate sequence is generated, including: In response to the coordinate change information being the second coordinate change information, determining an end coordinate of a first track located before the jump coordinate in the target track, a start coordinate of a second track located after the jump coordinate in the target track, and determining a first intermediate coordinate and a second intermediate coordinate based on a direction vector of the first track and a direction vector of the second track; respectively determining the end point coordinates of the first trajectory, the starting point coordinates of the second trajectory, the first intermediate coordinates, and the second intermediate coordinates as control points of a Bezier curve; The interpolation coordinate sequence is generated based on the interpolation factors in the interpolation factor sequence and the Bezier curve, wherein the distance between two adjacent interpolation factors in the interpolation factor sequence is the same, and the number of the interpolation factors is associated with the number of interpolation coordinates in the interpolation coordinate sequence.

8. The method according to claim 5, characterized in that The initial coordinate sequence is used to form a target trajectory, and based on the coordinate change information, an interpolated coordinate sequence is generated, including: In response to the coordinate change information being the third coordinate change information, constructing a bounding rectangle based on a first target coordinate located before the jump coordinate and a second target coordinate located after the jump coordinate in the initial coordinate sequence; Determining the midpoint of the diagonal of the circumscribed rectangle as the center of the target arc to be constructed, determining the starting angle of the target arc to be constructed based on the vector from the first target coordinate to the center, and determining the ending angle of the target arc to be constructed based on the vector from the second target coordinate to the center; Constructing the target arc based on the center of the circle, the starting angle and the ending angle; The interpolation coordinate sequence is generated based on the interpolation factors in the interpolation factor sequence and the constructed target arc, wherein the distance between two adjacent interpolation factors in the interpolation factor sequence is the same, and the number of the interpolation factors is associated with the number of interpolation coordinates in the interpolation coordinate sequence.

9. The method according to claim 3, characterized in that The adjusting the initial coordinate sequence based on the repeated coordinates to obtain a target coordinate sequence includes: Run-length encoding is performed on the repeated coordinates in the initial coordinate sequence to obtain the target coordinate sequence.

10. The method according to any one of claims 1 to 9, characterized in that The obtaining of difference data between adjacent map data in the adjusted target map data set includes: an acquiring step, in response to the map data in the target map data set being non-first map data, acquiring incremental data of the map data relative to previous map data in the target map data set that is adjacent to the map data, and determining the incremental data as the difference data in the difference data set, the difference data being smaller than the map data, and the difference data being smaller than the previous map data; a determining step, in response to the target map data set including next map data adjacent to the map data, determining the next map data as the map data, and returning to executing the acquiring step until the target map data set does not include the next map data adjacent to the map data; The encoding of the difference data set to obtain an encoding result includes: mapping the difference data set from a signed integer to an unsigned integer; performing variable-length encoding on the unsigned integer difference data set according to a protocol buffer format to obtain the encoding result; Based on the encoding result, determining a compression result corresponding to the initial map dataset, including: obtaining attribute data from the initial map dataset, wherein the attribute data is used to represent attributes of a scene to which geometric data in the initial map dataset belongs, and the geometric data is used to represent geometric features of geographic objects; serializing the attribute data and the encoding result to obtain a serialization result; and losslessly compressing duplicate data in the serialization result to obtain the compression result.

11. A method for processing map data, characterized in that: include: Get the compression result corresponding to the initial map dataset; Decompressing the compression result to obtain encoded data; decoding the encoded data to obtain a difference data set, wherein the difference data set includes difference data between adjacent map data in the adjusted target map data set, data compression performance corresponding to the adjusted target map data set is higher than data compression performance corresponding to the target map data set before adjustment, and the adjusted target map data set is obtained by adjusting the target map data set before adjustment based on the abnormal map data in the target map data set before adjustment; Restoring the difference data set to the target map data set before adjustment, wherein the data volume of the target map data set is smaller than the data volume of the initial map data set; The target map dataset is converted according to a target accuracy coefficient to obtain a decompression result corresponding to the compression result, wherein there is a difference between the decompression result and the initial map dataset.

12. A vehicle, characterized in that: include: a memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 11 when running.