Lossless data transmission compression

CN115004558BActive Publication Date: 2026-10-27AUSTRIAMICROSYSTEMS AG
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202080094609.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-12-23
Filing Date
2020-12-16
Publication Date
2026-10-27
Estimated Expiration
2040-12-16

AI Technical Summary

Technical Problem

因此,这种效应可能约束ALS传感器的采样速率,以便它不会使I2C过载传感器数据

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115004558B_ABST
    Figure CN115004558B_ABST
Patent Text Reader

Abstract

A method of compressing data for data transmission within an electronic device is disclosed. The method includes receiving, at a first processing means of the electronic device, a plurality of data samples generated by a means of the electronic device, wherein the data samples comprise numerical bits; reconstructing, by the first processing means, the plurality of data samples into a plurality of data packets; marking each data packet with a sample indicator bit to indicate a plurality of groups across the plurality of data packets; transmitting, through an interface of the electronic device, a bitstream comprising at least some of the plurality of data packets to a receiving means of the electronic device; and decoding, by a second processing means of the electronic device, the bitstream to obtain at least some of the plurality of data samples, the decoding being based at least in part on the sample indicator bits.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to data compression technology. Background Technology

[0002] Electronic devices, such as mobile devices, typically include screens with adjustable brightness. Automatic adjustment of screen brightness can be facilitated by using devices with an ambient light sensor (ALS). ALS performs the function of adjusting the screen brightness to match the ambient lighting environment, making the display appear clear and readable while also reducing the display's overall power consumption.

[0003] Data transmission in electronic devices for data obtained from ALS sensors is typically via I 2 The C interface is complete. With advancements in electronic device development, the sampling rate of ALS sensors has increased, for example, to enable rapid detection of changes in lighting conditions.

[0004] The increased sampling rate increases the amount of data that must be traversed through I 2 The amount of ALS data in C. As the amount of data increases, I... 2 The C bus interface may increase the likelihood of data backlog. Therefore, this effect may limit the sampling rate of the ALS sensor so that it does not cause I... 2 C overload sensor data. (via I) 2 The increased data volume or data transmission efficiency of the C interface will enable an increase in the sampling rate of ALS sensors in electronic devices.

[0005] Known technologies include US 2019 / 101442, “METHOD OF AMBIENT LUMINOSITY LEVELDETECTION, AND CORRESPONDING SENSOR”, which involves resetting and triggering a counter whenever a photodiode irradiated by ambient light reaches a discharge threshold. Summary of the Invention

[0006] In addition to providing lossless data compression, embodiments of this disclosure also provide an algorithm with a simple implementation. This is advantageous because, in the embodiments, the algorithm is implemented in the hardware of the electronic device and can be executed fast enough to meet the sampling rate requirements of the measurement sensor. In other words, in addition to providing improved data compression, the compression algorithm itself can be executed efficiently to compress high-throughput data that meets the sensor's requirements. In this way, existing hardware and interfaces on the electronic device can be maintained / reused with, for example, improved sensors with higher sampling rates.

[0007] According to one aspect of this disclosure, a method for compressing data for data transmission within an electronic device is provided, the method comprising:

[0008] At a first processing component of the electronic device, a plurality of data samples generated by a component of the electronic device are received, wherein the data samples include numerical bits;

[0009] The first processing component reconstructs multiple data samples into multiple data packets;

[0010] Use sample indicator bits to label each data group to indicate multiple groups across multiple data groups;

[0011] A bit stream, comprising at least some of a plurality of data packets, is transmitted to the receiving component of the electronic device via the interface of the electronic device.

[0012] The bit stream is decoded by a second processing component of the electronic device to obtain at least some of a plurality of data samples, the decoding being at least partially based on sample indicator bits.

[0013] The indicator bits can be selected so that each group of data (where each group can belong to the same data sample) contains the same / matching indicator bits. The defined size of the data groups can be the same for each group, or the defined size can be dynamically changed based on the history of the data sample size. Alternatively, the defined group size can be predetermined so that it changes periodically according to a predefined sequence. It should be understood that the sample indicator may not correspond to 1 bit.

[0014] Reconstructing data samples into data packets can occur in the order in which the data samples were received. In this way, the samples and the bits within the samples maintain the same order throughout the transmission, allowing the receiver to obtain the original order of the data samples.

[0015] Therefore, this aspect of data compression reduces the amount of data transmitted through the interface / bus. This offers the following advantages: the interface can be maintained within the existing device architecture, and this interface can be a serial or parallel interface (e.g., I / O). 2 (C) This means, for example, that existing device architectures do not require additional pins or other modifications. In other words, no hardware modifications are needed to increase the throughput of the interface; instead, the efficiency of information transmission itself is improved. In fact, a surprising result of the embodiments within this disclosure is that algorithms with uncomplicated implementations (especially relative to known compression methods) can provide compression ratios of more than twice as high.

