Data compression method, data reinjection method, data compression unit and vehicle-mounted device

By directly mapping RAW image data into RGB or YUV format and compressing it, the information loss problem during RAW data conversion is solved, data integrity and accuracy in ECU development are achieved, and effective verification and testing of domain controllers are supported.

CN120751152APending Publication Date: 2025-10-03KUNYI ELECTRONICS TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410705885.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

In the existing technology, there is information loss and distortion when RAW video data is converted into RGB or YUV format, resulting in the inability to accurately reproduce the actual scene when the video was shot during the ECU development process.

Method used

By directly mapping the original image data in RAW format to the target image data in RGB or YUV format and compressing it, the numerical conversion process is avoided and data integrity is ensured.

Benefits of technology

It achieves data compression and back-injection without information loss during the ECU development process, ensures data accuracy and integrity, and supports effective verification and testing of domain controllers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751152A_ABST
    Figure CN120751152A_ABST
Patent Text Reader

Abstract

The invention relates to a data compression method, a data reinjection method, a data compression unit and a vehicle-mounted device.Firstly, initial image data in a RAW format are obtained, and then target image data in a target format can be formed according to the initial image data in the RAW format; as the number of the target data bits included in the target image data is the same as the number of the initial data bits in the initial image data, the data of each target data bit can be determined on the basis of the data of each initial data bit to form the target image data in the target format, and then the target image data can be compressed. According to the method and the device, the data of each target data bit in the target image data is directly determined according to the data in the initial image data in the RAW format, so that the target image data in the RGB format or the YUV format can be obtained without performing numerical conversion on the initial image data in the RAW format; and the information loss in the numerical value conversion process is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data compression method, a data reinjection method, a data compression unit, and a vehicle-mounted device. Background Art

[0002] To meet the requirements of the vehicle ECU (Electronic Control Unit) development process, video data captured by road vehicles needs to be stored on disk. During the subsequent development of the ECU, or domain controller, the video data stored on disk needs to be restored and injected back into the domain controller.

[0003] Video data captured by road vehicles is usually in RAW format. Existing RAW data compression methods usually convert the numerical values ​​in the RAW data into numerical values ​​in RGB data or YUV data, and then encode and compress the converted RGB data or YUV data. This method has significant distortion during the numerical conversion process. Summary of the Invention

[0004] Based on this, it is necessary to provide a data compression method, a data reinjection method, an image data transmission system and a vehicle to address the above technical problems, which can reduce information loss during the RAW data compression process.

[0005] In a first aspect, the present application provides a data compression method, the data compression method comprising:

[0006] Acquire initial image data, wherein the format of the initial image data is RAW format; the initial image data includes data of X initial data bits; X ≥ 2;

[0007] forming target image data in a target format, the target image data including data of X target data bits, wherein the data of each target data bit is determined by the data of a corresponding initial data bit, and the target format is one of an RGB format and a YUV format;

[0008] The target image data is compressed to obtain compressed target image data.

[0009] In one embodiment, the initial image data includes m initial data bit units, the target image data includes m target data bit units, each initial data bit unit is mapped to a target data bit unit; the target image data in the target format includes:

[0010] For the mapped initial data bit unit and the target data bit unit, based on the data of each initial data bit in the initial data bit unit, the data of a target data bit in the mapped target data bit unit is determined.

[0011] In one embodiment, the initial data bit includes a first initial data bit and / or a second initial data bit;

[0012] If the initial data bits include the first initial data bit, then: determining the data of a target data bit in the mapped target data bit unit based on the data of each initial data bit in the initial data bit unit includes: filling the data of the first initial data bit in the initial data bit unit into the mapped target data bit;

[0013] If the initial data bits include the second initial data bits, then: determining the data of a target data bit in the mapped target data bit unit based on the data of each initial data bit in the initial data bit unit includes: flipping the data of the second initial data bit in the initial data bit unit and filling it into the mapped target data bit.

[0014] In one embodiment, obtaining initial image data includes:

