Method for encoding and decoding data

By using the analysis unit to select suitable encoding regulations and dynamically adjust the value range during data transmission, the problem of high data transmission rate and mismatch in accuracy is solved, and resource saving and efficient transmission are achieved.

CN118614008APending Publication Date: 2024-09-06ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380019097.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-01-27
Filing Date
2023-01-27
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In the existing technology, the data transmission rate is too high due to the requirements of high resolution and large value range in data transmission, and absolute accuracy is not required in all operating states, resulting in waste of resources and low efficiency.

Method used

The data encoding method is implemented through the analysis unit, selecting appropriate encoding specifications to reduce the data value range, omitting binary bits, adding encoding information to ensure high-resolution encoding, and dynamically adjusting the value range to adapt to different operating states.

Benefits of technology

Reduce the amount of data, reduce storage and transmission requirements, achieve higher accuracy and efficiency, adapt to transmission requirements under different operating states, and ensure constant bit rates and real-time transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118614008A
    Figure CN118614008A
Patent Text Reader

Abstract

The invention relates to a method for encoding data and a method for decoding data, the method for encoding data having the following steps: receiving a data item representing a numerical value from a predefined maximum value range (wmax); selecting a coding specification (c1, c2) suitable for the data item from at least one predefined first coding specification (c1) and a predefined second coding specification (c2); the values of the data item are encoded on the basis of the selected encoding specification (c1, c2) in such a way that all such bins of the values considered as binary numbers are omitted: the bins are lower than bins of a binary representation of a lower limit of a value range (w1, w2) used for the selected encoding specification (c1, c2), and the values of the data item are encoded on the basis of the selected encoding specification (c1, c2). And: omitting all such bins of the numerical value regarded as a binary number: the bins being higher than bins of a binary representation used for the upper limit of the value range (w1, w2) of the selected coding specification (c1, c2), and-omitting all such bins of the numerical value regarded as a binary number, said bins being higher than bins of a binary representation used for the upper limit of the value range (w1, w2) of the selected coding specification (c1, c2); and expanding the binary number of the encoded value at a predefined position by means of predefined encoding information (c0) which uniquely recognizes the encoding provisions (c1, c2) used in each case.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for encoding data and a method for decoding data, in particular data which have been encoded by means of the method for encoding data. Background Art

[0002] It is known from the prior art that, in order to transmit information, different types of measured data are transmitted via digital interfaces, for example from sensors to a computer unit for data processing. In such transmission, the corresponding resolution and value range of the data to be transmitted play an important role.

[0003] In a given static digital coding, the respectively required resolution and the respectively required value range result in requirements for the data transmission rate, which at least must be available for the transmission of the measured data. Requirements relating to this are defined, for example, in the PSI specification for peripheral crash sensors, the SPI specification for inertial sensors, the SENT specification for pressure sensors, etc.