[0016] Furthermore, the compression method described above reduces the number of bits, which inherently leads to a reduction in bus power consumption during information transmission.

[0017] Each of the multiple groups can correspond to a different set of data samples.

[0018] Decoding may include:

[0019] Multiple groups of data representing different corresponding data samples are identified based on sample indicator bits;

[0020] Remove the sample indicator bit from each data group to obtain multiple data samples initially received from the component.

[0021] Therefore, the indicator allows the receiver component to reorganize the bit stream into data packets, group the data packets into the correct data samples from which the data packets originated, and remove the indicator bits to obtain the data samples. Alternatively, the receiver may not divide the bit stream into packets. The receiver component may simply organize the bit stream directly into groups representing data samples and then remove the sample indicator bits.

[0022] The method may also include:

[0023] Before reconstruction, the numerical difference between each pair of adjacent data samples is calculated to obtain multiple differences;

[0024] Multiple differences, rather than data samples, are reconstructed by the first processing component to obtain multiple data groups.

[0025] Advantageously, calculating the difference before constructing and transmitting samples can offset any data sample with a higher value (which requires a larger number of bits to fully represent them). Therefore, calculating the difference between adjacent data samples can provide surprisingly large efficiency savings, for example, in the case of consecutive data sample sequences with very similar values. Thus, the relative difference between each pair of adjacent values ​​can be represented by a number much smaller than the value of the original data sample.

[0026] Furthermore, any negative difference can be represented using two's complement representation in binary. Advantageously, two's complement representation is an inherently efficient way to store and transmit negative numbers because it does not contain a dedicated "sign" bit. Instead, the first bit of the two's complement representation uses the first bit (i.e., the "most significant bit") to represent the sign of the number being represented and a portion of its value.

[0027] For each data sample, reconstruction may include dividing the numerical bits of the data sample into the minimum number of data groups required to represent the information included in the data sample.

[0028] In this way, any "zero" bits preceding the most significant bit in the number of data samples can be removed and not transmitted as part of the bit stream. In other words, however, advantageously, all bits containing information about the value of the data sample are transmitted; therefore, the compression method is lossless. For example, a set of data samples can all be received in 8-bit format at the first processing unit. However, each of the set of data samples can represent a value less than 63, and therefore requires at most 6 bits to represent that number. Therefore, a defined group size of 6 can be used.

[0029] Each of the multiple data groups can have a defined size.

[0030] The method may also include:

[0031] The data sample is reconstructed into data packets by monitoring by any one of the first processing component, the second processing component, and the receiving component of the electronic device to obtain the average number of data packets per data sample;

[0032] The defined size of multiple data groups is dynamically set based on the average number of data groups per data sample.

[0033] In this way, the receiver or transmitter (i.e., the first processing element) can monitor the history of the receiver's data samples to determine the average required number of data packets used. Therefore, the defined size of the data packets can be dynamically changed to efficiently transmit information within the data samples. Advantageously, as previously mentioned, any unnecessary "zero" bits that precede the most significant bit in the number of data samples and do not carry information can be removed from the data packets.

[0034] Data samples can represent signals measured by sensor components of electronic devices.

[0035] The sensor component is an ambient light sensor.

[0036] The algorithm described above provides favorable results for data obtained from ambient light sensors (ALS), particularly ALS sensors used to monitor the flicker of ambient light sources.

[0037] The components of an electronic device may include a set of data channels, each of which generates channel-specific data samples.

[0038] The method may further include: receiving a plurality of data samples generated by the set of data channels of the component; reconstructing the plurality of data samples by the first processing component to obtain a plurality of data packets, wherein for each data sample, the reconstruction includes: reconstructing the data sample into at least one data packet, wherein the at least one data packet has a defined size corresponding to a data channel in the set of data channels that generated the data sample.

[0039] To minimize the wasted "zero" bits that do not carry information, a different defined packet size can be used for each channel. For example, different channels can collect data with different precision (such as ambient light data). Therefore, different packet sizes will be best suited for transmitting the data samples of each channel most efficiently.

[0040] The indicator bits can be selected such that the first data packet in each group of data packets has a first indicator bit (e.g., one), and all other data packets have a different second indicator bit (e.g., zero).

[0041] Sample indicators can be inserted at defined locations within data groups.

[0042] The tagging may also include inserting sample indicators into each data group at predefined locations, wherein the predefined locations change according to a predefined sequence of locations.