[0015] Acquire original image data, wherein the original image data includes data of Y original data bits, where Y<X; and the format of the original image data is RAW format;

[0016] The original image data is processed into the initial image data.

[0017] In one embodiment, processing the original image data into the initial image data includes:

[0018] The original image data is supplemented with data bits to obtain the initial image data.

[0019] In one embodiment, the initial image data includes m initial data bit units, and the original image data includes m original data bit units; a data bit length of a single original data bit unit is less than a data bit length of a single initial data bit unit, and the difference in data bit lengths is a target difference; performing data bit supplementation processing on the original image data to obtain the initial image data includes:

[0020] Each of the original data bit units is supplemented with data bits corresponding to a target gap.

[0021] In one embodiment, the format of the original image data is a first type of RAW format, and the format of the initial image data is a second type of RAW format; processing the original image data into the initial image data includes:

[0022] The original image data in the first type RAW format is converted into a second type RAW format to obtain the initial image data.

[0023] In one embodiment, obtaining initial image data includes:

[0024] Original image data is acquired as the initial image data.

[0025] In one embodiment, each initial data bit unit corresponds to at least one of the following: a pixel, a plurality of pixels, a frame of image, or a plurality of frames of image;

[0026] In the specification of the target format, each target data bit unit is used to describe at least one of the following: a pixel, multiple pixels, a frame of image, and multiple frames of image.

[0027] In a second aspect, the present application provides a data reinjection method, the data reinjection method comprising:

[0028] Acquire compressed target image data, wherein the compressed target image data is obtained based on the data compression method in any one of the above embodiments;

[0029] Decompressing the compressed target image data to obtain the target image data;

[0030] Based on the target image data, acquiring the initial image data;

[0031] The tested piece is back-annotated based on the initial image data.

[0032] In a third aspect, the present application provides a data compression unit for executing the data compression method in any one of the above embodiments of the claims.

[0033] In a fourth aspect, the present application provides a vehicle-mounted device connected to an image acquisition device in a vehicle, comprising: a data compression unit of the above embodiment, wherein part or all of the initial image data originates from the image acquisition device.

[0034] In a fifth aspect, the present application provides a data injection unit for executing the data injection method in the above embodiment.

[0035] In a sixth aspect, the present application provides an image data acquisition and reinjection system, comprising the data compression unit in the above embodiment and the data injection unit in the above embodiment.

[0036] In a seventh aspect, the present application provides a vehicle, which includes the vehicle-mounted device in the above embodiment.

[0037] In an eighth aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the data compression method in any of the above embodiments, and / or the steps of the data re-injection method in the above embodiments.

[0038] In a ninth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data compression method in any of the above embodiments, or the steps of the data re-injection method in the above embodiments.

[0039] In a tenth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the data compression method in any of the above embodiments, or the steps of the data re-injection method in the above embodiments.

[0040] The above-mentioned data compression method, data reinjection method, data compression unit and vehicle-mounted device first obtain the initial image data in the RAW format, and then form the target image data in the target format based on the initial image data in the RAW format. Since the target image data includes the same number of target data bits as the number of initial data bits in the initial image data, the data of each target data bit can be determined based on the data of each initial data bit to form the target image data in the target format. The target format can be one of the RGB format and the YUV format. The target image data can then be compressed to obtain the compressed target image data. In the present application, the data of each target data bit in the target image data is directly determined based on the data in the initial image data in the RAW format, so that the target image data in the RGB format or YUV format can be obtained without performing numerical conversion on the initial image data in the RAW format, thereby avoiding information loss during the numerical conversion process. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 1 is a flow chart of a data compression method according to an embodiment;

[0043] Figure 2 is a schematic structural diagram of initial image data in one embodiment;

[0044] Figure 3is a schematic structural diagram of target image data in one embodiment;

[0045] Figure 4 Schematic diagram of the process of step S101 in one embodiment;

[0046] Figure 5 is a schematic diagram of the structure of original image data in one embodiment;

[0047] Figure 6 Schematic diagram of a data back-injection method according to an embodiment;

