Data compression method and device, data decompression method and device, vehicle, medium and product

By compressing the target attributes of the data to be compressed in the autonomous driving system, the problem of difficult data real-time and integrity in the prior art is solved, efficient data compression and decompression is achieved, data back-pass traffic is reduced and data retention ability is improved.

CN120017073APending Publication Date: 2025-05-16XIAOMI EV TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510112989.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In autonomous driving systems, existing data compression methods cannot meet the high requirements for real-time and integrity of data, and at the same time there are problems such as large data processing resources, limited data retention capacity, and large data back-pass traffic.

Method used

Provides a data compression method to compress multiple target messages according to the target attributes by obtaining the data to be compressed and determining its target attributes. The method includes generating a hash table and generating compressed messages based on target attributes, supporting lossless and lossy compression.

Benefits of technology

While ensuring data integrity and real-time, it effectively improves data compression efficiency, reduces data backhaul traffic, and improves data retention capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017073A_ABST
    Figure CN120017073A_ABST
Patent Text Reader

Abstract

The invention relates to a data compression method and device, a data decompression method and device, a vehicle, a medium and a product, and the method comprises the steps: obtaining to-be-compressed data which comprises a plurality of target messages; determining a target attribute of the to-be-compressed data, the target attribute being a first attribute or a second attribute, the first attribute being used for representing that the to-be-compressed data belong to lossless compressed data, and the second attribute being used for representing that the to-be-compressed data belong to lossy compressed data; and compressing the plurality of target messages in the to-be-compressed data according to the target attributes. Thus, by obtaining the to-be-compressed data, determining the target attribute of the to-be-compressed data and compressing the multiple target messages in the to-be-compressed data according to the target attribute, when the to-be-compressed data of the first attribute is compressed, the integrity and the real-time performance of the to-be-compressed data can be effectively guaranteed; when the to-be-compressed data of the second attribute is compressed, the real-time performance of the to-be-compressed data can be ensured, and meanwhile, the compression efficiency of the data can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular to a data compression method, a data decompression method, a device, a vehicle, a medium and a product. Background Art

[0002] With the development of autonomous driving technology, the amount of data generated by vehicles is growing exponentially. When processing the monitoring data generated by autonomous driving vehicles, there are problems such as high data processing resource consumption, limited data retention capacity, and large data return traffic.

[0003] In order to support higher system performance, longer data retention and reduce data return traffic, it is necessary to compress the monitoring data generated and stored on disk. The data compression methods in the existing technology may not meet the high requirements of the autonomous driving system for data real-time and integrity. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a data compression method, a data decompression method, a device, a vehicle, a medium and a product.

[0005] According to a first aspect of an embodiment of the present disclosure, a data compression method is provided, the method comprising: Acquire data to be compressed, where the data to be compressed includes a plurality of target messages; Determine a target attribute of the data to be compressed, the target attribute being a first attribute or a second attribute, wherein the first attribute is used to characterize the data as lossless compressed data, and the second attribute is used to characterize the data as lossy compressed data; The multiple target messages in the data to be compressed are compressed according to the target attributes.

[0006] Optionally, compressing the multiple target messages in the data to be compressed according to the target attribute includes: Determine a message header and a message body of each target message, wherein the message header includes the message identifier and the message tag, and the message body includes a timestamp and message content; Generate a hash table according to the message identifier and the message tag in each of the target messages in the data to be compressed; A target compressed message corresponding to the multiple target messages is generated according to the target attribute, the hash table, the timestamp of each target message, and the message content.

[0007] Optionally, the hash table is used to represent the correspondence between the common data in the target message and the index information of each of the target messages, and the generating of the target compressed messages corresponding to the multiple target messages according to the target attribute, the hash table, and the timestamp and the message content of each of the target messages includes: Generate a compressed message header of the target compressed message according to the hash table; A compressed message body of the target compressed message is generated according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message.

[0008] Optionally, generating a compressed message body of the target compressed message according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message includes: In the case where it is determined that the target attribute is the first attribute, if it is determined that the data to be compressed is time-sensitive data, determining a shared timestamp set according to the timestamp of each of the target messages in the multiple target messages; A compressed message body of the target compressed message is generated according to the shared timestamp set, the index information in the hash table, and the message content.

[0009] Optionally, determining a shared timestamp set according to the timestamp of each of the multiple target messages includes: When it is determined that there is at least one set of equal target timestamps among the multiple timestamps corresponding to the multiple target messages, the target timestamps are used as elements in the shared timestamp set.

[0010] Optionally, the shared timestamp set includes at least one shared timestamp, and generating a compressed message body of the target compressed message according to the shared timestamp set, index information in the hash table, and the message content includes: Determine the standby message content corresponding to each of the multiple standby messages corresponding to each of the shared timestamps; Determine the target index information corresponding to the standby message in the list; A compressed message body of the target compressed message is generated according to the multiple standby message contents corresponding to each shared timestamp, the multiple target index information and the shared timestamp, wherein the compressed message body includes the shared timestamp, the correspondence data between the standby message contents and the target index information.

[0011] Optionally, generating a compressed message body of the target compressed message according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message includes: In the case where the target attribute is determined to be the first attribute, if the data to be compressed is determined to be non-time-sensitive data, a compressed message body of the target compressed message is generated according to the index information in the hash table and the timestamp and message content of each target message.

[0012] Optionally, generating a compressed message body of the target compressed message according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message includes: In the case where it is determined that the target attribute is the second attribute, obtaining a sampling interval and a start timestamp of each target message, where the start timestamp is a timestamp of first sampling of the target message; A compressed message body of the target compressed message is generated according to the start timestamp, the sampling interval, the index information in the hash table and the message content.

[0013] According to a second aspect of an embodiment of the present disclosure, a data decompression method is provided, the method comprising: Acquire data to be decompressed, wherein the data to be decompressed includes a target compressed message; Determine a target attribute of the data to be decompressed, where the target attribute is a first attribute or a second attribute, wherein the first attribute is used to characterize the data as lossless compressed data, and the second attribute is used to characterize the data as lossy compressed data; The target compressed message in the data to be decompressed is decompressed according to the target attribute.

[0014] Optionally, decompressing the target compressed message in the to-be-decompressed data according to the target attribute includes: Determine a compressed message header and a compressed message body of the target compressed message, wherein the compressed message header includes a hash table, the hash table is used to represent the correspondence between common data of multiple decompressed messages and index information of each of the decompressed messages, and the compressed message body includes a timestamp, message content, and index information in the hash table of each of the decompressed messages; A plurality of decompressed messages corresponding to the target compressed message are generated according to the target attribute, the hash table, the timestamp of the decompressed message and the message content.