[0043] Advantageously, by inserting indicator bits at a set of varying positions / bit locations within the data packets, the bit stream becomes increasingly difficult to interpret or reverse engineer without prior knowledge of the defined sequence. Furthermore, a degree of encryption can be inserted into the data to protect the information represented by the bit stream.

[0044] The interface of an electronic device can be a serial peripheral interface.

[0045] The interface of an electronic device can be I 2 C interface.

[0046] Advantageously, due to the compression achievable through the examples of the described compression methods, it incorporates existing serial peripherals or I... 2 Existing C-interface technology can be used in an unmodified form to transmit information at a higher level of efficiency.

[0047] Each data sample can be represented in binary.

[0048] Each data sample with a negative value can be represented in two's complement binary form.

[0049] The first processing component may be a hardware element that includes a persistent configuration that enables the hardware element to perform refactoring and tagging.

[0050] A non-transitory data carrier that carries processor control code, which performs the above decoding at runtime.

[0051] According to another aspect of this disclosure, an apparatus is provided, comprising: a component configured to generate data samples; a first processing component configured to receive a plurality of data samples generated by the component of an electronic device, wherein the data samples include numerical bits. The apparatus further includes an interface coupled to the first processing component and a receiving component. The first processing component is further configured to: reconstruct the plurality of data samples into a plurality of data packets; mark each data packet with sample indicator bits to indicate a plurality of groups spanning the plurality of data packets; transmit a bit stream comprising at least some of the plurality of data packets to the receiving component via the interface; and a second processing component configured to decode the bit stream to obtain at least some of the plurality of data samples, the decoding being at least partially based on the sample indicator bits. Attached Figure Description

[0052] Embodiments of this disclosure are illustrated in the following figures, in which:

[0053] Figure 1 Example methods for data compression and transmission are shown;

[0054] Figure 2a This illustrates another example of data compression and transmission, where incremental changes to adjacent data values ​​are transmitted;

[0055] Figure 2b It shows according to Figure 2a The sample data processed is shown in Table 3;

[0056] Figure 3 An example method for data compression of data received from multiple data channels with different packet sizes is shown;

[0057] Figure 4 This indicates that it is configured or programmed to implement Figures 1-3 A diagram of the process of a general electronic device. Detailed Implementation

[0058] This disclosure specifically relates to lossless data compression for efficient transmission of data obtained from ambient light sensors (ALS) in electronic devices.

[0059] ALS is known to be sensitive to the inherent flicker in artificial light sources powered by AC sources. The sampling rate of the ALS affects its sensitivity to flicker. For example, the ALS may not sample at a sufficiently high rate to account for the flicker of artificial light sources, which could lead to inaccurate determination of ambient light levels.

[0060] Therefore, suitable electronic devices can be equipped to detect and mitigate flicker in ambient light sources. For example, an ALS can be utilized at a higher sampling rate, which will allow other algorithms within the electronic device to more accurately mitigate flicker and determine the accurate average value of ambient light conditions. The configuration of the ALS within the device may also depend on the sampling rate required to accurately determine ambient light conditions. For example, an ALS sensor positioned behind the screen of an electronic device requires an increased sampling rate.

[0061] However, the sampling rate of ALS is proportional to the traffic transmitted through the electronic device's transmission bus, which can be a serial bus, such as I... 2 C-bus. This can lead to data transfer bottlenecks at the bus.

[0062] Known compression algorithms include Lempel-Ziv-Welch (LZW) and adaptive Huffman. However, these algorithms require complex implementations, which generally makes them unsuitable for ALS scintillation data transmission. Therefore, there is no known method in the art to provide lossless data compression by incorporating ALS scintillation detection.

[0063] Compared to known implementations, this disclosure introduces a method that reduces traffic by approximately two times or more. However, embodiments relating to this disclosure are not limited to transmitting data acquired by an ALS sensor or data associated with an increased sampling rate to allow flicker detection. Therefore, it should be understood that this method is not limited to flicker detection and can be used in various scenarios where data needs to be transmitted via serial or parallel buses.

[0064] ALS flicker data can be transmitted via I 2 C is transmitted in 8-bit or 16-bit mode without compression. The bit size also varies depending on the measurement time. For higher flicker frequencies, the sampling rate and / or dynamic range increase, resulting in higher IF. 2 C-flow rate. For example, a 4kHz sampling rate with 10-bit resolution sampled at 100ms (10Hz interval) produces 3.2k bits, which is transmitted through I... 2 C-transmission. Using the current existing 8-bit or 16-bit directed FIFO (First-In-First-Out) architecture would require 400 bytes for 8-bit data transmission and 800 bytes for 16-bit data transmission.