[0048] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0050] During algorithm development (e.g., autonomous driving algorithms and assisted driving algorithms), the algorithms (e.g., neural networks) in the domain controller need to be trained, verified, and tested. This requires injecting various video image data into the domain controller. Some of this video image data can be collected by the vehicle's data acquisition system.

[0051] During algorithm development, existing data acquisition systems can only capture and store video data in RGB format. However, some cameras output RAW video data, not RGB video data. Therefore, to achieve compatibility with RAW video data, on-board data acquisition systems in related technologies typically convert RAW data into YUV or RGB video data before storage.

[0052] Taking conversion to YUV format as an example, the numerical values ​​in RAW data are usually converted to RGB data based on a conversion formula. At this time, each digit in the RGB data often requires multiple bits of data in the RAW data to participate in the conversion calculation to determine. The RGB data values ​​are then converted to YUV data values. However, information loss often occurs during this data conversion process. In particular, the information distortion rate is high during the multi-bit data conversion calculation process, resulting in the data conversion process often being unable to be accurately reversed. Therefore, even if the RAW format data is finally restored, the information contained therein will still be significantly lost compared to the image originally provided by the camera. This will result in the inability to accurately reproduce the actual scene during video capture during the verification, testing, or training of the domain controller under development, introducing significant distortion.

[0053] In one embodiment, Figure 1 As shown, the present application provides a data compression method, which includes steps S101 to S103.

[0054] S101: Acquire initial image data, wherein the format of the initial image data is RAW format, and the initial image data includes X initial data bits, where X≥2.

[0055] S102: forming target image data in a target format, where the target image data includes data of X target data bits, and the data of each target data bit is determined by the data of a corresponding initial data bit. The target format is one of an RGB format and a YUV format.

[0056] S103: compressing the target image data to obtain compressed target image data.

[0057] In this embodiment, the initial image data DATA_RAW1 can be the first type of RAW format video data output by the camera, or it can be processed RAW format video data. Specifically, the initial image data can include the data describing the image content itself, and can include or not include content describing other related information such as shooting parameters and timestamps. The structure of the initial image data DATA_RAW1 can be as follows: Figure 2 As shown, the initial image data DATA_RAW1 includes X initial data bits, each of which has corresponding data. The structure of the target image data DATA_TARGET can be as follows: Figure 3 As shown, the target image data DATA_TARGET includes X target data bits, where m*n=X. Before the target image data is finally formed, for example, at the beginning of construction (for example, before filling is completed), each target data bit can be blank, that is, there is no data in the target data bit, or can be non-blank, that is, there is data in the target data bit.

[0058] The statement that the data of each target data bit is determined by the data of a corresponding initial data bit may further be, for example, that the data of each target data bit is only determined by the data of the corresponding initial data bit and is not affected by the data of other initial data bits.

[0059] Since the number of target data bits in the target image data DATA_TARGET is the same as the number of initial data bits in the initial image data DATA_RAW1, the data in each target data bit can be determined based on the one-to-one correspondence between the data in each initial data bit. For example, if each target data bit is a blank data bit at the beginning of construction, the data in each initial data bit can be directly filled into each target data bit in a one-to-one correspondence, or the data in each initial data bit can be flipped and then the flipped data can be filled into each target data bit in a one-to-one correspondence. In another example, if each target data bit is a non-blank data bit at the beginning of construction, the data in each target data bit can be directly modified in a one-to-one correspondence based on the data in each initial data bit to form the new target image data DATA_TARGET.

[0060] After obtaining the target image data DATA_TARGET, since the format of the target image data DATA_TARGET is RGB format or YUV format, etc., the target image data DATA_TARGET can be directly compressed using a mature compression method for image data in the target format in related technologies.

[0061] The target image data formed can be understood as image data based on the specifications of the target format. For example, in this specification, there are clear regulations on how many data bits are used for each pixel and each image frame. The target image data formally meets the specifications of the target format, but it is only formally satisfied. The target image data formed cannot present the same or similar image content as the initial image data in the target format. Furthermore, the target image data can be understood as using the specifications of the target format to carry the content of the initial image data. This is different from the traditional conversion between the RAW format and the target format. If it is a traditional conversion, the image content presented by the converted target format image data is the same or similar to the image content of the RAW format image data. Precisely because the target image data only carries the content of the initial image data, it does not cause obvious information loss.

