Vehicle data compression method, device and equipment and storage medium
By using a three-level differential algorithm and a hybrid coding strategy to preprocess and compress vehicle data, the problem of low compression efficiency in existing technologies is solved, achieving efficient vehicle data compression, adapting to dynamic changes in vehicle load status, and improving data compression rate and processing speed.
Patent Information
- Application Number
- CN202511579924.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-02-03
AI Technical Summary
Existing vehicle data compression methods fail to fully consider the characteristics and real-time requirements of vehicle data, resulting in low compression efficiency or inability to adapt to dynamic changes in vehicle load status, thus affecting normal vehicle operation.
A three-level differential algorithm is used to preprocess the vehicle serialized structure data. The compression algorithm is dynamically selected based on the current load status of the vehicle. A hybrid encoding strategy is used to process data of different field types, including half-precision floating-point conversion of numeric fields, variable-length integer encoding, binary tree encoding of string fields, and optimized dictionary compression of nested messages.
It effectively eliminates data redundancy, improves compression ratio and processing speed, and ensures efficient data compression without affecting vehicle operation.
Smart Images

Figure CN121462002A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data compression technology, and in particular to vehicle data compression methods, apparatus, equipment and storage media. Background Technology
[0002] In traditional vehicle data compression schemes, the sheer volume and complexity of vehicle-generated data—including, but not limited to, time-series data collected by sensors, vehicle status information, and geographic location data—lead to significant storage and processing overhead due to its unstructured or semi-structured nature. While existing data compression methods exist, they often fail to adequately consider the characteristics and real-time requirements of vehicle data, resulting in data loss, low compression efficiency, or inability to adapt to dynamic changes in vehicle load. For example, some methods employ fixed compression algorithms, lacking flexibility in adjusting compression strategies, potentially causing processing delays and impacting normal vehicle operation; others directly compress the raw data, leading to low compression ratios and inefficient processing. Summary of the Invention
[0003] The main objective of this application is to provide a vehicle data compression method, apparatus, device, and storage medium, aiming to solve the technical problem of low compression ratio in current vehicle data compression.
[0004] To achieve the above objectives, this application proposes a vehicle data compression method, which includes: Retrieve vehicle serialized structure data stored in serialized structure format and the vehicle's current load status; The vehicle serialization structure data is preprocessed using a three-level difference algorithm to obtain preprocessed vehicle serialization structure data. The target compression algorithm is determined based on the current load status; The target compression algorithm uses a hybrid coding strategy to compress the preprocessed vehicle serialization structure data to obtain the target compressed vehicle data.
[0005] In one embodiment, the step of compressing the preprocessed vehicle serialized structure data using the target compression algorithm with a hybrid coding strategy to obtain the target compressed vehicle data includes: The preprocessed time series data is divided into field types to obtain data of different field types; The data of different field types are processed according to a hybrid encoding strategy to obtain the processed dataset; The target compression algorithm is used to compress the processed dataset to obtain target compressed vehicle data.
[0006] In one embodiment, the step of processing data of different field types according to a hybrid encoding strategy to obtain a processed dataset includes: Based on different field types, we can obtain numeric field data, string field data, and nested message data; Numerical field data is converted into half-precision floating-point numbers according to a hybrid encoding strategy to obtain preliminary compressed data; Variable-length integer encoding is applied to the initial compressed data to generate compressed numeric field data; The string field data is encoded by encoding it using a binary tree based on automotive terminology to obtain encoded string field data; The nested message data is processed using an optimized dictionary compression algorithm to obtain optimized nested message data; The processed dataset is obtained based on the compressed numeric field data, the encoded string field data, and the optimized nested message data.
[0007] In one embodiment, the step of preprocessing the vehicle serialization structure data using a three-level difference algorithm to obtain preprocessed vehicle serialization structure data includes: Time series data is obtained based on the vehicle serialization structure data; Based on the three-level difference algorithm, the sliding window difference algorithm, trend difference algorithm, and periodic difference algorithm are obtained; The time series data is preprocessed using the sliding window difference algorithm, the trend difference algorithm, and the period difference algorithm to obtain updated time series data. The vehicle serialization structure data is updated by updating the time series data to obtain preprocessed vehicle serialization structure data.
[0008] In one embodiment, the step of preprocessing the time series data using the sliding window differencing algorithm, the trend differencing algorithm, and the periodic differencing algorithm to obtain updated time series data includes: The sliding window difference algorithm is used to detect short-term fluctuations in the time series data to obtain time series data after short-term fluctuations are eliminated. The trend difference algorithm is used to perform trend difference on the time series data after the short-term fluctuations are eliminated, and the time series data after the linear change components are eliminated is obtained. The periodic difference algorithm is used to perform periodic difference on the time series data after the linear variation component is eliminated, so as to obtain the time series data after the repetition pattern is eliminated. Use the time series data after removing the repeating pattern as the updated time series data.
[0009] In one embodiment, the step of determining the target compression algorithm based on the current load state includes: The current compression mode is determined based on the current load status; When the current compression mode is deep compression mode, the target compression algorithm is determined to be the first compression algorithm; When the current compression mode is fast compression mode, the target compression algorithm is determined to be the second compression algorithm, wherein the compression ratio of the first compression algorithm is greater than the compression ratio of the second compression algorithm, and the compression speed of the first compression algorithm is less than the compression speed of the second compression algorithm.
[0010] In one embodiment, the step of determining the current compression mode based on the current load state includes: When the current load state is less than a first preset load threshold, the current compression mode is determined to be a deep compression mode; When the current load state is greater than the second preset load threshold, the current compression mode is determined to be the fast compression mode, wherein the first preset load threshold is less than the second preset load threshold.
[0011] Furthermore, to achieve the above objectives, this application also proposes a vehicle data compression device, which includes: The acquisition module is used to acquire vehicle serialized structure data stored in serialized structure format and the vehicle's current load status; The preprocessing module is used to preprocess the vehicle serialization structure data using a three-level difference algorithm to obtain preprocessed vehicle serialization structure data. The determination module is used to determine the target compression algorithm based on the current load status; The compression module is used to compress the preprocessed vehicle serialization structure data using a hybrid coding strategy through the target compression algorithm to obtain the target compressed vehicle data.
[0012] In addition, to achieve the above objectives, this application also proposes a vehicle data compression device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the vehicle data compression method as described above.
[0013] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the vehicle data compression method described above.
[0014] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the vehicle data compression method described above.
[0015] This application proposes one or more technical solutions that involve acquiring vehicle serialized structure data stored in a serialized structure format and the vehicle's current load status; preprocessing the vehicle serialized structure data using a three-level differential algorithm to obtain preprocessed vehicle serialized structure data; determining a target compression algorithm based on the current load status; and compressing the preprocessed vehicle serialized structure data using a hybrid coding strategy based on the target compression algorithm to obtain the target compressed vehicle data. By using differential prediction for data preprocessing to eliminate data redundancy, and by dynamically adjusting the compression strategy in conjunction with the vehicle's current load status, a balance is effectively struck between data compression rate and processing efficiency. Furthermore, the use of hybrid coding achieves efficient compression of structured data, improving the efficiency of vehicle data compression without affecting vehicle operation. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating an embodiment of the vehicle data compression method of this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the vehicle data compression method of this application; Figure 3 This is a flowchart illustrating Embodiment 3 of the vehicle data compression method of this application; Figure 4 This is a schematic diagram of the module structure of the vehicle data compression device according to an embodiment of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the vehicle data compression method in this application embodiment.
[0019] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0020] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0022] The main solution of this application embodiment is: to obtain vehicle serialized structure data stored in serialized structure format and the current load status of the vehicle; to preprocess the vehicle serialized structure data using a three-level differential algorithm to obtain preprocessed vehicle serialized structure data; to determine a target compression algorithm based on the current load status; and to compress the preprocessed vehicle serialized structure data using a hybrid encoding strategy through the target compression algorithm to obtain target compressed vehicle data.
[0023] Because existing vehicle data compression technologies fail to fully consider the characteristics and real-time requirements of vehicle data, problems such as data loss, low compression efficiency, or inability to adapt to dynamic changes in vehicle load status occur during the compression process. For example, some methods use fixed compression algorithms and cannot flexibly adjust compression strategies, which may lead to processing delays and affect the normal operation of vehicles; other methods directly compress the raw data, resulting in low compression ratios and low processing efficiency.
[0024] This application provides a solution that preprocesses vehicle serialized structure data using a three-level differential algorithm. This effectively eliminates short-term fluctuations, linearly varying components, and repetitive patterns in the data, thereby reducing data redundancy and improving subsequent compression efficiency. Simultaneously, the compression algorithm is dynamically selected based on the vehicle's current load status. A deep compression mode with a high compression ratio but slower speed is used when the load is low, while a fast compression mode with a low compression ratio but faster speed is used when the load is high. This ensures that the compression process meets storage requirements without affecting vehicle operation due to processing delays. A hybrid encoding strategy further optimizes the compression effect. For numeric fields, string fields, and nested message data, half-precision floating-point conversion, variable-length integer encoding, binary tree encoding based on automotive terminology, and an optimized dictionary compression algorithm are used respectively. This ensures that different types of data are compressed in the most appropriate way. The final compressed vehicle data achieves a higher compression ratio and faster processing speed while maintaining information integrity.
[0025] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as a vehicle data compression device. The following description uses a vehicle data compression device as an example to illustrate this embodiment and the subsequent embodiments.
[0026] Based on this, embodiments of this application provide a vehicle data compression method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the vehicle data compression method of this application.
[0027] In this embodiment, the vehicle data compression method includes steps S10 to S40: Step S10: Obtain the vehicle serialized structure data stored in serialized structure format and the vehicle's current load status.
[0028] It should be noted that the serialization structure format is protobuf. Protocol Buffers (protobuf) is a lightweight and efficient format for serialized structured data, widely used for storing and transmitting data. Therefore, this embodiment uses the protobuf format to store vehicle data in a structured manner, thereby improving the speed of vehicle data serialization and deserialization, and thus obtaining vehicle serialized structured data.
[0029] In practical implementation, the vehicle's current load status refers to the CPU load status within the vehicle. The vehicle's data processing capabilities and efficiency will vary depending on its load status. To more accurately match the vehicle's current data processing capabilities, this embodiment acquires the vehicle's CPU load status in real time, using this as the basis for dynamically adjusting the compression strategy.
[0030] Step S20: Preprocess the vehicle serialization structure data using a three-level difference algorithm to obtain preprocessed vehicle serialization structure data.
[0031] It should be noted that the three-level difference algorithm includes the sliding window difference algorithm, the trend difference algorithm, and the periodic difference algorithm. By processing time series data using these three algorithms, short-term fluctuations, linear variation components, and repetitive patterns in the data can be effectively eliminated, thereby reducing data redundancy.
[0032] In practice, the three-level difference algorithm is mainly used to process time series data such as vehicle speed and acceleration in the vehicle serialized structure data, thereby eliminating data redundancy and reducing the volume of effective data to 8.3% of the original value.
[0033] Step S30: Determine the target compression algorithm based on the current load status.
[0034] It should be noted that the current load status is used to determine the current compression mode, which includes deep compression mode and fast compression mode. Different target compression algorithms are selected according to different compression modes to achieve a balance between compression ratio and processing speed.
[0035] In one feasible implementation, step S30 may include steps A11 to A13: Step A11: Determine the current compression mode based on the current load status; It should be noted that the corresponding compression mode is different when the load is different. For example, when the load is high, the corresponding compression mode is fast compression, and when the load is low, the corresponding compression mode is slow compression. Specifically: when the current load is less than a first preset load threshold, the current compression mode is determined to be deep compression mode; when the current load is greater than a second preset load threshold, the current compression mode is determined to be fast compression mode, wherein the first preset load threshold is less than the second preset load threshold.
[0036] It should be understood that the first and second preset load thresholds can be determined based on the load's operating status. For example, the first preset load threshold can be set to 70%, and the second preset load threshold to 85%. When the vehicle's CPU load is below 70%, a deep compression mode is used; when it is above 85%, a fast compression mode is switched. In the intermediate load range, the current mode can be maintained or a smooth transition can be achieved based on actual needs. This dynamic threshold adjustment mechanism avoids the performance overhead caused by frequent switching and ensures that the optimal compression strategy is always used under different load scenarios.
[0037] In one feasible implementation, the vehicle-side CPU load can be monitored in real time through a dynamic bitrate control module.
[0038] Step A12: When the current compression mode is deep compression mode, determine the target compression algorithm as the first compression algorithm; It should be noted that the deep compression mode focuses on data compression ratio, achieving greater space savings through the first compression algorithm. In this embodiment, the first compression algorithm is the Brotli compression algorithm, with a compression level of 11.
[0039] Step A13: When the current compression mode is fast compression mode, the target compression algorithm is determined to be the second compression algorithm, wherein the compression ratio of the first compression algorithm is greater than the compression ratio of the second compression algorithm, and the compression speed of the first compression algorithm is less than the compression speed of the second compression algorithm.
[0040] It should be noted that the fast compression mode prioritizes processing speed, achieving even faster compression efficiency through a second compression algorithm. In this embodiment, the second compression algorithm is the LZ4 dictionary compression algorithm, known for its high-speed compression and decompression, which can significantly improve processing speed while maintaining a high compression ratio. Through this dynamic matching of compression mode and algorithm, the system can automatically adjust the compression strategy according to the real-time load status, maximizing compression efficiency while ensuring data integrity.
[0041] In practice, the compression mode switching module continuously monitors load metrics. When the load exceeds a preset threshold, it immediately triggers an algorithm switching mechanism to ensure that the compression process is always optimally matched to system resource conditions. This intelligent scheduling method avoids processing bottlenecks under high load and prevents resource waste under low load, thus achieving dual optimization of compression performance and system stability.
[0042] In one feasible implementation, a threshold can also be set. When the load is below this threshold, Brotli deep compression is enabled, increasing the compression ratio by 60%. When the load is above the threshold, LZ4 fast compression is switched to, increasing the decompression speed by 3 times. At the same time, the ARM NEON instruction set is used to achieve zero-copy decompression, reducing the CPU utilization rate by 50%.
[0043] Specifically, when the current load is less than a first preset load threshold, the vehicle is determined to be in low-load mode. In this case, for large data, such as vehicle semantic and image data, Brotli compression can be used. It has the highest compression ratio and is a deep compression, but it has a high CPU load. However, it has low bandwidth pressure and low storage space consumption, making it suitable for scenarios that are sensitive to storage space and have high network bandwidth requirements. If the current load is greater than a second preset load threshold, the vehicle is determined to be in high-load mode. In this case, for small data that needs to be transmitted frequently, LZ4 fast compression is used. It has a fast compression speed and low CPU load, making it suitable for frequently accessed "hot data," thus avoiding the increase in CPU load caused by frequently switching between multiple algorithms.
[0044] Step S40: Compress the preprocessed vehicle serialization structure data using the target compression algorithm with a hybrid coding strategy to obtain the target compressed vehicle data.
[0045] It should be noted that the hybrid encoding strategy uses different encoding methods for different field types of data, including half-precision floating-point conversion and variable-length integer encoding for numeric field data, binary tree encoding based on automotive terminology for string field data, and optimized dictionary compression algorithm for nested message data, so that different types of data can be compressed in the most appropriate way.
[0046] In practical implementation, when using the target compression algorithm for compression, hybrid encoding is used to process the coded data in different categories. This categorized encoding strategy not only improves the compression rate but also maintains the efficient retrieval capability of the data, ensuring that the compressed data can still support real-time query and analysis needs.
[0047] In practical implementation, memory-mapped decompression can also be achieved using the ARM NEON instruction set, avoiding data copy overhead. The entire process is connected in series through a data flow pipeline, with intermediate results at each stage temporarily stored in a shared buffer. The final output target compressed vehicle data packet includes field type identifiers, compression parameters, and checksums, ensuring that the decompression end can reverse-engineer the original vehicle data.
[0048] This embodiment provides a vehicle data compression method. It acquires vehicle serialized structure data stored in a serialized structure format and the vehicle's current load status. The vehicle serialized structure data is preprocessed using a three-level differential algorithm to obtain preprocessed vehicle serialized structure data. A target compression algorithm is determined based on the current load status. The preprocessed vehicle serialized structure data is then compressed using the target compression algorithm with a hybrid coding strategy to obtain the target compressed vehicle data. By using differential prediction for data preprocessing to eliminate data redundancy, and by dynamically adjusting the compression strategy based on the vehicle's current load status, a balance between data compression rate and processing efficiency is effectively achieved. Furthermore, the use of hybrid coding enables efficient compression of structured data, improving the efficiency of vehicle data compression without affecting vehicle operation.
[0049] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S40 includes steps S401 to S403: Step S401: Divide the preprocessed time series data into field types to obtain data of different field types.
[0050] It should be noted that the preprocessed time series data can be divided into field types to obtain data of different field types.
[0051] In practice, the preprocessed time-series data can be divided into numeric field data, string field data, and nested messages, and may also include data of other types of fields.
[0052] Step S402: Process the data of different field types according to the hybrid encoding strategy to obtain the processed dataset.
[0053] In practice, a differentiated encoding strategy can be used to process data of different field types accordingly, thereby improving the data compression ratio and obtaining the final processed dataset.
[0054] In one feasible implementation, step S402 may include steps B11 to B16: Step B11: Obtain numeric field data, string field data, and nested message data based on different field types; It should be noted that numerical data fields typically contain continuously changing numerical information such as vehicle speed and acceleration, while string data fields encompass textual information such as vehicle identification numbers and geographic location tags. Nested message data consists of multiple layers of structured data, such as a set of sensor readings containing timestamps. This classification method provides a basic framework for subsequent differentiated coding.
[0055] Step B12: Convert numeric field data into half-precision floating-point numbers according to the hybrid encoding strategy to obtain preliminary compressed data; It should be noted that the hybrid encoding strategy means that different data processing methods are used for different types of field data. Based on the characteristics of the Protobuf data structure, for numeric fields, variable-length integer encoding and floating-point truncation processing techniques can be used to convert numeric field data into half-precision floating-point numbers, thereby obtaining preliminary compressed data.
[0056] Step B13: Apply variable-length integer encoding to the preliminary compressed data to generate compressed numeric field data; In practice, after the conversion is completed, variable-length integer encoding is used for storage, thereby generating compressed numeric field data.
[0057] For numeric data fields, the 32-bit floating-point number is first compressed to 16 bits using half-precision floating-point conversion, reducing storage space while maintaining data precision. Then, variable-length integer encoding is employed, dynamically allocating the number of bits based on the numerical value. For example, values from 0 to 127 use only 1 byte, values from 128 to 16383 use 2 bytes, and so on. This combined encoding method improves the compression rate of numeric data by more than 40%.
[0058] Step B14: Encode the string field data using a binary tree based on automotive terminology to obtain encoded string field data; It's important to note that a vehicle-specific thesaurus can be pre-built to generate a Huffman tree. Efficient compression can be achieved by constructing an industry-specific dictionary. First, frequently occurring string terms in vehicle data are statistically analyzed, such as "ABS malfunction" and "battery overheating," and a Huffman binary tree structure is constructed. A Huffman tree is a binary tree structure used for data compression. It achieves lossless data compression based on the Huffman coding algorithm. Therefore, string field data can be encoded using a binary tree built based on vehicle terminology, thereby optimizing the string field data and obtaining encoded string field data, resulting in an additional 40% compression rate improvement. During encoding, shorter codes are used for high-frequency terms, and longer codes are used for low-frequency terms. The dictionary is also dynamically updated to accommodate newly emerging terms.
[0059] Step B15: Process the nested message data using an optimized dictionary compression algorithm to obtain optimized nested message data; It should be understood that the optimized dictionary compression algorithm is designed for the multi-layered structure of nested messages. Specifically, the optimized dictionary compression algorithm is the LZ4 algorithm, which is improved through message dependencies.
[0060] In practical implementation, nested message data can be processed by optimizing dictionary compression algorithms. First, the nested messages are flattened, converting the multi-layered structure into a set of key-value pairs. Then, a global dictionary is constructed to map recurring field names and values. During compression, only the dictionary index and differences are stored; during decompression, the complete structure is restored using the dictionary. For example, for nested messages containing multiple sensor readings, which would normally require storing the complete field names for each timestamp, such as "speed" and "rpm," dictionary compression simplifies this process by storing only the index number and the change value. This approach improves the compression rate of nested messages by 35% while maintaining data retrievability.
[0061] In its implementation, the dictionary uses a dynamic update mechanism, automatically expanding its capacity when a new field is detected to ensure the continuity of the compression process.
[0062] Step B16: Obtain the processed dataset based on the compressed numeric field data, the encoded string field data, and the optimized nested message data.
[0063] It should be noted that compressed numeric field data, encoded string field data, and optimized nested message data can be merged to obtain the processed dataset. During the merging process, the system adds a type identifier header to each type of data, containing metadata such as data length and encoding method, to ensure accurate reconstruction at the decompression end. For example, a 2-byte type identifier is appended to numeric data, a 3-byte dictionary version number is appended to string data, and a 4-byte dictionary index cardinality is appended to nested messages. Through this structured encapsulation, the processed dataset maintains a high compression ratio while supporting random access and partial decompression, meeting the real-time requirements of in-vehicle systems.
[0064] Step S403: Compress the processing dataset using the target compression algorithm to obtain target compressed vehicle data.
[0065] It is understandable that the target compression algorithm determined above can be used to compress the data dataset, and the Brotli deep compression and LZ4 fast compression modes can be switched in real time according to the CPU load on the vehicle.
[0066] In operation, the system automatically selects either the Brotli or LZ4 algorithm based on the vehicle's current load status. When the vehicle is in low-load mode, the Brotli algorithm is prioritized for deep compression of numerical, string, and nested message data in the processing dataset, leveraging its high compression ratio to reduce storage usage. When the vehicle enters high-load mode, the system switches to the LZ4 algorithm for fast compression, ensuring data transmission efficiency through variable-length encoding and dictionary optimization techniques. During compression, the system dynamically monitors CPU utilization. When the load approaches a threshold, it automatically triggers an algorithm switching mechanism, accelerating the decompression process using the ARMNEON instruction set. The final compressed vehicle data packet uses a standardized encapsulation format, including data type identifiers, compression algorithm version numbers, timestamps, and CRC checksums to ensure data integrity and traceability during transmission and storage.
[0067] This embodiment categorizes the preprocessed time-series data into different field types, obtaining data of different field types. It then processes this data according to a hybrid encoding strategy to obtain a processed dataset. Finally, it compresses the processed dataset using the target compression algorithm to obtain the target compressed vehicle data. Through categorized data processing and a dynamic algorithm selection mechanism, a balanced optimization of compression ratio and processing efficiency is achieved.
[0068] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Step S20 includes steps S201 to S204: Step S201: Obtain time series data based on the vehicle serialization structure data.
[0069] It should be noted that this embodiment mainly targets multi-dimensional monitoring data generated during vehicle operation. To address the time drift problem of multi-source data, it is necessary to eliminate the redundancy of time-series data. Therefore, time-series data in the vehicle serialized structure data can be obtained.
[0070] Time series data contains complete vehicle operating status trajectories, providing an accurate time reference for subsequent differential processing.
[0071] Step S202: Obtain the sliding window difference algorithm, trend difference algorithm, and periodic difference algorithm based on the three-level difference algorithm.
[0072] It should be noted that the three-level difference algorithm consists of the sliding window difference algorithm, the trend difference algorithm, and the periodic difference algorithm.
[0073] In practical implementation, the sliding window difference algorithm calculates the difference between adjacent data points by setting a fixed time window, effectively capturing short-term fluctuation characteristics, such as the engine speed difference collected every 100 milliseconds; the trend difference algorithm uses polynomial fitting to eliminate linear trends, suitable for analyzing the long-term variation patterns of tire pressure data; and the periodic difference algorithm identifies periodic components through Fourier transform, specifically handling the brake pressure patterns that repeat every 500 milliseconds from the ABS sensor. These three algorithms constitute a complete three-level difference system, preserving the temporal characteristics of the original data while eliminating redundancy caused by time drift.
[0074] Step S203: Preprocess the time series data using the sliding window difference algorithm, the trend difference algorithm, and the period difference algorithm to obtain updated time series data.
[0075] In practice, sliding window differencing, trend differencing, and periodic differencing algorithms can be applied sequentially to time series data. For example, when processing battery voltage data, sliding window differencing is first used to eliminate high-frequency noise, then trend differencing is used to remove the linear upward trend of the charging process, and finally periodic differencing is used to eliminate the periodic fluctuations caused by daily charge-discharge cycles. After three levels of processing, the standard deviation of the differencing time series data is reduced by 62% compared to the original data, while retaining more than 98% of the effective feature information. This multi-level differencing preprocessing mechanism significantly improves the convergence speed of subsequent compression algorithms, especially when processing non-stationary time series data.
[0076] In one feasible implementation, step S203 may include steps C11-C14: Step C11: Use the sliding window difference algorithm to detect short-term fluctuations in the time series data to obtain time series data after short-term fluctuation elimination; It should be noted that the sliding window differencing algorithm is used to capture short-term fluctuations. Therefore, the sliding window differencing algorithm can be used to detect short-term fluctuations in time series data and eliminate the data with short-term fluctuations, so as to obtain time series data after the elimination of short-term fluctuations.
[0077] Step C12: Use the trend difference algorithm to perform trend difference on the time series data after the short-term fluctuations have been eliminated, to obtain the time series data after the linear change components have been eliminated; It is understandable that the trend differencing algorithm is used to remove linearly varying components. Therefore, the trend differencing algorithm can be used to remove linearly varying components from time series data after short-term fluctuations have been eliminated, resulting in time series data after the linearly varying components have been eliminated.
[0078] Step C13: Use the periodic difference algorithm to perform periodic difference on the time series data after the linear variation components have been eliminated, to obtain the time series data after the repetition pattern has been eliminated; In practice, the periodic differencing algorithm focuses on identifying and eliminating periodic repetitive patterns in time series data. Therefore, it can be used to remove periodic patterns from time series data after the linear variation components have been eliminated, resulting in time series data with eliminated repetitive patterns. This processing method effectively removes data fluctuations caused by periodic events (such as daily commuting peaks, weekly maintenance cycles, etc.), making the time series data more stable and facilitating subsequent analysis and processing. Time series data processed by periodic differencing not only retains the non-periodic variation information of the original data but also significantly improves data compressibility, providing cleaner and more effective input data for subsequent compression algorithms.
[0079] Step C14: Use the time series data after eliminating the repeating pattern as the updated time series data.
[0080] In practice, the time series data, after being processed by the periodic differencing algorithm to eliminate repeating patterns, is directly used as the updated time series data. This completes a comprehensive preprocessing of the original time series data. Through the synergistic effect of three levels of algorithms—sliding window differencing, trend differencing, and periodic differencing—short-term fluctuations, linear changes, and periodic repeating patterns in the time series data are effectively removed, while retaining the core feature information of the data. This provides a higher-quality data foundation for subsequent compression processing. This multi-level differencing preprocessing mechanism not only improves the compressibility of the data but also accelerates the convergence speed of the compression algorithm.
[0081] Step S204: Update the vehicle serialization structure data using the updated time series data to obtain preprocessed vehicle serialization structure data.
[0082] It should be noted that the updated time-series data can be backfilled into the original vehicle serialization structure data to complete the synchronous update of the data structure. The updated vehicle serialization structure data will serve as the input source for the next stage of compression processing, and its optimized data characteristics can significantly improve the running efficiency of subsequent compression algorithms.
[0083] This embodiment obtains time-series data based on the vehicle serialization structure data; it then uses a three-level difference algorithm to derive a sliding window difference algorithm, a trend difference algorithm, and a periodic difference algorithm; the time-series data is preprocessed using these algorithms to obtain updated time-series data; finally, the vehicle serialization structure data is updated using the updated time-series data to obtain preprocessed vehicle serialization structure data. This three-level difference preprocessing workflow achieves deep purification of multi-source vehicle time-series data, significantly reducing the amount of effective data and improving the efficiency of subsequent vehicle data compression.
[0084] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the vehicle data compression method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0085] This application also provides a vehicle data compression device, please refer to... Figure 4 The vehicle data compression device includes: The acquisition module 10 is used to acquire vehicle serialized structure data stored in serialized structure format and the current load status of the vehicle.
[0086] The preprocessing module 20 is used to preprocess the vehicle serialization structure data using a three-level difference algorithm to obtain preprocessed vehicle serialization structure data.
[0087] The determination module 30 is used to determine the target compression algorithm based on the current load status.
[0088] Compression module 40 is used to compress the preprocessed vehicle serialization structure data using a hybrid coding strategy through the target compression algorithm to obtain target compressed vehicle data.
[0089] The vehicle data compression device provided in this application, employing the vehicle data compression method described in the above embodiments, can solve the technical problem of low compression ratio in current vehicle data compression. Compared with the prior art, the beneficial effects of the vehicle data compression device provided in this application are the same as those of the vehicle data compression method provided in the above embodiments, and other technical features in the vehicle data compression device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0090] In one embodiment, the compression module 40 is further configured to divide the preprocessed time-series data into field types to obtain data of different field types; The data of different field types are processed according to a hybrid encoding strategy to obtain the processed dataset; The target compression algorithm is used to compress the processed dataset to obtain target compressed vehicle data.
[0091] In one embodiment, the compression module 40 is further configured to obtain numeric field data, string field data, and nested message data based on data of different field types; Numerical field data is converted into half-precision floating-point numbers according to a hybrid encoding strategy to obtain preliminary compressed data; Variable-length integer encoding is applied to the initial compressed data to generate compressed numeric field data; The string field data is encoded by encoding it using a binary tree based on automotive terminology to obtain encoded string field data; The nested message data is processed using an optimized dictionary compression algorithm to obtain optimized nested message data; The processed dataset is obtained based on the compressed numeric field data, the encoded string field data, and the optimized nested message data.
[0092] In one embodiment, the preprocessing module 20 is further configured to obtain time series data based on the vehicle serialization structure data; Based on the three-level difference algorithm, the sliding window difference algorithm, trend difference algorithm, and periodic difference algorithm are obtained; The time series data is preprocessed using the sliding window difference algorithm, the trend difference algorithm, and the period difference algorithm to obtain updated time series data. The vehicle serialization structure data is updated by updating the time series data to obtain preprocessed vehicle serialization structure data.
[0093] In one embodiment, the preprocessing module 20 is further configured to use the sliding window difference algorithm to perform short-term fluctuation detection on the time series data to obtain time series data after short-term fluctuation elimination; The trend difference algorithm is used to perform trend difference on the time series data after the short-term fluctuations are eliminated, and the time series data after the linear change components are eliminated is obtained. The periodic difference algorithm is used to perform periodic difference on the time series data after the linear variation component is eliminated, so as to obtain the time series data after the repetition pattern is eliminated. Use the time series data after removing the repeating pattern as the updated time series data.
[0094] In one embodiment, the determining module 30 is further configured to determine the current compression mode based on the current load state; When the current compression mode is deep compression mode, the target compression algorithm is determined to be the first compression algorithm; When the current compression mode is fast compression mode, the target compression algorithm is determined to be the second compression algorithm, wherein the compression ratio of the first compression algorithm is greater than the compression ratio of the second compression algorithm, and the compression speed of the first compression algorithm is less than the compression speed of the second compression algorithm.
[0095] In one embodiment, the determining module 30 is further configured to determine that the current compression mode is a deep compression mode when the current load state is less than a first preset load threshold. When the current load state is greater than the second preset load threshold, the current compression mode is determined to be the fast compression mode, wherein the first preset load threshold is less than the second preset load threshold.
[0096] This application provides a vehicle data compression device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the vehicle data compression method in the first embodiment described above.
[0097] The following is for reference. Figure 5 The diagram illustrates a structural schematic of a vehicle data compression device suitable for implementing embodiments of this application. The vehicle data compression device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5The vehicle data compression device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.
[0098] like Figure 5 As shown, the vehicle data compression device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the vehicle data compression device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touch screens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the vehicle data compression device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show vehicle data compression devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0099] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0100] The vehicle data compression device provided in this application, employing the vehicle data compression method described in the above embodiments, can solve the technical problem of low compression ratio in current vehicle data compression. Compared with the prior art, the beneficial effects of the vehicle data compression device provided in this application are the same as those of the vehicle data compression method provided in the above embodiments, and other technical features of this vehicle data compression device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0101] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0102] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0103] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the vehicle data compression method in the above embodiments.
[0104] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0105] The aforementioned computer-readable storage medium may be included in the vehicle data compression device; or it may exist independently and not be installed in the vehicle data compression device.
[0106] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the vehicle data compression device, the vehicle data compression device: acquires vehicle serialized structure data stored in a serialized structure format and the current load state of the vehicle; preprocesses the vehicle serialized structure data using a three-level differential algorithm to obtain preprocessed vehicle serialized structure data; determines a target compression algorithm based on the current load state; and compresses the preprocessed vehicle serialized structure data using a hybrid encoding strategy through the target compression algorithm to obtain target compressed vehicle data.
[0107] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0108] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0109] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0110] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described vehicle data compression method, which can solve the technical problem of low compression ratio in current vehicle data compression. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the vehicle data compression method provided in the above embodiments, and will not be repeated here.
[0111] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the vehicle data compression method described above.
[0112] The computer program product provided in this application can solve the technical problem of low compression ratio in current vehicle data compression. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the vehicle data compression method provided in the above embodiments, and will not be repeated here.
[0113] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for compressing vehicle data, characterized in that, The vehicle data compression method includes: Retrieve vehicle serialized structure data stored in serialized structure format and the vehicle's current load status; The vehicle serialization structure data is preprocessed using a three-level difference algorithm to obtain preprocessed vehicle serialization structure data. The target compression algorithm is determined based on the current load status; The target compression algorithm uses a hybrid coding strategy to compress the preprocessed vehicle serialization structure data to obtain the target compressed vehicle data.
2. The method as described in claim 1, characterized in that, The step of compressing the preprocessed vehicle serialized structure data using the target compression algorithm with a hybrid coding strategy to obtain the target compressed vehicle data includes: The preprocessed time series data is divided into field types to obtain data of different field types; The data of different field types are processed according to a hybrid encoding strategy to obtain the processed dataset; The target compression algorithm is used to compress the processed dataset to obtain target compressed vehicle data.
3. The method as described in claim 2, characterized in that, The steps of processing data of different field types according to the hybrid encoding strategy to obtain the processed dataset include: Based on different field types, we can obtain numeric field data, string field data, and nested message data; Numerical field data is converted into half-precision floating-point numbers according to a hybrid encoding strategy to obtain preliminary compressed data; Variable-length integer encoding is applied to the initial compressed data to generate compressed numeric field data; The string field data is encoded by encoding it using a binary tree based on automotive terminology to obtain encoded string field data; The nested message data is processed using an optimized dictionary compression algorithm to obtain optimized nested message data; The processed dataset is obtained based on the compressed numeric field data, the encoded string field data, and the optimized nested message data.
4. The method as described in claim 1, characterized in that, The step of preprocessing the vehicle serialization structure data using a three-level difference algorithm to obtain preprocessed vehicle serialization structure data includes: Time series data is obtained based on the vehicle serialization structure data; Based on the three-level difference algorithm, the sliding window difference algorithm, trend difference algorithm, and periodic difference algorithm are obtained; The time series data is preprocessed using the sliding window difference algorithm, the trend difference algorithm, and the period difference algorithm to obtain updated time series data. The vehicle serialization structure data is updated by updating the time series data to obtain preprocessed vehicle serialization structure data.
5. The method as described in claim 4, characterized in that, The step of preprocessing the time series data using the sliding window differencing algorithm, the trend differencing algorithm, and the periodic differencing algorithm to obtain updated time series data includes: The sliding window difference algorithm is used to detect short-term fluctuations in the time series data to obtain time series data after short-term fluctuations are eliminated. The trend difference algorithm is used to perform trend difference on the time series data after the short-term fluctuations are eliminated, and the time series data after the linear change components are eliminated is obtained. The periodic difference algorithm is used to perform periodic difference on the time series data after the linear variation component is eliminated, so as to obtain the time series data after the repetition pattern is eliminated. Use the time series data after removing the repeating pattern as the updated time series data.
6. The method as described in claim 1, characterized in that, The step of determining the target compression algorithm based on the current load state includes: The current compression mode is determined based on the current load status; When the current compression mode is deep compression mode, the target compression algorithm is determined to be the first compression algorithm; When the current compression mode is fast compression mode, the target compression algorithm is determined to be the second compression algorithm, wherein the compression ratio of the first compression algorithm is greater than the compression ratio of the second compression algorithm, and the compression speed of the first compression algorithm is less than the compression speed of the second compression algorithm.
7. The method as described in claim 6, characterized in that, The step of determining the current compression mode based on the current load state includes: When the current load state is less than a first preset load threshold, the current compression mode is determined to be a deep compression mode; When the current load state is greater than the second preset load threshold, the current compression mode is determined to be the fast compression mode, wherein the first preset load threshold is less than the second preset load threshold.
8. A vehicle data compression device, characterized in that, The device includes: The acquisition module is used to acquire vehicle serialized structure data stored in serialized structure format and the vehicle's current load status; The preprocessing module is used to preprocess the vehicle serialization structure data using a three-level difference algorithm to obtain preprocessed vehicle serialization structure data. The determination module is used to determine the target compression algorithm based on the current load status; The compression module is used to compress the preprocessed vehicle serialization structure data using a hybrid coding strategy through the target compression algorithm to obtain the target compressed vehicle data.
9. A vehicle data compression device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the vehicle data compression method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the vehicle data compression method as described in any one of claims 1 to 7.