[0065] The algorithm according to embodiments of this disclosure can reduce I 2The C-band flow allows for the transmission of up to 350 bytes, compared to 800 bytes, without information loss. Advantageously, the reduced interface load enables the use of existing bus topologies within current electronic devices to transmit more data. Therefore, only software implementation changes need to be applied to the electronic device, without requiring a complete redesign of its architecture.

[0066] It should be understood that compression algorithms can be implemented in the hardware or software of an electronic device. For example, the algorithm can be hard-coded within an electronic device on a chip such as an FPGA (Field-Programmable Gate Array) or ASIC (Application-Specific Integrated Circuit). Hardware-implemented algorithms can run most efficiently, which is beneficial for execution that is fast enough to meet the requirements of sensor sampling rates. Hardware executable code can also provide a level of parallelism that is inaccessible on software-implemented algorithms.

[0067] Example 1: Compression

[0068] Figure 1 A flowchart illustrating a series of steps involved in a compression algorithm is shown, which in an embodiment may relate to data used for flicker detection of an ALS sensor. However, the data compression method is general enough to be applicable to the compression and transmission of various data types and is not necessarily related to sensor data. Furthermore, the algorithm is general enough to be applied to transmission over any suitable serial or parallel bus. The description of sensor data is provided only as an example and for convenience. Figure 1 .

[0069] S100 - Receive raw data including data words representing measured sensor values. According to step S100, raw data is received from a sensor in the electronic device. The data can take the form of a sequence of numbers. The numbers can represent, for example, a unit or indication of ambient light intensity, or any quantity that can be measured by the sensor. Each number is called a data word. Data words can be represented as binary numbers; however, the underlying software or hardware can use any numerical base system.

[0070] S102 - Reconstruct the data word into groups of a fixed size of n-1 bits. In step S102, each data word is divided or reconstructed into a separate group. The size of the group is preferably measured in bits. The group size can be predetermined, for example, containing n-1 bits. As an example only, a group size of n-1 bits can be used, for example, where n = 6. Therefore, a data word consisting of 10 bits will be divided into 2 groups. Different data words consisting of 11 bits will be divided into 3 groups.

[0071] Alternatively, the packet size can be dynamically selected based on the size of the data words received from the sensor. For example, if data words of 11 or 12 bits are frequently received from the sensor, the algorithm may determine that dividing / reconstructing the data words into two packets of 6 bits each, rather than three packets of 5 bits each, will be more efficient. In this way, fewer zeros (indicating the absence of useful information from the sensor) are transmitted, and a higher degree of compression can be achieved.

[0072] S104 - Insert indicator bits at fixed positions within each group to obtain groups of size n bits, where the indicator bits identify distinct data words. More specifically, in step S104, indicator bits are added to predetermined positions within the groups. The indicator bits are used to identify distinct data words. In other words, the indicator bits are used to mark the beginning of a new data word. The indicator bits can be zero or one; however, in alternative embodiments where the groups are not represented in binary, the indicator bits can be any number. From another perspective, the sample indicator bits switch with the transmitted data words. The data word length is flexible and non-fixed, and depends on the size of the number being received from the sensor. All groups within the data word have the same sample indicator bit position. For example, the indicator bits (e.g., zero or one) can be inserted as a prefix into the groups or appended as a suffix. The group size is now n bits.

[0073] Table 1 below shows an example with a defined group size n = 6 after the indicator bits have been added.

[0074]

[0075] Table 2 below shows an example with a defined group size n = 7 after the indicator bits have been added.

[0076]

[0077] Using this mechanism, the receiver can identify the start / end of each data word after the bit stream has been transmitted. Individual bits representing indicator bits are removed and these bits are merged until the next indicator changes, thereby reconstructing the transmitted data word.

[0078] S106 - Transmit the packets as a bit stream of data to the receiver. In step S106, the data packets are transmitted as a bit stream, which can be, for example, a continuous (uninterrupted) bit stream.

[0079] S108 - Split the bit stream into individual packets. In step S108, the bit stream is divided or segmented into packets of a predetermined length (e.g., 6). Therefore, when the receiver knows the predetermined packet size, the bit stream is reconstructed / divided into new packets every nth bit.

[0080] S110 - Packets are assigned to their respective data words based on indicator bits. In step S110, the receiver determines which packets belong to the same data word by reading indicator bits at predetermined positions within the packets. For example, the indicator bit could be the first bit in each packet, and indicator bit '1' could indicate the beginning of a new data word. Therefore, indicator bit '0' could indicate the middle or end of a data word. The packets are then assigned to their respective data words. The order of data words and packets is maintained throughout steps S100 to S110, so no sorting or reordering of the packets is required.