[0062] The above-mentioned data compression method first obtains the initial image data in the RAW format, and then forms the target image data in the target format based on the initial image data in the RAW format. Since the target image data includes the same number of target data bits as the number of initial data bits in the initial image data, the data of each target data bit can be determined based on the data of each initial data bit to form the target image data in the target format. The target format can be one of the RGB format and the YUV format. The target image data can then be compressed to obtain the compressed target image data. In the present application, the data of each target data bit in the target image data is directly determined based on the data in the initial image data in the RAW format, so that the target image data in the RGB format or the YUV format can be obtained without the need for numerical conversion of the initial image data in the RAW format, thereby avoiding information loss during the numerical conversion process.

[0063] In one embodiment, please refer to Figure 2 and Figure 3 The initial image data DATA_RAW1 may include m initial data bit units: RAW1_1, RAW1_2, ..., RAW1_m, each initial data bit unit may include n initial data bits: B1_1, B1_2, ..., B1_n, and the target image data DATA_TARGET may include m target data bit units: TARGET_1, TARGET_2, ..., TARGET_m, each target data bit unit may include n target data bits: B2_1, B2_2, ..., B2_n, where m*n=X.

[0064] Wherein, each initial data bit unit is mapped to a target data bit unit. In application, the mapping relationship between each initial data bit unit and each target data bit unit may follow a sequence. For example, the first initial data bit unit in the initial image data DATA_RAW1 corresponds to the first target data bit unit in the target image data DATA_TARGET, the second initial data bit unit in the initial image data DATA_RAW1 corresponds to the second target data bit unit in the target image data DATA_TARGET, ..., the mth initial data bit unit in the initial image data DATA_RAW1 corresponds to the mth target data bit unit in the target image data DATA_TARGET. The mapping relationship between each initial data bit unit and each target data bit unit may not follow a sequence. For example, the first initial data bit unit in the initial image data DATA_RAW corresponds to the third target data bit unit in the target image data DATA_TARGET, the second initial data bit unit in the initial image data DATA_RAW corresponds to the seventh target data bit unit in the target image data DATA_TARGET, etc.

[0065] Step S102, forming target image data in a target format, includes: for the mapped initial data bit unit and target data bit unit, based on the data of each initial data bit in the initial data bit unit, determining the data of a target data bit in the mapped target data bit unit.

[0066] For the mapped initial data bit units and target data bit units, each initial data bit is mapped to a target data bit, and the mapping relationship between each initial data bit and each target data bit can follow a sequence. For example, in the mapped initial data bit units and target data bit units, the first initial data is located corresponding to the first target data bit, the second initial data is located corresponding to the second target data bit, ..., the nth initial data is located corresponding to the nth target data bit. The mapping relationship between each initial data bit and each target data bit can not follow a sequence. For example, in the mapped initial data bit units and target data bit units, the first initial data is located corresponding to the second target data bit, the second initial data is located corresponding to the fifth target data bit, etc.

[0067] For the mapped initial data bits and target data bits, the data in the target data bits can be determined based on the data in the initial data bits. For example, for the mapped initial data bits and target data bits, the data in the initial data bits can be directly filled into the target data bits. For example, if the data in the initial data bits is 1, the data in the corresponding target data bits can be directly determined to be 1. Alternatively, the data in the initial data bits can be flipped before being filled into the target data bits. For example, if the data in the initial data bits is 1, the data "1" can be flipped to data "0", and then the data in the corresponding target data bits can be determined to be 0. By determining the data of each target data bit in the mapped target data bit unit based on the data of each initial data bit in the initial data bit unit, data loss caused by performing numerical conversion on the data using a conversion formula can be avoided.

[0068] In one embodiment, the initial data bits may include first initial data bits and / or second initial data bits.