[0015] Optionally, generating a plurality of decompressed messages corresponding to the target compressed message according to the target attribute, the hash table, the timestamp of the decompressed message and the message content includes: In the case where it is determined that the target attribute is the first attribute, if it is determined that the data to be decompressed is time-sensitive data, determining the common data of each of the decompressed messages according to the index information of each of the decompressed messages in the compressed message header; Determine a decompression timestamp of each of the decompressed messages according to index information of each of the decompressed messages in the compressed message body; For each of the decompressed messages, a message header of the decompressed message is generated according to the common data of the decompressed message, and a message body of the decompressed message is generated according to the decompression timestamp of the decompressed message and the message content of the decompressed message.

[0016] Optionally, determining a decompression timestamp of each of the decompressed messages from the compressed message body includes: According to the index information of each decompressed message in the compressed message body, the shared timestamp corresponding to the decompressed message is determined from the shared timestamp set in the compressed message body, and the shared timestamp is used as the decompression timestamp of the decompressed message, and the shared timestamp set includes at least one shared timestamp.

[0017] Optionally, determining a decompression timestamp of each of the decompressed messages from the compressed message body includes: When it is determined that the target attribute is the first attribute, if it is determined that the data to be decompressed is non-time-sensitive data, the timestamp corresponding to the decompressed message is determined according to the index information of each decompressed message in the compressed message body, and the timestamp corresponding to the decompressed message is used as the decompression timestamp.

[0018] Optionally, generating a plurality of decompressed messages corresponding to the target compressed message according to the target attribute, the hash table, the timestamp of the decompressed message and the message content includes: When it is determined that the target attribute is the second attribute, the start timestamp and sampling interval corresponding to the decompressed message are determined from the compressed message body according to the index information of each decompressed message, and the start timestamp and the sampling interval are used as the decompression timestamp of the decompressed message.

[0019] According to a third aspect of an embodiment of the present disclosure, a data compression device is provided, the device comprising: A first acquisition module is configured to acquire data to be compressed, wherein the data to be compressed includes a plurality of target messages; A first determination module is configured to determine a target attribute of the data to be compressed, wherein the target attribute is a first attribute or a second attribute, wherein the first attribute is used to indicate that the data belongs to lossless compression, and the second attribute is used to indicate that the data belongs to lossy compression; The compression module is configured to compress the multiple target messages in the data to be compressed according to the target attribute.

[0020] Optionally, the compression module is further configured to: Determine a message header and a message body of each target message, wherein the message header includes the message identifier and the message tag, and the message body includes a timestamp and message content; Generate a hash table according to the message identifier and the message tag in each of the target messages in the data to be compressed; A target compressed message corresponding to the multiple target messages is generated according to the target attribute, the hash table, the timestamp of each target message, and the message content.

[0021] Optionally, the hash table is used to represent the correspondence between the common data in the target message and the index information of each target message, and the compression module is further configured to: Generate a compressed message header of the target compressed message according to the hash table; A compressed message body of the target compressed message is generated according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message.

[0022] Optionally, the compression module is further configured to: In the case where it is determined that the target attribute is the first attribute, if it is determined that the data to be compressed is time-sensitive data, determining a shared timestamp set according to the timestamp of each of the target messages in the multiple target messages; A compressed message body of the target compressed message is generated according to the shared timestamp set, the index information in the hash table, and the message content.

[0023] Optionally, the compression module is further configured to: When it is determined that there is at least one set of equal target timestamps among the multiple timestamps corresponding to the multiple target messages, the target timestamps are used as elements in the shared timestamp set.

[0024] Optionally, the shared timestamp set includes at least one shared timestamp, and the compression module is further configured to: Determine the standby message content corresponding to each of the multiple standby messages corresponding to each of the shared timestamps; Determine the target index information corresponding to the standby message in the list; A compressed message body of the target compressed message is generated according to the multiple standby message contents corresponding to each shared timestamp, the multiple target index information and the shared timestamp, wherein the compressed message body includes the shared timestamp, the correspondence data between the standby message contents and the target index information.

[0025] Optionally, the compression module is further configured to: In the case where the target attribute is determined to be the first attribute, if the data to be compressed is determined to be non-time-sensitive data, a compressed message body of the target compressed message is generated according to the index information in the hash table and the timestamp and message content of each target message.

[0026] Optionally, the compression module is further configured to: In the case where it is determined that the target attribute is the second attribute, obtaining a sampling interval and a start timestamp of each target message, where the start timestamp is a timestamp of first sampling of the target message; A compressed message body of the target compressed message is generated according to the start timestamp, the sampling interval, the index information in the hash table and the message content.

[0027] According to a fourth aspect of an embodiment of the present disclosure, a data decompression device is provided, the device comprising: A second acquisition module is configured to acquire data to be decompressed, wherein the data to be decompressed includes a target compressed message; A second determination module is configured to determine a target attribute of the data to be decompressed, wherein the target attribute is a first attribute or a second attribute, wherein the first attribute is used to indicate that the data is losslessly compressed, and the second attribute is used to indicate that the data is lossily compressed; The decompression module is configured to decompress the target compressed message in the data to be decompressed according to the target attribute.

[0028] Optionally, the decompression module is further configured to: Determine a compressed message header and a compressed message body of the target compressed message, wherein the compressed message header includes a hash table, the hash table is used to represent the correspondence between common data of multiple decompressed messages and index information of each of the decompressed messages, and the compressed message body includes a timestamp, message content, and index information in the hash table of each of the decompressed messages; A plurality of decompressed messages corresponding to the target compressed message are generated according to the target attribute, the hash table, the timestamp of the decompressed message and the message content.

[0029] Optionally, the decompression module is further configured to: In the case where it is determined that the target attribute is the first attribute, if it is determined that the data to be decompressed is time-sensitive data, determining common data of each of the decompressed messages according to the index information in the compressed message header; Determine a decompression timestamp of each of the decompressed messages according to the index information in the compressed message body; For each of the decompressed messages, a message header of the decompressed message is generated according to the common data of the decompressed message, and a message body of the decompressed message is generated according to the decompression timestamp of the decompressed message and the message content of the decompressed message.

[0030] Optionally, the decompression module is further configured to: According to the index information in the compressed message body, the shared timestamp corresponding to the decompressed message is determined from the shared timestamp set in the compressed message body, and the shared timestamp is used as the decompression timestamp of the decompressed message, and the shared timestamp set includes at least one of the shared timestamps.