[0081] S112 - Remove indicator bits from the packets to obtain raw, unprocessed data. In step S112, once the packets have been assigned their respective data words, indicator bits are removed from each packet. Therefore, the raw, unprocessed data received from the sensor is obtained by the receiver.

[0082] The described algorithm and... are further described in Table 3 below. Figure 1 The steps.

[0083]

[0084]

[0085] In Table 3 above underlined The number represents the indicator bit.

[0086] In addition to the embodiments described above, the algorithm may include other optional elements to achieve further levels of compression. For example, the algorithm may allow only positive data samples to be transmitted. This has the advantage of not needing to transmit the "sign bit," thus reducing the number of bits transmitted.

[0087] Alternatively, both positive and negative data samples can be transmitted in two's complement representation. This reduces the total number of bits transmitted, as two's complement may be a more storage-efficient way to represent binary numbers. When two's complement representation is used to represent both positive and negative numbers, the difference is the sign bit (0 for positive numbers and 1 for negative numbers), and this representation is typically used when transmitting the difference.

[0088] In yet another alternative example, the receiver and / or transmitter can monitor the average required number of packets per data word and automatically / dynamically adjust the packet size to an optimal value. As mentioned above, a dynamic packet size can be selected to minimize the number of zeros in the first series of digits used as binary numbers (and therefore do not carry information about the sample size).

[0089] Example 2: Incremental Compression

[0090] In other example implementations, instead of transmitting raw data, the difference (or increment) between adjacent values ​​can be transmitted. Once received, a set of raw values ​​can be calculated based on the value of the first data word and this difference. In this way, advantageously, the amount of data transmitted can be significantly reduced according to the relative values ​​of the data words. For example, when the data word represents a large number and a series of consecutive data words have the same value, the difference between the consecutive data words will be zero, and therefore can be represented with as few as 1 bit. This brings the benefits of lossless data compression methods. In this algorithm, negative numbers can be represented using two's complement. Using an incremental approach, further improved compression ratios can be achieved for data associated with ALS flicker detection data.

[0091] Figure 2a An example flowchart illustrating the series of steps involved in a compression algorithm that further processes sensor data to transmit only the difference between consecutive adjacent data words is shown below. Figure 2a The steps.

[0092] S100 - Receives raw data including data words representing the measured sensor values;