[0069] If the initial data bits include the first initial data bit, then based on the data of each initial data bit in the initial data bit unit, determining the data of a target data bit in the mapped target data bit unit includes: the step of filling the data of the first initial data bit in the initial data bit unit into the mapped target data bit.

[0070] If the initial data bits include a second initial data bit, then: based on the data of each initial data bit in the initial data bit unit, determining the data of a target data bit in the mapped target data bit unit includes: flipping the data of the second initial data bit in the initial data bit unit and filling it into the mapped target data bit.

[0071] When performing data filling, the initial data bits can be divided into the first initial data bit and the second initial data bit in advance. For the first initial data bit, the data of the first initial data bit can be directly filled into the mapped target data bit. For the second initial data bit, the data in the first initial data bit needs to be flipped, and then the flipped data is filled into the mapped target data bit. For example, in a pair of mapped initial data bit units and target data bit units, the initial data bit unit includes 5 initial data bits, the data in the first initial data bit is 1, the data in the second initial data bit is 0, the data in the third initial data bit is 0, the data in the fourth initial data bit is 1, and the data in the fifth initial data bit is 0, that is, the initial data bit unit can be represented as "10010", wherein the first, third, and fifth initial data bits are the first data bits, and the second and fourth initial data bits are the second data bits, then the filled target data bit unit is represented as "11000". Through this filling method, the security of the data filling process can be improved and data leakage can be avoided.

[0072] In one example, the initial data bits of the initial image data may include only the first data bit, and the second data bit may be introduced only under certain specific security requirements; in another example, the initial data bits of the initial image data may also include only the second data bit. Figure 4 As shown, step S101, obtaining initial image data, includes:

[0073] S401: Acquire original image data, where the original image data includes Y original data bits, where Y<X; the format of the original image data is RAW format;

[0074] S402: Process the original image data into initial image data. The original image data DATA_RAW2 is the video data in RAW format directly output by the camera. The structural diagram of the original image data DATA_RAW2 can be as follows: Figure 5As shown, the original image data DATA_RAW2 can also be divided into m original data bit units: RAW2_1, RAW2_2, ……, RAW2_m. Each original data bit unit can include s initial data bits: B3_1, B3_2, ……, B3_s, where s*m = Y. Since the number of original data bits in the original image data DATA_RAW2 is less than the number of target data bits in the target image data DATA_TARGET, the original image data can be processed for data bit supplementation to obtain the initial image data DATA_RAW1.

[0075] In one embodiment, the data bit length of a single original data bit unit is less than the data bit length of a single initial data bit unit, and the difference in data bit length is the target difference; processing the original image data for data bit supplementation to obtain the initial image data includes the step of supplementing the data bits of the target difference for each original data bit unit.

[0076] Since the number of original data bits in the original image data DATA_RAW2 is less than the number of target data bits in the target image data DATA_TARGET, but the number of original data bit units in the original image data DATA_RAW2 is the same as the number of target data bit units in the target image data DATA_TARGET, so s < n. Therefore, the number of supplementary data bits can be determined according to the difference between the number of original data bits in the original data bit unit and the number of target data bits in the target data bit unit, that is, n - s = △s, △s > 0, and △s is the number of supplementary data bits for data bit supplementation for each original data bit unit. Then, the supplementary data bits can be inserted into each original data bit unit respectively to form the initial image data DATA_RAW1. Among them, when inserting the supplementary data bits, the supplementary data bits can be inserted at the head position, the tail position or interspersed and filled in the middle position of the original data bit unit. In addition, the data of the supplementary data bits can be all 1 or 0, or some of the supplementary data bits can be 1 and the rest can be 0. For example: 1 for odd bits and 0 for even bits.

[0077] In one embodiment, the format of the original image data is the first type of RAW format, and the format of the initial image data is the second type of RAW format; processing the original image data into the initial image data includes the step of converting the original image data in the first type of RAW format into the second type of RAW format to obtain the initial image data.