[0031] Optionally, the decompression module is further configured to: When it is determined that the target attribute is the first attribute, if it is determined that the data to be decompressed is non-time-sensitive data, the timestamp corresponding to the decompressed message is determined according to the index information in the compressed message body, and the timestamp corresponding to the decompressed message is used as the decompression timestamp.

[0032] Optionally, the decompression module is further configured to: When it is determined that the target attribute is the second attribute, the start timestamp and sampling interval corresponding to the decompressed message are determined from the compressed message body according to the index information of each decompressed message, and the start timestamp and the sampling interval are used as the decompression timestamp of the decompressed message.

[0033] According to a fifth aspect of an embodiment of the present disclosure, a vehicle is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to implement the steps of the method provided in the first aspect and / or the second aspect.

[0034] According to a sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method provided in the first aspect and / or the second aspect of the present disclosure are implemented.

[0035] According to a seventh aspect of an embodiment of the present disclosure, a computer program is provided, which, when executed by a processor, implements the steps of the method provided in the first aspect and / or the second aspect of the present disclosure.

[0036] The above technical scheme obtains the data to be compressed and determines the target attributes of the data to be compressed, and compresses the multiple target messages in the data to be compressed according to the target attributes. When compressing the data to be compressed with the first attribute, it can effectively ensure the integrity and real-time performance of the data to be compressed, and can also effectively improve the data compression efficiency; when compressing the data to be compressed with the second attribute, it can ensure the real-time performance of the data to be compressed, and can also effectively improve the data compression efficiency.

[0037] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0039] Figure 1 is a flow chart of a data compression method according to an exemplary embodiment; Figure 2 is based on Figure 1 The illustrated embodiment shows a flow chart of a data compression method; Figure 3 is based on Figure 2 The illustrated embodiment shows a flow chart of a data compression method; Figure 4 is based on Figure 3 The illustrated embodiment shows a flow chart of a data compression method; Figure 5 is based on Figure 3 A flow chart of another data compression method shown in the illustrated embodiment; Figure 6 is a schematic diagram showing a data compression method according to an exemplary embodiment; Figure 7 is a flow chart of a data decompression method according to an exemplary embodiment; Figure 8 is based on Figure 7 A flow chart of a data decompression method shown in the illustrated embodiment; Fig. 9 is based on Figure 8 A flow chart of a data decompression method shown in the illustrated embodiment; Fig.10 is a block diagram of a data compression device according to an exemplary embodiment; Fig.11 is a block diagram of a data decompression device according to an exemplary embodiment; Fig.12 is a block diagram of a vehicle according to an exemplary embodiment; Fig.13 is a block diagram of a device for data compression according to an exemplary embodiment; Fig.14 A chip system is shown according to an exemplary embodiment. DETAILED DESCRIPTION

[0040] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0041] Before introducing the specific implementation methods of the present disclosure in detail, the application scenarios of the present disclosure are first described as follows. The present disclosure can be applied to multiple application scenarios in an autonomous driving system for data compression of monitoring data. In application scenarios where data return traffic is limited, such as scenarios where data transmission bandwidth is limited or cost-sensitive, it is necessary to reduce the data return traffic through compression technology. The data compression method in the prior art has the problem of large data return traffic. In application scenarios where data needs to be retained for a long time, such as the monitoring system of an autonomous driving vehicle, it is necessary to save the data of the vehicle's operating status for a long time in order to perform fault analysis and performance optimization. The data compression method in the prior art has the problem of limited data retention capacity. In application scenarios where data processing performance is high, such as on an embedded platform with limited resources, it is necessary to consider the impact of resource consumption caused by processing data on the current system operation, and the data compression method in the prior art has the problem of large data processing resource consumption. In application scenarios with high real-time requirements, such as an autonomous driving system, it is necessary to monitor the vehicle status in real time and respond quickly to abnormal situations. Therefore, the data compression methods in the prior art cannot meet the high requirements of the autonomous driving system for data real-time and integrity, nor can they effectively reduce the costs of data processing, storage and transmission while ensuring data integrity and real-time.

[0042] In order to solve the above problems, the scheme disclosed in the present invention obtains the data to be compressed and determines the target attributes of the data to be compressed, and compresses the multiple target messages in the data to be compressed according to the target attributes. When compressing the data to be compressed with the first attribute, the integrity and real-time performance of the data to be compressed can be effectively guaranteed, and the data compression efficiency can be effectively improved; when compressing the data to be compressed with the second attribute, the real-time performance of the data to be compressed can be guaranteed, and the data compression efficiency can be effectively improved.

[0043] Figure 1 is a flow chart of a data compression method according to an exemplary embodiment. Figure 1 As shown, the data compression method includes the following steps.

[0044] Step 101: Obtain data to be compressed.

[0045] The data to be compressed includes multiple target messages.

[0046] In this step, the data to be compressed can be collected through the monitoring module in the autonomous driving system. The data to be compressed includes data that is only written to the disk and data that needs to be transmitted back. The data that is only written to the disk includes data that is locally archived, stored for a long time, or analyzed afterwards, and usually does not need to be transmitted to a remote server or other nodes in real time. The data that needs to be transmitted back includes data that needs to be transmitted to a remote server in real time or quasi-real time for monitoring, data analysis, model training, or cloud-based decision support.

[0047] Step 102: Determine the target attribute of the data to be compressed.

[0048] The target attribute is a first attribute or a second attribute, the first attribute is used to characterize lossless compressed data, and the second attribute is used to characterize lossy compressed data.

[0049] In this step, the target attribute of the data to be compressed may be determined according to the data identifier of the data to be compressed and in accordance with a preset classification standard.

[0050] For example, the preset classification criteria include that position data belongs to lossless compression data, and ambient temperature data belongs to lossy compression data. If it is determined that the data to be compressed is position data, the target attribute of the data to be compressed can be determined to be the first attribute; if it is determined that the data to be compressed is ambient temperature data, the target attribute of the data to be compressed can be determined to be the second attribute.

[0051] Step 103: compress the multiple target messages in the data to be compressed according to the target attributes.

[0052] In this step, the message header and message body of each target message can be determined, the message header including the message identifier and the message tag, and the message body including the timestamp and the message content; a hash table is generated according to the message identifier and the message tag in each target message in the data to be compressed; and a target compressed message corresponding to the multiple target messages is generated according to the target attributes, the hash table, and the timestamp and the message content of each target message.

[0053] The above technical scheme obtains the data to be compressed and determines the target attributes of the data to be compressed, and compresses the multiple target messages in the data to be compressed according to the target attributes. When compressing the data to be compressed with the first attribute, it can effectively ensure the integrity and real-time performance of the data to be compressed, and can also effectively improve the data compression efficiency; when compressing the data to be compressed with the second attribute, it can ensure the real-time performance of the data to be compressed, and can also effectively improve the data compression efficiency.