[0093] S101 - Calculate the difference between each consecutive adjacent number (data word) and store the difference in binary (optionally in binary two's complement representation) instead of the original data word;

[0094] S102 - Reconstruct the data word into a fixed-size block with n-1 bits;

[0095] S104 - Insert indicator bits at fixed positions within each group to obtain groups of size n bits, where the indicator bits identify different data words;

[0096] S106 - Transmit the packet as a bit stream of data to the receiver;

[0097] S108 - Splits the bitstream into separate packets;

[0098] S110 - Assigns packets to their respective data words based on indicator bits;

[0099] S111 - Remove the indicator bits from the group to obtain the difference calculated in binary representation;

[0100] S113 - For each data word, the difference is continuously added to the first data word to obtain the raw, unprocessed data;

[0101] Apart from Figure 1 In addition to the steps shown, Figure 2aS101 is illustrated, in which the difference or increment between consecutive adjacent numbers is calculated. Each original data word is then replaced with the difference calculated between the data word and the immediately preceding data word. Thus, the first data word in the sequence is maintained so that the complete set of data words can be recalculated once the increment has been transmitted. Optionally, for further efficiency, negative numbers (and optionally positive numbers) can be represented using two's complement representation in binary.

[0102] The incremental compression algorithm also includes a further step S111 of removing indicator bits from the increment. Subsequently, in order to obtain the original sensor-measured data word value, at step S113, the difference must be continuously added to the first data word to obtain the original value.

[0103] Table 4 below shows an example of a series of data words for which incremental compression was applied before transmission. The packet size is, for example, 6.

[0104]

[0105] In table 4 above underlined The numbers in bold italics represent the sign bit of the binary two's complement number.

[0106] Figure 2b A graph 200 showing the original data word values ​​is presented. It illustrates the increments between various adjacent data words. For example, the increment 202 between the zeroth data word n0 = 0 and the second data word n1 = 338 gives the increment D. 0,1 =338. n 10 =345 and n 11 The increment 204 between 250 and 250 gives the increment D. 10,11 =n 11 -n 10 = -95. The axis represents the number of data words 206x and the value of the data word (decimal) 206y.

[0107] Two's complement representation is advantageous because it is a more efficient way to store negative numbers in binary, thus leading to more efficient data transfer. However, it should be understood that the above method is not limited to two's complement binary representation, and any suitable representation of the increment value can be used.

[0108] It should be understood that using two's complement, the range of representable differences is "halved." For example, if there are at most 10 bits to represent each value, the representable range of an unsigned number is from 0 to 1023. With a 10-bit two's complement representation, there exists a range from -512 to 511 (each bit position has a weight of 2^positions, except for the sign bit, which has a value of -2^positions, e.g., (-2^9, ..., 2^3, 2^2, 2^1, 2^0) = -512, ..., 8, 4, 2, 1). In the case of two consecutive values ​​1000 and 20, and the desired difference to be transmitted, the result would be -980. It would use 11 bits to represent this difference in the two's complement scheme. It should be understood that in one scenario, when there are at most 10 bits, the property of range wrapping can be used in the following way: Wrapping with more than 10 bits will be used. That is, mod(1000+k, 2^10) = 20, then k = 2³ + 20 = 44, or in other words, 20 - 1000 + 2^10 = -980 + 1024 = 44. Therefore, instead of transmitting -980 (11 bits in the two's complement b10000101100 = -1024 + 32 + 8 + 4 = -980), it is also possible to transmit 44 (7 bits in the two's complement b0101100 = 44 = 32 + 8 + 4). To recover the correct value, it is simply necessary to calculate mod(1000+44, 2^10) = 20. In general, the same applies in the opposite direction, for example, from 12 to 900, => the difference is +888, which cannot be represented by a 10-bit two's complement value. This is when calculating 900 - 12 - 2^10 = 888 - 1024 = -136. Modulo operations are also useful for representable values; for example, the range from 500 to 100 results in -400 => mod(500-400, 2^10) = 100. Therefore, modulo operations can be applied during decoding. If the entire representation range is not 10 bits but any other number of bits, the method can be adjusted accordingly. Those skilled in the art will understand that the above examples are applicable to the inventive concept of this disclosure.

[0109] Based on the specific examples in Table 4 above, the following compression factors will be implemented if data is to be transmitted:

[0110] Regular data transmission:

[0111] 16-bit FIFO mode → 20 × 2 bytes = total 40 byte.

[0112] Data transfer example in Table 4 using incremental compression:

[0113] Data compression with two's complement and a defined data block size (6 bits)

[0114] →24 × 6 bits / 8 = Total 18 byte

[0115] Achieved compression ratio:

[0116] 40 bytes: 18 bytes → 2.22:1 ratio

[0117] Therefore, a compression factor greater than 2 is achieved using the two's complement representation of the difference between adjacent data word values. Furthermore, the above implementation preserves accurate input data, thus the compression is lossless. Similar to the first example, dynamic block size can also be implemented, for example, based on block history. In this way, the block size can be selected such that "wasted" zeros before the block value are minimized, allowing as many digits as possible in each block to convey information about the underlying data word value. It should be understood that 1s can also be wasted when two's complement is available.

[0118] Example 3: Compression with multiple channels

[0119] As mentioned above, data words can be received from channels with specific bit widths. Maintaining the bit width of the received data words in a packet may be advantageous, or alternatively, dynamically resizing the packet width to transmit the information contained in the data words most efficiently may be more efficient.

[0120] In an alternative example, the sensor may contain multiple channels, for example, each with a different sensitivity or each channel set to measure a specific range within the spectrum of ambient light. Therefore, a set of data words can be measured by the sensor, where each data word within that set has a different bit width. In this case, the compression algorithm uses an indicator bit to switch between consecutive data words of different widths.

[0121] For example, a sensor can deliver data words in three channels with the following bit widths:

[0122] Channel 1 4 Channel 2 9 Channel 3 6

[0123] Table 5

[0124] The following data words can be received from the sensor, with their bit width tables based on channels divided into groups. In this way, the bit width of each channel is predetermined, and the group size is fixed.

[0125] Channel 1 110 - <![CDATA[ 1 110]]> Channel 2 110011100110 <![CDATA[ 1 00001100]]> <![CDATA[ 0 11100110]]> Channel 3 1100110011 <![CDATA[ 1 11001]]> <![CDATA[ 0 10011]]>

[0126] Table 6

[0127] Again, the underlined numbers represent indicator bits. For example, bit stream transmission using the FIFO protocol is a concatenation of the above packets with added indicator bits: 1 110010 10011 1 00001100 0 11100110 1 110

[0129] The indicator bit indicates the start of a new data word in the same manner as described above. Additionally, the indicator bit also indicates the use of a new packet width. The receiver receiving the aforementioned transmit bit stream possesses information about each channel and its corresponding bit width. The receiver also knows the order of the channels.

[0130] However, the receiver can only read 0s and 1s and cannot immediately distinguish the indicator bit from the information bit. Instead, the receiver identifies which bit is the indicator bit based on a predefined position of the indicator bit within each packet.

[0131] Therefore, in the multi-channel example, the receiver is programmed to read every nth bit as an indicator bit, where n is also programmed to change according to the order of the three channels each time a new data word is detected. This is further explained below:

[0132]

[0133] For example, the receiver can be programmed to read the stream in six-bit units. The second block of six in the above stream begins with a zero. Therefore, this zero is read as an indicator bit, indicating i) that the following bits are part of the same data word as the previous block, and ii) that the current block has a bit width of six. The next block, read as an indicator bit, begins with a 1. Therefore, this indicates that the bit width of the next block has changed. This table indicates that the block width has changed from 6→9. From this point, the bit stream is read in nine-bit units until the indicator bit is read, which is '1'. The next '1' indicates that the bit width should change again, from bit width 9→4 (the last four bits of the above bit stream). When the next data word is identified, the receiver cycles back to using the bit width of the first channel.