[0078] Different RAW formats may have different specifications. Therefore, conversion between different RAW formats can be performed to ensure that the number of raw data bits in the raw image data DATA_RAW2 equals the target number of data bits in the target image data DATA_TARGET after conversion, thereby forming the initial image data. Therefore, in addition to supplementing each raw data bit unit, the raw image data DATA_RAW2 can also be format-converted to convert the raw image data DATA_RAW2 in a first RAW format into the initial image data DATA_RAW1 in a second RAW format. Since both the initial image data DATA_RAW1 and the raw image data DATA_RAW2 are in RAW format, this data conversion process does not cause information loss.

[0079] In one embodiment, step S101, obtaining initial image data, further includes: obtaining original image data as initial image data.

[0080] In an application, the number of original data bits in the original image data DATA_RAW2 is the same as the number of target data bits in the target image data DATA_TARGET, and the original image data DATA_RAW2 can be directly used as the initial image data DATA_RAW1.

[0081] In one embodiment, each initial data bit unit corresponds to at least one of the following: a pixel, multiple pixels, a frame of image, or multiple frames of image.

[0082] In the target format specification, each target data bit unit is used to describe at least one of the following: a pixel, multiple pixels, a frame, or multiple frames. However, this is only a specification. In the target image data, the target data bit unit may not actually describe a pixel (or multiple pixels, a frame, or multiple frames) of the original image data or the initial image data. In other words, if the image content of the target data bit unit is displayed, it will not be the same as or similar to the content displayed in the corresponding portion of the original image data or the initial image data.

[0083] In addition, taking pixels as an example, in one example, the data bit length of K1 pixels in the target format specification can carry the data of K2 pixels in the RAW format image data. The numerical values ​​of K1 and K2 may be the same or different, may be in a multiple relationship, or may not be in a multiple relationship.

[0084] Due to the correspondence between data bit units and pixels and image frames, the length of an original data bit unit is the data bit length of a pixel in the corresponding RAW format specification, or an integer multiple thereof. Similarly, the length of a target data bit unit is the data bit length of a pixel in the corresponding target format specification, or an integer multiple thereof. The original image data contains an integer number of original data bit units, and the target image data contains an integer number of target data bit units. At this time, it is possible that the two do not match. This requires supplementation or conversion between different types of RAW formats to ensure that filling can occur between the initial data bit unit and the target data bit unit with the same data bit length.

[0085] Filling based on the initial data bit unit and the target data bit unit can help ensure that the data of the pixel point or image frame will not be cut, ensuring data integrity. In some scenarios, it can help avoid adverse effects such as information damage caused by segmentation during compression and other processing. In addition, it can be easy to execute. For example, in some scenarios, it can facilitate processing of data streams.

[0086] The process of the above steps S101 and S102 can be continuously looped. For example, the camera continuously outputs a data stream of image data, and then executes steps S101-S102 for the current image data as initial image data or original image data; and then continuously loops.

[0087] In one example, each time the process is executed, at least one of the following information: the data length of the original image data, the data length of the initial image data, the data length and number of the original data bit units, the data length and number of the initial data bit units, the data length of the target image data, and the data length and number of the target data bit units can be determined based on at least one of the frame rate, resolution, and transmission speed of the data stream output by the camera. For example, the data length and number of data bit units mentioned therein can be manually determined based on the frame rate and resolution, and then executed accordingly during the acquisition process. In some examples, if the frame rate, resolution, etc. of the camera changes during the acquisition process, the part of the data length and / or the part of the number of data bit units mentioned therein can also be changed manually or based on the change. The data length and / or number mentioned therein can be positively correlated with the frame rate and resolution. In this example, it can help to adapt to the output of the camera and freely change the data length and / or number of data bit units to be processed, thereby ensuring effective and timely processing.

[0088] The process of the above steps S101 and S102 may also be that after all image data output by the camera is collected, all image data are used as initial image data or original image data to execute steps S101-S102.

[0089] Step S103 may be executed each time after executing S101 and S102, or after executing S101 and S102 multiple times. That is, as long as the target image data is obtained, compression may be performed at any time without departing from the scope of the embodiment of the present invention.