[0054] Figure 2 is based on Figure 1 The embodiment shown is a flow chart of a data compression method, such as Figure 2 As shown, Figure 1 The step 103 of compressing the multiple target messages in the data to be compressed according to the target attribute may include: Step 1031, determining the message header and message body of each of the target messages.

[0055] The message header includes the message identifier and message tag, and the message body includes a timestamp and message content.

[0056] For example, each message includes a Header and a Body, wherein the Header includes the message identifier name and message labels, and the Body includes a timestamp for obtaining the message and a message content value.

[0057] Step 1032: Generate a hash table according to the message identifier and the message tag in each of the target messages in the data to be compressed.

[0058] The hash table is used to represent the corresponding relationship between the common data in the target message and the index information of each target message.

[0059] In this step, multiple hash keys are obtained through hash calculation based on the message identifier and the message tag in each target message. When it is determined that multiple different messages generate the same hash key, the deduplicated hash key is used as the hash table.

[0060] Step 1033: Generate target compressed messages corresponding to the multiple target messages according to the target attributes, the hash table, and the timestamp and message content of each target message.

[0061] In this step, the compressed message header of the target compressed message can be generated according to the hash table; the compressed message body of the target compressed message can be generated according to the target attribute, the index information in the hash table, and the timestamp and message content of each target message.

[0062] The above technical scheme generates target compressed messages corresponding to the multiple target messages according to the target attributes, the hash table, the timestamp of each target message and the message content. It can compress the multiple target messages to be compressed with different attributes of the data to be compressed, ensure the integrity and / or real-time performance of the data to be compressed, and can also effectively improve the data compression efficiency.

[0063] Figure 3 is based on Figure 2 The embodiment shown is a flow chart of a data compression method, such as Figure 3 As shown, Figure 2 Generating the target compressed messages corresponding to the multiple target messages according to the target attribute, the hash table, the timestamp of each target message, and the message content in step 1033 may include: S1, generating a compressed message header of the target compressed message according to the hash table.

[0064] The hash table is used to represent the corresponding relationship between the common data in the target message and the index information of each target message.

[0065] In this step, the hash table is filled into the compressed message header of the target compressed message.

[0066] S2, generating a compressed message body of the target compressed message according to the target attribute, the index information in the hash table, and the timestamp and message content of each target message.

[0067] In this step, when it is determined that the target attribute is the first attribute, if it is determined that the data to be compressed is time-sensitive data, a shared timestamp set is determined according to the timestamp of each target message in the multiple target messages; based on the shared timestamp set, the index information in the hash table and the message content generate a compressed message body of the target compressed message.

[0068] The above technical scheme generates a compressed message header of the target compressed message according to the hash table, which can deduplicate common data in multiple target messages while ensuring data integrity, thereby effectively improving data compression efficiency. Compressing the multiple target messages in the data to be compressed according to the target attributes can also further effectively improve data compression efficiency.

[0069] Figure 4 is based on Figure 3 The embodiment shown is a flow chart of a data compression method, such as Figure 4 As shown, Figure 3 Generating the compressed message body of the target compressed message according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message as described in S2 may include: S21, when it is determined that the target attribute is the first attribute, if it is determined that the data to be compressed is time-sensitive data, determine a shared timestamp set according to the timestamp of each of the multiple target messages.

[0070] The time-sensitive data may be data related to memory, CPU or location.

[0071] In this step, when it is determined that there is at least one set of equal target timestamps among the multiple timestamps corresponding to the multiple target messages, the target timestamps are used as elements in the shared timestamp set.

[0072] For example, the data to be compressed includes 4 target messages, the timestamp of the first message is 2:01, the timestamp of the second message is 3:01, the timestamp of the third message is 2:01, and the timestamp of the fourth message is 2:01. It can be determined that the target timestamp is 2:01, and 2:01 is used as an element in the shared timestamp set.

[0073] S22: Generate a compressed message body of the target compressed message according to the shared timestamp set, the index information in the hash table, and the message content.

[0074] The shared timestamp set includes at least one shared timestamp.

[0075] In this step, the standby message content corresponding to each of the multiple standby messages corresponding to each shared timestamp is determined; and the target index information corresponding to the standby message in the index table is determined; and a compressed message body of the target compressed message is generated according to the multiple standby message contents corresponding to each shared timestamp, the multiple target index information and the shared timestamp, wherein the compressed message body includes the shared timestamp, the correspondence data between the standby message content and the target index information.

[0076] In the above technical solution, when it is determined that the target attribute is the first attribute, if it is determined that the data to be compressed is time-sensitive data, the compressed message body of the target compressed message is generated according to the shared timestamp set, the index information in the hash table, and the message content. By aligning the timestamps of multiple target messages and determining the shared timestamp, the data volume can be greatly reduced while keeping the data lossless.

[0077] Optionally, Figure 3 Generating the compressed message body of the target compressed message according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message as described in S2 may include: In the case where the target attribute is determined to be the first attribute, if the data to be compressed is determined to be non-time-sensitive data, a compressed message body of the target compressed message is generated according to the index information in the hash table and the timestamp and message content of each target message.

[0078] The non-time-sensitive data may be data in a compatible compression format.

[0079] In this step, the timestamp of each target message and the message content corresponding to each target message can be determined; and the first index information corresponding to the target message in the target table can be determined; according to the timestamp of each target message, the message content corresponding to each target message and the index information of each target message, a compressed message body of the target compressed message is generated, and the compressed message body includes the timestamp of each target message, the message content corresponding to each target message and the corresponding relationship data of the index information corresponding to each target message.

[0080] The above technical scheme, when it is determined that the target attribute is the first attribute, if it is determined that the data to be compressed is non-time-sensitive data, generates a compressed message body of the target compressed message according to the timestamp of the target message, the index information in the hash table, and the message content, which can achieve a significant reduction in data volume and keep the data lossless.

[0081] Figure 5 is based on Figure 3 The embodiment shown is a flow chart of a data compression method, such as Figure 5 As shown, Figure 3 Generating the compressed message body of the target compressed message according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message as described in S2 may include: S23: When it is determined that the target attribute is the second attribute, obtain a sampling interval and a start timestamp of each target message.

[0082] The start timestamp is the timestamp of the first collection of the target message, and the sampling interval is the frequency of collecting the timestamp of the target message.

[0083] It should be noted that when compressing the data to be compressed belonging to the second attribute, it is lossy compression, and the data to be compressed may be data that allows a slight time deviation.

