Waveform compression method, waveform compression apparatus, and waveform display device
By prioritizing and comparing waveform data, the problems of resource consumption and data loss during waveform display compression are solved, and complete display under different compression ratios is achieved.
Patent Information
- Application Number
- PCT/CN2025/109613
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-23
- Filing Date
- 2025-07-21
- Publication Date
- 2026-01-29
AI Technical Summary
Existing technologies require a large amount of cache resources during compression processing when displaying multiple waveforms, and may result in data loss and incomplete waveform display when the compression ratio is greater than N+1:1.
By prioritizing the data type of the waveform to be displayed, a second display data is generated. Then, within the compressed domain, the data with the highest priority is compared according to the priority of the data type and determined as the display data. Combined with enable information and delay processing, complete display is ensured within the reduced display area.
The compression process effectively utilizes cache resources to ensure the integrity and continuity of displayed data, adapting to the needs of different compression ratios.
Smart Images

Figure CN2025109613_29012026_PF_FP_ABST
Abstract
Description
A waveform compression method, a waveform compression device, and a waveform display device. Technical Field
[0001] This application relates to the field of measurement, specifically to a waveform compression method, a waveform compression device, and a waveform display device. Background Technology
[0002] In some data acquisition systems, the acquired data needs to be mapped and converted into waveforms before being displayed on the screen. However, the area where the waveform is displayed is not fixed, as shown in Figures 1 and 2. Figure 1 shows the default display interface of an oscilloscope, and Figure 2 shows a common interface after opening some pop-up areas. From Figure 1 to Figure 2, the waveform display area is compressed in both the vertical and horizontal directions, so the displayed waveform also needs to be compressed accordingly.
[0003] Taking the data input line by line within the waveform display area and the vertical compression performed by the processing module as an example, the simplest method to preserve as much of the original sampled data as possible is to overlay the lines that are not displayed due to compression onto the next line to be displayed. However, this method is only suitable for a single waveform. To handle more complex situations such as multiple different waveforms, an existing method is to cache N lines of data during processing. During compression, some lines will not be displayed. In the displayed lines, the data of that line is compared with the nearest N cached lines, and the most suitable data for display is selected from these N+1 lines. However, this process always consumes cache resources that can store N lines of data, and when the compression ratio is greater than (N+1):1, some of the most suitable data may be lost entirely, which may result in a broken waveform in the display. Summary of the Invention
[0004] The main technical problem this application addresses is to provide a waveform compression method and a corresponding waveform compression device that can fully display the most suitable data after waveform compression.
[0005] According to a first aspect, one embodiment provides a waveform compression method, comprising:
[0006] Acquire first display data of the waveform to be displayed, which corresponds to at least one pixel in the initial display area on the display screen. The first display data includes a data type.
[0007] The data type of the first display data is converted according to a preset priority order to generate second display data that corresponds one-to-one with the first display data;
[0008] Based on the set compression ratio, the second display data within the same compression domain is compared at least according to the priority of the data type to determine the second display data with the highest priority within the compression domain, and the second display data with the highest priority within each compression domain is used as the third display data for display in the reduced display area; the compression domain refers to the area within the initial display area corresponding to the same position in the reduced display area.
[0009] In one embodiment, based on a set compression ratio, second display data within the same compression domain are compared at least according to the priority of data types to determine the second display data with the highest priority within the compression domain, and the second display data with the highest priority within each compression domain is used as the third display data for display in the reduced display area, including:
[0010] The second display data is compared one by one with the cached data at the same position in the cache area. The second display data with the higher priority is determined as the current comparison result. The data cached in the cache area is the lowest priority data or the second display data with the higher priority after the previous comparison at the same position.
[0011] Based on the set compression ratio, obtain the enable information for whether to display the currently compared second display data in a reduced display area on the screen;
[0012] The third display data is generated based on the enabling information and the current comparison results.
[0013] In one embodiment, generating third display data based on enable information and the current comparison result includes:
[0014] When the enable information is valid, the second display data with higher current priority is output as the third display data, and the cached data at the same position in the cache area is updated to the lowest priority data;
[0015] When the enable information is invalid, no data is output, and the cached data at the same position in the buffer is updated to the second display data with the higher current priority.
[0016] In one embodiment, before generating third display data based on enable information and the current comparison result, the waveform compression method further includes:
[0017] The enable information is delayed to synchronize with the output of the second display data that has the higher current priority.
[0018] In one embodiment, the compression domain refers to a set number of rows within the initial display area corresponding to the same row of the reduced display area. When comparing the second display data with the cached data at the same position in the cache area one by one, the second display data of each row is compared with the cached data at the same position in the cache area.
[0019] or,
[0020] A compression field refers to a set number of columns within the initial display area corresponding to the same column of the reduced display area. When comparing the second display data one by one with the cached data at the same position in the cache area, the second display area of each column is compared with the cached data at the same position in the cache area.
[0021] In one embodiment, the first display data further includes intensity value information, which includes pixel brightness information, and the waveform compression method further includes:
[0022] Obtain the data type bit corresponding to the data type and the intensity value bit corresponding to the pixel brightness information from the second display data;
[0023] The data type bits are set to have a higher priority than the intensity value bits according to a preset priority order to generate the second display data.
[0024] In one embodiment, the data type bits include persistence data bits and data source channel bits;
[0025] In the data type bit, the priority of the afterglow data bit is set to be higher than the priority of the data source channel bit according to the preset priority order;
[0026] On the persistent data bits, the priority of non-persistent data bits is set higher than that of persistent data bits;
[0027] In the data source channel position, the priority of the data source channels is set to decrease progressively according to the time order in which the data source channels are selected, from the closest to the furthest.
[0028] In one embodiment, the intensity value information further includes special display information, which represents a background color or a non-background color. The intensity value bit of the intensity value information represented by the special display information as a non-background color has a higher priority than the intensity value bit of the intensity value information represented by the special display information as a background color.
[0029] According to a second aspect, one embodiment provides a waveform compression apparatus, comprising:
[0030] The data processing module acquires the first display data corresponding to at least one pixel in the initial display area of the waveform to be displayed, performs priority conversion on the data type of the first display data according to a preset priority order, and generates second display data that corresponds one-to-one with the first display data; the first display data includes data type;
[0031] The compression processing module, connected to the data processing module, compares the second display data within the same compression domain based on the set compression ratio, at least according to the priority of the data type, to determine the second display data with the highest priority within the compression domain; and uses the second display data with the highest priority within each compression domain as the third display data to be displayed in the reduced display area; the compression domain refers to the area within the initial display area corresponding to the same position in the reduced display area.
[0032] In one embodiment, the compression processing module includes a comparator, a data selector, and a cache module;
[0033] The comparator compares the second display data one by one with the cached data at the same position in the cache module, and determines the second display data with higher priority as the current comparison result. The data cached by the cache module is the lowest priority data or the second display data with higher priority after the previous comparison at the same position.
[0034] The data selector, based on a set compression ratio, obtains enable information regarding whether the second display data being compared is displayed in a reduced display area on the screen; and generates third display data based on the enable information and the current comparison result.
[0035] In one embodiment, when the enable information is valid, the data selector outputs the second display data with higher current priority as the third display data, and updates the cached data at the same position in the cache module with the data with the lowest priority.
[0036] When the enable information is invalid, the data selector does not output data and updates the cached data at the same position in the cache module with the second display data that has the higher current priority.
[0037] In one embodiment, the waveform compression device further includes a delay module;
[0038] The delay module delays the enable information to synchronize it with the output of the second display data that has the higher current priority.
[0039] In one embodiment, in the data selector, the compression domain refers to a set number of rows in the initial display area corresponding to the same row of the reduced display area, and the comparator compares the second display data of each row with the cached data at the same position in the cache module.
[0040] or,
[0041] In the data selector, the compression field refers to a set number of columns in the initial display area corresponding to the same column of the reduced display area. The comparator compares the second display data of each column with the cached data at the same position in the cache module.
[0042] In one embodiment, the first display data further includes intensity value information, which includes pixel brightness information. The data processing module obtains the data type bit corresponding to the data type and the intensity value bit corresponding to the pixel brightness information in the second display data, and sets the priority of the data type bit to be higher than the priority of the intensity value bit according to a preset priority order to generate the second display data.
[0043] In one embodiment, the data type bit includes a persistence data bit and a data source channel bit; the data processing module sets the priority of the persistence data bit to be higher than the priority of the data source channel bit according to a preset priority order in the data type bit; the data processing module sets the priority of the non-persistent data bit to be higher than the priority of the persistence data bit in the persistence data bit; the data processing module sets the priority of the data source channel to decrease step by step in the order of the time in which the data source channel was selected, from the nearest to the farthest.
[0044] In one embodiment, the intensity value information further includes special display information, which represents either a background color or a non-background color; the data processing module sets the priority of the intensity value bit of the intensity value information represented by the special display information as a non-background color to be higher than the priority of the intensity value bit of the intensity value information represented by the special display information as a background color.
[0045] According to a third aspect, one embodiment provides a waveform display device, comprising:
[0046] The data acquisition module is used to acquire data from each input channel;
[0047] The data processing module is used to process the data collected from each channel to generate first display data corresponding to at least one pixel in the initial display area on the display screen;
[0048] A waveform compression device, wherein the waveform compression device in any of the above embodiments is employed;
[0049] The display module is used to display first display data and / or display third display data after compressing the first display data.
[0050] According to the waveform compression method, waveform compression device, and waveform display device of the above embodiments, the first display data of the waveform to be displayed is priority-converted according to a preset priority order, that is, the first display data is adjusted according to the data format that needs to be prioritized for display by a user, so that the determined second display data becomes display data suitable for display before compression. Then, according to the set compression ratio, the second display data within the same compression domain are compared, wherein at least the priority of the data types in the second display data is compared, thereby determining the second display data with the highest priority within the compression domain, and the second display data is used as the third display data after compression. Based on the second display data that is already suitable for display, the third display data is obtained by comparison, and then the third display data is the most suitable display data for display under the compression ratio. By displaying each row or column of the compressed third display data, the most suitable and complete waveform diagram can be obtained, and the compression ratio can be set manually as needed. Attached Figure Description
[0051] Figure 1 shows the default display interface style of an oscilloscope in the background art;
[0052] Figure 2 shows the interface style after the pop-up area appears in the background technology.
[0053] Figure 3 is a schematic diagram of the structure of a waveform display device according to an embodiment;
[0054] Figure 4 is a schematic diagram of the waveform compression device in one embodiment;
[0055] Figure 5 is a data bit setting diagram of the second display data in one embodiment;
[0056] Figure 6 is a schematic diagram of the compression processing module of a waveform compression device in one embodiment;
[0057] Figure 7 is a diagram showing the relationship between the number of addresses in the cache module and the data input method and compression direction in one embodiment;
[0058] Figure 8 is a general flowchart of the waveform compression method in another embodiment;
[0059] Figure 9 is a flowchart of step S200 in the waveform compression method in another embodiment;
[0060] Figure 10 is a flowchart of step S300 in the waveform compression method in another embodiment. Detailed Implementation
[0061] The present application will now be described in further detail with reference to the accompanying drawings and specific embodiments. Similar elements in different embodiments are referred to by related similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the present application. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to the present application are not shown or described in the specification. This is to avoid obscuring the core parts of the present application with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.
[0062] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.
[0063] The serial numbers assigned to components in this article, such as "first" and "second", are used only to distinguish the objects being described and have no sequential or technical meaning.
[0064] This application provides a waveform compression method, a waveform compression device, and a waveform display device. According to a preset priority, the most suitable display data is prioritized to the highest priority. In this way, no matter what the compression ratio is, the most suitable display data will definitely be displayed, and the resources consumed in the entire compression and display process are minimized. The details are described below.
[0065] Please refer to Figure 3. In one embodiment, this application provides a waveform display device, including a data acquisition module 1, a data processing module 2, a waveform compression device 3, and a display module 4.
[0066] In one embodiment, the data acquisition module 1 is used to acquire data from each input channel.
[0067] In one embodiment, the data processing module 2 is used to process the data collected from each channel to generate first display data corresponding to at least one pixel in the initial display area on the display screen.
[0068] In one embodiment, the waveform compression device 3 is used to convert and compress the first display data to generate the third display data.
[0069] In one embodiment, the waveform compression device 3 is also connected to the display module 4. The first display data is processed in the waveform compression device 3 and then sent to the display module for display. Therefore, the display module 4 is used to display the first display data and / or display the third display data after the first display data is compressed.
[0070] Please refer to Figure 4. In one embodiment, this application also provides a waveform compression device 3, which includes a data processing module 100, a compression processing module 200, and a delay module 300.
[0071] In one embodiment, the data processing module 100 acquires first display data corresponding to at least one pixel in the initial display area of the waveform to be displayed. The data processing module 100 performs priority conversion on the data type and intensity value information of the first display data according to a preset priority order to generate second display data that corresponds one-to-one with the first display data.
[0072] In one embodiment, the waveform to be displayed is displayed as pixels. When the waveform needs to be displayed on the screen, the first display data of the waveform to be displayed corresponds to at least one pixel in the original display area on the screen before compression. Since the first display data is for waveform display, the first display data includes the data type and intensity value information of the corresponding pixel.
[0073] In one embodiment, the second display data includes data type bits corresponding to assigned values for different data types, and also intensity value bits corresponding to assigned values for pixel brightness information within the intensity value information. In the second display data, the data processing module 100 sets the priority of the data type bits to be higher than the priority of the intensity value bits according to a preset priority order. The preset priority order is related to both the data type and intensity value information; within the data type, it is related to the afterglow data and the data source channel. Different preset priority orders result in different priority order between the data type bits and the intensity value bits, which can be adjusted according to user needs.
[0074] In one embodiment, the data type bit includes a persistence data bit and a data source channel bit. The persistence data bit is used to indicate whether the second display data is persistence data, and the data source channel bit is used to indicate which of the multiple channels the second display data originates from.
[0075] In one embodiment, in the data type bit of the second displayed data, the data processing module 100 sets the priority of the persistence data of the data type bit to be higher than the priority of the data source channel bit according to a preset priority order. In the persistence data bit of the second displayed data, the data processing module 100 sets the priority of non-persistent data to be higher than the priority of persistence data. In the data source channel bit of the second displayed data, the data processing module 100 sets the priority of the data source channels to decrease progressively according to the time order in which the data source channels were selected, from most recent to oldest.
[0076] In one embodiment, the intensity value information includes not only pixel brightness information used to determine the waveform brightness, but also special display information. This special display information includes background color and non-background color. The non-background color includes templates, tested channel pressure templates, and other channel pressure templates. Here, a template refers to a preset waveform display setting or layout style; the tested channel pressure template refers to the template of the currently tested data source channel; and other channel pressure templates refer to templates of data source channels other than the currently tested data source channel. In the intensity value positions of the second displayed data, the data processing module 100 sets the priority of non-background colors higher than that of background colors. Furthermore, in the intensity value positions of non-background colors, the data processing module 100 reserves a set number of positions for special display. These positions start with the maximum priority of the intensity value position and decrease gradually until the required set number is reached.
[0077] In one embodiment, referring to Figure 5, this application uses three data bits to represent the data type bit and six data bits to represent the intensity value bit. According to a preset priority order, the three-bit data type bit is placed in the high-order bits, and the six-bit intensity value bit is placed in the low-order bits. In the data type bit, one data bit is used to represent the afterglow data bit, and two data bits are used to represent the data source channel bit. According to a preset priority order, the afterglow data bit is placed in the high-order bits, and the data source channel bit is placed in the low-order bits.
[0078] In one embodiment, if "1" represents the highest priority and "0" represents the lowest priority in binary, then in the persistence data bits, 1 represents non-persistent data and 0 represents persistent data. In the data source channel bits, 11 represents the currently selected data source channel, then the previously selected data source channel was 10, the previous one was 01, and so on, decreasing in priority and data level. The earliest selected data source channel is 00. Since this application provides only four data source channels, two data bits are used to represent the data source channel bits. If the number of data source channels is not limited to four, the number of data bits used can be determined based on the correspondence between the number of data source channels and binary representation. Thus, after the priority assignment is completed, the non-persistent data of the currently selected data source channel has the highest priority value, allowing for display during subsequent data comparisons.
[0079] Since the first display data corresponds to pixels, the intensity value information in the first display data is fixed, and therefore the intensity value information in the second display data is also fixed. Thus, the 0s and 1s assigned to the intensity value bits in the second display data are fixed. However, to meet the special display needs of users, this application reserves a set number of bits in the intensity value bits for special displays.
[0080] Taking a six-bit intensity value as an example, the range of the six-bit intensity value in binary is 0-63, which can represent background color and non-background color respectively. Non-background color includes template, the template of the channel under test, and other channel templates. If it is necessary to prioritize the display of the template, the template of the channel under test, and other channel templates in the intensity value bits, the value of the template in the intensity value bits can be adjusted to 63, the value of the template of the channel under test can be adjusted to 62, and the value of other channel templates can be adjusted to 61. The values of the other information represented by the intensity value bits remain unchanged. At this time, the template has the maximum value in the intensity value bits, which is the highest priority. The values of the template of the channel under test and other channel templates decrease successively in terms of data and priority.
[0081] For background color, those skilled in the art would expect the background color to be the lowest priority, so both the data type bit and the intensity value bit are assigned a value of 0, thereby ensuring that the background color maintains the lowest priority.
[0082] In one embodiment, if "0" represents the highest priority and "1" represents the lowest priority in binary, then in the persistence data bits, 0 represents non-persistent data and 1 represents persistent data. In the data source channel bits, 00 represents the currently selected data source channel, then the previously selected data source channel was 01, the previous one was 10, and so on, decreasing in priority and increasing in data, with the earliest selected data source channel being 11. Since this application provides only four data source channels, two data bits are used to represent the data source channel bits. If the number of data source channels is not limited to four, the number of data bits used to represent the data source channel bits can be determined according to the correspondence between the number of data source channels and binary representation. Thus, after the priority assignment is completed, the non-persistent data of the currently selected data source channel has the highest priority value, which can be displayed during subsequent data comparisons.
[0083] Since the first display data corresponds to pixels, the intensity value information in the first display data is fixed, and therefore the intensity value information in the second display data is also fixed. Thus, the 0s and 1s assigned to the intensity value bits in the second display data are fixed. However, to meet the special display needs of users, this application reserves a set number of bits in the intensity value bits for special displays.
[0084] Taking a six-bit intensity value as an example, the range of the six-bit intensity value in binary is 0-63, which can represent background color and non-background color respectively. Non-background color includes template, the template of the channel under test, and other channel templates. If it is necessary to prioritize the display of the template, the template of the channel under test, and other channel templates in the intensity value bits, the value of the template in the intensity value bits can be adjusted to 00, the value of the template of the channel under test can be adjusted to 01, and the value of other channel templates can be adjusted to 02. The values of the other information represented by the intensity value bits remain unchanged. At this time, the template has the minimum value in the intensity value bits, which is the highest priority. The template of the channel under test and other channel templates increase in data and decrease in priority.
[0085] For background color, those skilled in the art would expect the background color to be the lowest priority, so both the data type bit and the intensity value bit are assigned a value of 1, thereby ensuring that the background color maintains the lowest priority.
[0086] In one embodiment, the compression processing module 200 is connected to the data processing module 100. Based on a set compression ratio, the compression processing module 200 compares second display data within the same compression domain to determine the second display data with the highest priority within the compression domain. The highest-priority second display data within each compression domain is then used as the third display data for display in the reduced display area. Here, a compression domain refers to a region within the initial display area corresponding to the same position in the reduced display area. For example, when the compression method is line compression and the compression ratio is 2:1, the compression domain is the first and second rows within the initial display area. The second display data within the first and second rows is compared to determine the second display data with the highest priority within that compression domain. Similarly, when the compression method is line compression and the compression ratio is 2:1, the compression domain is also the third and fourth rows within the initial display area, or the fifth and sixth rows, etc. Different compression methods and compression ratios result in different corresponding compression domains.
[0087] Please refer to Figure 6. In one embodiment, the compression processing module 200 includes a comparator 210, a data selector 220, and a cache module 230.
[0088] In one embodiment, the first input of comparator 210 is connected to data processing module 100 to obtain second display data, the second input of comparator 210 is connected to the first output of cache module 230, and the output of comparator 210 is connected to the second input of data selector 220. Based on a set compression ratio, comparator 210 compares the second display data within the same compression domain to determine the second display data with the highest priority within the compression domain.
[0089] In one embodiment, the comparator 210 can compare the data types in the second display data one by one with the priority of the data types corresponding to the cached data at the same position in the cache module 230, determine the second display data corresponding to the data type with the highest priority, and use it as the current comparison result. The current comparison result is then sent to the data selector 220.
[0090] In one embodiment, comparator 210 can also directly compare each piece of the second display data with the cached data at the same position in cache module 230 to determine the second display data with the highest current priority, which is then used as the current comparison result and sent to data selector 220. The data cached by cache module 230 is either the lowest priority data or the second display data with a higher priority after the previous comparison at the same position. If "1" represents the highest priority and "0" represents the lowest priority in binary, then every bit of the lowest priority data is 0; if "0" represents the highest priority and "1" represents the lowest priority in binary, then every bit of the lowest priority data is 1.
[0091] It should be noted that the compression ratio set in this application includes compression by row or compression by column. When compression by row and compression by column are required, compression by row or compression by column can be performed first, and then compression by column or compression by row, according to the technical solution provided in this application.
[0092] In one embodiment, when the set compression ratio is line-by-line compression, the cache module 230 caches the data of the initial line under the set compression ratio, and the data of the initial line has the lowest priority. The comparator 210 compares the second display data of each line with the cached data at the same position in the cache area, and takes the second display data with higher priority as the current comparison result.
[0093] In one embodiment, when the set compression ratio is column-wise compression, the initial column data under the set compression ratio is cached in the caching module 230, and the initial column data has the lowest priority. The comparator 210 compares the second display data of each column with the cached data at the same position in the cache area, and takes the second display data with higher priority as the current comparison result.
[0094] In one embodiment, the first input terminal of the data selector 220 is connected to the second output terminal of the cache module 230, the third input terminal of the data selector 220 is connected to the output terminal of the data processing module 100, the fourth input terminal of the data selector 220 is connected to the output terminal of the delay module 300, the first output terminal of the data selector 220 is connected to the input terminal of the cache module 230, and the second output terminal of the data selector 220 is used to output the compressed third display data.
[0095] In one embodiment, based on a set compression ratio, the data selector 220 obtains enable information regarding whether the currently compared second display data should be displayed on the screen in a reduced display area. The data selector 220 then generates third display data based on the enable information and the current comparison result. Specifically, when the enable information is valid, the data selector 220 outputs the second display data with the higher current priority as the third display data and updates the cached data at the same position in the buffer with the lowest priority data. When the enable information is invalid, the data selector 220 does not output any data and updates the cached data at the same position in the buffer with the second display data with the higher current priority.
[0096] Please refer to Figure 7. In one embodiment, when the cache module 230 stores a row of second display data, the number of addresses in the cache module 230 is equal to the number of columns; when the cache module 230 stores a column of second display data, the number of addresses in the cache module 230 is equal to the number of rows.
[0097] It should be noted that this application also delays the enable information so that the enable information can be synchronized with the second display data with the highest priority after comparison.
[0098] For example, when the compression ratio for line-by-line compression is set to 2:1 (compressing two lines into one), the initial line's data is first cached in the buffer. Then, the second display data of the first line is compared with the data in the buffer. The second display data of the first line has a higher priority than the data in the buffer, and its enable bit is invalid. Therefore, the second display data of the first line is not output, and the data in the buffer is updated from the initial line's data to the second display data of the first line. Next, the second display area of the second line is compared with the second display data of the first line cached in the buffer. Since the enable bit of the second display data of the second line is valid, the second display data with the highest priority between the first and second lines is output, and this is used to generate the third display data.
[0099] For example, when the column compression ratio is set to 2:1 (compressing two columns into one), the initial column data is cached in the buffer. Then, the second display data of the first column is compared with the data in the buffer. The second display data of the first column has a higher priority than the data in the buffer, and its enable bit is invalid. Therefore, the second display data of the first column is not output, and the data in the buffer is updated from the initial column data to the second display data of the first column. Next, the second display area of the second column is compared with the cached second display data of the first column. If the enable bit of the second display data of the second column is valid, the second display data with the highest priority between the first and second column data is output, and this is used to generate the third display data.
[0100] In one embodiment, the input terminal of the delay module 300 is used to acquire enable information, and the output terminal of the delay module 300 is connected to the fourth input terminal of the data processing module 100. The delay module 300 delays the enable information so that the enable information can be synchronized with the second display data with the highest priority after comparison.
[0101] Please refer to Figure 8. In one embodiment, this application provides a waveform compression method, which includes the following steps:
[0102] Step S100: Obtain the first display data of the waveform to be displayed.
[0103] In one embodiment, the waveform to be displayed is displayed as pixels. When the waveform needs to be displayed on the screen, the first display data of the waveform to be displayed corresponds to at least one pixel in the original display area on the screen before compression. That is, the first display data corresponds to at least one pixel in the initial display area on the screen. Since the first display data is for waveform display, the first display data includes the data type and intensity value information of the corresponding pixel.
[0104] Step S200: Priority conversion is performed on the first display data to generate the second display data.
[0105] In one embodiment, the data type and intensity value information of the first display data are prioritized according to a preset priority order to generate second display data that corresponds one-to-one with the first display data, that is, the second display data and the first display data correspond to the same pixels.
[0106] Please refer to Figure 9. In one embodiment, when performing step S200 to perform priority conversion on the first display data and generate the second display data, the following steps are also included.
[0107] Step S210: Prioritize data types and intensity value information.
[0108] In one embodiment, the second display data includes a data type bit corresponding to the assigned data type, and an intensity value bit corresponding to the assigned pixel brightness information. In the second display data, the data type bit is set to have a higher priority than the intensity value bit according to a preset priority order. The priority order of the data type bit and the intensity value bit varies depending on the preset priority order, and can be adjusted according to user needs.
[0109] Step S220: Set the priority of the data type bits.
[0110] In one embodiment, the data type bit includes a persistence data bit and a data source channel bit. The persistence data bit is used to indicate whether the second display data is persistence data, and the data source channel bit is used to indicate which of the multiple channels the second display data originates from.
[0111] In one embodiment, in the data type bits of the second display data, the priority of the persistence data in the data type bits is set to be higher than the priority of the data source channel bits according to a preset priority order. In the persistence data bits of the second display data, the priority of non-persistent data is set to be higher than the priority of persistence data.
[0112] In one embodiment, the intensity value information includes not only pixel brightness information used to determine the waveform brightness display, but also special display information. This special display information includes background color and non-background color. The non-background color includes templates, tested channel pressure templates, and other channel pressure templates. Here, a template refers to a preset waveform display setting or layout style; the tested channel pressure template refers to the template of the currently tested data source channel; and other channel pressure templates refer to templates of data source channels other than the currently tested data source channel. In the data source channel position of the second displayed data, the priority of the data source channels is set progressively lower according to the time order in which they were selected, from closest to furthest. In the intensity value position of the second displayed data, the priority of non-background colors is set higher than that of background colors. Furthermore, a set number of digits are reserved in the intensity value position of non-background colors for special display. These digits start from the maximum priority of the intensity value position and decrease progressively until the required set number is reached.
[0113] Step S300: Based on the set compression ratio, compare the second display data within the same compression domain to determine the third display data.
[0114] In one embodiment, under a set compression ratio, second display data within the same compression domain are compared to determine the second display data with the highest priority within that compression domain. The second display data with the highest priority in each compression domain is then used as the third display data to be displayed in the reduced display area. Here, a compression domain refers to the area of the initial display area corresponding to the same position in the reduced display area before compression, under the set compression ratio.
[0115] Please refer to Figure 10. In one embodiment, when performing step S300, which compares the second display data within the same compression domain based on a set compression ratio to determine the third display data, the following steps are also included.
[0116] Step S310: In the second displayed data, at least the data of the data type is compared with the cached data at the same position in the cache to determine the current comparison result.
[0117] In one embodiment, the data types in the second display data are compared one by one with the priority of the data types corresponding to the cached data at the same position in the cache area, and the second display data corresponding to the data type with the highest priority is determined as the current comparison result.
[0118] In one embodiment, the second display data can be directly compared one by one with the cached data at the same position in the cache to determine the second display data with the highest current priority, which is then used as the current comparison result. The data cached in the cache is either the lowest priority data or the second display data with a higher priority after the previous comparison at the same position. If "1" represents the highest priority and "0" represents the lowest priority in binary, then every bit of the lowest priority data is 0; if "0" represents the highest priority and "1" represents the lowest priority in binary, then every bit of the lowest priority data is 1.
[0119] In one embodiment, the compression ratio set by this application includes compression by row or compression by column. When compression by row and compression by column are required, compression by row or compression by column can be performed first, and then compression by column or compression by row, according to the technical solution provided by this application.
[0120] In one embodiment, when the set compression ratio is line-by-line compression, the initial row data under the set compression ratio is cached in the cache area, and the initial row data has the lowest priority. The second display data of each row is compared with the cached data at the same position in the cache area, and the second display data with higher priority is taken as the current comparison result.
[0121] In one embodiment, when the set compression ratio is column-based compression, the data of the initial column under the set compression ratio is cached in the cache area, and the data of the initial column has the lowest priority. The second display data of each column is compared with the cached data at the same position in the cache area, and the second display data with higher priority is taken as the current comparison result.
[0122] Step S320: Obtain the current comparison enable information, and generate third display data based on the enable information and the current comparison result.
[0123] In one embodiment, based on a set compression ratio, enable information is obtained regarding whether the currently compared second display data should be displayed on the screen in a reduced display area. Third display data is then generated based on the enable information and the current comparison result. Specifically, when the enable information is valid, the second display data with the higher current priority is output as the third display data, and the cached data at the same position in the buffer is updated to the lowest priority data. When the enable information is invalid, no data is output, and the cached data at the same position in the buffer is updated to the second display data with the higher current priority.
[0124] The waveform compression method provided in this application ensures that when the second display data in a certain row or column cannot be displayed, the buffer always stores the data with the highest priority among those rows or columns. Only when the row or column can be displayed is the data in the buffer restored to the data with the lowest priority, at which point the second display data with the highest priority is displayed. This second display data with the highest priority is the most suitable data under the set compression ratio, thus ensuring that the most suitable data can be displayed.
[0125] Those skilled in the art will understand that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to achieve the above functions. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be achieved. In addition, when all or part of the functions in the above embodiments are implemented by computer programs, the program can also be stored in a server, another computer, disk, optical disk, flash drive, or external hard drive, etc., and can be downloaded or copied to the memory of a local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be achieved.
[0126] The above examples illustrate this application only to aid understanding and are not intended to limit its scope. Those skilled in the art to which this application pertains can make various simple deductions, modifications, or substitutions based on the ideas presented.
Claims
1. A waveform compression method characterized by, The method comprises the following steps: acquiring first display data corresponding to at least one pixel point in an initial display region on a display screen, the first display data comprising data type and intensity value information, and the intensity value information comprising pixel brightness information; performing priority conversion on the data type of the first display data according to a preset priority order to generate second display data corresponding to the first display data; wherein a data type bit corresponding to the data type and an intensity value bit corresponding to the pixel brightness information are acquired in the second display data; and the priority of the data type bit is set to be higher than the priority of the intensity value bit according to the preset priority order to generate the second display data; comparing the second display data in the same compression domain according to at least the priority of the data type based on a preset compression ratio to determine the second display data with the highest priority in the compression domain, and taking the second display data with the highest priority in each compression domain as third display data for display in a reduced display region; the compression domain refers to a region in the initial display region corresponding to the same position of the reduced display region.
2. The waveform compression method of claim 1, wherein, The method of comparing the second display data in the same compression domain according to at least the priority of the data type based on a preset compression ratio to determine the second display data with the highest priority in the compression domain, and taking the second display data with the highest priority in each compression domain as third display data for display in a reduced display region, comprises the following steps: comparing the second display data with the cache data in the same position in the cache region one by one to determine the second display data with the higher current priority as the current comparison result, wherein the cache data in the cache region is the data with the lowest priority or the second display data with the higher priority after the previous comparison in the same position; acquiring enabling information of whether the second display data after the current comparison is displayed in the reduced display region on the display screen based on the preset compression ratio; generating the third display data according to the enabling information and the current comparison result.
3. The waveform compression method of claim 2, wherein, The method of generating the third display data according to the enabling information and the current comparison result comprises the following steps: when the enabling information is valid, outputting the second display data with the higher current priority as the third display data, and updating the cache data in the same position in the cache region to the data with the lowest priority; when the enabling information is invalid, not outputting data, and updating the cache data in the same position in the cache region to the second display data with the higher current priority.
4. The waveform compression method of claim 3, wherein, Before the method of generating the third display data according to the enabling information and the current comparison result, the method further comprises the following steps: delaying the enabling information to synchronize the enabling information with the output of the second display data with the higher current priority.
5. The waveform compression method of claim 2, wherein, The compression domain refers to a set number of rows in the initial display region corresponding to the same row of the reduced display region, and the second display data of each row is compared with the cache data in the same position in the cache region when the second display data is compared with the cache data in the same position in the cache region one by one; or The compression domain refers to a set number of columns in the initial display region corresponding to the same column of the reduced display region, and when comparing the second display data with the cache data at the same position in the cache region, the second display region of each column is compared with the cache data at the same position in the cache region.
6. The waveform compression method of claim 5, wherein, The data type bits include a persistence data bit and a data source channel bit; In the data type bits, the priority of the persistence data bit is set to be higher than the priority of the data source channel bit according to a preset priority order; In the persistence data bit, the priority of the non-persistence data bit is set to be higher than the priority of the persistence data bit; In the data source channel bit, the priority of the data source channel is set to be gradually reduced according to the time order from near to far when the data source channel is selected.
7. The waveform compression method of claim 6, wherein, The intensity value information further includes special display information indicating a background color or a non-background color, and the priority of the intensity value bit of the intensity value information indicating the non-background color is set to be higher than the priority of the intensity value bit of the intensity value information indicating the background color.
8. A waveform compression apparatus characterized by comprising: The data arrangement module obtains first display data corresponding to at least one pixel point in the initial display region on the display screen, performs priority conversion on the data type of the first display data according to a preset priority order, and generates second display data corresponding to the first display data; The compression processing module is connected to the data arrangement module, and the compression processing module compares the second display data in the same compression domain according to the priority of the data type based on a set compression ratio, determines the second display data with the highest priority in the compression domain, and takes the second display data with the highest priority in each compression domain as third display data for display in the reduced display region; the compression domain refers to a region in the initial display region corresponding to the same position of the reduced display region. The compression processing module includes a comparator, a data selector, and a cache module; 9. The waveform compression apparatus of claim 8, wherein The comparator compares the second display data with the cache data at the same position in the cache module one by one, determines the second display data with the higher current priority as the current comparison result, and the data cached in the cache module is the data with the lowest priority or the second display data with the higher priority after the previous comparison at the same position; The data selector obtains enabling information of whether the second display data of the current comparison is displayed in the reduced display region on the display screen based on the set compression ratio; and generates the third display data according to the enabling information and the current comparison result. 10. The waveform compression apparatus of claim 9, wherein When the enable information is valid, the data selector outputs the second display data of higher current priority as third display data, and updates the cache data in the same position in the cache module as the data of the lowest priority; When the enable information is invalid, the data selector does not output data, and updates the cache data in the same position in the cache module as the second display data of higher current priority.
11. The waveform compression apparatus of claim 10, wherein, The waveform compression device further comprises a delay module; The delay module delays the enable information, so that the enable information is synchronized with the output of the second display data of higher current priority.
12. The waveform compression apparatus of claim 11, wherein, In the data selector, the compression domain refers to a set number of rows in the initial display region corresponding to the same row of the reduced display region, and the comparator compares the second display data of each row with the cache data in the same position in the cache module; Or, In the data selector, the compression domain refers to a set number of columns in the initial display region corresponding to the same column of the reduced display region, and the comparator compares the second display data of each column with the cache data in the same position in the cache module.
13. The waveform compression device of claim 8, wherein the data type bits comprise afterglow data bits and data source channel bits; the data arrangement module sets the priority of the afterglow data bits to be higher than the priority of the data source channel bits in the data type bits according to a preset priority order; the data arrangement module sets the priority of the non-afterglow data bits to be higher than the priority of the afterglow data bits in the afterglow data bits; and the data arrangement module sets the priority of the data source channel bits to be gradually reduced in the order of time from near to far according to the selection of the data source channel.
14. The waveform compression device of claim 13, wherein the intensity value information further comprises special display information, the special display information indicating background color or non-background color; and the data arrangement module sets the priority of the intensity value bits of the intensity value information indicating non-background color to be higher than the priority of the intensity value bits of the intensity value information indicating background color.
15. A waveform display device, characterized by comprising: Comprise: a data acquisition module for acquiring data input from each channel; a data processing module for processing the acquired data of each channel to generate first display data corresponding to at least one pixel point in the initial display region on the display screen; a waveform compression device, which is the waveform compression device according to any one of claims 8-14; a display module for displaying the first display data and / or third display data obtained by compressing the first display data.
Citation Information
Patent Citations
Digital three-dimensional oscilloscope with real-time waveform image scaling function
CN102109543A
Oscilloscope display zooming method and oscilloscope display zooming device
CN104793031A
Method for enlarging waveform details on touch oscilloscope
CN106771455A
Waveform zooming method, device and system
CN108318723A
Waveform compression method, waveform compression device and waveform display equipment
CN118521465A