[0090] In some examples, steps S101 , S102 , and S103 may be executed in the same entity. In other examples, steps S101 , S102 , and S103 may be executed in different entities.

[0091] Furthermore, in one example, during the process of processing the original image data into the initial image data, the data content therein may be modified, for example, by embedding, adding, or modifying information, such as a timestamp. In another example, before compressing the target image data, the data content therein may be modified, for example, by embedding, adding, or modifying information, such as a timestamp.

[0092] In one embodiment, Figure 6 As shown, the present application also provides a data reinjection method, which includes:

[0093] S601: Acquire compressed target image data, wherein the compressed target image data is obtained based on the data compression method in any one of the above embodiments.

[0094] S602: Decompress the compressed target image data to obtain the target image data.

[0095] S603: Acquire initial image data based on the target image data.

[0096] S604: Perform back-annotation on the device under test based on the initial image data.

[0097] This data reinjection method corresponds to the data compression method in any of the above embodiments. After obtaining the compressed target image data, the target image data can be directly decompressed based on a mature target format data decompression method in related technologies.

[0098] Then, based on the mapping relationship and filling rule when forming the target image data, the data in each target data bit in the target image data DATA_TARGET is restored one by one and then filled into each initial data bit in the initial image data DATA_RAW1.

[0099] For the mapped target data bits and initial data bits, if the initial data bit is the first initial data bit, the data in the target data bit can be directly restored to the initial data bit; if the initial data bit is the second initial data bit, the data in the target data bit needs to be flipped and then the flipped data is restored to the initial data bit.

[0100] After restoring the original image data DATA_RAW1, it is necessary to obtain the original image data DATA_RAW2 based on the original image data DATA_RAW1. The original image data DATA_RAW1 can be directly determined as the original image data DATA_RAW2. Alternatively, the original image data DATA_RAW2 can be restored based on the method used to generate the original image data DATA_RAW1. If the original image data DATA_RAW1 was previously generated by supplementing the original image data DATA_RAW2 with data bits, the supplemented data bits need to be removed to restore the original image data DATA_RAW2. If the original image data DATA_RAW1 was previously generated by format conversion, the original image data DATA_RAW1 in the second type RAW format needs to be converted into the original image data DATA_RAW2 in the first type RAW format.

[0101] After the original image data DATA_RAW2 is obtained, the original image data DATA_RAW2 may be injected back into the device under test to perform verification, training, and other processing on the device under test.

[0102] By using the data reinjection method of the present application, the integrity of the original image data DATA_RAW2 received by the device under test can be ensured, thereby avoiding data distortion.

[0103] In one embodiment, the present application provides a data compression unit for executing the data compression method according to any one of the above embodiments of the claims.

[0104] In one embodiment, the present application provides a vehicle-mounted device connected to an image acquisition device in a vehicle, comprising: a data compression unit of the above embodiment, wherein part or all of the initial image data originates from the image acquisition device.

[0105] In one embodiment, the present application provides a data injection unit for executing the data injection method in the above embodiment.

[0106] In one embodiment, the present application provides an image data acquisition and re-injection system, comprising the data compression unit in the above embodiment and the data injection unit in the above embodiment.

[0107] In one embodiment, the present application provides a vehicle, which includes the vehicle-mounted device in the above embodiment.

[0108] In one embodiment, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the data compression method in any of the above embodiments and / or the steps of the data re-injection method in the above embodiments are implemented.

[0109] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless means, and the wireless means can be implemented via Wi-Fi, a mobile cellular network, near-field communication (NFC), or other technologies. When executed by the processor, the computer program implements a data compression method or a data re-injection method. The display unit of the computer device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.

[0110] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0111] In one embodiment, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the data compression method in any of the above embodiments or the steps of the data re-injection method in the above embodiments are implemented.

[0112] In one embodiment, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the data compression method in any of the above embodiments, or the steps of the data re-injection method in the above embodiments.