[0084] S24: Generate a compressed message body of the target compressed message according to the start timestamp, the sampling interval, the index information in the hash table and the message content.

[0085] In this step, the message content of the target message corresponding to the start timestamp of each target message and the sampling interval of the target message is used, and the index information corresponding to the target message in the hash table is determined; the compressed message body of the target compressed message is generated according to the start timestamp and sampling interval of each target message, the message content of each target message and the index information corresponding to each target message, and the compressed message body includes the start timestamp and sampling interval, the message content of the target message and the corresponding relationship data of the index information of the target message.

[0086] The above technical solution, when determining that the target attribute is the second attribute, generates a compressed message body of the target compressed message according to the start timestamp, the sampling interval, the index information in the hash table and the message content, which can achieve a significant reduction in data volume.

[0087] Figure 6 is a schematic diagram of a data compression method according to an exemplary embodiment. Figure 6As shown, each Message includes a Header and a Body, wherein the Header includes the message identifier name, message labels and sampling interval step, and the Body includes a timestamp timestamp and a message content value. The attribute of the data to be compressed is determined to be the second attribute, and the data to be compressed includes multiple MessageA and MessageB. After periodic filtering and aggregation of multiple MessageA and MessageB, multiple hash keys are obtained through hash calculation according to the name and labels in each MessageA and MessageB. When it is determined that multiple different messages generate the same hash key, the deduplicated hash key is used as the hash table. The hash table and the sampling interval are stored in the Header of the CompressMessage compressed message, and the index, timestamp timestamp and message content value in the hash table are stored in the Body of the CompressMessage compressed message to complete the compression of the data to be compressed. When the downstream algorithm user needs to decompress the CompressMessage compressed message, the CompressMessage compressed message can be obtained through the data channel, and the hash_key mapping table is obtained through the shared memory to decompress the CompressMessage compressed message.

[0088] Figure 7 is a flow chart of a data decompression method according to an exemplary embodiment. Figure 6 As shown, the data decompression method includes the following steps.

[0089] Step 701, obtaining data to be decompressed.

[0090] The data to be decompressed includes a target compressed message.

[0091] Step 702: Determine the target attribute of the data to be decompressed.

[0092] The target attribute is a first attribute or a second attribute, wherein the first attribute is used to characterize lossless compressed data, and the second attribute is used to characterize lossy compressed data.

[0093] In this step, the target attribute of the data to be decompressed may be determined according to the data identifier of the data to be decompressed and in accordance with a preset classification standard.

[0094] For example, the preset classification criteria include that position data belongs to lossless compressed data, and ambient temperature data belongs to lossy compressed data. If it is determined that the data to be decompressed is position data, the target attribute of the data to be decompressed can be determined to be the first attribute; if it is determined that the data to be decompressed is ambient temperature data, the target attribute of the data to be decompressed can be determined to be the second attribute.

[0095] Step 703: decompress the target compressed message in the data to be decompressed according to the target attribute.

[0096] In this step, the compressed message header and compressed message body of the target compressed message can be determined, the compressed message header includes a hash table, the hash table is used to represent the correspondence between common data of multiple decompressed messages and index information of each decompressed message, and the compressed message body includes the timestamp, message content and index information in the hash table of each decompressed message; according to the target attribute, the hash table, the timestamp of the decompressed message and the message content generate multiple decompressed messages corresponding to the target compressed message.

[0097] The above technical scheme obtains the data to be decompressed and determines the target attribute of the data to be decompressed, and decompresses the target compressed message in the data to be decompressed according to the target attribute. When decompressing the data to be decompressed with a first attribute, the integrity and real-time performance of the data to be decompressed can be effectively guaranteed, and the data decompression efficiency can be effectively improved; when decompressing the data to be decompressed with a second attribute, the real-time performance of the data to be decompressed can be guaranteed, and the data decompression efficiency can be effectively improved.

[0098] Figure 8 is based on Figure 7 The embodiment shown is a flow chart of a data decompression method, such as Figure 2 As shown, Figure 7 Decompressing the target compressed message in the to-be-decompressed data according to the target attribute in step 703 may include: Step 7031, determine the compressed message header and compressed message body of the target compressed message, the compressed message header includes a hash table.

[0099] The hash table is used to represent the correspondence between common data of multiple decompressed messages and index information of each decompressed message, and the compressed message body includes the timestamp, message content and index information in the hash table of each decompressed message.

[0100] Step 7032: Generate multiple decompressed messages corresponding to the target compressed message according to the target attribute, the hash table, the timestamp of the decompressed message and the message content.

[0101] The target attribute is a first attribute or a second attribute, wherein the first attribute is used to characterize lossless compressed data, and the second attribute is used to characterize lossy compressed data.

[0102] The above technical solution can effectively ensure the integrity and / or real-time performance of the data to be decompressed, and can also effectively improve the decompression efficiency of the data, by decompressing the target compressed message in the data to be decompressed according to the target attribute.

[0103] Fig. 9 is based on Figure 8 The embodiment shown is a flow chart of a data decompression method, such as Figure 8 As shown, Figure 8 Generating a plurality of decompressed messages corresponding to the target compressed message according to the target attribute, the hash table, the timestamp of the decompressed message, and the message content in step 7032 may include: Step 901, when it is determined that the target attribute is the first attribute, if it is determined that the data to be decompressed is time-sensitive data, determine the common data of each decompressed message according to the index information of each decompressed message in the compressed message header.

[0104] The first attribute is lossless compression.

[0105] Step 902: Determine the decompression timestamp of each decompressed message according to the index information of each decompressed message in the compressed message body.

[0106] In this step, the shared timestamp corresponding to the decompressed message is determined from the shared timestamp set in the compressed message body according to multiple index information in the compressed message body, and the shared timestamp is used as the decompression timestamp of the decompressed message. The shared timestamp set includes at least one shared timestamp.

[0107] For example, the shared timestamp set includes a shared timestamp of 2:01 and a shared timestamp of 2:02, and the compressed message body includes three index information. The shared timestamp corresponding to the first index information is 2:01, the shared timestamp corresponding to the second index information is 2:01, and the shared timestamp corresponding to the third index information is 2:02. It can be determined that the decompression timestamp of the first index information and the second index information is 2:01, and the decompression timestamp of the third index information is 2:02.

[0108] Step 903: for each of the decompressed messages, generate a message header of the decompressed message according to the common data of the decompressed message, and generate a message body of the decompressed message according to the decompression timestamp of the decompressed message and the message content of the decompressed message.