[0134] Figure 3 An example of the algorithm described above is shown.

[0135] S300 - Determines a predefined number of channels {C1, C2, ... Cm} based on the channels on the corresponding sensor, each channel... It has a defined bit size {n1, n2, ..., nm} .

[0136] Step S300 illustrates the predetermined properties of the sensor channels and their corresponding bit widths. It should be understood that the "determining" step can be performed before any operation of the electronic device; for example, channels and their corresponding bit widths can be pre-programmed into the electronic device. However, the number of channels and the bit width of each corresponding channel are determined and defined in the storage device of the electronic device.

[0137] S302 - Receives a set of data words, each set has a corresponding data word, and each channel has one data word. ;

[0138] At step S302, the data words are received by the sensor, i.e., as a set of data words as shown in Table 5 above.

[0139] S304 - Reconstructs the data word into groups of a size defined by the bit size of each channel. :

[0140] Then, at S304, the data word is reconstructed / divided into groups of defined bit size according to the channel to which the data word belongs.

[0141] S306 - Insert an indicator bit at a fixed position within the group, where '1' identifies the start of a new data word, and '1' indicates the continuation of the identification data word ;

[0142] Then, an indicator bit (zero or one) is inserted at the defined position in each group. The indicator bit identifies whether the group is the beginning of a new data word (i.e., by '1') or a continuation of a data word (i.e., by '0').

[0143] S308 transmits packets as a data bit stream to the receiver and splits the packets once transmitted. :

[0144] Data packets are merged together to form a continuous bit stream, and in step S308, this bit stream is transmitted to the receiver via a bus / interface for reception. The receiver then decodes the bit stream using a bit-width sequence defined for multiple channels.

[0145] Additionally, the indicator bit can be inserted anywhere within the data stream described above. For example, the indicator bit can be appended to the end of each packet, or inserted as the second bit in each packet, for example. In yet another example, as a supplement or alternative to the above, the indicator bit can be inverted, causing the bit width to change to 0 instead of 1 (the remaining sample indicators are 1).

[0146] Alternatively, the positions of the indicator bits can be predetermined, changing within each packet according to a predetermined order. In other words, the positions of the indicator bits change based on a predefined sequence. The transmitter and receiver share this order of indicator bit positions. Using this brings the added advantage of making reverse engineering of packet streams or compression methods extremely difficult. Furthermore, the data itself is further altered relative to the original data words; therefore, advantageously, a degree of encryption can be achieved by changing the positions of the indicator bits according to a predefined sequence.

[0147] It should be understood that the aforementioned multi-channel compression algorithm can be applied to any number of transmission scenarios involving data transmission via serial or parallel interfaces. Furthermore, the data does not need to originate from a sensor, and it should be understood that the compression algorithm is applicable to all data, including data derived from any number of sources.

[0148] Figure 4 An example of a general-purpose electronic device system 400 configured to implement a compression algorithm is shown, such as... Figure 1-3As shown. The electronic device includes a user interface 412, a general-purpose processor 414, and a general-purpose storage device 416, which may include, for example, a persistent hard disk, flash memory, or solid-state storage media or a volatile / non-persistent RAM storage device. The electronic device also includes working memory, which may include volatile storage devices, such as instructions for further processing any received sensor measurement data.

[0149] The electronic device also includes a sensor 402, which may be, for example, an ALS sensor. The sensor is coupled to hardware and / or another processor 404 for executing a compression algorithm. For example, element 404 may be a chip with a hard-coded compression algorithm, such as an FPGA or ASIC. Code element 404 is coupled to an interface, which uses, for example, a FIFO as described above to transmit compressed code. The interface may be any suitable serial or parallel bus, such as an I / O bus. 2 C or I 3 A C interface is then coupled to a receiver 408 that receives compressed data. The receiver may also include reconstruction code, or suitable hardware components configured to implement reconstruction code, such that the compressed code can be reconstructed into the original received sensor data. Alternatively, the receiver may simply transmit the compressed data to a general-purpose processor 414 for processing. Those skilled in the art will readily recognize that the sensor 402 need not be an ALS sensor and can be any number of external components capable of detecting and quantifying some observables, which can then be transmitted as data.