[0004] Given the definition of digitally encoded statics, the high requirements for the resolution of the measured data and the large value ranges to be displayed for such measured data lead to particularly high requirements for the data transmission rate. However, the resulting high data transmission rate is not necessarily necessary in all transmission situations. For example, in certain operating states of the system, the measured values ​​are usually located in a relatively small value range, but a high absolute accuracy is required within this range (for example, the pressure values ​​in the brake system of a vehicle are very small during the main operating time, but the small pressures should be recorded in order to recognize the driver's braking request). If the system is in an operating state in which a larger value range is required, it may happen that the measured values ​​no longer need the same absolute accuracy, but an equivalent relative resolution is sufficient. Summary of the invention

[0005] According to a first aspect of the invention, a method for encoding data is proposed, which method can be used particularly advantageously, but not exclusively, for encoding measured values ​​of sensors (eg sensors of vehicles, industrial plants, home automation systems, etc.).

[0006] For example, the method is implemented by means of an analysis and utilization unit, which is advantageously configured as an ASIC, an FPGA, a processor, a digital signal processor, a microcontroller or the like. For example, the method is implemented as a computer program, which is stored in a memory unit attached to the analysis and utilization unit and / or integrated in the analysis and utilization unit in terms of information technology and can be implemented by the analysis and utilization unit.

[0007] In a first step of the method according to the invention, a data item (Datum) is received (for example, the data item comes from a sensor, a memory unit, a computer register, etc.), which represents a value from a predefined maximum value range. It is noted that the maximum value range can be a value range that is limited compared to the value range of the (sensor) data originally generated. This can be used meaningfully when the resolution of the data to be encoded should be higher than in the processing chain downstream of these data. By reducing the initial value range of the data to the maximum value range used for the method, the amount of data generated by the data can be reduced initially.

[0008] In the second step of the method according to the invention, a coding rule suitable for the data item is selected from at least one predefined first coding rule and a predefined second coding rule, wherein the first coding rule is configured to encode a first value range, the lower limit of the first value range corresponds to the lower limit of the maximum value range, and the upper limit of the first value range corresponds to a binary number that is at least one binary bit (or more bit number) smaller than the binary number of the binary representation used for the upper limit of the maximum value range.

[0009] Furthermore, a second coding provision is provided for encoding a second value range, the lower limit of which corresponds to a binary number that is at least one binary digit greater than the binary number used for the binary representation of the lower limit of the maximum value range and the upper limit of which coincides with the upper limit of the maximum value range. In other words, different value ranges are respectively encoded by the first coding provision and by the second coding provision. The predefined coding provision is stored, for example, in the above-mentioned memory unit or in a memory unit different therefrom.

[0010] When selecting a coding specification, a coding specification is always selected whose value range contains the numerical value of the data item, wherein in the case where the numerical value is contained in the value ranges of multiple coding specifications (because the value ranges have overlaps, for example), in this case a value range is selected that has the smallest lower value range limit. This ensures that the current numerical value to be encoded is always encoded with the highest possible resolution, so that the overall error caused by the encoding according to the invention is kept as low as possible.

[0011] In a third step of the method according to the invention, the numerical value encoding for the data item is specified based on the selected encoding in such a way that all binary bits of the numerical value regarded as a binary number are omitted, which are lower than the binary bits used for the binary representation of the lower limit of the value range specified by the selected encoding (i.e., the so-called "least significant bits", LSB for short), and in such a way that all binary bits of the numerical value regarded as a binary number are omitted, which are higher than the binary bits used for the binary representation of the upper limit of the value range specified by the selected encoding (i.e., the so-called "most significant bits", MSB for short). Preferably, the omission of the lower binary bits is performed by shifting the binary bits of the numerical value to be encoded by the corresponding number of binary bits towards the LSB (that is, to the right).

[0012] In the fourth step of the method according to the invention, the binary number of the coded value is expanded at predefined positions with predefined coding information which clearly identifies the respectively used coding specification. The number of binary bits required for the coding information depends on the number of coding specifications used in the method and can occupy one or more binary bits in the finally coded value accordingly.

[0013] In general, it should be pointed out that the method according to the invention can also be implemented without binary representation and / or processing at the binary level, and the description based on binary representation provided here is only used to simplify the explanation. Accordingly, the method can also be performed in decimal, hexadecimal, octal or in different numbering systems by using equivalent arithmetic operations.

[0014] Furthermore, it goes without saying that, before processing by the method according to the invention, any existing encoding of such received data items whose values ​​are to be encoded with the aid of the method according to the invention and which are not suitable for the inventive omission of binary bits and / or other processing steps of the method according to the invention (e.g. two's complement encoding of negative values) is first partially or completely decoded.

[0015] The method according to the invention also offers the advantage that a reduction in the amount of data required can be achieved, while smaller values ​​that usually have to be present with a particularly high degree of accuracy can be encoded with their original (high) resolution or with only a small loss of resolution. The reduction according to the invention in the amount of data required can, for example, reduce the required memory requirement and / or the required data transmission rate and / or speed up the data transmission.

[0016] The dependent claims indicate preferred developments of the invention.

[0017] In a particularly advantageous embodiment of the invention, the number of bits used to encode the value range of the respective coding specification is uniform for all coding specifications. This offers the advantage that, for example, in conjunction with the transmission of data encoded according to the invention, a constant bit rate and / or real-time transmission can be achieved, since the number of bits per value to be encoded does not change.

[0018] In a further advantageous embodiment of the invention, at least one third coding specification is additionally used in the method, which is provided for coding a third value range, the lower limit of which corresponds to a binary number that is at least one binary digit greater than the binary number used for the binary representation of the lower limit of the first value range, and the upper limit of which corresponds to a binary number that is at least one binary digit less than the binary number used for the binary representation of the upper limit of the second value range. Furthermore, it is advantageously possible to use a fourth, fifth or more coding specifications with respectively corresponding, mutually different value ranges.

[0019] The number of binary bits between the corresponding binary representations of the lower limit values ​​of the corresponding value range is advantageously identical or substantially identical. "Substantially identical" refers to the case where, due to the total number of binary bits provided for the coded values ​​and a certain number of used coding regulations, the same number of binary bits is not possible. Accordingly, here, approximately the same number of binary bits should also be included. Alternatively, it is conceivable that the higher the numerical value of the lower limit of the corresponding value range, the higher the corresponding number of binary bits between the lower limits. In this way, it is achieved that for smaller values, a correspondingly higher resolution is achieved.

[0020] Advantageously, the corresponding lower limit and / or upper limit of the corresponding value range are dynamically adjusted according to the current marginal conditions. For example, in the case of a vehicle using the method according to the invention, existing environmental conditions and / or identified critical driving situations and / or the current speed of the vehicle, etc., can be considered as marginal conditions. This realizes the optimal matching of the method according to the invention with the corresponding boundary conditions. By adjusting the lower limit and / or upper limit, on the one hand, the offset of the value range specified for the corresponding coding can be optimally adjusted, and the scale (Umfang) of the corresponding value range can be optimally adjusted. Such a dynamic adjustment can be clearly identified, for example, by adding an additional identifier to the encoded value, so as to achieve correct decoding. Alternatively or additionally, it is particularly advantageously possible to store information about such a dynamic adjustment in a separate data item, for example, before transmitting the encoded value, the separate data item is transmitted to the receiver of the encoded value. For example, only when the dynamic adjustment of the value range changes, the information will be sent to the receiver (for example, through a separate transmission frame), so that the receiver can perform decoding of the received encoded value based on the last received information.

[0021] Preferably, negative values ​​to be coded are represented by means of a sign bit, by which the coded value is extended at a predefined position. The position for the sign bit and for the coded information and possibly further information can be specified in essentially any manner.

[0022] Particularly preferably, the method according to the invention is used for encoding measured values ​​of sensors and / or for transmitting data between a transmitter and a receiver, in particular in a vehicle or in a home automation system. Furthermore, radar sensors and / or lidar sensors and / or ultrasonic sensors and / or speed sensors and / or acceleration sensors and / or position sensors and / or temperature sensors and / or pressure sensors and / or further sensors are conceivable as sensors.

[0023] Further preferably, in the data transmission, each coded value is transmitted in a single transmission frame (also referred to in English as "frame"). This enables transmission with a particularly small time delay, which can play an important role in time-critical applications. Of course, this does not exclude that the coded values ​​according to the invention can also be transmitted in segmented form between the transmitter and the receiver.

[0024] According to a second aspect of the present invention, a method for decoding data is provided, wherein the data to be decoded are preferably data that have been encoded by means of a method for encoding data according to any one of claims 1 to 8.

[0025] In the first step of the method according to the invention, a data item is received, the data item having an encoded value and encoding information corresponding to the encoded value. The receiving process and the further processing described below are performed, for example, by means of an analysis and utilization unit, which is preferably constructed similarly or identically to the analysis and utilization unit described above for encoding data.

[0026] In the second step of the method of the present invention, a predefined decoding provision for decoding the encoded numerical value is selected from at least one predefined first encoding provision and a predefined second decoding provision according to the encoding information. Advantageously, the encoding provision is stored in a memory unit attached to the analysis and utilization unit in terms of information technology. Preferably, the corresponding decoding provision of the method according to the second aspect of the present invention corresponds to the corresponding encoding provision of the method according to the first aspect of the present invention, so that the correspondingly encoded numerical value can be completely reconstructed or reconstructed with a resolution error introduced by the encoding by means of the corresponding encoding provision.

[0027] In a third step of the method according to the invention, the coded value regarded as a binary number is shifted towards higher-order bits by the number of bits specified by the selected decoding specification in order to generate a decoded binary number. Here, the decoded binary number has a predefined number of target bits, which is at least so large that a predefined maximum value range used when encoding the value can be represented by means of the decoded binary number. In addition, the bits of the decoded binary number that are higher than the highest occupied bit of the shifted binary number are occupied with the value 0, and the bits of the decoded binary number that are lower than the lowest occupied bit of the shifted binary number are occupied with predefined replacement values. Preferably, the replacement values ​​are selected in such a way that the average error when reconstructing the decoded value relative to the initially coded value is as small as possible, without necessarily requiring such a minimization.

[0028] When specifying the substitute value, it is provided, for example, that each binary bit of the decoded binary number to be occupied by means of the substitute value is occupied by the value 0, or that each binary bit of the decoded binary number to be occupied by means of the substitute value is occupied by the value 1. It is also particularly advantageous that the most significant binary bit of the binary bits of the decoded binary number to be occupied by the substitute value is occupied by the value 1, and the respective other binary bits to be occupied by the substitute value are occupied by the value 0, or that the most significant binary bit of the binary bits of the decoded binary number to be occupied by the substitute value is occupied by the value 0, and the respective other binary bits to be occupied by the substitute value are occupied by the value 1. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Herein, it is shown:

[0030] Figure 1 A first embodiment of a predefined encoding rule and a corresponding predefined decoding rule according to the present invention is shown; and

[0031] Figure 2 A second exemplary embodiment for the predefined encoding specification and the corresponding predefined decoding specification according to the present invention is shown. DETAILED DESCRIPTION

[0032] Figure 1 A first exemplary embodiment for encoding specifications c1, c2 and corresponding decoding specifications d1, d2 according to the present invention is shown.

[0033] It should be noted that the representation (in particular the data representation, for example in a memory cell) of the respective encoding specifications c1, c2 and the corresponding decoding specifications d1, d2 can be identical. In the example shown here, all the information required for encoding and decoding of the values ​​is arranged in the same table, wherein separate encoding specifications c1, c2 and decoding specifications d1, d2 can also be used explicitly, in which only the information required for encoding or decoding is contained.

[0034] It is further pointed out that the encoding of a numerical value according to the invention and the decoding of a numerical value according to the invention can always be carried out independently of one another, regardless of whether a joint representation or a separate representation is provided for the encoding / decoding.

[0035] exist Figure 1 The table shown in the table has consecutive numbers in its first column from the left, which represent the corresponding bits or binary bits of the maximum value range w_max, wherein the maximum value range w_max refers to a quantity, that is, a positive value range, and the sign bit SIGN for representing both positive and negative values ​​is set as an additional 20th bit. In this case, it is explicitly pointed out that the method according to the invention can also be carried out with a maximum value range w_max that does not have negative values ​​(for example, pressure, temperature, distance). In such a case, the 20th bit is preferably used additionally to represent the positive value range.

[0036] exist Figure 1 The table shown in has the corresponding lower limits for encoding / decoding specifications in its second column from the left.

[0037] The third column from the left represents a first encoding specification c1 and a first decoding specification d1 having a value range w1, and the fourth column from the left represents a second encoding specification c2 and a second decoding specification d2 having a value range w2.

[0038] The number of numerical values ​​to be encoded by means of the method according to the invention lies within a maximum value range w_max, which is received as a data item by the evaluation unit.

[0039] Analyze and utilize the unit according to the size of the value Such coding regulations c1, c2 are selected to encode a numerical value that is within the value range w1, w2 of the coding regulations, wherein, in one case, the numerical value is contained in the value ranges w1, w2 of multiple coding regulations c1, c2, in which case such coding regulations c1, c2 are always selected: the coding regulations have the smallest lower limit of the value range.

[0040] In a specific example, the value 2000 is encoded, which is contained in the value ranges w1, w2 of the two encoding specifications c1, c2. According to the predefined provisions described above, the first encoding specification c1 is selected to encode the value, and the amount of the value is encoded with 14 bits (c1_bit1 to c1_bit14).

[0041] Now, a sign bit SIGN is added as the 15th bit to the encoded numerical value, which signifies a positive value.

[0042] Additionally, coding information c0 is added as the 16th bit to the coded value, which coding information c0 indicates that the first coding specification c1 is used.

[0043] The second coding specification c2 is used for coding when the value to be coded is, for example, 55555. Here, the LSBs (ie, bits 1 to 5 in the fourth column from the left) are omitted, so that corresponding errors are introduced when using the second coding specification c2 due to the associated reduction in resolution.

[0044] Since the number of bits provided for encoding in the respective encoding specifications c1 , c2 is defined identically here, the encoded values ​​are correspondingly generated with a uniform bit length, whereby a constant data transmission rate can be achieved when transmitting values ​​encoded in this way.

[0045] Furthermore, it is possible, for example, to adjust the respective limits of the value ranges w1, w2 as a function of the current boundary conditions and to transmit corresponding information about the adjustment from the transmitter to the receiver by means of an additional transmission frame from the transmitter (which is arranged to perform encoding of the numerical values) to the receiver (which is arranged to perform decoding of the numerical values), thereby ensuring at all times the correct decoding of the transmitted data based on this information.

[0046] The method of the invention can be used particularly advantageously for encoding measured values ​​of sensors of a vehicle, which are encoded by the sensor itself, for example, and then transmitted to a control unit of the vehicle corresponding to the sensor, in which the measured values ​​of the sensor are decoded. In this case, each encoded measured value is particularly preferably transmitted in a single transmission frame.

[0047] In order to perform decoding of the coded value, first the bits of the coded value are shifted to the position at which they were located before the coding, according to the coding rules c1, c2 used. The MSBs omitted during coding are filled with the value "0" during decoding with the aid of the first decoding rule d1, while the LSBs are filled with the substitute values ​​specified in the fourth column from the left in the table in the positions 1 to 5 during decoding with the aid of the second decoding rule d2.

[0048] Figure 2 A second embodiment of the predefined encoding rules c1, c2, c3 and the corresponding predefined decoding rules d1, d2, d3 according to the present invention is shown. Figure 1 Tables in and Figure 2 There are many similarities between the tables in , and in the following, to avoid repetition, only the differences between the two tables are described.

[0049] exist Figure 2 In the example, the maximum value range w_max corresponds to only 16 bits after adding the sign bit SIGN. In addition, a third encoding specification c3 and a third decoding specification d3 with a third value range w3 are provided. Here, the lower limits of the value ranges w1, w2, w3 are respectively defined in such a way that the spacing of the lower limits increases towards larger values. When encoding smaller values, this achieves correspondingly smaller errors than when encoding larger values.

[0050] In order to clearly identify the respectively used coding specification c1 , c2 , c3 , here, accordingly, 2 bits are required in the coding information c0 to be provided.

[0051] In addition, here, unlike in Figure 1 The table in defines partially different alternative values ​​in comparison.

Claims

1. A method for encoding data, comprising the following steps: receiving a data item representing a value from a predefined maximum value range (w_max), · selecting a coding rule (c1, c2) suitable for the data item from at least one predefined first coding rule (c1) and a predefined second coding rule (c2), wherein: the first coding specification (c1) being provided for coding a first value range (w1), the lower limit of which corresponds to the lower limit of the maximum value range (w_max) and the upper limit of which corresponds to a binary number which is at least one binary digit smaller than the binary number of the binary representation of the upper limit of the maximum value range (w_max), o the second coding specification (c2) is provided for coding a second value range (w2), the lower limit of the second value range corresponds to a binary number which is at least one binary digit greater than the binary number of the binary representation used for the lower limit of the maximum value range (w_max), and the upper limit of the second value range corresponds to the upper limit of the maximum value range (w_max), o selecting a coding specification (c1, c2) whose value range (w1, w2) contains the value of the data item, wherein, in one case, the value is contained in the value ranges (w1, w2) of a plurality of coding specifications (c1, c2), in which case the coding specification (c1, c2) is selected which has the smallest lower limit of the value range, Encode the value of the data item based on the selected encoding specification (c1, c2) in such a way that: o omit all bits of the value considered as a binary number that are lower than the bit of the binary representation of the lower limit of the value range (w1, w2) used for the selected encoding specification (c1, c2), and o omit all binary digits of the value considered as a binary number that are higher than the binary digit of the binary representation of the upper limit of the value range (w1, w2) used for the selected encoding specification (c1, c2), and The binary number of the coded value is extended at a predefined position with predefined coding information (c0), which unambiguously identifies the respectively used coding specification (c1, c2).

2. The method according to claim 1, wherein: The number of bits used for encoding the value range (w1, w2) of the respective encoding specification (c1, c2) is uniform for all encoding specifications (c1, c2).

3. A method according to any one of the preceding claims, wherein: Additionally using at least one third encoding specification (c3), which is provided for encoding a third value range (w3), the lower limit of the third range of values ​​corresponds to a binary number which is at least one binary digit greater than the binary number represented in binary as the lower limit of the first range of values ​​(w1), and The upper limit of the third value range corresponds to a binary number which is at least one binary digit smaller than the binary number represented in binary for the upper limit of the second value range (w2).

4. The method according to claim 3, wherein: The number of binary digits between the corresponding binary representations of the lower limit of the corresponding value range (w1, w2) the same or substantially the same, or The higher the numerical value of the lower limit of the respective value range (w1, w2), the higher the number of binary bits.

5. A method according to any one of the preceding claims, wherein: The respective lower limit and / or upper limit of the respective value range (w1, w2) is adjusted dynamically as a function of current boundary conditions.

6. A method according to any one of the preceding claims, wherein: Negative values ​​to be encoded are marked by means of a sign bit (SIGN), by which the encoded value is extended at a predefined position.

7. A method according to any one of the preceding claims, wherein: The method is used in Encode the sensor's measured value, and / or Transmitting data between transmitters and receivers, especially in vehicles or in home automation systems.

8. The method according to claim 7, wherein: Each coded value is transmitted in a single transmission frame during data transmission.

9. A method for decoding data, comprising the following steps: receiving a data item having an encoded value and encoding information (c0) corresponding to the encoded value, selecting, based on the coding information (c0), a predefined decoding specification (d1, d2) for decoding the coded value from at least one predefined first decoding specification (d1) and a predefined second decoding specification (d2), shifting the encoded value, considered as a binary number, towards higher order bits by the number of bits specified by the selected decoding specification (d1, d2) to produce a decoded binary number, in, the decoded binary number has a predefined number of target bits, which is at least large enough to represent a predefined maximum value range (w_max) used when encoding the numerical value with the aid of the decoded binary number, and The decoded binary number o bits of higher order than the bit most highly occupied by the shifted binary number are occupied by the value zero, and o Bits lower in order than the bit least occupied by the shifted binary number are occupied by predefined replacement values.

10. The method according to claim 9, wherein: For the alternative value setting, Each binary bit of the decoded binary number to be occupied by the substitute value is occupied by the value 0, or Each binary bit of the decoded binary number to be occupied by the substitute value is occupied by the value 1, or The most significant bit of the bits to be occupied by the replacement value of the decoded binary number is occupied by the value 1, and the corresponding other bits to be occupied by the replacement value are occupied by the value 0, or The most significant bit of the bits of the decoded binary number to be occupied by the replacement value is occupied by the value 0, and the corresponding other bits to be occupied by the replacement value are occupied by the value 1.