[0109] Optionally, Fig. 9 Determining the decompression timestamp of each decompressed message according to the index information of each decompressed message in the compressed message body in step 902 may also include: When it is determined that the target attribute is the first attribute, if it is determined that the data to be decompressed is non-time-sensitive data, the timestamp corresponding to the decompressed message is determined according to the index information in the compressed message body, and the timestamp corresponding to the decompressed message is used as the decompression timestamp.

[0110] For example, the compressed message body includes 3 index information, the shared timestamp corresponding to the first index information is 2:01, the shared timestamp corresponding to the second index information is 2:03, and the shared timestamp corresponding to the third index information is 2:02. It can be determined that the decompression timestamp of the decompressed message corresponding to the first index information is 2:01, the decompression timestamp of the decompressed message corresponding to the second index information is 2:03, and the decompression timestamp of the third index information is 2:02.

[0111] Optionally, Figure 8 Generating a plurality of decompressed messages corresponding to the target compressed message according to the target attribute, the hash table, the timestamp of the decompressed message, and the message content in step 7032 may also include: When it is determined that the target attribute is the second attribute, the start timestamp and sampling interval corresponding to the decompressed message are determined from the compressed message body according to the index information of each decompressed message, and the start timestamp and the sampling interval are used as the decompression timestamp of the decompressed message.

[0112] The start timestamp is the timestamp of the first collection of the decompressed message in the target compressed message.

[0113] For example, the decompressed message needs to be collected three times. The compressed message body includes three index information. The start timestamp corresponding to the first index information is 2:01 and the sampling interval is 1 minute. It can be determined that the decompression timestamp corresponding to the second index information is 2:02 and the decompression timestamp corresponding to the third index information is 2:03.

[0114] The above technical solution can effectively ensure the integrity and real-time performance of the data to be decompressed, and can also effectively improve the decompression efficiency of the data, by decompressing the target compressed message in the data to be decompressed according to the target attribute.

[0115] Fig.10 is a block diagram of a data compression device according to an exemplary embodiment. Fig.10 , the device comprises: The first acquisition module 1001 is configured to acquire data to be compressed, where the data to be compressed includes a plurality of target messages; A first determining module 1002 is configured to determine a target attribute of the data to be compressed, wherein the target attribute is a first attribute or a second attribute, wherein the first attribute is used to indicate that the data is losslessly compressed, and the second attribute is used to indicate that the data is lossily compressed; The compression module 1003 is configured to compress the multiple target messages in the data to be compressed according to the target attribute.

[0116] Optionally, the compression module 1003 is further configured to: Determine a message header and a message body of each target message, wherein the message header includes the message identifier and the message tag, and the message body includes a timestamp and message content; Generate a hash table according to the message identifier and the message tag in each of the target messages in the data to be compressed; A target compressed message corresponding to the multiple target messages is generated according to the target attribute, the hash table, the timestamp of each target message, and the message content.

[0117] Optionally, the hash table is used to represent the corresponding relationship between the common data in the target message and the index information of each target message, and the compression module 1003 is further configured to: Generate a compressed message header of the target compressed message according to the hash table; A compressed message body of the target compressed message is generated according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message.

[0118] Optionally, the compression module 1003 is further configured to: In the case where it is determined that the target attribute is the first attribute, if it is determined that the data to be compressed is time-sensitive data, determining a shared timestamp set according to the timestamp of each of the target messages in the multiple target messages; A compressed message body of the target compressed message is generated according to the shared timestamp set, the index information in the hash table, and the message content.

[0119] Optionally, the compression module 1003 is further configured to: When it is determined that there is at least one set of equal target timestamps among the multiple timestamps corresponding to the multiple target messages, the target timestamps are used as elements in the shared timestamp set.

[0120] Optionally, the shared timestamp set includes at least one shared timestamp, and the compression module 1003 is further configured to: Determine the standby message content corresponding to each of the multiple standby messages corresponding to each of the shared timestamps; Determine the target index information corresponding to the standby message in the list; A compressed message body of the target compressed message is generated according to the multiple standby message contents corresponding to each shared timestamp, the multiple target index information and the shared timestamp, wherein the compressed message body includes the shared timestamp, the correspondence data between the standby message contents and the target index information.

[0121] Optionally, the compression module 1003 is further configured to: In the case where the target attribute is determined to be the first attribute, if the data to be compressed is determined to be non-time-sensitive data, a compressed message body of the target compressed message is generated according to the index information in the hash table and the timestamp and message content of each target message.

[0122] Optionally, the compression module 1003 is further configured to: In the case where it is determined that the target attribute is the second attribute, obtaining a sampling interval and a start timestamp of each target message, where the start timestamp is a timestamp of first sampling of the target message; A compressed message body of the target compressed message is generated according to the start timestamp, the sampling interval, the index information in the hash table and the message content.

[0123] Fig.11 is a block diagram of a data decompression device according to an exemplary embodiment. Fig.11 , the device comprises: The second acquisition module 1101 is configured to acquire data to be decompressed, where the data to be decompressed includes a target compressed message; The second determination module 1102 is configured to determine a target attribute of the data to be decompressed, wherein the target attribute is a first attribute or a second attribute, wherein the first attribute is used to indicate that the data is losslessly compressed, and the second attribute is used to indicate that the data is lossily compressed; The decompression module 1103 is configured to decompress the target compressed message in the data to be decompressed according to the target attribute.

[0124] Optionally, the decompression module 1103 is further configured to: Determine a compressed message header and a compressed message body of the target compressed message, wherein the compressed message header includes a hash table, the hash table is used to represent the correspondence between common data of multiple decompressed messages and index information of each of the decompressed messages, and the compressed message body includes a timestamp, message content, and index information in the hash table of each of the decompressed messages; A plurality of decompressed messages corresponding to the target compressed message are generated according to the target attribute, the hash table, the timestamp of the decompressed message and the message content.

[0125] Optionally, the decompression module 1103 is further configured to: In the case where it is determined that the target attribute is the first attribute, if it is determined that the data to be decompressed is time-sensitive data, determining common data of each of the decompressed messages according to the index information in the compressed message header; Determine a decompression timestamp of each of the decompressed messages according to the index information in the compressed message body; For each of the decompressed messages, a message header of the decompressed message is generated according to the common data of the decompressed message, and a message body of the decompressed message is generated according to the decompression timestamp of the decompressed message and the message content of the decompressed message.

[0126] Optionally, the decompression module 1103 is further configured to: According to the index information in the compressed message body, the shared timestamp corresponding to the decompressed message is determined from the shared timestamp set in the compressed message body, and the shared timestamp is used as the decompression timestamp of the decompressed message, and the shared timestamp set includes at least one of the shared timestamps.