[0150] Undoubtedly, those skilled in the art will conceive of many other effective alternatives. It should be understood that the invention is not limited to the described embodiments, but includes modifications that are obvious to those skilled in the art and fall within the scope of the appended claims.

Claims

1. A method for compressing data for data transmission within an electronic device, the method comprising: The first processing component of the electronic device receives a plurality of data samples generated by a component of the electronic device, wherein the data samples include numerical bits; The first processing component reconstructs the plurality of data samples into a plurality of data groups; Each data group is marked with a sample indicator bit to indicate multiple groups across the multiple data groups; A bit stream comprising at least some of the plurality of data packets is transmitted to the receiving component of the electronic device via the interface of the electronic device. The bitstream is decoded by a second processing component of the electronic device to obtain at least some of the plurality of data samples, the decoding being at least partially based on the sample indicator bits. The sample indicator bit is inserted at a predefined position within the data group, and the predefined position within each data group changes according to a predefined sequence.

2. The method of claim 1, wherein each of the plurality of groups corresponds to a different corresponding data sample.

3. The method according to claim 2, wherein the decoding includes: The plurality of groups are identified based on the sample indicator bits, representing the data groups of the different corresponding data samples; Remove the sample indicator bit from each data group to obtain the plurality of data samples initially received from the component.

4. The method according to claim 1, further comprising: Prior to the reconstruction, the numerical difference between each pair of adjacent data samples is calculated to obtain multiple differences; The plurality of differences, rather than the data samples, are reconstructed by the first processing component to obtain the plurality of data groups.

5. The method of claim 1, wherein for each data sample, the reconstruction comprises: The data sample is divided into the minimum number of data groups required to represent the information included in the data sample.

6. The method of claim 1, wherein each of the plurality of data packets has a defined size.

7. The method according to claim 6, further comprising: The data sample is reconstructed into data packets by monitoring by any one of the first processing component, the second processing component, and the receiving component of the electronic device to obtain the average number of data packets per data sample; The defined size of the multiple data groups is dynamically set based on the average number of data groups per data sample.

8. The method of claim 1, wherein the data sample represents a signal measured by a sensor component of the electronic device.

9. The method of claim 8, wherein the sensor component is an ambient light sensor.

10. The method of claim 1, wherein the component of the electronic device comprises a set of data channels, each data channel generating a channel-specific data sample.

11. The method of claim 10, wherein the method further comprises: Receive the plurality of data samples generated by the set of data channels of the component; The plurality of data samples are reconstructed by the first processing component to obtain the plurality of data groups. For each data sample, the reconstruction includes: The data sample is reconstructed into at least one data group, wherein the at least one data group has a defined size corresponding to a data channel in the set of data channels that generated the data sample.

12. The method of claim 1, wherein the interface of the electronic device is a serial peripheral interface.

13. The method of claim 1, wherein the interface of the electronic device is I. 2 C interface.

14. The method of claim 1, wherein each data sample is represented in binary.

15. The method of claim 1, wherein each data sample having a negative value is represented in two's complement binary form.

16. The method of claim 1, wherein the first processing component is a hardware element comprising a persistent configuration that enables the hardware element to perform the reconstruction and the tagging.

17. The method of claim 1, wherein the sample indicator bit does not correspond to a 1 bit.

18. A non-transitory data carrier carrying processor control code, the processor control code implementing the decoding according to claim 1 at runtime.

19. An apparatus comprising: A component that is configured to generate data samples; A first processing component is configured to receive a plurality of data samples generated by a component of an electronic device, wherein the data samples include numerical bits; An interface coupled to the first processing component and the receiving component, wherein the first processing component is further configured to: The multiple data samples are reconstructed into multiple data groups; Each data group is marked with a sample indicator bit to indicate multiple groups across the multiple data groups; A bit stream comprising at least some of the plurality of data packets is transmitted to the receiving component via the interface; A second processing component is configured to decode the bitstream to obtain at least some of the plurality of data samples, the decoding being at least partially based on the sample indicator bits. The sample indicator bit is inserted at a predefined position within the data group, and the predefined position within each data group changes according to a predefined sequence.

Citation Information

Patent Citations

  • Method of Ambient Luminosity Level Detection, and Corresponding Sensor

    US20190101442A1

  • Compression and storage of projection data in a computed tomography system

    US20100128949A1

  • Lossless data compression

    US20180167083A1