[0113] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0114] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0115] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0116] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A data compression method, characterized in that: The data compression method comprises: Acquire initial image data, wherein the format of the initial image data is RAW format, and the initial image data includes data of X initial data bits, where X≥2; forming target image data in a target format, the target image data including data of X target data bits, wherein the data of each target data bit is determined by the data of a corresponding initial data bit, and the target format is one of an RGB format and a YUV format; The target image data is compressed to obtain compressed target image data.

2. The data compression method according to claim 1, wherein: The initial image data includes m initial data bit units, the target image data includes m target data bit units, and each initial data bit unit is mapped to one target data bit unit; The target image data in the target format is formed, including: For the mapped initial data bit unit and the target data bit unit, based on the data of each initial data bit in the initial data bit unit, the data of a target data bit in the mapped target data bit unit is determined.

3. The data compression method according to claim 2, wherein: The initial data bits include a first initial data bit and / or a second initial data bit; If the initial data bits include the first initial data bit, then: determining the data of a target data bit in the mapped target data bit unit based on the data of each initial data bit in the initial data bit unit includes: filling the data of the first initial data bit in the initial data bit unit into the mapped target data bit; If the initial data bits include the second initial data bits, then: determining the data of a target data bit in the mapped target data bit unit based on the data of each initial data bit in the initial data bit unit includes: flipping the data of the second initial data bit in the initial data bit unit and filling it into the mapped target data bit.

4. The data compression method according to claim 1, wherein: The obtaining of initial image data comprises: Acquire original image data, wherein the original image data includes data of Y original data bits, where Y<X; and the format of the original image data is RAW format; The original image data is processed into the initial image data.

5. The data compression method according to claim 4, wherein: The processing of the original image data into the initial image data comprises: The original image data is supplemented with data bits to obtain the initial image data.

6. The data compression method according to claim 5, wherein: The initial image data includes m initial data bit units, and the original image data includes m original data bit units; the data bit length of a single original data bit unit is less than the data bit length of a single initial data bit unit, and the difference in data bit lengths is a target difference; Performing data bit supplementation processing on the original image data to obtain the initial image data includes: Each of the original data bit units is supplemented with data bits corresponding to a target gap.

7. The data compression method according to claim 4, wherein: The format of the original image data is a first type of RAW format, and the format of the initial image data is a second type of RAW format; processing the original image data into the initial image data includes: The original image data in the first type RAW format is converted into a second type RAW format to obtain the initial image data.

8. The data compression method according to claim 1, wherein: The obtaining of initial image data comprises: Original image data is acquired as the initial image data.

9. The data compression method according to claim 2 or 6, characterized in that: Each initial data bit unit corresponds to at least one of the following: a pixel, multiple pixels, a frame of image, multiple frames of image; In the specification of the target format, each target data bit unit is used to describe at least one of the following: a pixel, multiple pixels, a frame of image, and multiple frames of image.

10. A data re-injection method, characterized in that: The data back-injection method includes: Acquire compressed target image data, wherein the compressed target image data is obtained based on the data compression method according to any one of claims 1 to 9; Decompressing the compressed target image data to obtain the target image data; Based on the target image data, acquiring the initial image data; The tested piece is back-annotated based on the initial image data.

11. A data compression unit, characterized in that: Used to execute the data compression method according to any one of claims 1 to 9.

12. A vehicle-mounted device connected to an image acquisition device in a vehicle, characterized in that: include: The data compression unit according to claim 11, wherein part or all of the initial image data originates from the image acquisition device.

13. A data injection unit, characterized in that: Used to execute the data injection method described in claim 10.

14. An image data acquisition and re-annotation system, characterized in that: It comprises the data compression unit according to claim 11 and the data injection unit according to claim 13.

15. A vehicle, characterized in that: The vehicle includes the vehicle-mounted device according to claim 12.

16. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the data compression method according to any one of claims 1 to 9 and / or the data re-injection method according to claim 10 are implemented.

17. 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 data compression method according to any one of claims 1 to 9 or the data re-injection method according to claim 10 are implemented.

18. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the data compression method according to any one of claims 1 to 9 or the data re-injection method according to claim 10 are implemented.