[0127] Optionally, the decompression module 1103 is further configured to: When it is determined that the target attribute is the first attribute, if it is determined that the data to be decompressed is non-time-sensitive data, the timestamp corresponding to the decompressed message is determined according to the index information in the compressed message body, and the timestamp corresponding to the decompressed message is used as the decompression timestamp.

[0128] Optionally, the decompression module 1103 is further configured to: When it is determined that the target attribute is the second attribute, the start timestamp and sampling interval corresponding to the decompressed message are determined from the compressed message body according to the index information of each decompressed message, and the start timestamp and the sampling interval are used as the decompression timestamp of the decompressed message.

[0129] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0130] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon. When the program instructions are executed by a processor, the steps of the data compression method and / or the data decompression method provided by the present disclosure are implemented.

[0131] Fig.12 1 is a block diagram of a vehicle 1200 according to an exemplary embodiment. For example, the vehicle 1200 may be a hybrid vehicle, a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other types of vehicles. The vehicle 1200 may be an autonomous vehicle, a semi-autonomous vehicle, or a non-autonomous vehicle.

[0132] Reference Fig.12 , the vehicle 1200 may include various subsystems, for example, an infotainment system 1210, a perception system 1220, a decision control system 1230, a drive system 1240, and a computing platform 1250. The vehicle 1200 may also include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and each component of the vehicle 1200 may be interconnected by wire or wireless means.

[0133] In some embodiments, the infotainment system 1210 may include a communication system, an entertainment system, and a navigation system, etc.

[0134] The perception system 1220 may include several sensors for sensing information about the environment around the vehicle 1200. For example, the perception system 1220 may include a global positioning system (the global positioning system may be a GPS system, or a Beidou system or other positioning systems), an inertial measurement unit (IMU), a laser radar, a millimeter wave radar, an ultrasonic radar, and a camera.

[0135] The decision control system 1230 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.

[0136] The drive system 1240 may include components that provide powered motion for the vehicle 1200. In one embodiment, the drive system 1240 may include an engine, an energy source, a transmission system, and wheels. The engine may be one or a combination of an internal combustion engine, an electric motor, and an air compression engine. The engine is capable of converting energy provided by the energy source into mechanical energy.

[0137] Some or all functions of the vehicle 1200 are controlled by a computing platform 1250. The computing platform 1250 may include at least one first processor 1251 and a first memory 1252, and the first processor 1251 may execute instructions 1253 stored in the first memory 1252.

[0138] The first processor 1251 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.

[0139] The first memory 1252 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0140] In addition to the instructions 1253 , the first memory 1252 may also store data, such as road maps, route information, and data such as the location, direction, and speed of the vehicle. The data stored in the first memory 1252 may be used by the computing platform 1250 .

[0141] In the embodiment of the present disclosure, the first processor 1251 may execute instruction 1253 to complete all or part of the steps of the above-mentioned data compression method and / or data decompression method.

[0142] In another exemplary embodiment, a computer program product is also provided, which includes a computer program that can be executed by a programmable device, and has a code portion for executing the above-mentioned data compression method and / or data decompression method when executed by the programmable device.

[0143] Fig.13 1 is a block diagram of a device 1300 for data compression according to an exemplary embodiment. For example, the device 1300 may be provided as a server. Fig.13The apparatus 1300 includes a processing component 1322, which further includes one or more processors, and a memory resource represented by a second memory 1332 for storing instructions executable by the processing component 1322, such as an application. The application stored in the second memory 1332 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1322 is configured to execute instructions to perform the above-mentioned data compression method and / or data decompression method.

[0144] The device 1300 may also include a power supply component 1326 configured to perform power management of the device 1300, a wired or wireless network interface 1350 configured to connect the device 1300 to a network, and an input / output interface 1358. The device 1300 may operate based on an operating system stored in the second memory 1332, such as Windows Server 2003. TM , Mac OSX TM , Unix TM , Linux TM , FreeBSD TM or similar.

[0145] Fig.14 A chip system is shown according to an exemplary embodiment. Fig.14 As shown, the chip system includes at least one second processor 1401 and at least one interface circuit 1402. The second processor 1401 and the interface circuit 1402 can be interconnected through lines. For example, the interface circuit 1402 can be used to receive signals from other devices (such as the memory of the electronic device). For another example, the interface circuit 1402 can be used to send signals to other devices (such as the second processor 1401). Exemplarily, the interface circuit 1402 can read the instructions stored in the memory and send the instructions to the second processor 1401. When the instructions are executed by the second processor 1401, the data compression device and / or the data decompression device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, and some embodiments of the present disclosure are not specifically limited to this.

[0146] In some embodiments of the present disclosure, the interface circuit 1402 can obtain data, program instructions and / or information from the internal storage area of ​​the chip system; it can also obtain data, program instructions and / or information from outside the chip system.

[0147] Optionally, the chip system may also include a memory for storing necessary computer programs and data.

[0148] Those skilled in the art may also understand that the various illustrative logical blocks and steps listed in the embodiments of the present application may be implemented by electronic hardware, computer software, or a combination of the two. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the functions described for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present application.

[0149] In addition, the word "exemplary" is used herein to indicate serving as an example, instance, or diagram. Any aspect or design described as "exemplary" in this article is not necessarily understood to be advantageous compared to other aspects or designs. On the contrary, the use of the word exemplary is intended to present concepts in a specific way. As used herein, the term "or" is intended to represent an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from the context, "X applies A or B" is intended to represent any one of the natural inclusive arrangements. That is, if X applies A; X applies B; or X applies both A and B, "X applies A or B" is satisfied under any of the aforementioned examples. In addition, unless otherwise specified or clearly pointed to a singular form from the context, the articles "one" and "an" as used in this application and the appended claims are generally understood to mean "one or more".

[0150] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

[0151] It should be understood that, unless otherwise specifically noted, the features of some embodiments of the various present disclosures described herein may be combined with each other. As used herein, the term "and / or" includes any one of the related listed items and any combination of any two or more; similarly, "at least one of . . . " includes any one of the related listed items and any combination of any two or more.

Claims

1. A data compression method, characterized in that: include: Acquire data to be compressed, where the data to be compressed includes a plurality of target messages; Determine a target attribute of the data to be compressed, the target attribute being a first attribute or a second attribute, wherein the first attribute is used to characterize the data as lossless compressed data, and the second attribute is used to characterize the data as lossy compressed data; The multiple target messages in the data to be compressed are compressed according to the target attributes.

2. The data compression method according to claim 1, characterized in that: The compressing the multiple target messages in the data to be compressed according to the target attribute includes: Determine a message header and a message body of each target message, wherein the message header includes a message identifier and a message tag, and the message body includes a timestamp and message content; Generate a hash table according to the message identifier and the message tag in each of the target messages in the data to be compressed; A target compressed message corresponding to the multiple target messages is generated according to the target attribute, the hash table, the timestamp of each target message, and the message content.

3. The data compression method according to claim 2, characterized in that: The hash table is used to represent the correspondence between the common data in the target message and the index information of each of the target messages, and the target compressed messages corresponding to the multiple target messages are generated according to the target attribute, the hash table, and the timestamp and the message content of each of the target messages, including: Generate a compressed message header of the target compressed message according to the hash table; A compressed message body of the target compressed message is generated according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message.

4. The data compression method according to claim 3, characterized in that: The step of generating a compressed message body of the target compressed message according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message includes: In the case where it is determined that the target attribute is the first attribute, if it is determined that the data to be compressed is time-sensitive data, determining a shared timestamp set according to the timestamp of each of the target messages in the multiple target messages; A compressed message body of the target compressed message is generated according to the shared timestamp set, the index information in the hash table, and the message content.

5. The data compression method according to claim 4, characterized in that: The determining a shared timestamp set according to the timestamp of each of the target messages in the multiple target messages comprises: When it is determined that there is at least one set of equal target timestamps among the multiple timestamps corresponding to the multiple target messages, the target timestamps are used as elements in the shared timestamp set.

6. The data compression method according to claim 4, characterized in that: The shared timestamp set includes at least one shared timestamp, and generating a compressed message body of the target compressed message according to the shared timestamp set, index information in the hash table, and the message content includes: Determine the standby message content corresponding to each of the multiple standby messages corresponding to each of the shared timestamps; Determine the target index information corresponding to the standby message in the list; A compressed message body of the target compressed message is generated according to the multiple standby message contents corresponding to each shared timestamp, the multiple target index information and the shared timestamp, wherein the compressed message body includes the shared timestamp, the correspondence data between the standby message contents and the target index information.

7. The data compression method according to claim 3, characterized in that: The step of generating a compressed message body of the target compressed message according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message includes: In the case where the target attribute is determined to be the first attribute, if the data to be compressed is determined to be non-time-sensitive data, a compressed message body of the target compressed message is generated according to the index information in the hash table and the timestamp and message content of each target message.

8. The data compression method according to claim 3, characterized in that: The step of generating a compressed message body of the target compressed message according to the target attribute, the index information in the hash table, and the timestamp and the message content of each target message includes: In the case where it is determined that the target attribute is the second attribute, obtaining a sampling interval and a start timestamp of each target message, where the start timestamp is a timestamp of first sampling of the target message; A compressed message body of the target compressed message is generated according to the start timestamp, the sampling interval, the index information in the hash table and the message content.

9. A data decompression method, characterized in that: The method comprises: Acquire data to be decompressed, wherein the data to be decompressed includes a target compressed message; Determine a target attribute of the data to be decompressed, where the target attribute is a first attribute or a second attribute, wherein the first attribute is used to characterize the data as lossless compressed data, and the second attribute is used to characterize the data as lossy compressed data; The target compressed message in the data to be decompressed is decompressed according to the target attribute.

10. The data decompression method according to claim 9, characterized in that: The decompressing the target compressed message in the to-be-decompressed data according to the target attribute includes: Determine a compressed message header and a compressed message body of the target compressed message, wherein the compressed message header includes a hash table, the hash table is used to represent the correspondence between common data of multiple decompressed messages and index information of each of the decompressed messages, and the compressed message body includes a timestamp, message content, and index information in the hash table of each of the decompressed messages; A plurality of decompressed messages corresponding to the target compressed message are generated according to the target attribute, the hash table, the decompression timestamp of the decompressed message and the message content.

11. The data decompression method according to claim 10, characterized in that: The generating a plurality of decompressed messages corresponding to the target compressed message according to the target attribute, the hash table, the timestamp of the decompressed message and the message content comprises: In the case where it is determined that the target attribute is the first attribute, if it is determined that the data to be decompressed is time-sensitive data, determining common data of each of the decompressed messages according to the index information in the compressed message header; Determine a decompression timestamp of each of the decompressed messages according to the index information in the compressed message body; For each of the decompressed messages, a message header of the decompressed message is generated according to the common data of the decompressed message, and a message body of the decompressed message is generated according to the decompression timestamp of the decompressed message and the message content of the decompressed message.

12. The data decompression method according to claim 11, characterized in that: Determining a decompression timestamp of each of the decompressed messages from the compressed message body includes: According to the index information in the compressed message body, the shared timestamp corresponding to the decompressed message is determined from the shared timestamp set in the compressed message body, and the shared timestamp is used as the decompression timestamp of the decompressed message, and the shared timestamp set includes at least one of the shared timestamps.

13. The data decompression method according to claim 11, characterized in that: Determining a decompression timestamp of each of the decompressed messages from the compressed message body includes: When it is determined that the target attribute is the first attribute, if it is determined that the data to be decompressed is non-time-sensitive data, the timestamp corresponding to the decompressed message is determined according to the index information in the compressed message body, and the timestamp corresponding to the decompressed message is used as the decompression timestamp.

14. The data decompression method according to claim 10, characterized in that: The generating a plurality of decompressed messages corresponding to the target compressed message according to the target attribute, the hash table, the timestamp of the decompressed message and the message content comprises: When it is determined that the target attribute is the second attribute, the start timestamp and sampling interval corresponding to the decompressed message are determined from the compressed message body according to the index information of each decompressed message, and the start timestamp and the sampling interval are used as the decompression timestamp of the decompressed message.

15. A data compression device, characterized in that: The device comprises: A first acquisition module is configured to acquire data to be compressed, wherein the data to be compressed includes a plurality of target messages; A first determination module is configured to determine a target attribute of the data to be compressed, wherein the target attribute is a first attribute or a second attribute, wherein the first attribute is used to indicate that the data belongs to lossless compression, and the second attribute is used to indicate that the data belongs to lossy compression; The compression module is configured to compress the multiple target messages in the data to be compressed according to the target attribute.

16. A data decompression device, characterized in that: The device comprises: A second acquisition module is configured to acquire data to be decompressed, wherein the data to be decompressed includes a target compressed message; A second determination module is configured to determine a target attribute of the data to be decompressed, wherein the target attribute is a first attribute or a second attribute, wherein the first attribute is used to indicate that the data is losslessly compressed, and the second attribute is used to indicate that the data is lossily compressed; The decompression module is configured to decompress the target compressed message in the data to be decompressed according to the target attribute.

17. A vehicle, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the steps of the method described in any one of claims 1 to 14.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 14 are implemented.

19. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 14.