JP2023170314A - Data processing method and data processing device - Google Patents

Data processing method and data processing device Download PDF

Info

Publication number
JP2023170314A
JP2023170314A JP2022081978A JP2022081978A JP2023170314A JP 2023170314 A JP2023170314 A JP 2023170314A JP 2022081978 A JP2022081978 A JP 2022081978A JP 2022081978 A JP2022081978 A JP 2022081978A JP 2023170314 A JP2023170314 A JP 2023170314A
Authority
JP
Japan
Prior art keywords
data
bit
block
valid
bits
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2022081978A
Other languages
Japanese (ja)
Inventor
伸之 久本
Nobuyuki Hisamoto
宏章 加門
Hiroaki Kamon
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Screen Holdings Co Ltd
Original Assignee
Screen Holdings Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Screen Holdings Co Ltd filed Critical Screen Holdings Co Ltd
Priority to JP2022081978A priority Critical patent/JP2023170314A/en
Publication of JP2023170314A publication Critical patent/JP2023170314A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

To provide a data processing technology for new data compression.SOLUTION: A data processing method includes a step a) of dividing first data of m*n bit length into m divided blocks of n bit length, a step b) of determining a valid block to be stored from among the divided blocks, and a step c) of storing a valid block. In the step b), the uppermost divided block whose numerical value is non-zero and the divided blocks lower than the uppermost divided block whose numerical value is non-zero are defined as valid blocks. As a result, data in which the upper digits are successively zero can be efficiently compressed and stored.SELECTED DRAWING: Figure 2

Description

本発明は、データを圧縮するためのデータ処理方法およびデータ処理装置に関する。 The present invention relates to a data processing method and data processing apparatus for compressing data.

従来、多くの産業機器では、装置制御、監視、故障予知等の様々な用途でデータセンシングが行われている。近年では、センシングデバイス内の処理の多様化、高性能化および省電力化等の要求があり、センシングデバイスに、リコンフィグ可能なFPGA(Filed Programmable Gate Array)デバイスを搭載するケースが増えている。 Conventionally, data sensing has been performed in many industrial devices for various purposes such as device control, monitoring, and failure prediction. In recent years, there has been a demand for diversification of processing within sensing devices, higher performance, lower power consumption, etc., and an increasing number of sensing devices are equipped with reconfigurable FPGA (Filed Programmable Gate Array) devices.

センシングデバイスの内部にセンシングデータを保存する場合、センシングデータを内部に保存するためのメモリ容量を大きく確保するのが難しい。また、センシングデータの容量を増加させるために、圧縮処理によってメモリ容量を削減する必要性が高まっている。 When storing sensing data inside a sensing device, it is difficult to secure a large memory capacity to store the sensing data internally. Furthermore, in order to increase the capacity of sensing data, there is an increasing need to reduce memory capacity through compression processing.

従来のFPGAを用いたセンシングデータの圧縮方法は、例えば、特許文献1に記載されている。特許文献1には、ランレングス圧縮方法を用いたデータ圧縮方法が開示されている。 A conventional sensing data compression method using an FPGA is described in, for example, Patent Document 1. Patent Document 1 discloses a data compression method using a run-length compression method.

特表2018-534811号公報Special table 2018-534811 publication

所謂ランレングス圧縮方法では、同値が連続しやすいデータにおいては圧縮率が高い一方で、データ一致率が低い場合には圧縮率が低下するという問題がある。 The so-called run-length compression method has a problem in that while the compression rate is high for data where the same value is likely to continue, the compression rate decreases when the data matching rate is low.

本発明は、このような事情に鑑みなされたものであり、新たなデータ圧縮のためのデータ処理技術を提供することを目的とする。 The present invention was made in view of the above circumstances, and an object of the present invention is to provide a new data processing technique for data compression.

上記課題を解決するため、本願の第1発明は、データ処理方法であって、a)m*nビット長の第1データを、m個のnビット長の分割ブロックに分割する工程と、b)前記分割ブロックのうち、格納すべき有効ブロックを判別する工程と、c)前記有効ブロックを格納する工程と、を有し、前記工程b)において、数値が非ゼロとなる最上位の前記分割ブロックと、数値が非ゼロとなる最上位の前記分割ブロックよりも下位の前記分割ブロックとを、前記有効ブロックとする。 In order to solve the above problems, the first invention of the present application is a data processing method comprising: a) dividing first data of m*n bit length into m divided blocks of n bit length; ) determining a valid block to be stored among the divided blocks; c) storing the valid block; The block and the divided blocks lower than the highest divided block whose numerical values are non-zero are defined as the valid blocks.

本願の第2発明は、第1発明のデータ処理方法であって、前記工程b)において、1つの前記第1データに対して、mビット長のイネーブルビットを含むイネーブル信号を1つ生成し、最下位からp番目の前記分割ブロックが前記有効ブロックでない場合には、前記イネーブルビットの最下位からp番目の桁を0とし、最下位からp番目の前記分割ブロックが前記有効ブロックである場合には、前記イネーブルビットの最下位からp番目の桁を1とする。 A second invention of the present application is the data processing method of the first invention, wherein in step b), one enable signal including an enable bit of m-bit length is generated for one piece of the first data; When the p-th divided block from the lowest order is not the valid block, the p-th digit from the lowest order of the enable bit is set to 0, and when the p-th divided block from the lowest order is the valid block, sets the p-th digit from the lowest order of the enable bit to 1.

本願の第3発明は、第1発明または第2発明のデータ処理方法であって、前記工程c)は、c1)前記有効ブロックのそれぞれに1ビット長の判別ビットを付与する工程と、c2)前記判別ビットと、前記有効ブロックと同じ数値を有するnビット長の第2データとを併せて格納する工程と、を含む。 A third invention of the present application is the data processing method according to the first invention or the second invention, wherein the step c) includes c1) adding a 1-bit long discrimination bit to each of the valid blocks, and c2) The method includes the step of storing the discrimination bit together with second data having a length of n bits and having the same numerical value as the valid block.

本願の第4発明は、第3発明のデータ処理方法であって、前記工程c1)において、1つの前記第1データに対して前記有効ブロックが1つである場合、その前記有効ブロックに対応する前記判別ビットを1とし、1つの前記第1データに対して前記有効ブロックが複数である場合、最下位の前記有効ブロックに対する前記判別ビットを1とし、その他の前記有効ブロックに対する前記判別ビットを0とし、前記工程c2)において、
1つの前記第1データに対する前記判別ビットおよび前記第2データを、上位側から順に格納する。
A fourth invention of the present application is the data processing method of the third invention, in which in the step c1), when there is one valid block for one piece of the first data, the data processing method corresponds to the valid block. The discrimination bit is set to 1, and when there is a plurality of valid blocks for one said first data, the discrimination bit for the lowest valid block is set to 1, and the discrimination bit for the other valid blocks is set to 0. In the step c2),
The determination bits and the second data for one piece of the first data are stored in order from the most significant side.

本願の第5発明は、第4発明のデータ処理方法であって、前記工程c)の後に、d)新たな読み出しデータとして、新たなm*nビット長のゼロデータを準備する工程と、e)格納された前記判別ビットおよび前記第2データを読み出す工程と、f)前記読み出しデータの最下位側からnビットを、前記工程e)において読み出した前記第2データの数値とする工程と、を行い、前記工程e)において読み出した前記判別ビットが0である場合には、前記工程f)の後に、g)前記読み出しデータの非ゼロのビットを全てnビット上位へとシフトする工程を行った後に、再び前記工程e)へ戻り、前記工程e)において読み出した前記判別ビットが1である場合には、前記工程f)の後に、h)前記読み出しデータを第3データとして出力する工程を行う。 A fifth invention of the present application is the data processing method according to the fourth invention, which includes, after the step c), d) preparing new m*n bit length zero data as new read data; and e. ) reading out the stored discrimination bit and the second data; and f) setting n bits from the least significant side of the read data as a numerical value of the second data read in the step e). and if the discrimination bit read in the step e) is 0, then after the step f), a step of g) shifting all non-zero bits of the read data to the upper n bits is performed. After that, return to step e) again, and if the discrimination bit read in step e) is 1, perform h) outputting the read data as third data after step f). .

本願の第6発明は、第1発明ないし第5発明のいずれか一発明のデータ処理方法であって、前記工程a)、前記工程b)および前記工程c)の前にp)時系列データである元データを取得する工程と、q)最新の前記元データと、1つ前の時刻の前記元データとの差分である前記第1データを算出する工程と、をさらに有する。 A sixth invention of the present application is the data processing method according to any one of the first to fifth inventions, wherein p) time series data is processed before the steps a), b) and c). The method further includes the steps of: acquiring certain original data; and q) calculating the first data that is a difference between the latest original data and the original data at the previous time.

本願の第7発明は、第5発明のデータ処理方法であって、前記工程a)、前記工程b)および前記工程c)の前にp)時系列データである元データを取得する工程と、q)最新の前記元データと、1つ前の時刻の前記元データとの差分である前記第1データを算出する工程と、をさらに有し、前記工程h)の後に、r)出力した前記第3データを、1つ前の時刻の第4データと加算し、新たな前記第4データを算出する工程と、を行う。 A seventh invention of the present application is the data processing method of the fifth invention, which includes, before the step a), the step b), and the step c), p) acquiring original data that is time series data; q) further comprising the step of calculating the first data that is the difference between the latest original data and the original data at the previous time, and after the step h), r) the outputted Adding the third data to the fourth data at the previous time to calculate new fourth data.

本願の第8発明は、外部または内部に設けられた記憶部にデータを格納するデータ処理装置であって、m*nビット長の第1データを、m個のnビット長の分割ブロックに分割し、前記分割ブロックのうち、格納すべき有効ブロックを判別する、分割処理部と、前記有効ブロックを、前記記憶部に順に格納する、格納処理部と、を有し、前記分割処理部は、数値が非ゼロとなる最上位の前記分割ブロックと、数値が非ゼロとなる最上位の前記分割ブロックよりも下位の前記分割ブロックとを、前記有効ブロックとする。 An eighth invention of the present application is a data processing device that stores data in a storage section provided externally or internally, and divides first data of m*n bit length into m divided blocks of n bit length. and a division processing unit that determines valid blocks to be stored among the divided blocks, and a storage processing unit that sequentially stores the valid blocks in the storage unit, and the division processing unit includes: The uppermost divided block whose numerical value is non-zero and the lower divided blocks than the uppermost divided block whose numerical value is non-zero are defined as the valid blocks.

本願の第9発明は、第8発明のデータ処理装置であって、前記分割処理部は、1つの前記第1データに対して、mビット長のイネーブルビットを含むイネーブル信号を1つ生成し、最下位からp番目の前記分割ブロックが前記有効ブロックでない場合には、前記イネーブルビットの最下位からp番目の桁を0とし、最下位からp番目の前記分割ブロックが前記有効ブロックである場合には、前記イネーブルビットの最下位からp番目の桁を1とする。 A ninth invention of the present application is the data processing device according to the eighth invention, wherein the division processing unit generates one enable signal including an m-bit length enable bit for one piece of the first data, When the p-th divided block from the lowest order is not the valid block, the p-th digit from the lowest order of the enable bit is set to 0, and when the p-th divided block from the lowest order is the valid block, sets the p-th digit from the lowest order of the enable bit to 1.

本願の第10発明は、第8発明のデータ処理装置であって、前記格納処理部は、前記有効ブロックのそれぞれに1ビット長の判別ビットを付与し、1つの前記第1データに対する前記判別ビットと、前記有効ブロックと同じ数値を有するnビット長の第2データとを併せて、上位側から順に前記記憶部に格納し、前記格納処理部は、1つの前記第1データに対して前記有効ブロックが1つである場合、その前記有効ブロックに対応する前記判別ビットを1とし、1つの前記第1データに対して前記有効ブロックが複数である場合、最下位の前記有効ブロックに対する前記判別ビットを1とし、その他の前記有効ブロックに対する前記判別ビットを0とする。 A tenth invention of the present application is the data processing device according to the eighth invention, wherein the storage processing unit assigns a 1-bit long discrimination bit to each of the valid blocks, and the discrimination bit for one of the first data. and n-bit length second data having the same numerical value as the valid block are stored in the storage unit in order from the most significant side, and the storage processing unit stores the valid block for one piece of the first data. If there is one block, the determination bit corresponding to the valid block is set to 1; if there is a plurality of valid blocks for one first data, the determination bit for the lowest valid block. is set to 1, and the discrimination bits for the other valid blocks are set to 0.

本願の第11発明は、第10発明のデータ処理装置であって、前記記憶部から前記判別ビットおよび前記第2データを読み出して、前記第1データを復元した第3データを生成する、伸長処理部をさらに有し、前記伸長処理部は、S)新たな読み出しデータとして、新たなm*nビット長のゼロデータを準備する工程と、T)前記記憶部に格納された前記判別ビットおよび前記第2データを読み出す工程と、U)前記読み出しデータの最下位側からnビットを、前記工程T)において読み出した前記第2データの数値とする工程と、を行い、前記工程T)において読み出した前記判別ビットが0である場合には、前記工程U)の後に、V)前記読み出しデータの非ゼロのビットを全てnビット上位へとシフトする工程を行った後に、再び前記工程T)へ戻り、前記工程T)において読み出した前記判別ビットが0である場合には、前記工程U)の後に、W)前記読み出しデータを出力する工程を行う。 An eleventh invention of the present application is the data processing device according to the tenth invention, in which decompression processing reads the discrimination bit and the second data from the storage unit and generates third data by restoring the first data. S) preparing new m*n-bit length zero data as new read data; and T) processing the determination bits stored in the storage unit and the A step of reading out the second data, and a step of U) converting the n bits from the least significant side of the read data into the numerical value of the second data read in the step T), and If the determination bit is 0, after the step U), perform the step of V) shifting all non-zero bits of the read data to the upper n bits, and then return to the step T) again. , when the determination bit read in step T) is 0, step W) of outputting the read data is performed after step U).

本願の第12発明は、第8発明ないし第11発明のいずれか一発明のデータ処理装置であって、時系列データであるm*nビット長の元データと、1つ前の時刻の前記元データとの差分である前記第1データを算出する、差分算出処理部をさらに有する。 A twelfth invention of the present application is the data processing device according to any one of the eighth invention to the eleventh invention, which comprises: original data of m*n bit length that is time series data; and the original data at the previous time. It further includes a difference calculation processing unit that calculates the first data that is a difference between the data and the first data.

本願の第13発明は、第11発明のデータ処理装置であって、時系列データであるm*nビット長の元データと、1つ前の時刻の前記元データとの差分である前記第1データを算出する、差分算出処理部と、前記伸長処理部の出力した前記第3データに基づいて、前記元データを復元した第4データを算出する、加算処理部と、をさらに有し、前記加算処理部は、1つ前の時刻の前記第4データと、新たな前記第3データとを加算して、新たな第4データを算出する。 A thirteenth invention of the present application is the data processing device according to the eleventh invention, wherein the first data processing apparatus is a difference between original data of m*n bit length which is time series data and the original data at the previous time. further comprising: a difference calculation processing unit that calculates data; and an addition processing unit that calculates fourth data obtained by restoring the original data based on the third data output from the decompression processing unit; The addition processing unit calculates new fourth data by adding the fourth data at the previous time and the new third data.

本願の第1発明~第13発明によれば、上位側の桁が連続してゼロとなるデータを効率良く圧縮して格納することができる。 According to the first to thirteenth inventions of the present application, it is possible to efficiently compress and store data whose upper digits are successively zero.

特に、本願の第3発明、第4発明および第10発明によれば、1つの第1データに対する第2データの区切りが明確となる。 In particular, according to the third, fourth, and tenth inventions of the present application, the division of second data with respect to one piece of first data becomes clear.

特に、本願の第6発明、第7発明、第12発明および第13発明によれば、圧縮対象となるデータが時系列データの場合に、1つ前の時刻との差分を取ることにより、圧縮効率が向上する。すなわち、格納すべき第2データの数を低減できる。 In particular, according to the sixth, seventh, twelfth, and thirteenth inventions of the present application, when the data to be compressed is time series data, compression is performed by taking the difference from the previous time. Increased efficiency. That is, the number of second data to be stored can be reduced.

第1実施形態に係るデータ処理装置の構成を示した図である。FIG. 1 is a diagram showing the configuration of a data processing device according to a first embodiment. 第1実施形態に係るデータ圧縮処理の流れを示したフローチャートである。3 is a flowchart showing the flow of data compression processing according to the first embodiment. 第1実施形態に係るデータ圧縮処理の各段階におけるデータの一例を示した図である。FIG. 3 is a diagram showing an example of data at each stage of data compression processing according to the first embodiment. 第1実施形態に係るデータ圧縮処理における各段階におけるデータの具体例を示した図である。FIG. 7 is a diagram showing a specific example of data at each stage in the data compression process according to the first embodiment. 第1実施形態に係るデータ伸長処理の流れを示したフローチャートである。7 is a flowchart showing the flow of data decompression processing according to the first embodiment. 第1実施形態に係る格納データと、データ伸長処理の各段階におけるデータの一例を示した図である。FIG. 3 is a diagram showing an example of stored data and data at each stage of data expansion processing according to the first embodiment. 第2実施形態に係るデータ処理装置の構成を示した図である。FIG. 2 is a diagram showing the configuration of a data processing device according to a second embodiment. 第2実施形態に係るデータ圧縮処理の流れを示したフローチャートである。7 is a flowchart showing the flow of data compression processing according to the second embodiment. 第2実施形態に係るデータ圧縮処理の各段階におけるデータの一例を示した図である。FIG. 7 is a diagram showing an example of data at each stage of data compression processing according to the second embodiment. 第2実施形態に係るデータ圧縮処理における各段階におけるデータの具体例を示した図である。FIG. 7 is a diagram showing a specific example of data at each stage in data compression processing according to the second embodiment. 第2実施形態に係るデータ圧縮処理における各段階におけるデータの具体例を示した図である。FIG. 7 is a diagram showing a specific example of data at each stage in data compression processing according to the second embodiment. 第2実施形態に係るデータ伸長処理の流れを示したフローチャートである。7 is a flowchart showing the flow of data decompression processing according to the second embodiment. 第2実施形態に係る格納データと、データ伸長処理の各段階におけるデータの一例を示した図である。FIG. 7 is a diagram showing an example of stored data and data at each stage of data decompression processing according to the second embodiment.

以下、本発明の実施形態について、図面を参照しつつ説明する。 Embodiments of the present invention will be described below with reference to the drawings.

<1.第1実施形態>
<1-1.データ処理装置の構成>
図1は、本発明の一実施形態に係るデータ処理装置1の構成を示した図である。このデータ処理装置1は、センサ90から入力されるセンシングデータを圧縮処理して格納する装置である。データ処理装置1は、例えば、センサ90を含むセンシングデバイスに搭載されたFPGA(Filed Programmable Gate Array)によって実現される。
<1. First embodiment>
<1-1. Configuration of data processing device>
FIG. 1 is a diagram showing the configuration of a data processing device 1 according to an embodiment of the present invention. This data processing device 1 is a device that compresses and stores sensing data input from a sensor 90. The data processing device 1 is realized, for example, by an FPGA (Filed Programmable Gate Array) mounted on a sensing device including the sensor 90.

データ処理装置1は、センサ90から入力されるセンシングデータDiを圧縮データとして後述する格納処理部15に格納することができる。本実施形態では、センシングデータDiは、アナログデータである。なお、センシングデータDiはデジタルデータであってもよい。また、データ処理装置1は、格納処理部15に格納した圧縮データを伸長し、出力データDoとして出力することができる。なお、出力データDoは、デジタルデータであってもよいし、アナログデータであってもよい。 The data processing device 1 can store the sensing data Di input from the sensor 90 as compressed data in the storage processing unit 15, which will be described later. In this embodiment, the sensing data Di is analog data. Note that the sensing data Di may be digital data. Further, the data processing device 1 can decompress the compressed data stored in the storage processing unit 15 and output it as output data Do. Note that the output data Do may be digital data or analog data.

図1に示すように、データ処理装置1は、受信部11と、分割処理部13と、格納処理部15と、伸長処理部17と、送信部19と、記憶部20とを有する。本実施形態では、記憶部20は、データ処理装置1を構成するFPGAの内蔵RAMである。しかしながら、記憶部20は、データ処理装置1の外部に接続されたRAM等のメモリであってもよい。 As shown in FIG. 1, the data processing device 1 includes a receiving section 11, a division processing section 13, a storage processing section 15, an expansion processing section 17, a transmission section 19, and a storage section 20. In this embodiment, the storage unit 20 is a built-in RAM of an FPGA that constitutes the data processing device 1. However, the storage unit 20 may be a memory such as a RAM connected to the outside of the data processing device 1.

受信部11は、センサ90から入力されたセンシングデータDiを受信し、m×nビット長のデジタルデータに変換し、当該デジタルデータを第1データD1とする。具体的には、受信部11は、I2CやSPI等のプロトコルを解釈可能である。このため、これらのプロトコルで入力されるセンシングデータDiを解釈し、デジタルデータである第1データD1に変換する。そして、受信部11は、第1データD1を分割処理部13へと引き渡す。 The receiving unit 11 receives sensing data Di input from the sensor 90, converts it into digital data of m×n bit length, and sets the digital data as first data D1. Specifically, the receiving unit 11 can interpret protocols such as I2C and SPI. Therefore, the sensing data Di input using these protocols is interpreted and converted into first data D1 which is digital data. The receiving unit 11 then delivers the first data D1 to the division processing unit 13.

分割処理部13は、第1データD1をm個のnビット長の複数の分割ブロックDvに分割する。ここで、複数の分割ブロックDvはそれぞれ、第1データD1の最下位ビットから順に、nビット毎に第1分割ブロックDv.1、第2分割ブロックDv.2、…、第m分割ブロックDv.mと称する。なお、図1中に各データの後に括弧内で記載されているm*n、n、1等は、そのデータのビット数を表している。 The division processing unit 13 divides the first data D1 into a plurality of m division blocks Dv each having a length of n bits. Here, each of the plurality of divided blocks Dv is a first divided block Dv. 1. Second divided block Dv. 2,..., m-th divided block Dv. It is called m. Note that m*n, n, 1, etc. written in parentheses after each data in FIG. 1 represent the number of bits of the data.

分割処理部13は、m個の分割ブロックDv.1~Dv.mのうちいずれのデータが、格納処理部15に格納すべき有効ブロックであるか、格納しない非有効ブロックであるかを判別する。そして、分割処理部13は、1つの第1データD1に対して、mビット長のイネーブルビットを含むイネーブル信号Deを1つ生成する。なお、イネーブル信号Deは、イネーブルビットを全て含むビット長であればよく、mビット長であってもよいし、mビットよりも長いビット長を有してもよい。分割処理部13は、各分割ブロックDv.1~Dv.mと、イネーブル信号Deとを、格納処理部15に引き渡す。 The division processing unit 13 divides m divided blocks Dv. 1~Dv. It is determined which data among m is a valid block that should be stored in the storage processing unit 15 or an ineffective block that should not be stored. Then, the division processing unit 13 generates one enable signal De including an m-bit length enable bit for one piece of first data D1. Note that the enable signal De may have a bit length that includes all enable bits, may be m bits long, or may have a bit length longer than m bits. The division processing unit 13 processes each division block Dv. 1~Dv. m and the enable signal De are delivered to the storage processing section 15.

具体的には、分割処理部13は、分割ブロックDv.1~Dv.mを最上位から順に、数値がゼロであるか非ゼロであるかを判別する。そして、最上位の分割ブロックDv.mから順に、連続して数値がゼロとなる分割ブロックDvを非有効ブロックであると判断する。また、数値が非ゼロとなる最上位の分割ブロックDvと、当該分割ブロックDvよりも下位の分割ブロックDvとを、有効ブロックとする。 Specifically, the division processing unit 13 divides the division blocks Dv. 1~Dv. Starting from the highest value of m, it is determined whether the numerical value is zero or non-zero. Then, the uppermost divided block Dv. Starting from m, divided blocks Dv whose numerical values become zero consecutively are determined to be ineffective blocks. Further, the uppermost divided block Dv whose numerical value is non-zero and the lower divided blocks Dv than the divided block Dv are defined as valid blocks.

例えば、m個の分割ブロックDv.1~Dv.mのうち、数値がゼロとなる最上位の分割ブロックDvが最下位からx番目の分割ブロックDv(第x分割ブロックDv.x)である場合(1≦x≦m)、最下位から連続するx個の分割ブロックDv.1~Dv.xを有効ブロックとする。また、(x+1)番目~m番目までの(m-x)個の分割ブロックDv.(x+1)~Dv.mを非有効ブロックとする。 For example, m divided blocks Dv. 1~Dv. If the highest divided block Dv whose numerical value is zero among m is the x-th divided block Dv from the lowest (x-th divided block Dv.x) (1≦x≦m), it is continuous from the lowest. x divided blocks Dv. 1~Dv. Let x be a valid block. In addition, (m−x) divided blocks Dv. (x+1)~Dv. Let m be an invalid block.

なお、分割処理部13は、第1データD1の数値がゼロである場合、すなわち、m個全ての分割ブロックDv.1~Dv.mの数値がゼロである場合、第1分割ブロックDv.1のみを有効ブロックとする。これにより、1つの第1データD1に対して、少なくとも1つの有効ブロックが指定される。 Note that when the numerical value of the first data D1 is zero, that is, the division processing unit 13 divides all m division blocks Dv. 1~Dv. If the value of m is zero, the first divided block Dv. Only 1 is considered a valid block. As a result, at least one valid block is designated for one piece of first data D1.

仮に、第1データD1の数値がゼロである場合に、全ての分割ブロックDv.1~Dv.mを非有効ブロックとしてしまうと、当該第1データD1に対応する判別ビットDdおよび第2データD2が記憶されず、当該第1データD1がデータ伸長処理において復元されないという問題が生じる。本実施形態では、第1データD1の数値がゼロである場合でも、第1分割ブロックDv.1を有効ブロックとすることにより、当該第1データD1に対応するデータ(後述する判別ビットDdおよび第2データD2)が記憶部20に記憶されるため、このような第1データD1についても、データ伸長処理において復元される。 If the numerical value of the first data D1 is zero, all divided blocks Dv. 1~Dv. If m is made an ineffective block, a problem arises in that the discrimination bit Dd and second data D2 corresponding to the first data D1 are not stored, and the first data D1 is not restored in the data decompression process. In this embodiment, even when the numerical value of the first data D1 is zero, the first divided block Dv. 1 as a valid block, data corresponding to the first data D1 (determination bit Dd and second data D2, which will be described later) is stored in the storage unit 20. Therefore, also for such first data D1, Restored during data decompression processing.

イネーブル信号Deのイネーブルビットの各桁は、分割ブロックDv.1~Dv.mのそれぞれが有効ブロックであるか否かを示す。本実施形態では、イネーブル信号Deのイネーブルビット各桁は、対応する分割ブロックDv.1~Dv.mが有効ブロックである場合には1、非有効ブロックである場合には0の値を有する。具体的には、最下位からp番目の分割ブロックDv.pが非有効ブロックである場合には、イネーブルビットの最下位からp番目の桁を0とする。また、最下位からp番目の分割ブロックDv.pが有効ブロックである場合には、イネーブルビットの最下位からp番目の桁を1とする。 Each digit of the enable bit of the enable signal De corresponds to the divided block Dv. 1~Dv. Indicates whether each of m is a valid block. In this embodiment, each enable bit digit of the enable signal De corresponds to the corresponding divided block Dv. 1~Dv. It has a value of 1 if m is a valid block, and 0 if it is a non-valid block. Specifically, the p-th divided block Dv. If p is an ineffective block, the pth digit from the lowest enable bit is set to 0. Also, the p-th divided block Dv. If p is a valid block, the pth digit from the lowest enable bit is set to 1.

格納処理部15は、分割ブロックDv.1~Dv.mのうち、有効ブロックを、1ビットの判別ビットDdとnビット長の第2データD2との組み合わせに変換して、記憶部20に格納する。これにより、記憶部20には、1ビットの判別ビットDdとnビット長の第2データD2とを組み合わせたn+1ビット長のデータ群が複数格納される。 The storage processing unit 15 stores divided blocks Dv. 1~Dv. m, a valid block is converted into a combination of a 1-bit discrimination bit Dd and an n-bit long second data D2, and is stored in the storage unit 20. As a result, the storage unit 20 stores a plurality of data groups each having a length of n+1 bits, which is a combination of the 1-bit discrimination bit Dd and the second data D2 having a length of n bits.

具体的には、格納処理部15は、有効ブロックを上位側から順にイネーブル信号Deを参照し、イネーブル信号Deが1である分割ブロックDvに判別ビットDdを付与して、判別ビットDdとともに第2データD2として格納する。このとき、1つの第1データD1について、最下位の第1分割ブロックDv.1に対応する判別ビットDdは1、その他の有効ブロックに対応する判別ビットDdは0が付与される。 Specifically, the storage processing unit 15 refers to the enable signal De of the valid blocks in order from the upper side, adds the discrimination bit Dd to the divided block Dv for which the enable signal De is 1, and adds the discrimination bit Dd to the divided block Dv in which the enable signal De is 1. Stored as data D2. At this time, for one piece of first data D1, the lowest first divided block Dv. The discrimination bit Dd corresponding to 1 is assigned 1, and the discrimination bit Dd corresponding to other valid blocks is assigned 0.

なお、判別ビットDdの数値は0と1が逆であっても良い。また、格納処理部15は、有効ブロックを下位側から順に第2データD2として格納してもよい。その場合、判別ビットDdの数値は、1~m個の有効ブロックのうち、再上位の有効ブロックに対応する判別ビットDdを、その他の有効ブロックに対応する判別ビットDdと異なる数値とする。 Note that the numerical value of the discrimination bit Dd may be 0 and 1, which are reversed. Furthermore, the storage processing unit 15 may store the valid blocks in order from the lower order side as the second data D2. In this case, the numerical value of the determination bit Dd is such that the determination bit Dd corresponding to the next higher-order effective block among the 1 to m valid blocks is a different value from the determination bit Dd corresponding to the other valid blocks.

伸長処理部17は、記憶部20に記憶された判別ビットDdと第2データD2とを順に読み出すことにより、第1データD1を復元した第3データD3を生成する。そして、伸長処理部17は、送信部19に第3データD3を引き渡す。伸長処理部17における伸長処理の詳細については、後述する。 The decompression processing unit 17 sequentially reads the discrimination bit Dd and the second data D2 stored in the storage unit 20, thereby generating third data D3 that is the restored first data D1. The decompression processing section 17 then delivers the third data D3 to the transmission section 19. Details of the decompression process in the decompression processing section 17 will be described later.

送信部19は、データ処理装置1の外部へ、出力データDoを出力する。出力データDoは、第3データD3そのものであってもよいし、第3データD3を所望のデータ形式へ変換したものであってもよい。 The transmitter 19 outputs the output data Do to the outside of the data processing device 1. The output data Do may be the third data D3 itself, or may be the third data D3 converted into a desired data format.

<1-2.データ圧縮処理の流れ>
次に、第1実施形態に係るデータ処理装置1におけるデータ圧縮処理について、図2~図4を参照しつつ説明する。図2は、第1実施形態のデータ圧縮処理の流れを示したフローチャートである。図3は、第1実施形態のデータ圧縮処理の各段階におけるデータの一例を示した図である。なお、図3の例では、m=4としている。
<1-2. Flow of data compression process>
Next, data compression processing in the data processing device 1 according to the first embodiment will be explained with reference to FIGS. 2 to 4. FIG. 2 is a flowchart showing the flow of data compression processing in the first embodiment. FIG. 3 is a diagram showing an example of data at each stage of data compression processing according to the first embodiment. Note that in the example of FIG. 3, m=4.

このデータ圧縮処理では、データ処理装置1は、m*nビット長の第1データD1を、複数組の判別ビットDd(1ビット長)および第2データD2(nビット長)のデータ群とに変換して、記憶部20に格納する。 In this data compression process, the data processing device 1 converts the first data D1 of m*n bit length into data groups of multiple sets of discrimination bits Dd (1 bit length) and second data D2 (n bit length). The data is converted and stored in the storage unit 20.

図2に示すように、センシングデータDiの圧縮処理では、まず、受信部11が、センシングデータDiを受信する(ステップS11)。そして、受信部11は、センシングデータDiをm*nビット長の第1データD1へと変換し、分割処理部13へと引き渡す(ステップS12)。 As shown in FIG. 2, in the compression process of the sensing data Di, the receiving unit 11 first receives the sensing data Di (step S11). Then, the receiving unit 11 converts the sensing data Di into first data D1 having a length of m*n bits, and delivers it to the division processing unit 13 (step S12).

図3の例には、4×nビット長の第1データD1と、nビット長の4つの分割ブロックDv.1,Dv.2,Dv.3,Dv.4と、4ビット長のイネーブル信号Deとが示されている。また、図3の例には、記憶部20に記憶される格納データとして、判別ビットDdと第2データD2との組み合わせが複数示されている。 In the example of FIG. 3, first data D1 having a length of 4×n bits and four divided blocks Dv. 1, Dv. 2, Dv. 3, Dv. 4 and an enable signal De having a length of 4 bits. Further, in the example of FIG. 3, a plurality of combinations of the discrimination bit Dd and the second data D2 are shown as stored data stored in the storage unit 20.

なお、図3中、これらの各データの数値を、data_k_zの形式で示している。ここで、kは、複数の第1データD1の順番を示す値であり、zは、第1データD1をnビット毎に分割した分割ブロックDvにおいて下位側から何番目の分割ブロックDvの数値であるかを示すものである。すなわち、data_k_zは、k番目の第1データD1をnビット毎に分割した下位側からz番目の分割ブロックDvの数値を示す。 In addition, in FIG. 3, the numerical values of each of these data are shown in the format of data_k_z. Here, k is a value indicating the order of the plurality of first data D1, and z is the numerical value of the divided block Dv from the lower side in the divided blocks Dv obtained by dividing the first data D1 every n bits. It shows whether there is. That is, data_k_z indicates the numerical value of the z-th divided block Dv from the lower side, which is obtained by dividing the k-th first data D1 into every n bits.

すなわち、図3において、data_k_1は、第1データD1の最下位側から1~n番目のnビットのデータ、data_k_2は、第1データD1の最下位側からn+1~2n番目のnビットのデータ、data_k_3は、第1データD1の最下位側から2n+1~3n番目のnビットのデータ、data_k_4は、第1データD1の最下位側から3n+1~4n番目のnビットのデータを示している。 That is, in FIG. 3, data_k_1 is the 1st to nth n-bit data from the least significant side of the first data D1, data_k_2 is the n+1st to 2nth n-bit data from the least significant side of the first data D1, data_k_3 indicates 2n+1 to 3nth n-bit data from the least significant side of the first data D1, and data_k_4 indicates 3n+1 to 4nth n-bit data from the least significant side of the first data D1.

次に、分割処理部13は、m*nビット長の第1データD1を、m個のnビット長の分割ブロックDv.1~Dv.mに分割する(ステップS13)。 Next, the division processing unit 13 divides the m*n-bit length first data D1 into m n-bit length division blocks Dv. 1~Dv. Divide into m (step S13).

具体的には、第1データD1の最下位側からnビット毎に、第1分割ブロックDv.1、第2分割ブロックDv.2、…、第m分割ブロックDv.mとする。すなわち、第1分割ブロックDv.1は、第1データD1の最下位側から1~n番目のnビットのデータであり、第2分割ブロックDv.2は、第1データD1の最下位側からn+1~2n番目のnビットのデータであり、第m分割ブロックDv.mは、第1データD1の最下位側から(m-1)*n+1~m*n番目のnビットのデータである。 Specifically, the first divided block Dv. 1. Second divided block Dv. 2,..., m-th divided block Dv. Let it be m. That is, the first divided block Dv. 1 is the 1st to nth n-bit data from the least significant side of the first data D1, and the second divided block Dv. 2 is the n+1 to 2n-th n-bit data from the lowest side of the first data D1, and the m-th divided block Dv. m is (m-1)*n+1 to m*n-th n-bit data from the least significant side of the first data D1.

図3の例では、第1分割ブロックDv.1はdata_k_1であり、第2分割ブロックDv.2はdata_k_2であり、第3分割ブロックDv.3はdata_k_3であり、第4分割ブロックDv.4はdata_k_4となる。 In the example of FIG. 3, the first divided block Dv. 1 is data_k_1, and second divided block Dv. 2 is data_k_2, and third divided block Dv. 3 is data_k_3, and the fourth divided block Dv. 4 becomes data_k_4.

分割処理部13は、続いて、有効ブロックを判別し、各分割ブロックDv.1~Dv.mのうち、どの分割ブロックDvが有効ブロックであるかを示すイネーブル信号Deを生成する(ステップS14)。そして、分割処理部13は、分割ブロックDv.1~Dv.mとイネーブル信号Deとを格納処理部15へと引き渡す。 The division processing unit 13 then determines the valid blocks and divides each divided block Dv. 1~Dv. An enable signal De indicating which divided block Dv is a valid block among m is generated (step S14). Then, the division processing unit 13 processes the division block Dv. 1~Dv. m and the enable signal De are delivered to the storage processing section 15.

図3の例では、分割ブロックDv.1~Dv.4の数が4個であるため、イネーブル信号Deに含まれるイネーブルビットは4ビット長である。すなわち、イネーブル信号Deはビット長の全てがイネーブルビットである。また、図3の例では、4ビット長のイネーブルビットの各桁の数値は、enable_k_1,enable_k_2,enable_k_3,enable_k_4で示されている。enable_k_1,enable_k_2,enable_k_3,enable_k_4はそれぞれ、対応する分割ブロックDv.1~Dv.4が有効ブロックである場合は1、対応する分割ブロックDv.1~Dv.4が非有効ブロックである場合は0である。 In the example of FIG. 3, the divided block Dv. 1~Dv. Since the number of 4's is 4, the enable bit included in the enable signal De has a length of 4 bits. That is, the entire bit length of the enable signal De is an enable bit. Further, in the example of FIG. 3, the numerical values of each digit of the 4-bit long enable bit are indicated as enable_k_1, enable_k_2, enable_k_3, and enable_k_4. enable_k_1, enable_k_2, enable_k_3, enable_k_4 are the corresponding divided blocks Dv. 1~Dv. 4 is a valid block, 1, the corresponding divided block Dv. 1~Dv. If 4 is an invalid block, it is 0.

その後、格納処理部15は、分割ブロックDv.1~Dv.mとイネーブル信号Deとに基づいて、判別ビットDdを生成し、判別ビットDdおよび第2データD2を記憶部20に格納する(S15)。 Thereafter, the storage processing unit 15 stores the divided block Dv. 1~Dv. A discrimination bit Dd is generated based on m and the enable signal De, and the discrimination bit Dd and second data D2 are stored in the storage unit 20 (S15).

具体的には、格納処理部15は、イネーブル信号Deのイネーブルビットを参照して、分割ブロックDv.1~Dv.mのうち、有効ブロックのみを第2データD2として記憶部20に格納する。このとき、1つの第1データD1に対応する第2データD2の数が有効ブロックの数によって異なるため、第1データD1毎の区切りを判別するために、各第2データD2に対して判別ビットDdを付与する。 Specifically, the storage processing unit 15 refers to the enable bit of the enable signal De and stores the divided blocks Dv. 1~Dv. Among m, only valid blocks are stored in the storage unit 20 as second data D2. At this time, since the number of second data D2 corresponding to one first data D1 differs depending on the number of valid blocks, in order to determine the break for each first data D1, a determination bit is set for each second data D2. Give Dd.

本実施形態では、1つの第1データD1に対応する1~m個の分割ブロックDvを、上位側から順に、第2データD2として記憶部20に格納する。このとき、各第2データD2は、判別ビットDdとともに格納される。すなわち、記憶部20には、1ビット長の判別ビットDdと、nビット長の第2データD2とが1組のデータ群として格納される。 In this embodiment, 1 to m divided blocks Dv corresponding to one first data D1 are stored in the storage unit 20 as second data D2 in order from the uppermost side. At this time, each second data D2 is stored together with the discrimination bit Dd. That is, the storage unit 20 stores the 1-bit long discrimination bit Dd and the n-bit long second data D2 as a data group.

また、1つの第1データD1に対応する1~m個の第2データD2のうち、最後に格納する第2データD2に対応する判別ビットDdの数値を1とし、その他の判別ビットDdの数値を0としている。すなわち、本実施形態のように、上位側の分割ブロックDvから順に第2データD2として格納する場合には、最後に格納する第1分割ブロックDv.1に対応する判別ビットDdの数値を1とする。 Furthermore, among the 1 to m pieces of second data D2 corresponding to one first data D1, the value of the discrimination bit Dd corresponding to the second data D2 stored last is set to 1, and the value of the other discrimination bits Dd is set to 1. is set to 0. That is, when storing the second data D2 in order from the upper divided block Dv as in the present embodiment, the first divided block Dv. Let the value of the discrimination bit Dd corresponding to 1 be 1.

図3の例では、1番目(k=1)の第1データD1の有効ブロックが第1分割ブロックDv.1(数値がdata_1_1)と第2分割ブロックDv.2(数値がdata_1_2)との2つであり、2番目(k=2)の第1データD1の有効ブロックが第1分割ブロックDv.1(数値がdata_2_1)と第2分割ブロックDv.2(数値がdata_2_2)と第3分割ブロックDv.3(数値がdata_2_3)の3つである場合の格納データの例が示されている。なお、図3において、格納データの枠外右側には、何番目の第1データD1のどの分割ブロックDvに対応するかが、参考のために記載されている。 In the example of FIG. 3, the first (k=1) effective block of the first data D1 is the first divided block Dv. 1 (the numerical value is data_1_1) and the second divided block Dv. 2 (the numerical value is data_1_2), and the second (k=2) effective block of the first data D1 is the first divided block Dv. 1 (the numerical value is data_2_1) and the second divided block Dv. 2 (the numerical value is data_2_2) and the third divided block Dv. 3 (the numerical value is data_2_3), an example of stored data is shown. In addition, in FIG. 3, on the right side outside the frame of the stored data, it is written for reference which divided block Dv of which first data D1 corresponds.

この例では、各段に、判別ビットDdと、第2データD2とが1組のデータ群として格納されている。1番目の第2データD2は、1番目(k=1)の第1データD1の第2分割ブロックDv.2(数値がdata_1_2)である。2番目の第2データD2は、1番目(k=1)の第1データD1の第1分割ブロックDv.1(数値がdata_1_1)となる。3番目の第2データD2は、2番目(k=2)の第1データD1の第3分割ブロックDv.3(数値がdata_2_3)となる。4番目の第2データD2は、2番目(k=2)の第1データD1の第2分割ブロックDv.2(数値がdata_2_2)となる。5番目の第2データD2は、2番目(k=2)の第1データD1の第1分割ブロックDv.1(数値がdata_2_1)となる。 In this example, the discrimination bit Dd and the second data D2 are stored as one data group in each stage. The first second data D2 is the second divided block Dv. of the first (k=1) first data D1. 2 (the numerical value is data_1_2). The second second data D2 is the first divided block Dv. of the first (k=1) first data D1. 1 (the numerical value is data_1_1). The third second data D2 is the third divided block Dv. of the second (k=2) first data D1. 3 (the numerical value is data_2_3). The fourth second data D2 is the second divided block Dv. of the second (k=2) first data D1. 2 (the numerical value is data_2_2). The fifth second data D2 is the first divided block Dv. of the second (k=2) first data D1. 1 (the numerical value is data_2_1).

そして、判別ビットDdは、1番目(k=1)の第1データD1に対応する2つの第2データD2について、順に、0,1となっており、2番目(k=2)の第1データD1に対応する3つの第2データD2について、順に、0,0,1となっている。すなわち、各第1データD1に対して、最後に格納する第2データD2の判別ビットDdが1、それ以外の第2データD2の判別ビットDdが0となっている。 The determination bit Dd is 0 and 1 in order for the two second data D2 corresponding to the first (k=1) first data D1, and the second (k=2) first The three second data D2 corresponding to the data D1 are 0, 0, and 1 in this order. That is, for each first data D1, the determination bit Dd of the second data D2 stored last is 1, and the determination bit Dd of the other second data D2 is 0.

1つのセンシングデータDiに対して、ステップS11~S15が完了すると、データ処理装置1は、センサ90におけるセンシングが終了したか否かを判断する(ステップS16)。センシングが終了していないと判断すると(ステップS16:No)、データ処理装置1は、ステップS11へ戻り、次のセンシングデータDiに対して、ステップS11~S15を行う。一方、センシングが終了したと判断すると(ステップS16:Yes)、データ処理装置1は、データ圧縮処理を終了する。 When steps S11 to S15 are completed for one piece of sensing data Di, the data processing device 1 determines whether sensing by the sensor 90 has ended (step S16). If it is determined that the sensing has not been completed (step S16: No), the data processing device 1 returns to step S11 and performs steps S11 to S15 on the next sensing data Di. On the other hand, if it is determined that the sensing has ended (step S16: Yes), the data processing device 1 ends the data compression process.

図4は、第1実施形態のデータ圧縮処理の各段階におけるデータ(第1データD1、分割データDv.1~Dv.4、イネーブル信号De、判別ビットDdおよび第2データD2)の具体例を示した図である。図4の例では、第1データD1が16ビットであり、m=4、n=4としている。 FIG. 4 shows a specific example of data (first data D1, divided data Dv.1 to Dv.4, enable signal De, discrimination bit Dd, and second data D2) at each stage of the data compression process of the first embodiment. FIG. In the example of FIG. 4, the first data D1 is 16 bits, m=4, and n=4.

図4の例では、第1データD1が、1番目(k=1)から4番目(k=4)まで順に、
k=1:008a(16進法)/0000000001001010(2進法)
k=2:0f03(16進法)/0000111100000011(2進法)
k=3:0000(16進法)/0000000000000000(2進法)
k=4:10c5(16進法)/0001000011000101(2進法)
となっている。
In the example of FIG. 4, the first data D1 is sequentially from the first (k=1) to the fourth (k=4).
k=1:008a (hexadecimal)/0000000001001010 (binary)
k=2:0f03 (hexadecimal)/0000111100000011 (binary)
k=3:0000 (hexadecimal)/0000000000000000 (binary)
k=4:10c5 (hexadecimal)/0001000011000101 (binary)
It becomes.

このため、1番目(k=1)の分割ブロックDv.4,Dv.3,Dv.2,Dv,1は上位側から順に、0000,0000,0100,1010である。第4分割ブロックDv.4および第3分割ブロックDv.3は、数値が0であるため非有効ブロックである。また、第2分割ブロックDv.2は数値が非ゼロであるため、第2分割ブロックDv.2および第1分割ブロックDv.1が有効ブロックとなる。したがって、1番目(k=1)のイネーブル信号Deは、下位側から4桁目および3桁目が0、下位側から2桁目および1桁目が1となる。 Therefore, the first (k=1) divided block Dv. 4, Dv. 3, Dv. 2, Dv, 1 are 0000, 0000, 0100, and 1010 in order from the upper side. Fourth divided block Dv. 4 and third divided block Dv. 3 is an invalid block because the numerical value is 0. Further, the second divided block Dv. Since the numerical value of 2 is non-zero, the second divided block Dv. 2 and the first divided block Dv. 1 is a valid block. Therefore, in the first (k=1) enable signal De, the fourth and third digits from the least significant side are 0, and the second and first digits from the least significant side are 1.

2番目(k=2)の分割ブロックDv.4,Dv.3,Dv.2,Dv,1は上位側から順に、0000,1111,0000,0011である。第4分割ブロックDv.4は、数値が0であるため非有効ブロックである。また、第3分割ブロックDv.3は数値が非ゼロであるため、第3分割ブロックDv.3と、それよりも下位側の第2分割ブロックDv.2および第1分割ブロックDv.1とが有効ブロックとなる。したがって、2番目(k=2)のイネーブル信号Deは、下位側から4桁目が0、下位側から3桁目、2桁目および1桁目が1となる。 The second (k=2) divided block Dv. 4, Dv. 3, Dv. 2, Dv, 1 are 0000, 1111, 0000, 0011 in order from the upper side. Fourth divided block Dv. 4 is an invalid block because the numerical value is 0. Further, the third divided block Dv. Since the numerical value of 3 is non-zero, the third divided block Dv. 3 and the second divided block Dv.3 on the lower side. 2 and the first divided block Dv. 1 is a valid block. Therefore, in the second (k=2) enable signal De, the fourth digit from the least significant side is 0, and the third, second, and first digits from the least significant side are 1.

3番目(k=3)の分割ブロックDv.4,Dv.3,Dv.2,Dv,1は上位側から順に、0000,0000,0000,0000である。全ての分割ブロックDv.4,Dv.3,Dv.2,Dv,1の数値が0であるため、最も下位側の第1分割ブロックDv.1のみが有効ブロックとなり、その他の分割ブロックDv.4~Dv.2は非有効ブロックとなる。したがって、3番目(k=3)のイネーブル信号Deは、下位側から4桁目、3桁目および2桁目が0、下位側から1桁目が1となる。 The third (k=3) divided block Dv. 4, Dv. 3, Dv. 2, Dv, 1 are 0000, 0000, 0000, 0000 in order from the upper side. All divided blocks Dv. 4, Dv. 3, Dv. Since the value of Dv.2,Dv,1 is 0, the first divided block Dv.2, Dv. Only Dv.1 is a valid block, and the other divided blocks Dv. 4~Dv. 2 is an invalid block. Therefore, in the third (k=3) enable signal De, the fourth, third, and second digits from the lower order side are 0, and the first digit from the lower order side is 1.

4番目(k=4)の分割ブロックDv.4,Dv.3,Dv.2,Dv,1は上位側から順に、0001,0000,1100,0101である。最上位の第4分割ブロックDv.4の数値が非ゼロであるため、全ての分割ブロックDv.4,Dv.3,Dv.2,Dv,1が有効ブロックとなる。したがって、4番目(4=3)のイネーブル信号Deは、4桁全てが1となる。 Fourth (k=4) divided block Dv. 4, Dv. 3, Dv. 2, Dv, 1 are 0001, 0000, 1100, 0101 in order from the upper side. The fourth divided block Dv. Since the value of Dv.4 is non-zero, all divided blocks Dv. 4, Dv. 3, Dv. 2,Dv,1 becomes a valid block. Therefore, all four digits of the fourth (4=3) enable signal De are 1.

このような分割ブロックDv.4,Dv.3,Dv.2,Dv,1およびイネーブル信号Deが入力された場合、格納処理部15は、記憶部20に、1ビットの判別ビットDdと4ビットの第2データD2のデータ群を、1番目(k=1)の第1データD1について2組、2番目(k=2)の第1データD1について3組、3番目(k=3)の第1データD1について1組、4番目(k=4)の第1データD1について4組格納する。すなわち、この場合、4つの第1データD1に対して10組の判別ビットDdおよび第2データD2が記憶部20に格納される。 Such a divided block Dv. 4, Dv. 3, Dv. 2, Dv, 1 and the enable signal De are input, the storage processing unit 15 stores the data group of the 1-bit discrimination bit Dd and the 4-bit second data D2 in the storage unit 20 as the first (k= 1) 2 sets for the first data D1, 3 sets for the 2nd (k=2) first data D1, 1 set for the 3rd (k=3) first data D1, and 4th (k=4) Four sets of first data D1 are stored. That is, in this case, ten sets of discrimination bits Dd and second data D2 are stored in the storage unit 20 for four pieces of first data D1.

データ圧縮処理を行わずに4つの第1データD1をそのまま格納する場合には、16ビット×4つで64ビット分のデータが記憶部20に格納される。これに対し、本実施形態のデータ圧縮処理を行った場合、図4の例では、5ビット×10組で50ビット分のデータが記憶部20に格納される。すなわち、記憶部20に格納すべきデータ量を圧縮することができている。 When storing the four pieces of first data D1 as they are without performing data compression processing, data for 64 bits (16 bits x 4) is stored in the storage unit 20. On the other hand, when the data compression process of this embodiment is performed, in the example of FIG. 4, 50 bits of data are stored in the storage unit 20 in 5 bits x 10 sets. That is, the amount of data to be stored in the storage unit 20 can be compressed.

このように、第1実施形態に係るデータ圧縮処理を用いることにより、格納すべきデータ量を小さくすることができる。特に、第1データD1の上位側の桁が0が連続する場合、格納すべきデータ量を特に小さくすることができる。 In this way, by using the data compression process according to the first embodiment, the amount of data to be stored can be reduced. In particular, when the upper digits of the first data D1 are consecutive 0s, the amount of data to be stored can be particularly reduced.

<1-3.データ伸長処理の流れ>
続いて、第1実施形態に係るデータ処理装置1におけるデータ伸長処理について、図5および図6を参照しつつ説明する。図5は、第1実施形態のデータ伸長処理の流れを示したフローチャートである。図6は、第1実施形態に係る、記憶部20に格納された格納データと、データ伸長処理の各段階におけるデータの一例を示した図である。なお、図6の例は、図3の格納データ例に対応しており、m=4としている。
<1-3. Flow of data decompression process>
Next, data decompression processing in the data processing device 1 according to the first embodiment will be explained with reference to FIGS. 5 and 6. FIG. 5 is a flowchart showing the flow of data decompression processing in the first embodiment. FIG. 6 is a diagram showing an example of stored data stored in the storage unit 20 and data at each stage of data decompression processing according to the first embodiment. Note that the example in FIG. 6 corresponds to the stored data example in FIG. 3, and m=4.

このデータ伸長処理では、データ処理装置1は、記憶部20に格納された複数組の判別ビットDd(1ビット長)および第2データD2(nビット長)のデータ群を読み出して、第1データD1(m*nビット長)を復元した第3データD3(m*nビット長)を生成する。 In this data decompression process, the data processing device 1 reads out data groups of multiple sets of discrimination bits Dd (1 bit length) and second data D2 (n bit length) stored in the storage unit 20, and Third data D3 (m*n bit length) is generated by restoring D1 (m*n bit length).

図5に示すように、データ伸長処理においては、まず、伸長処理部17が、新たなデータ読み出し開始時に、第1データD1と同じビット長(m*nビット長)のゼロデータを第3データD3の仮データとして準備する(ステップS21)。 As shown in FIG. 5, in the data decompression process, the decompression processing unit 17 first transfers zero data having the same bit length (m*n bit length) as the first data D1 to the third data when starting to read new data. It is prepared as temporary data for D3 (step S21).

次に、伸長処理部17は、記憶部20から、判別ビットDdおよび第2データD2のデータ群を1組読み出す(ステップS22)。そして、伸長処理部17は、読み出した第2データD2を、第3データD3の仮データの最下位側から1~n桁目に入力する。 Next, the decompression processing unit 17 reads out one data group of the discrimination bit Dd and the second data D2 from the storage unit 20 (step S22). Then, the decompression processing unit 17 inputs the read second data D2 into the first to nth digits from the lowest order of the temporary data of the third data D3.

続いて、伸長処理部17は、ステップS22において読み出した判別ビットDdから、ステップS22で読み出した第2データD2が最終ブロックであるか否かを判別する(ステップS23)。判別ビットDdが0である場合、伸長処理部17は、最終ブロックでないと判断し(ステップS23:No)、ステップS24へと進み、第3データD3の仮データの各桁をnビット分上位側へシフトする(ステップS24)。その後、伸長処理部17は、ステップS22へと進み、次の判別ビットDdおよび第2データD2を読み出す。 Subsequently, the decompression processing unit 17 determines whether the second data D2 read out in step S22 is the final block based on the determination bit Dd read out in step S22 (step S23). If the determination bit Dd is 0, the decompression processing unit 17 determines that it is not the final block (step S23: No), proceeds to step S24, and converts each digit of the temporary data of the third data D3 by n bits to the upper side. (step S24). Thereafter, the decompression processing unit 17 proceeds to step S22 and reads out the next determination bit Dd and second data D2.

一方、判別ビットDdが1である場合、伸長処理部17は、最終ブロックであると判断し(ステップS23:Yes)、仮データであった第3データD3を、最終的な第3データD3として、送信部19へと出力する(ステップS25)。その後、送信部19は、データ処理装置1の外部へ、第3データD3に基づいて出力データDoを出力する。なお、出力データDoは、第3データD3そのものであってもよいし、第3データD3を所望のデータ形式へ変換したものであってもよい。 On the other hand, if the determination bit Dd is 1, the decompression processing unit 17 determines that the block is the final block (step S23: Yes), and uses the third data D3, which was temporary data, as the final third data D3. , is output to the transmitter 19 (step S25). Thereafter, the transmitter 19 outputs output data Do to the outside of the data processing device 1 based on the third data D3. Note that the output data Do may be the third data D3 itself, or may be the third data D3 converted into a desired data format.

以下では、図6の例を用いて、本実施形態のデータ伸長処理における、具体的な第3データD3の生成方法を示す。図6の上部に示すように、図6の例では、記憶部20に、1番目(k=1)の第1データD1に対応する2つの第2データD2(data_1_2,data_1_1)と、2番目(k=1)の第1データD1に対応する3つの第2データD2(data_2_3,data_2_2,data_2_1)が格納されている。 Below, using the example of FIG. 6, a specific method of generating the third data D3 in the data decompression process of this embodiment will be described. As shown in the upper part of FIG. 6, in the example of FIG. Three second data D2 (data_2_3, data_2_2, data_2_1) corresponding to the first data D1 (k=1) are stored.

図6の例では、1回目のステップS21でゼロデータである第3データD3の仮データが準備される。その後、1回目のステップS22で、第2データD2としてdata_1_2が読み出される。このため、第3データD3の仮データの最下位側から1~n桁目がdata_1_2となる。 In the example of FIG. 6, provisional data of the third data D3, which is zero data, is prepared in the first step S21. Thereafter, in the first step S22, data_1_2 is read out as the second data D2. Therefore, the first to nth digits from the least significant side of the temporary data of the third data D3 become data_1_2.

続いて、ステップS23において、1回目のステップS22で読み出された判別ビットDdが0であるため、伸長処理部17は、最終ブロックではないと判断し、第3データD3の仮データをシフトする(ステップS24)。これにより、第3データD3の仮データの最下位側からn+1~2n桁目がdata_1_2となり、最下位側から1~n桁目が0となる。 Subsequently, in step S23, since the determination bit Dd read in the first step S22 is 0, the decompression processing unit 17 determines that it is not the final block, and shifts the temporary data of the third data D3. (Step S24). As a result, the n+1 to 2n digits from the least significant side of the temporary data of the third data D3 become data_1_2, and the 1st to nth digits from the least significant side become 0.

そして、2回目のステップS22で、第2データD2としてdata_1_1が読み出される。このため、第3データD3の仮データの最下位側からn+1~2n桁目がdata_1_2、最下位側から1~n桁目がdata_1_1となる。 Then, in the second step S22, data_1_1 is read out as the second data D2. Therefore, the n+1 to 2n digits from the least significant side of the temporary data of the third data D3 become data_1_2, and the 1st to nth digits from the least significant side become data_1_1.

続いて、ステップS23において、2回目のステップS22で読み出された判別ビットDdが1であるため、伸長処理部17は、最終ブロックであると判断し、現状の第3データD3を最終データとして出力する(ステップS25)。これにより、1番目(k=1)の第1データD1を復元した第3データD3が出力される。 Subsequently, in step S23, since the determination bit Dd read in the second step S22 is 1, the decompression processing unit 17 determines that it is the final block, and sets the current third data D3 as the final data. Output (step S25). As a result, third data D3 obtained by restoring the first (k=1) first data D1 is output.

第3データD3の出力後、2回目のステップS21でゼロデータである第3データD3の仮データが準備される。その後、3回目のステップS22で、第2データD2としてdata_2_3が読み出される。このため、第3データD3の仮データの最下位側から1~n桁目がdata_2_3となる。 After outputting the third data D3, temporary data of the third data D3, which is zero data, is prepared in a second step S21. Thereafter, in the third step S22, data_2_3 is read out as the second data D2. Therefore, the first to nth digits from the least significant side of the temporary data of the third data D3 become data_2_3.

続いて、ステップS23において、3回目のステップS22で読み出された判別ビットDdが0であるため、伸長処理部17は、最終ブロックではないと判断し、第3データD3の仮データをシフトする(ステップS24)。これにより、第3データD3の仮データの最下位側からn+1~2n桁目がdata_2_3となり、最下位側から1~n桁目が0となる。 Subsequently, in step S23, since the determination bit Dd read in the third step S22 is 0, the decompression processing unit 17 determines that it is not the final block, and shifts the temporary data of the third data D3. (Step S24). As a result, the n+1 to 2n digits from the least significant side of the temporary data of the third data D3 become data_2_3, and the 1st to nth digits from the least significant side become 0.

その後、4回目のステップS22で、第2データD2としてdata_2_2が読み出される。このため、第3データD3の仮データの最下位側からn+1~2n桁目がdata_2_3、最下位側から1~n桁目がdata_2_2となる。 Thereafter, in the fourth step S22, data_2_2 is read out as the second data D2. Therefore, the n+1 to 2n digits from the least significant side of the temporary data of the third data D3 become data_2_3, and the 1st to nth digits from the least significant side become data_2_2.

続いて、ステップS23において、4回目のステップS22で読み出された判別ビットDdが0であるため、伸長処理部17は、最終ブロックではないと判断し、第3データD3の仮データをシフトする(ステップS24)。これにより、第3データD3の仮データの最下位側から2n+1~3n桁目がdata_2_3となり、最下位側からn+1~2n桁目がdata_2_2となり、最下位側から1~n桁目が0となる。 Subsequently, in step S23, since the determination bit Dd read out in step S22 for the fourth time is 0, the decompression processing unit 17 determines that it is not the final block, and shifts the temporary data of the third data D3. (Step S24). As a result, the 2n+1 to 3n digits from the least significant side of the temporary data of the third data D3 become data_2_3, the n+1 to 2n digits from the least significant side become data_2_2, and the 1st to nth digits from the least significant side become 0. .

その後、5回目のステップS22で、第2データD2としてdata_2_1が読み出される。このため、第3データD3の仮データの最下位側から2n+1~3n桁目がdata_2_3、最下位側からn+1~2n桁目がdata_2_2、最下位側から1~n桁目がdata_2_1となる。 Thereafter, in the fifth step S22, data_2_1 is read out as the second data D2. Therefore, the 2n+1 to 3n digits from the least significant side of the temporary data of the third data D3 become data_2_3, the n+1 to 2n digits from the least significant side become data_2_2, and the 1st to nth digits from the least significant side become data_2_1.

続いて、ステップS23において、5回目のステップS22で読み出された判別ビットDdが1であるため、伸長処理部17は、最終ブロックであると判断し、現状の第3データD3を最終データとして出力する(ステップS25)。これにより、2番目(k=2)の第1データD1を復元した第3データD3が出力される。 Subsequently, in step S23, since the determination bit Dd read out in step S22 for the fifth time is 1, the decompression processing unit 17 determines that it is the final block and sets the current third data D3 as the final data. Output (step S25). As a result, third data D3 obtained by restoring the second (k=2) first data D1 is output.

<2.第2実施形態>
<2-1.データ処理装置の構成>
図7は、本発明の第2実施形態に係るデータ処理装置1Aの構成を示した図である。データ処理装置1Aは、センサ90から入力される時系列のセンシングデータDiを圧縮データとして格納処理部15Aに格納する。
<2. Second embodiment>
<2-1. Configuration of data processing device>
FIG. 7 is a diagram showing the configuration of a data processing device 1A according to the second embodiment of the present invention. The data processing device 1A stores the time-series sensing data Di input from the sensor 90 as compressed data in the storage processing unit 15A.

図7に示すように、本実施形態のデータ処理装置1Aは、受信部11Aと、差分算出処理部12Aと、分割処理部13Aと、格納処理部15Aと、伸長処理部17Aと、加算処理部18Aと、送信部19Aと、記憶部20Aとを有する。なお、以下では、第1実施形態と同様の事項については、説明を省略する。 As shown in FIG. 7, the data processing device 1A of this embodiment includes a receiving section 11A, a difference calculation processing section 12A, a division processing section 13A, a storage processing section 15A, an expansion processing section 17A, and an addition processing section. 18A, a transmitting section 19A, and a storage section 20A. Note that, below, descriptions of the same matters as in the first embodiment will be omitted.

受信部11Aは、センサ90から入力されたセンシングデータDiを定期的に受信し、m×nビット長のデジタルデータに変換し、時系列データである当該デジタルデータを元データD0とする。そして、受信部11Aは、元データD0を差分算出処理部12Aへと引き渡す。 The receiving unit 11A periodically receives sensing data Di input from the sensor 90, converts it into digital data of m×n bit length, and sets the digital data, which is time series data, as original data D0. The receiving unit 11A then delivers the original data D0 to the difference calculation processing unit 12A.

差分算出処理部12Aは、最新の元データD0と、1つ前の時刻の元データD0との差分を算出し、当該差分の絶対値を示す第1データD1と、当該差分の正負を示す符号ビットDsとを生成する。具体的には、第1データD1は、最新の元データD0から、1つ前の時刻の元データD0を差し引いたものである。そして、差分算出処理部12Aは、第1データD1および符号ビットDsを、分割処理部13Aへと引き渡す。 The difference calculation processing unit 12A calculates the difference between the latest original data D0 and the original data D0 at the previous time, and generates first data D1 indicating the absolute value of the difference and a sign indicating the sign of the difference. A bit Ds is generated. Specifically, the first data D1 is obtained by subtracting the original data D0 at the previous time from the latest original data D0. The difference calculation processing section 12A then delivers the first data D1 and the sign bit Ds to the division processing section 13A.

第1データD1のビット長は、元データD0のビット長と同じm*nビット長である。符号ビットDsは、算出した差分の正負を示すデータである。本実施形態では、算出した差分が正の数の場合、符号ビットDsは0であり、算出した差分が負の数の場合、符号ビットDsは1である。 The bit length of the first data D1 is m*n bits, which is the same as the bit length of the original data D0. The sign bit Ds is data indicating whether the calculated difference is positive or negative. In this embodiment, when the calculated difference is a positive number, the sign bit Ds is 0, and when the calculated difference is a negative number, the sign bit Ds is 1.

なお、差分算出処理部12Aに初めて(1回目に)元データD0が入力された場合には、第1データD1を、元データD0と同じ数値とするとともに、符号ビットDsを「正」を示す値(本実施形態では0)とする。 Note that when the original data D0 is input to the difference calculation processing unit 12A for the first time (first time), the first data D1 is set to the same numerical value as the original data D0, and the sign bit Ds is set to indicate "positive". value (0 in this embodiment).

分割処理部13Aは、第1データD1をm個のnビット長の複数の分割ブロックDvに分割する。ここで、複数の分割ブロックDvはそれぞれ、第1データD1の最下位ビットから順に、nビット毎に第1分割ブロックDv.1、第2分割ブロックDv.2、…、第m分割ブロックDv.mと称する。 The division processing unit 13A divides the first data D1 into a plurality of m division blocks Dv each having a length of n bits. Here, each of the plurality of divided blocks Dv is a first divided block Dv. 1. Second divided block Dv. 2,..., m-th divided block Dv. It is called m.

分割処理部13Aは、m個の分割ブロックDv.1~Dv.mのうちいずれのデータが、記憶部20Aに格納すべき有効ブロックであるか、格納しない非有効ブロックであるかを判別する。そして、分割処理部13Aは、1つの第1データD1に対して、mビット長のイネーブルビットを含むイネーブル信号Deを1つ生成する。分割処理部13Aは、各分割ブロックDv.1~Dv.mと、イネーブル信号Deと、差分算出処理部12Aの生成した符号ビットDsとを、格納処理部15Aに引き渡す。 The division processing unit 13A divides m division blocks Dv. 1~Dv. It is determined which data among m is a valid block that should be stored in the storage unit 20A or an ineffective block that should not be stored. Then, the division processing unit 13A generates one enable signal De including an m-bit length enable bit for one piece of first data D1. The division processing unit 13A processes each division block Dv. 1~Dv. m, the enable signal De, and the sign bit Ds generated by the difference calculation processing section 12A are delivered to the storage processing section 15A.

具体的には、分割処理部13Aは、第1実施形態の分割処理部13と同様に、最上位の分割ブロックDv.mから順に、連続して数値がゼロとなる分割ブロックDvを非有効ブロックであると判断する。また、数値が非ゼロとなる最上位の分割ブロックDvと、当該分割ブロックDvよりも下位の分割ブロックDvとを、有効ブロックとする。また、分割処理部13Aは、第1データD1の数値がゼロである場合、すなわち、m個全ての分割ブロックDv.1~Dv.mの数値がゼロである場合、第1分割ブロックDv.1のみを有効ブロックとする。 Specifically, like the division processing unit 13 of the first embodiment, the division processing unit 13A divides the uppermost division block Dv. Starting from m, divided blocks Dv whose numerical values become zero consecutively are determined to be ineffective blocks. Further, the uppermost divided block Dv whose numerical value is non-zero and the lower divided blocks Dv than the divided block Dv are defined as valid blocks. In addition, when the numerical value of the first data D1 is zero, the division processing unit 13A performs a process in which all m division blocks Dv. 1~Dv. If the value of m is zero, the first divided block Dv. Only 1 is considered a valid block.

イネーブル信号Deのイネーブルビットの各桁は、分割ブロックDv.1~Dv.mのそれぞれが有効ブロックであるか否かを示す。本実施形態では、イネーブル信号Deのイネーブルビット各桁は、対応する分割ブロックDv.1~Dv.mが有効ブロックである場合には1、非有効ブロックである場合には0の値を有する。 Each digit of the enable bit of the enable signal De corresponds to the divided block Dv. 1~Dv. Indicates whether each of m is a valid block. In this embodiment, each enable bit digit of the enable signal De corresponds to the corresponding divided block Dv. 1~Dv. It has a value of 1 if m is a valid block, and 0 if it is a non-valid block.

格納処理部15Aは、分割ブロックDv.1~Dv.mのうち、有効ブロックを、1ビットの判別ビットDdと、符号ビットDsと、nビット長の第2データD2との組み合わせに変換して、記憶部20Aに格納する。これにより、記憶部20Aには、1ビットの判別ビットDd、1ビットの符号ビットDsおよびnビット長の第2データD2を組み合わせたn+2ビット長のデータ群が複数格納される。 The storage processing unit 15A stores divided blocks Dv. 1~Dv. m, a valid block is converted into a combination of a 1-bit discrimination bit Dd, a sign bit Ds, and an n-bit length of second data D2, and is stored in the storage unit 20A. As a result, the storage unit 20A stores a plurality of n+2 bit long data groups that are a combination of the 1-bit discrimination bit Dd, the 1-bit sign bit Ds, and the n-bit long second data D2.

具体的には、格納処理部15Aは、上位側から順にイネーブル信号Deを参照し、イネーブル信号Deが1である分割ブロックDvに判別ビットDdを付与して、判別ビットDdおよび符号ビットDsとともに第2データD2として格納する。 Specifically, the storage processing unit 15A sequentially refers to the enable signal De from the upper side, adds the discrimination bit Dd to the divided block Dv for which the enable signal De is 1, and adds the discrimination bit Dd and the sign bit Ds to the divided block Dv. 2 data D2.

伸長処理部17Aは、記憶部20Aに記憶された判別ビットDd、符号ビットDsおよび第2データD2を順に読み出すことにより、読み出しデータとして、第1データD1を復元した第3データD3を生成する。伸長処理部17Aにおける伸長処理は、第1実施形態の伸長処理部17Aと同様に行う。そして、伸長処理部17Aは、第3データD3と、記憶部20Aから読み出した符号ビットDsとを、加算処理部18Aへ引き渡す。 The decompression processing unit 17A generates third data D3, which is the restored first data D1, as read data by sequentially reading out the discrimination bit Dd, code bit Ds, and second data D2 stored in the storage unit 20A. The decompression processing in the decompression processing section 17A is performed in the same manner as in the decompression processing section 17A of the first embodiment. The expansion processing section 17A then delivers the third data D3 and the code bit Ds read from the storage section 20A to the addition processing section 18A.

加算処理部18Aは、伸長処理部17Aから引き渡された第3データD3を、符号ビットDsを参照し、1つ前の時刻の第4データD4と加算または減算し、新たな第4データD4を算出する。第4データD4は、最終出力データである。具体的には、第3データD3とともに引き渡された符号ビットDsが「正」を示す数値である場合には、第3データD3と、1つ前の時刻の第4データD4とを加算して、新たな第4データD4とする。一方、第3データD3とともに引き渡された符号ビットDsが「負」を示す数値である場合には、1つ前の時刻の第4データD4から、第3データD3を減算して、新たな第4データD4とする。 The addition processing section 18A refers to the sign bit Ds, adds or subtracts the third data D3 delivered from the decompression processing section 17A to the fourth data D4 at the previous time, and generates new fourth data D4. calculate. The fourth data D4 is the final output data. Specifically, when the sign bit Ds delivered together with the third data D3 is a numerical value indicating "positive", the third data D3 and the fourth data D4 of the previous time are added. , new fourth data D4. On the other hand, if the sign bit Ds delivered together with the third data D3 is a numerical value indicating "negative", the third data D3 is subtracted from the fourth data D4 of the previous time, and a new 4 data D4.

送信部19Aは、データ処理装置1Aの外部へ、出力データDoを出力する。出力データDoは、第4データD4そのものであってもよいし、第4データD4を所望のデータ形式へ変換したものであってもよい。 The transmitter 19A outputs the output data Do to the outside of the data processing device 1A. The output data Do may be the fourth data D4 itself, or may be the fourth data D4 converted into a desired data format.

<2-2.データ圧縮処理の流れ>
次に、第2実施形態に係るデータ処理装置1Aにおけるデータ圧縮処理について、図8~図9を参照しつつ説明する。図8は、第2実施形態のデータ圧縮処理の流れを示したフローチャートである。図9は、第1実施形態のデータ圧縮処理の各段階におけるデータの一例を示した図である。なお、図9の例では、m=4としている。
<2-2. Flow of data compression process>
Next, data compression processing in the data processing device 1A according to the second embodiment will be explained with reference to FIGS. 8 and 9. FIG. 8 is a flowchart showing the flow of data compression processing according to the second embodiment. FIG. 9 is a diagram showing an example of data at each stage of the data compression process according to the first embodiment. Note that in the example of FIG. 9, m=4.

このデータ圧縮処理では、データ処理装置1Aは、m*nビット長の第1データD1を、複数組の判別ビットDd(1ビット長)、符号ビットDs(1ビット長)および第2データD2(nビット長)のデータ群とに変換して、記憶部20Aに格納する。 In this data compression process, the data processing device 1A converts m*n bit length first data D1 into multiple sets of discrimination bit Dd (1 bit length), sign bit Ds (1 bit length), and second data D2 ( n bits long) and stored in the storage unit 20A.

図8に示すように、センシングデータDiの圧縮処理では、まず、受信部11Aが、センシングデータDiを受信する(ステップS31)。そして、受信部11Aは、センシングデータDiをm*nビット長の元データD0へと変換し、差分算出処理部12Aへと引き渡す(ステップS32)。 As shown in FIG. 8, in the compression process of the sensing data Di, first, the receiving unit 11A receives the sensing data Di (step S31). Then, the receiving unit 11A converts the sensing data Di into original data D0 of m*n bit length and delivers it to the difference calculation processing unit 12A (step S32).

図9の例には、4×nビット長の元データD0および第1データD1と、nビット長の4つの分割ブロックDv.1,Dv.2,Dv.3,Dv.4と、1ビット長の符号ビットDsと、4ビット長のイネーブル信号Deとが示されている。また、図3の例には、記憶部20に記憶される格納データとして、判別ビットDd、符号ビットDsおよび第2データD2との組み合わせが複数示されている。 In the example of FIG. 9, original data D0 and first data D1 each having a length of 4×n bits, and four divided blocks Dv. 1, Dv. 2, Dv. 3, Dv. 4, a 1-bit long code bit Ds, and a 4-bit long enable signal De. Furthermore, in the example of FIG. 3, a plurality of combinations of the discrimination bit Dd, the sign bit Ds, and the second data D2 are shown as the stored data stored in the storage unit 20.

なお、図9中、これらの各データの数値を、data0_k_zや、data_k_zの形式で示している。ここで、kは、複数の元データD0または第1データD1の順番を示す値であり、zは、元データD0または第1データD1をnビット毎に分割した分割ブロックDvにおいて下位側から何番目の分割ブロックDvの数値であるかを示すものである。 Note that in FIG. 9, the numerical values of each of these data are shown in the format of data0_k_z and data_k_z. Here, k is a value indicating the order of the plurality of original data D0 or first data D1, and z is a value indicating the order of the plurality of original data D0 or first data D1, and z is a value indicating the order of the plurality of original data D0 or first data D1 from the lower order in the divided block Dv obtained by dividing the original data D0 or first data D1 into every n bits. This indicates whether it is the numerical value of the th divided block Dv.

ステップS32に続いて、差分算出処理部12Aは、ステップS33の差分算出工程を行う。差分算出処理部12Aは、1回目のステップS33では、1つ前の時刻の元データD0が存在しないため、第1データD1の数値を元データD0の数値と同じとし、符号ビットDsを「正」を示す0とする。 Following step S32, the difference calculation processing unit 12A performs a difference calculation process of step S33. In the first step S33, the difference calculation processing unit 12A sets the numerical value of the first data D1 to be the same as the numerical value of the original data D0, and sets the sign bit Ds to "positive" because the original data D0 of the previous time does not exist. ” is set to 0.

また、差分算出処理部12Aは、2回目以降のk回目のステップS33では、現在時刻(k回目)における元データD0と、1つ前の時刻(k-1回目)における元データD0との差分を算出する。具体的には、現在時刻(k回目)における元データD0から、1つ前の時刻(k-1回目)における元データD0を差し引いて差分を算出する。そして、算出した当該差分の絶対値を第1データD1の数値とし、当該差分の正負に基づいて符号ビットDsを生成する(ステップS33)。このとき、本実施形態では、差分が正の値である場合には符号ビットDsを0とし、差分が負の値である場合には符号ビットDsを1とする。その後、差分算出処理部12Aは、分割処理部13Aに、第1データD1と符号ビットDsとを引き渡す。 In addition, in the second and subsequent k-th steps S33, the difference calculation processing unit 12A calculates the difference between the original data D0 at the current time (k-th time) and the original data D0 at the previous time (k-1st time). Calculate. Specifically, the difference is calculated by subtracting the original data D0 at the previous time (k-1st time) from the original data D0 at the current time (kth time). Then, the absolute value of the calculated difference is set as the numerical value of the first data D1, and a sign bit Ds is generated based on the sign of the difference (step S33). At this time, in this embodiment, the sign bit Ds is set to 0 when the difference is a positive value, and the sign bit Ds is set to 1 when the difference is a negative value. Thereafter, the difference calculation processing section 12A delivers the first data D1 and the sign bit Ds to the division processing section 13A.

なお、図9において、現在時刻(k回目)の元データD0の最下位側から1~n番目のnビットの数値をdata0_k_1、最下位側からn+1~2n番目のnビットの数値をdata0_k_2、最下位側から2n+1~3n番目のnビットの数値をdata0_k_3、最下位側から3n+1~n番目のnビットの数値をdata0_k_4としている。 In addition, in FIG. 9, the numerical value of the 1st to nth n bits from the least significant side of the original data D0 at the current time (kth time) is data0_k_1, the numerical value of the n+1 to 2nth n bits from the least significant side is designated as data0_k_2, and the most significant value is The numerical value of the 2n+1 to 3nth n bits from the least significant side is data0_k_3, and the numerical value of the 3n+1 to nth n bits from the least significant side is data0_k_4.

同様に、図9において、1つ前の時刻(k-1回目)の元データD0の最下位側から1~n番目のnビットの数値をdata0_k-1_1、最下位側からn+1~2n番目のnビットの数値をdata0_k-1_2、最下位側から2n+1~3n番目のnビットの数値をdata0_k-1_3、最下位側から3n+1~n番目のnビットの数値をdata0_k-1_4としている。 Similarly, in FIG. 9, the 1st to nth n bits from the least significant side of the original data D0 at the previous time (k-1st time) are data0_k-1_1, and the n+1 to 2nth values from the least significant side are The n-bit value is data0_k-1_2, the 2n+1 to 3n-th n-bit value from the least significant side is data0_k-1_3, and the 3n+1 to n-th n-bit value from the least significant side is data0_k-1_4.

図9において、k回目のステップS33で算出した第1データD1の最下位側から1~n番目のnビットの数値をdata_k_1、最下位側からn+1~2n番目のnビットの数値をdata_k_2、最下位側から2n+1~3n番目のnビットの数値をdata_k_3、最下位側から3n+1~n番目のnビットの数値をdata_k_4としている。また、図9において、k回目のステップS33で生成した符号ビットDsの数値をpnsign_kとしている。 In FIG. 9, the numerical value of the 1st to nth n bits from the least significant side of the first data D1 calculated in the k-th step S33 is referred to as data_k_1, the numerical value of the n+1 to 2nth n bits from the least significant side is referred to as data_k_2, and the numerical value of the n bits from the least significant side is referred to as data_k_2. The numerical value of the 2n+1 to 3nth n bits from the least significant side is defined as data_k_3, and the numerical value of the 3n+1 to nth n bits from the least significant side is defined as data_k_4. Further, in FIG. 9, the numerical value of the sign bit Ds generated in the k-th step S33 is set as pnsign_k.

次に、分割処理部13Aは、m*nビット長の第1データD1を、m個のnビット長の分割ブロックDv.1~Dv.mに分割する(ステップS34)。 Next, the division processing unit 13A divides the m*n-bit length first data D1 into m n-bit length division blocks Dv. 1~Dv. Divide into m (step S34).

具体的には、第1データD1の最下位側からnビット毎に、第1分割ブロックDv.1、第2分割ブロックDv.2、…、第m分割ブロックDv.mとする。図9の例では、第1分割ブロックDv.1はdata_k_1であり、第2分割ブロックDv.2はdata_k_2であり、第3分割ブロックDv.3はdata_k_3であり、第4分割ブロックDv.4はdata_k_4となる。 Specifically, the first divided block Dv. 1. Second divided block Dv. 2,..., m-th divided block Dv. Let it be m. In the example of FIG. 9, the first divided block Dv. 1 is data_k_1, and second divided block Dv. 2 is data_k_2, and third divided block Dv. 3 is data_k_3, and the fourth divided block Dv. 4 becomes data_k_4.

分割処理部13Aは、続いて、有効ブロックを判別し、各分割ブロックDv.1~Dv.mのうち、どの分割ブロックDvが有効ブロックであるかを示すイネーブル信号Deを生成する(ステップS35)。そして、分割処理部13Aは、分割ブロックDv.1~Dv.mとイネーブル信号Deとを、符号ビットDsとともに格納処理部15Aへと引き渡す。 The division processing unit 13A then determines valid blocks and divides each divided block Dv. 1~Dv. An enable signal De indicating which divided block Dv is a valid block among m is generated (step S35). Then, the division processing unit 13A processes the division block Dv. 1~Dv. m and the enable signal De are delivered to the storage processing section 15A together with the sign bit Ds.

図9の例では、分割ブロックDvの数が4個であるため、イネーブル信号Deに含まれるイネーブルビットは4ビット長である。すなわち、イネーブル信号Deはビット長の全てがイネーブルビットである。また、図3の例では、4ビット長のイネーブルビットの各桁の数値は、enable_k_1,enable_k_2,enable_k_3,enable_k_4で示されている。enable_k_1,enable_k_2,enable_k_3,enable_k_4はそれぞれ、対応する分割ブロックDv.1~Dv.4が有効ブロックである場合は1、対応する分割ブロックDv.1~Dv.4が非有効ブロックである場合は0である。 In the example of FIG. 9, the number of divided blocks Dv is four, so the enable bit included in the enable signal De has a length of four bits. That is, the entire bit length of the enable signal De is an enable bit. Further, in the example of FIG. 3, the numerical values of each digit of the 4-bit long enable bit are indicated as enable_k_1, enable_k_2, enable_k_3, and enable_k_4. enable_k_1, enable_k_2, enable_k_3, enable_k_4 are the corresponding divided blocks Dv. 1~Dv. 4 is a valid block, 1, the corresponding divided block Dv. 1~Dv. If 4 is an invalid block, it is 0.

その後、格納処理部15Aは、分割ブロックDv.1~Dv.mとイネーブル信号Deとに基づいて、判別ビットDdを生成し、判別ビットDd、符号ビットDsおよび第2データD2を記憶部20に格納する(ステップS36)。 After that, the storage processing unit 15A stores the divided block Dv. 1~Dv. A discrimination bit Dd is generated based on m and the enable signal De, and the discrimination bit Dd, sign bit Ds, and second data D2 are stored in the storage unit 20 (step S36).

具体的には、格納処理部15は、イネーブル信号Deのイネーブルビットを参照して、分割ブロックDv.1~Dv.mのうち、有効ブロックのみを第2データD2として記憶部20に格納する。このとき、1つの第1データD1に対応する第2データD2の数が有効ブロックの数によって異なるため、第1データD1毎の区切りを判別するために、各第2データD2に対して判別ビットDdを付与する。そして、判別ビットDdと、符号ビットDsとともに、第2データD2が記憶部20に格納される。すなわち、記憶部20には、1ビット長の判別ビットDdと、1ビット長の符号ビットDsと、nビット長の第2データD2とが1組のデータ群として格納される。 Specifically, the storage processing unit 15 refers to the enable bit of the enable signal De and stores the divided blocks Dv. 1~Dv. Among m, only valid blocks are stored in the storage unit 20 as second data D2. At this time, since the number of second data D2 corresponding to one first data D1 differs depending on the number of valid blocks, in order to determine the break for each first data D1, a determination bit is set for each second data D2. Give Dd. Then, the second data D2 is stored in the storage unit 20 together with the discrimination bit Dd and the sign bit Ds. That is, the storage unit 20 stores a 1-bit long discrimination bit Dd, a 1-bit long code bit Ds, and an n-bit long second data D2 as a data group.

図9の例では、1番目(k=1)の第1データD1の有効ブロックが第1分割ブロックDv.1(数値がdata_1_1)と第2分割ブロックDv.2(数値がdata_1_2)と第3分割ブロックDv.3(数値がdata_1_3)の3つであり、2番目(k=2)の第1データD1の有効ブロックが第1分割ブロックDv.1(数値がdata_2_1)と第2分割ブロックDv.2(数値がdata_2_2)の2つであり、2番目(k=2)の符号ビットDsが「負」を示す1である場合の格納データの例が示されている。 In the example of FIG. 9, the first (k=1) effective block of the first data D1 is the first divided block Dv. 1 (the numerical value is data_1_1) and the second divided block Dv. 2 (the numerical value is data_1_2) and the third divided block Dv. 3 (the numerical value is data_1_3), and the second (k=2) effective block of the first data D1 is the first divided block Dv. 1 (the numerical value is data_2_1) and the second divided block Dv. 2 (the numerical value is data_2_2), and the second (k=2) sign bit Ds is 1 indicating "negative".

この例では、各段に、判別ビットDdと、符号ビットDsと、第2データD2とが1組のデータ群として格納されている。1番目の第2データD2は、1番目(k=1)の第1データD1の第3分割ブロックDv.3(数値がdata_1_3)である。2番目の第2データD2は、1番目(k=1)の第1データD1の第2分割ブロックDv.2(数値がdata_1_2)である。3番目の第2データD2は、1番目(k=1)の第1データD1の第1分割ブロックDv.1(数値がdata_1_1)となる。 In this example, a discrimination bit Dd, a sign bit Ds, and second data D2 are stored as a data group in each stage. The first second data D2 is the third divided block Dv. of the first (k=1) first data D1. 3 (the numerical value is data_1_3). The second second data D2 is the second divided block Dv. of the first (k=1) first data D1. 2 (the numerical value is data_1_2). The third second data D2 is the first divided block Dv. of the first (k=1) first data D1. 1 (the numerical value is data_1_1).

4番目の第2データD2は、2番目(k=2)の第1データD1の第2分割ブロックDv.2(数値がdata_2_2)となる。5番目の第2データD2は、2番目(k=2)の第1データD1の第1分割ブロックDv.1(数値がdata_2_1)となる。 The fourth second data D2 is the second divided block Dv. of the second (k=2) first data D1. 2 (the numerical value is data_2_2). The fifth second data D2 is the first divided block Dv. of the second (k=2) first data D1. 1 (the numerical value is data_2_1).

そして、判別ビットDdは、1番目(k=1)の第1データD1に対応する3つの第2データD2について、順に、0,0,1となっており、2番目(k=2)の第1データD1に対応する2つの第2データD2について、順に、0,1となっている。すなわち、各第1データD1に対して、最後に格納する第2データD2の判別ビットDdが1、それ以外の第2データD2の判別ビットDdが0となっている。 The determination bit Dd is 0, 0, 1 in order for the three second data D2 corresponding to the first (k=1) first data D1, and is 0, 0, 1 for the second (k=2) first data D1. The two second data D2 corresponding to the first data D1 are 0 and 1 in that order. That is, for each first data D1, the determination bit Dd of the second data D2 stored last is 1, and the determination bit Dd of the other second data D2 is 0.

また、符号ビットDsは、1番目(k=1)の第1データD1に対応する3つの第2データD2については、初めての第1データD1であるため、いずれも「正」を示す0となっている。また、2番目(k=2)の第1データD1に対応する2つの第2データD2に対応する符号ビットDsは、いずれも「負」を示す1となっている。このように、同じ第1データD1に対応する符号ビットDsは、同じ数値となる。 Moreover, the sign bit Ds is 0 indicating "positive" for the three second data D2 corresponding to the first (k=1) first data D1, since this is the first first data D1. It has become. Further, the sign bits Ds corresponding to the two second data D2 corresponding to the second (k=2) first data D1 are both 1 indicating "negative". In this way, the code bits Ds corresponding to the same first data D1 have the same numerical value.

1つのセンシングデータDiに対して、ステップS31~S36が完了すると、データ処理装置1Aは、センサ90におけるセンシングが終了したか否かを判断する(ステップS37)。センシングが終了していないと判断すると(ステップS37:No)、データ処理装置1Aは、ステップS31へ戻り、次のセンシングデータDiに対して、ステップS31~S36を行う。一方、センシングが終了したと判断すると(ステップS37:Yes)、データ処理装置1Aは、データ圧縮処理を終了する。 When steps S31 to S36 are completed for one piece of sensing data Di, the data processing device 1A determines whether sensing by the sensor 90 has ended (step S37). If it is determined that sensing has not been completed (step S37: No), the data processing device 1A returns to step S31 and performs steps S31 to S36 on the next sensing data Di. On the other hand, if it is determined that the sensing has ended (step S37: Yes), the data processing device 1A ends the data compression process.

図10および図11は、第2実施形態のデータ圧縮処理の各段階におけるデータ(元データD0、第1データD1、分割データDv.1~Dv.4、符号ビットDs、イネーブル信号De、判別ビットDdおよび第2データD2)の具体例を示した図である。図10および図11の例では、元データD0が16ビットであり、m=4、n=4としている。 10 and 11 show data at each stage of the data compression process of the second embodiment (original data D0, first data D1, divided data Dv.1 to Dv.4, sign bit Ds, enable signal De, discrimination bit FIG. 4 is a diagram showing a specific example of Dd and second data D2). In the examples of FIGS. 10 and 11, the original data D0 is 16 bits, m=4, and n=4.

図10の例では、元データD0が、1番目(k=1)から4番目(k=4)まで順に、
k=1:534a(16進法)/0101001101001010(2進法)
k=2:5323(16進法)/0101001100100011(2進法)
k=3:532c(16進法)/0101001100101100(2進法)
k=4:5315(16進法)/0101001100010101(2進法)
となっている。
In the example of FIG. 10, the original data D0 is sequentially from the first (k=1) to the fourth (k=4).
k=1:534a (hexadecimal)/0101001101001010 (binary)
k=2:5323 (hexadecimal)/0101001100100011 (binary)
k=3:532c (hexadecimal)/0101001100101100 (binary)
k=4:5315 (hexadecimal)/0101001100010101 (binary)
It becomes.

そして、第1データD1は、1番目(k=1)から4番目(k=4)まで順に、
k=1:534a(16進法)/0101001101001010(2進法)
k=2:0027(16進法)/0000000000100111(2進法)
k=3:0009(16進法)/0000000000001001(2進法)
k=4:0017(16進法)/0000000000010111(2進法)
符号ビットDsは、1番目(k=1)から4番目(k=4)まで順に、
k=1:0
k=2:1
k=3:0
k=4:1
となっている。
The first data D1 is sequentially from the first (k=1) to the fourth (k=4).
k=1:534a (hexadecimal)/0101001101001010 (binary)
k=2:0027 (hexadecimal)/0000000000100111 (binary)
k=3:0009 (hexadecimal)/0000000000001001 (binary)
k=4:0017 (hexadecimal)/0000000000010111 (binary)
The code bits Ds are sequentially from the first (k=1) to the fourth (k=4):
k=1:0
k=2:1
k=3:0
k=4:1
It becomes.

k=1において、第1データD1は、元データD0と同じ数値であり、符号ビットDsは「正」を示す0となっている。k=2の第1データD1は、k=2の元データD0からk=1の元データD0を減算した結果の絶対値である。また、k=2の元データD0の数値がk=1の元データD0の数値よりも小さいため、符号ビットDsは「負」を示す1となっている。k=3の第1データD1は、k=3の元データD0からk=2の元データD0を減算した結果の絶対値である。また、k=3の元データD0の数値がk=2の元データD0の数値よりも大きいため、符号ビットDsは「正」を示す0となっている。k=4の第1データD1は、k=4の元データD0からk=3の元データD0を減算した結果の絶対値である。また、k=4の元データD0の数値がk=3の元データD0の数値よりも小さいため、符号ビットDsは「負」を示す1となっている。 When k=1, the first data D1 has the same numerical value as the original data D0, and the sign bit Ds is 0 indicating "positive". The first data D1 with k=2 is the absolute value of the result of subtracting the original data D0 with k=1 from the original data D0 with k=2. Further, since the numerical value of the original data D0 with k=2 is smaller than the numerical value of the original data D0 with k=1, the sign bit Ds is 1 indicating "negative". The first data D1 with k=3 is the absolute value of the result of subtracting the original data D0 with k=2 from the original data D0 with k=3. Further, since the numerical value of the original data D0 with k=3 is larger than the numerical value of the original data D0 with k=2, the sign bit Ds is 0 indicating "positive". The first data D1 with k=4 is the absolute value of the result of subtracting the original data D0 with k=3 from the original data D0 with k=4. Further, since the numerical value of the original data D0 with k=4 is smaller than the numerical value of the original data D0 with k=3, the sign bit Ds is 1 indicating "negative".

図10の例では、1番目(k=1)の分割ブロックDv.4,Dv.3,Dv.2,Dv,1はいずれも非ゼロである。このため、全ての分割ブロックDv.1~4が有効ブロックとなる。したがって、1番目(k=1)のイネーブル信号Deは、4桁全てが1となる。 In the example of FIG. 10, the first (k=1) divided block Dv. 4, Dv. 3, Dv. 2, Dv, and 1 are all non-zero. Therefore, all divided blocks Dv. 1 to 4 are valid blocks. Therefore, all four digits of the first (k=1) enable signal De are 1.

2番目(k=2)の分割ブロックDv.4,Dv.3,Dv.2,Dv,1は上位側から、第4分割ブロックDv.4および第3分割ブロックDv.3の数値が0であるため非有効ブロックとなる。また、第2分割ブロックDv.2は数値が非ゼロであるため、第2分割ブロックDv.2および第1分割ブロックDv.1が有効ブロックとなる。したがって、2番目(k=2)のイネーブル信号Deは、下位側から4桁目および3桁目が0、下位側から2桁目および1桁目が1となる。 The second (k=2) divided block Dv. 4, Dv. 3, Dv. 2, Dv, 1 is the fourth divided block Dv. 4 and third divided block Dv. Since the value of 3 is 0, it is an invalid block. Further, the second divided block Dv. Since the numerical value of 2 is non-zero, the second divided block Dv. 2 and the first divided block Dv. 1 is a valid block. Therefore, in the second (k=2) enable signal De, the fourth and third digits from the least significant side are 0, and the second and first digits from the least significant side are 1.

3番目(k=3)の分割ブロックDv.4,Dv.3,Dv.2,Dv,1は上位側から順に、第4分割ブロックDv.4、第3分割ブロックDv.3および第2分割ブロックDv.2の数値が0であるため、最も下位側の第1分割ブロックDv.1のみが有効ブロックとなり、その他の分割ブロックDv.4~Dv.2は非有効ブロックとなる。したがって、3番目(k=3)のイネーブル信号Deは、下位側から4桁目、3桁目および2桁目が0、下位側から1桁目が1となる。 The third (k=3) divided block Dv. 4, Dv. 3, Dv. 2, Dv, 1 are the fourth divided blocks Dv. 4. Third divided block Dv. 3 and the second divided block Dv. 2 is 0, the lowest first divided block Dv. Only Dv.1 is a valid block, and the other divided blocks Dv. 4~Dv. 2 is an invalid block. Therefore, in the third (k=3) enable signal De, the fourth, third, and second digits from the lower order side are 0, and the first digit from the lower order side is 1.

4番目(k=4)の分割ブロックDv.4,Dv.3,Dv.2,Dv,1は上位側から、第4分割ブロックDv.4および第3分割ブロックDv.3の数値が0であるため非有効ブロックとなる。また、第2分割ブロックDv.2は数値が非ゼロであるため、第2分割ブロックDv.2および第1分割ブロックDv.1が有効ブロックとなる。したがって、4番目(k=4)のイネーブル信号Deは、下位側から4桁目および3桁目が0、下位側から2桁目および1桁目が1となる。 Fourth (k=4) divided block Dv. 4, Dv. 3, Dv. 2, Dv, 1 is the fourth divided block Dv. 4 and third divided block Dv. Since the value of 3 is 0, it is an invalid block. Further, the second divided block Dv. Since the numerical value of 2 is non-zero, the second divided block Dv. 2 and the first divided block Dv. 1 is a valid block. Therefore, in the fourth (k=4) enable signal De, the fourth and third digits from the least significant side are 0, and the second and first digits from the least significant side are 1.

このような分割ブロックDv.4,Dv.3,Dv.2,Dv,1、イネーブル信号Deおよび符号ビットDsが入力された場合、格納処理部15は、記憶部20に、1ビットの判別ビットDd、1ビットの符号ビットDsおよび4ビットの第2データD2のデータ群を、1番目(k=1)の第1データD1について4組、2番目(k=2)の第1データD1について2組、3番目(k=3)の第1データD1について1組、4番目(k=4)の第1データD1について2組格納する。すなわち、この場合、4つの第1データD1に対して9組の判別ビットDdおよび第2データD2が記憶部20に格納される。 Such a divided block Dv. 4, Dv. 3, Dv. 2, Dv, 1, when the enable signal De and the sign bit Ds are input, the storage processing unit 15 stores the 1-bit discrimination bit Dd, the 1-bit sign bit Ds, and the 4-bit second data in the storage unit 20. The data group of D2 is divided into four sets for the first (k=1) first data D1, two sets for the second (k=2) first data D1, and three sets for the third (k=3) first data D1. One set is stored for the first data D1, and two sets are stored for the fourth (k=4) first data D1. That is, in this case, nine sets of discrimination bits Dd and second data D2 are stored in the storage unit 20 for four pieces of first data D1.

データ圧縮処理を行わずに4つの第1データD1をそのまま格納する場合には、16ビット×4つで64ビット分のデータが記憶部20に格納される。これに対し、本実施形態のデータ圧縮処理を行った場合、図4の例では、6ビット×9組で54ビット分のデータが記憶部20に格納される。すなわち、記憶部20に格納すべきデータ量を圧縮することができる。 When storing the four pieces of first data D1 as they are without performing data compression processing, data for 64 bits (16 bits x 4) is stored in the storage unit 20. On the other hand, when the data compression process of this embodiment is performed, in the example of FIG. 4, 54 bits of data are stored in the storage unit 20 in 6 bits x 9 sets. That is, the amount of data to be stored in the storage unit 20 can be compressed.

このように、第2実施形態に係るデータ圧縮処理を用いることにより、格納すべきデータ量を小さくすることができる。特に、入力データが時系列のセンシングデータDiである場合には、連続した時刻において、センシングデータDiが近い数値を有する場合が多い。そのような場合、1つ前の時刻との差分として第1データD1を算出すると、第1データD1の、最上位から連続してゼロとなる桁数が多くなる。すなわち、非有効ブロックの数が多くなる。したがって、記憶部20に格納すべき第2データD2の数を大幅に低減できる。 In this way, by using the data compression process according to the second embodiment, the amount of data to be stored can be reduced. In particular, when the input data is time-series sensing data Di, the sensing data Di often have similar numerical values at consecutive times. In such a case, when the first data D1 is calculated as a difference from the previous time, the number of consecutive zero digits of the first data D1 increases from the highest order. In other words, the number of invalid blocks increases. Therefore, the number of second data D2 to be stored in the storage unit 20 can be significantly reduced.

<2-3.データ伸長処理の流れ>
続いて、第2実施形態に係るデータ処理装置1Aにおけるデータ伸長処理について、図12および図13を参照しつつ説明する。図12は、第2実施形態のデータ伸長処理の流れを示したフローチャートである。図13は、記憶部20Aに格納された格納データの一例と、当該格納データに対応する、第2実施形態のデータ伸長処理の各段階における第3データD3および第4データD4の一例を示した図である。なお、図13の例は、図3の格納データ例に対応しており、m=4としている。
<2-3. Flow of data decompression process>
Next, data decompression processing in the data processing device 1A according to the second embodiment will be described with reference to FIGS. 12 and 13. FIG. 12 is a flowchart showing the flow of data decompression processing in the second embodiment. FIG. 13 shows an example of stored data stored in the storage unit 20A, and examples of third data D3 and fourth data D4 at each stage of the data decompression process of the second embodiment, which correspond to the stored data. It is a diagram. Note that the example in FIG. 13 corresponds to the stored data example in FIG. 3, and m=4.

このデータ伸長処理では、データ処理装置1Aは、記憶部20Aに格納された複数組の判別ビットDd(1ビット長)、符号ビットDs(1ビット長)および第2データD2(nビット長)のデータ群を読み出して、元データD0(m*nビット長)を復元した第4データD4(m*nビット長)を生成する。 In this data decompression process, the data processing device 1A stores multiple sets of discrimination bits Dd (1 bit length), code bits Ds (1 bit length), and second data D2 (n bit length) stored in the storage unit 20A. The data group is read and fourth data D4 (m*n bit length) is generated by restoring the original data D0 (m*n bit length).

図12に示すように、データ伸長処理においては、まず、伸長処理部17Aが、新たなデータ読み出し開始時に、第1データD1と同じビット長(m*nビット長)のゼロデータを第3データD3の仮データとして準備する(ステップS41)。 As shown in FIG. 12, in the data decompression process, the decompression processing unit 17A first transfers zero data having the same bit length (m*n bit length) as the first data D1 to the third data when starting to read new data. It is prepared as temporary data for D3 (step S41).

次に、伸長処理部17Aは、記憶部20Aから、判別ビットDd、符号ビットDsおよび第2データD2のデータ群を1組読み出す(ステップS42)。そして、伸長処理部17Aは、読み出した第2データD2を、第3データD3の仮データの最下位側から1~n桁目に入力する。 Next, the decompression processing unit 17A reads out one data group of the discrimination bit Dd, the sign bit Ds, and the second data D2 from the storage unit 20A (step S42). Then, the decompression processing unit 17A inputs the read second data D2 to the first to nth digits from the least significant side of the temporary data of the third data D3.

続いて、伸長処理部17Aは、ステップS42において読み出した判別ビットDdから、ステップS42で読み出した第2データD2が最終ブロックであるか否かを判別する(ステップS43)。判別ビットDdが0である場合、伸長処理部17Aは、最終ブロックでないと判断し(ステップS43:No)、ステップS44へと進み、第3データD3の仮データの各桁をnビット分上位側へシフトする(ステップS44)。その後、伸長処理部17Aは、ステップS42へと進み、次の判別ビットDd、符号ビットDsおよび第2データD2を読み出す。 Subsequently, the decompression processing unit 17A determines whether the second data D2 read out in step S42 is the final block based on the determination bit Dd read out in step S42 (step S43). If the determination bit Dd is 0, the decompression processing unit 17A determines that it is not the final block (step S43: No), proceeds to step S44, and converts each digit of the temporary data of the third data D3 by n bits to the upper side. (step S44). Thereafter, the decompression processing unit 17A proceeds to step S42 and reads out the next determination bit Dd, sign bit Ds, and second data D2.

一方、判別ビットDdが1である場合、伸長処理部17Aは、最終ブロックであると判断し(ステップS43:Yes)、仮データであった第3データD3を、最終的な第3データD3として、符号ビットDsとともに加算処理部18Aへと引き渡し、ステップS45へと進む。 On the other hand, if the determination bit Dd is 1, the decompression processing unit 17A determines that the block is the final block (step S43: Yes), and uses the third data D3, which was temporary data, as the final third data D3. , and the sign bit Ds are delivered to the addition processing section 18A, and the process proceeds to step S45.

第3データD3および符号ビットDsが引き渡されると、加算処理部18Aは、新たに入力された現在時刻の第3データD3と、1つ前の時刻の第4データD4とを加算する(ステップS45)。 When the third data D3 and the sign bit Ds are delivered, the addition processing unit 18A adds the newly input third data D3 at the current time and the fourth data D4 at the previous time (step S45 ).

加算処理部18Aは、1回目のステップS45では、1つ前の時刻の第4データD4が存在しないため、引き渡された第3データD3の数値を第4データD4の数値とする。 In the first step S45, the addition processing unit 18A sets the numerical value of the delivered third data D3 as the numerical value of the fourth data D4 since the fourth data D4 of the previous time does not exist.

また、加算処理部18Aは、2回目以降のk回目のステップS45では、1つ前の時刻(k-1回目)における第4データD4に、符号ビットDsに基づいて、現在時刻(k回目)における第3データD3を加算または減算する。 Further, in the second and subsequent k-th steps S45, the addition processing unit 18A adds the current time (k-th time) to the fourth data D4 at the previous time (k-1st time) based on the sign bit Ds. The third data D3 in is added or subtracted.

具体的には、現在時刻(k回目)の符号ビットDsが「正」を示す0である場合には、1つ前の時刻(k-1回目)の第4データD4の数値と、現在時刻(k回目)の第3データD3の数値を加算したものを、新たな現在時刻(k回目)の第4データD4とする。 Specifically, when the sign bit Ds of the current time (kth time) is 0 indicating "positive", the numerical value of the fourth data D4 of the previous time (k-1st time) and the current time The value obtained by adding the numerical values of the third data D3 (kth time) is set as the new fourth data D4 of the current time (kth time).

一方、現在時刻(k回目)の符号ビットDsが「負」を示す1である場合には、1つ前の時刻(k-1回目)の第4データD4の数値から、現在時刻(k回目)の第3データD3の数値を減算したものを、新たな現在時刻(k回目)の第4データD4とする。 On the other hand, if the sign bit Ds of the current time (kth time) is 1 indicating "negative", the current time (kth time) is calculated from the value of the fourth data D4 of the previous time (k-1st time). ) is subtracted from the third data D3, and the result is set as the new fourth data D4 at the current time (kth time).

その後、加算処理部18Aは、算出した第4データD4を送信部19Aへと出力する(ステップS46)。その後、送信部19Aは、データ処理装置1Aの外部へ、第4データD4に基づいて出力データDoを出力する。なお、出力データDoは、第4データD4そのものであってもよいし、第4データD4を所望のデータ形式へ変換したものであってもよい。 After that, the addition processing section 18A outputs the calculated fourth data D4 to the transmission section 19A (step S46). Thereafter, the transmitter 19A outputs output data Do to the outside of the data processing device 1A based on the fourth data D4. Note that the output data Do may be the fourth data D4 itself, or may be the fourth data D4 converted into a desired data format.

以下では、図13の例を用いて、本実施形態のデータ伸長処理における、具体的な第3データD3の生成方法を示す。図13の上部に示すように、図13の例では、記憶部20に、1番目(k=1)の第1データD1に対応する3つの第2データD2(data_1_3,data_1_2,data_1_1)と、2番目(k=1)の第1データD1に対応する2つの第2データD2(data_2_2,data_2_1)が格納されている。 Below, using the example of FIG. 13, a specific method of generating the third data D3 in the data decompression process of this embodiment will be described. As shown in the upper part of FIG. 13, in the example of FIG. 13, three second data D2 (data_1_3, data_1_2, data_1_1) corresponding to the first (k=1) first data D1 are stored in the storage unit 20. Two second data D2 (data_2_2, data_2_1) corresponding to the second (k=1) first data D1 are stored.

図13の例では、1回目のステップS41でゼロデータである第3データD3の仮データが準備される。その後、1回目のステップS42で、第2データD2としてdata_1_3が読み出される。このため、第3データD3の仮データの最下位側から1~n桁目がdata_1_3となる。 In the example of FIG. 13, provisional data of the third data D3, which is zero data, is prepared in the first step S41. Thereafter, in the first step S42, data_1_3 is read out as the second data D2. Therefore, the first to nth digits from the least significant side of the temporary data of the third data D3 become data_1_3.

続いて、ステップS43において、1回目のステップS42で読み出された判別ビットDdが0であるため、伸長処理部17Aは、最終ブロックではないと判断し、第3データD3の仮データをシフトする(ステップS44)。これにより、第3データD3の仮データの最下位側からn+1~2n桁目がdata_1_3となり、最下位側から1~n桁目が0となる。 Subsequently, in step S43, since the determination bit Dd read in the first step S42 is 0, the decompression processing unit 17A determines that it is not the final block, and shifts the temporary data of the third data D3. (Step S44). As a result, the n+1 to 2n digits from the least significant side of the temporary data of the third data D3 become data_1_3, and the 1st to nth digits from the least significant side become 0.

そして、2回目のステップS42で、第2データD2としてdata_1_2が読み出される。このため、第3データD3の仮データの最下位側からn+1~2n桁目がdata_1_3、最下位側から1~n桁目がdata_1_2となる。 Then, in the second step S42, data_1_2 is read out as the second data D2. Therefore, the n+1 to 2n digits from the least significant side of the temporary data of the third data D3 become data_1_3, and the 1st to nth digits from the least significant side become data_1_2.

続いて、ステップS43において、2回目のステップS42で読み出された判別ビットDdが0であるため、伸長処理部17Aは、最終ブロックではないと判断し、第3データD3の仮データをシフトする(ステップS44)。これにより、第3データD3の仮データの最下位側から2n+1~3n桁目がdata_1_3、最下位側からn+1~2n桁目がdata_1_2となり、最下位側から1~n桁目が0となる。 Subsequently, in step S43, since the determination bit Dd read in the second step S42 is 0, the decompression processing unit 17A determines that it is not the final block, and shifts the temporary data of the third data D3. (Step S44). As a result, the 2n+1 to 3n digits from the least significant side of the temporary data of the third data D3 become data_1_3, the n+1 to 2n digits from the least significant side become data_1_2, and the 1st to nth digits from the least significant side become 0.

そして、3回目のステップS42で、第2データD2としてdata_1_1が読み出される。このため、第3データD3の仮データの最下位側から2n+1~3n桁目がdata_1_3、最下位側からn+1~2n桁目がdata_1_2、最下位側から1~n桁目がdata_1_1
となる。
Then, in the third step S42, data_1_1 is read out as the second data D2. Therefore, the 2n+1 to 3n digits from the least significant side of the temporary data of the third data D3 are data_1_3, the n+1 to 2n digits from the least significant side are data_1_2, and the 1st to n digits from the least significant side are data_1_1.
becomes.

続いて、ステップS43において、2回目のステップS42で読み出された判別ビットDdが1であるため、伸長処理部17Aは、最終ブロックであると判断し、符号ビットDsとともに、現状の第3データD3を最終データとして加算処理部18Aへと引き渡し、ステップS45へと進む。これにより、1番目(k=1)の第1データD1を復元した第3データD3と符号ビットDsとが、加算処理部18Aへと引き渡される。 Subsequently, in step S43, since the discrimination bit Dd read in the second step S42 is 1, the decompression processing unit 17A determines that it is the final block, and saves the current third data along with the sign bit Ds. D3 is passed to the addition processing section 18A as final data, and the process proceeds to step S45. As a result, the third data D3 obtained by restoring the first (k=1) first data D1 and the sign bit Ds are delivered to the addition processing section 18A.

ステップS45において、引き渡された第3データD3が1番目(k=1)の第3データD3であり、1つ前の時刻の第4データD4が存在しないため、加算処理部18Aは、引き渡された第3データD3の数値をそのまま第4データD4とする。そして、当該第4データD4を出力する(ステップS46)。 In step S45, the delivered third data D3 is the first (k=1) third data D3 and the fourth data D4 of the previous time does not exist, so the addition processing unit 18A The numerical value of the third data D3 is used as the fourth data D4. Then, the fourth data D4 is output (step S46).

第4データD4の出力後、2回目のステップS41でゼロデータである第3データD3の仮データが再び準備される。その後、4回目のステップS22で、第2データD2としてdata_2_2が読み出される。このため、第3データD3の仮データの最下位側から1~n桁目がdata_2_2となる。 After outputting the fourth data D4, temporary data of the third data D3, which is zero data, is prepared again in a second step S41. Thereafter, in the fourth step S22, data_2_2 is read out as the second data D2. Therefore, the first to nth digits from the least significant side of the temporary data of the third data D3 become data_2_2.

続いて、ステップS43において、4回目のステップS42で読み出された判別ビットDdが0であるため、伸長処理部17Aは、最終ブロックではないと判断し、第3データD3の仮データをシフトする(ステップS44)。これにより、第3データD3の仮データの最下位側からn+1~2n桁目がdata_2_2となり、最下位側から1~n桁目が0となる。 Subsequently, in step S43, since the determination bit Dd read out in step S42 for the fourth time is 0, the decompression processing unit 17A determines that the block is not the final block, and shifts the temporary data of the third data D3. (Step S44). As a result, the n+1 to 2n digits from the least significant side of the temporary data of the third data D3 become data_2_2, and the 1st to nth digits from the least significant side become 0.

その後、5回目のステップS42で、第2データD2としてdata_2_1が読み出される。このため、第3データD3の仮データの最下位側からn+1~2n桁目がdata_2_2、最下位側から1~n桁目がdata_2_1となる。 Thereafter, in the fifth step S42, data_2_1 is read out as the second data D2. Therefore, the n+1 to 2n digits from the least significant side of the temporary data of the third data D3 become data_2_2, and the 1st to nth digits from the least significant side become data_2_1.

続いて、ステップS43において、5回目のステップS22で読み出された判別ビットDdが1であるため、伸長処理部17Aは、最終ブロックであると判断し、現状の第3データD3を、3~5回目のステップS22で読みだされた符号ビットDsとともに、最終データとして加算処理部18Aへと引き渡す。 Subsequently, in step S43, since the discrimination bit Dd read out in step S22 for the fifth time is 1, the decompression processing unit 17A determines that it is the final block, and converts the current third data D3 into Together with the sign bit Ds read out in the fifth step S22, it is delivered to the addition processing section 18A as final data.

加算処理部18Aは、符号ビットDsが「負」を示す1であるため、前回の第4データD4から、現状の第3データD3を減算する(ステップS45)。具体的には、上位側からnビットごとに0,data_1_3,data_1_2,data_1_1である数値から、上位側からnビットごとに0,0,data_2_2,data_2_1である数値を差し引く。これにより、新たな第4データD4が算出される。この新たな第4データD4は、2番目(k=2)の元データD0と同じ数値(上位側からnビットごとにdata0_1_4,data0_1_3,data0_1_2,data0_1_1)を有する。そして、当該第4データD4を出力する(ステップS46)。 Since the sign bit Ds is 1 indicating "negative", the addition processing unit 18A subtracts the current third data D3 from the previous fourth data D4 (step S45). Specifically, from the numerical values 0, data_1_3, data_1_2, data_1_1 for every n bits from the high-order side, the numerical values 0, 0, data_2_2, data_2_1 for every n bits from the high-order side are subtracted. As a result, new fourth data D4 is calculated. This new fourth data D4 has the same numerical value as the second (k=2) original data D0 (data0_1_4, data0_1_3, data0_1_2, data0_1_1 for every n bits from the high-order side). Then, the fourth data D4 is output (step S46).

<3.変形例>
以上、本発明の一実施形態について説明したが、本発明は、上記の実施形態に限定されるものではない。
<3. Modified example>
Although one embodiment of the present invention has been described above, the present invention is not limited to the above embodiment.

上記の実施形態では、m*nビット長の元データD0または第1データD1を圧縮し、再び伸長する方法および装置について説明した。具体的な例として、分割ブロックDvの数m=4、分割ブロックDvのビット長n=4の場合を挙げたが、本発明はこれに限られない。例えば、m=16、n=8であり、元データD0または第1データD1が128ビット長であってもよい。 In the above embodiment, the method and apparatus for compressing the original data D0 or the first data D1 having a length of m*n bits and decompressing it again have been described. As a specific example, the case where the number of divided blocks Dv is m=4 and the bit length of the divided blocks Dv is n=4 has been given, but the present invention is not limited to this. For example, m=16, n=8, and the original data D0 or first data D1 may have a length of 128 bits.

また、上記の実施形態や変形例に登場した各要素を、矛盾が生じない範囲で、適宜に組み合わせてもよい。 Furthermore, the elements appearing in the above-described embodiments and modifications may be combined as appropriate to the extent that no contradiction occurs.

1,1A データ処理装置
12A 差分算出処理部
13,13A 分割処理部
15,15A 格納処理部
17,17A 伸長処理部
18A 加算処理部
20,20A 記憶部
D0 元データ
D1 第1データ
D2 第2データ
D3 第3データ
D3 第4データ
D4 第4データ
Dd 判別ビット
De イネーブル信号
Ds 符号ビット
Dv 分割ブロック
1, 1A Data processing device 12A Difference calculation processing section 13, 13A Division processing section 15, 15A Storage processing section 17, 17A Decompression processing section 18A Addition processing section 20, 20A Storage section D0 Original data D1 First data D2 Second data D3 3rd data D3 4th data D4 4th data Dd Discrimination bit De enable signal Ds Sign bit Dv Divided block

Claims (13)

データ処理方法であって、
a)m*nビット長の第1データを、m個のnビット長の分割ブロックに分割する工程と、
b)前記分割ブロックのうち、格納すべき有効ブロックを判別する工程と、
c)前記有効ブロックを格納する工程と、
を有し、
前記工程b)において、数値が非ゼロとなる最上位の前記分割ブロックと、数値が非ゼロとなる最上位の前記分割ブロックよりも下位の前記分割ブロックとを、前記有効ブロックとする、データ処理方法。
A data processing method, comprising:
a) dividing the first data having a length of m*n bits into m divided blocks having a length of n bits;
b) determining a valid block to be stored among the divided blocks;
c) storing the valid block;
has
In the step b), data processing in which the uppermost divided block whose numerical value is non-zero and the lower divided blocks than the uppermost divided block whose numerical value is non-zero are used as the valid blocks. Method.
請求項1に記載のデータ処理方法であって、
前記工程b)において、1つの前記第1データに対して、mビット長のイネーブルビットを含むイネーブル信号を1つ生成し、
最下位からp番目の前記分割ブロックが前記有効ブロックでない場合には、前記イネーブルビットの最下位からp番目の桁を0とし、
最下位からp番目の前記分割ブロックが前記有効ブロックである場合には、前記イネーブルビットの最下位からp番目の桁を1とする、データ処理方法。
The data processing method according to claim 1,
In step b), one enable signal including an m-bit length enable bit is generated for one piece of the first data;
If the p-th divided block from the lowest order is not the valid block, the p-th digit from the lowest order of the enable bit is set to 0;
The data processing method includes setting the pth digit of the enable bit to 1 when the pth divided block from the lowest order is the valid block.
請求項1に記載のデータ処理方法であって、
前記工程c)は、
c1)前記有効ブロックのそれぞれに1ビット長の判別ビットを付与する工程と、
c2)前記判別ビットと、前記有効ブロックと同じ数値を有するnビット長の第2データとを併せて格納する工程と、
を含む、データ処理方法。
The data processing method according to claim 1,
The step c) is
c1) adding a 1-bit long discrimination bit to each of the valid blocks;
c2) storing the discrimination bit and n-bit second data having the same numerical value as the valid block;
data processing methods, including;
請求項3に記載のデータ処理方法であって、
前記工程c1)において、
1つの前記第1データに対して前記有効ブロックが1つである場合、その前記有効ブロックに対応する前記判別ビットを1とし、
1つの前記第1データに対して前記有効ブロックが複数である場合、最下位の前記有効ブロックに対する前記判別ビットを1とし、その他の前記有効ブロックに対する前記判別ビットを0とし、
前記工程c2)において、
1つの前記第1データに対する前記判別ビットおよび前記第2データを、上位側から順に格納する、データ処理方法。
4. The data processing method according to claim 3,
In the step c1),
When the number of the valid blocks is one for one piece of the first data, the determination bit corresponding to the valid block is set to 1,
When there is a plurality of valid blocks for one piece of the first data, the determination bit for the lowest valid block is set to 1, and the determination bit for the other valid blocks is set to 0;
In the step c2),
A data processing method, wherein the discrimination bits and the second data for one piece of the first data are stored in order from the most significant side.
請求項4に記載のデータ処理方法であって、
前記工程c)の後に、
d)新たな読み出しデータとして、新たなm*nビット長のゼロデータを準備する工程と、
e)格納された前記判別ビットおよび前記第2データを読み出す工程と、
f)前記読み出しデータの最下位側からnビットを、前記工程e)において読み出した前記第2データの数値とする工程と、
を行い、
前記工程e)において読み出した前記判別ビットが0である場合には、前記工程f)の後に、
g)前記読み出しデータの非ゼロのビットを全てnビット上位へとシフトする工程
を行った後に、再び前記工程e)へ戻り、
前記工程e)において読み出した前記判別ビットが1である場合には、前記工程f)の後に、
h)前記読み出しデータを第3データとして出力する工程
を行う、データ処理方法。
5. The data processing method according to claim 4,
After said step c),
d) preparing new m*n bit length zero data as new read data;
e) reading the stored discrimination bit and the second data;
f) setting n bits from the least significant side of the read data as a numerical value of the second data read in the step e);
and
If the determination bit read in step e) is 0, after step f),
g) After performing the step of shifting all the non-zero bits of the read data upward by n bits, return to the step e) again,
If the determination bit read in step e) is 1, after step f),
h) A data processing method, comprising the step of outputting the read data as third data.
請求項1ないし請求項5のいずれか一項に記載のデータ処理方法であって、
前記工程a)、前記工程b)および前記工程c)の前に
p)時系列データである元データを取得する工程と、
q)最新の前記元データと、1つ前の時刻の前記元データとの差分である前記第1データを算出する工程と、
をさらに有する、データ処理方法。
The data processing method according to any one of claims 1 to 5,
Before the step a), the step b), and the step c), p) obtaining original data that is time series data;
q) calculating the first data that is the difference between the latest original data and the original data at the previous time;
A data processing method further comprising:
請求項5に記載のデータ処理方法であって、
前記工程a)、前記工程b)および前記工程c)の前に
p)時系列データである元データを取得する工程と、
q)最新の前記元データと、1つ前の時刻の前記元データとの差分である前記第1データを算出する工程と、
をさらに有し、
前記工程h)の後に、
r)出力した前記第3データを、1つ前の時刻の第4データと加算し、新たな前記第4データを算出する工程と、
を行う、データ処理方法。
6. The data processing method according to claim 5,
Before the step a), the step b), and the step c), p) obtaining original data that is time series data;
q) calculating the first data that is the difference between the latest original data and the original data at the previous time;
It further has
After the step h),
r) adding the outputted third data to fourth data at the previous time to calculate new fourth data;
data processing methods.
外部または内部に設けられた記憶部にデータを格納するデータ処理装置であって、
m*nビット長の第1データを、m個のnビット長の分割ブロックに分割し、前記分割ブロックのうち、格納すべき有効ブロックを判別する、分割処理部と、
前記有効ブロックを、前記記憶部に順に格納する、格納処理部と、
を有し、
前記分割処理部は、数値が非ゼロとなる最上位の前記分割ブロックと、数値が非ゼロとなる最上位の前記分割ブロックよりも下位の前記分割ブロックとを、前記有効ブロックとする、データ処理装置。
A data processing device that stores data in a storage section provided externally or internally,
a division processing unit that divides the first data having a length of m*n bits into m divided blocks each having a length of n bits, and determines an effective block to be stored among the divided blocks;
a storage processing unit that sequentially stores the valid blocks in the storage unit;
has
The division processing unit performs data processing in which the uppermost divided block whose numerical value is non-zero and the lower divided blocks than the uppermost divided block whose numerical value is non-zero are used as the valid blocks. Device.
請求項8に記載のデータ処理装置であって、
前記分割処理部は、
1つの前記第1データに対して、mビット長のイネーブルビットを含むイネーブル信号を1つ生成し、
最下位からp番目の前記分割ブロックが前記有効ブロックでない場合には、前記イネーブルビットの最下位からp番目の桁を0とし、
最下位からp番目の前記分割ブロックが前記有効ブロックである場合には、前記イネーブルビットの最下位からp番目の桁を1とする、データ処理装置。
9. The data processing device according to claim 8,
The division processing unit is
generating one enable signal including an m-bit length enable bit for one piece of the first data;
If the p-th divided block from the lowest order is not the valid block, the p-th digit from the lowest order of the enable bit is set to 0;
In the data processing device, when the p-th divided block from the lowest order is the valid block, the p-th digit from the lowest order of the enable bit is set to 1.
請求項8に記載のデータ処理装置であって、
前記格納処理部は、
前記有効ブロックのそれぞれに1ビット長の判別ビットを付与し、
1つの前記第1データに対する前記判別ビットと、前記有効ブロックと同じ数値を有するnビット長の第2データとを併せて、上位側から順に前記記憶部に格納し、
前記格納処理部は、
1つの前記第1データに対して前記有効ブロックが1つである場合、その前記有効ブロックに対応する前記判別ビットを1とし、
1つの前記第1データに対して前記有効ブロックが複数である場合、最下位の前記有効ブロックに対する前記判別ビットを1とし、その他の前記有効ブロックに対する前記判別ビットを0とする、データ処理装置。
9. The data processing device according to claim 8,
The storage processing unit includes:
assigning a 1-bit long discrimination bit to each of the valid blocks;
storing the discrimination bits for one of the first data and n-bit second data having the same numerical value as the valid block in the storage unit in order from the most significant side;
The storage processing unit includes:
When the number of the valid blocks is one for one piece of the first data, the determination bit corresponding to the valid block is set to 1,
When there is a plurality of valid blocks for one piece of the first data, the determination bit for the lowest valid block is set to 1, and the determination bit for the other valid blocks is set to 0.
請求項10に記載のデータ処理装置であって、
前記記憶部から前記判別ビットおよび前記第2データを読み出して、前記第1データを復元した第3データを生成する、伸長処理部
をさらに有し、
前記伸長処理部は、
S)新たな読み出しデータとして、新たなm*nビット長のゼロデータを準備する工程と、
T)前記記憶部に格納された前記判別ビットおよび前記第2データを読み出す工程と、
U)前記読み出しデータの最下位側からnビットを、前記工程T)において読み出した前記第2データの数値とする工程と、
を行い、
前記工程T)において読み出した前記判別ビットが0である場合には、前記工程U)の後に、
V)前記読み出しデータの非ゼロのビットを全てnビット上位へとシフトする工程
を行った後に、再び前記工程T)へ戻り、
前記工程T)において読み出した前記判別ビットが0である場合には、前記工程U)の後に、
W)前記読み出しデータを出力する工程
を行う、データ処理装置。
The data processing device according to claim 10,
further comprising an expansion processing unit that reads the discrimination bit and the second data from the storage unit and generates third data that is a restored version of the first data;
The decompression processing section includes:
S) preparing new m*n bit length zero data as new read data;
T) reading the discrimination bit and the second data stored in the storage unit;
U) a step of setting n bits from the least significant side of the read data as a numerical value of the second data read in the step T);
and
If the discrimination bit read in the step T) is 0, after the step U),
V) After performing the step of shifting all the non-zero bits of the read data to the upper n bits, return to the step T) again,
If the discrimination bit read in the step T) is 0, after the step U),
W) A data processing device that performs the step of outputting the read data.
請求項8ないし請求項11のいずれか一項に記載のデータ処理装置であって、
時系列データであるm*nビット長の元データと、1つ前の時刻の前記元データとの差分である前記第1データを算出する、差分算出処理部
をさらに有する、データ処理装置。
The data processing device according to any one of claims 8 to 11,
A data processing device further comprising a difference calculation processing unit that calculates the first data that is a difference between m*n bit length original data that is time series data and the original data at a previous time.
請求項11に記載のデータ処理装置であって、
時系列データであるm*nビット長の元データと、1つ前の時刻の前記元データとの差分である前記第1データを算出する、差分算出処理部と、
前記伸長処理部の出力した前記第3データに基づいて、前記元データを復元した第4データを算出する、加算処理部と、
をさらに有し、
前記加算処理部は、1つ前の時刻の前記第4データと、新たな前記第3データとを加算して、新たな第4データを算出する、データ処理装置。
The data processing device according to claim 11,
a difference calculation processing unit that calculates the first data that is the difference between m*n bit length original data that is time series data and the original data at the previous time;
an addition processing unit that calculates fourth data obtained by restoring the original data based on the third data output by the expansion processing unit;
It further has
The addition processing unit is a data processing device that calculates new fourth data by adding the fourth data of the previous time and the new third data.
JP2022081978A 2022-05-19 2022-05-19 Data processing method and data processing device Pending JP2023170314A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022081978A JP2023170314A (en) 2022-05-19 2022-05-19 Data processing method and data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022081978A JP2023170314A (en) 2022-05-19 2022-05-19 Data processing method and data processing device

Publications (1)

Publication Number Publication Date
JP2023170314A true JP2023170314A (en) 2023-12-01

Family

ID=88927857

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022081978A Pending JP2023170314A (en) 2022-05-19 2022-05-19 Data processing method and data processing device

Country Status (1)

Country Link
JP (1) JP2023170314A (en)

Similar Documents

Publication Publication Date Title
EP0154860B1 (en) Model driven data compression/decompression system for data transfer
JP2544895B2 (en) Distributed data processing system
CN107836083B (en) Method, apparatus and system for semantic value data compression and decompression
US7688233B2 (en) Compression for deflate algorithm
US7821430B2 (en) Arithmetic decoding apparatus
US5594435A (en) Permutation-based data compression
RU2595916C1 (en) Encoder, decoder and method
CN1139861A (en) Length changeable code and segment and device
US5857036A (en) System and method for the fractal encoding of datastreams
JPH11196000A (en) Coding method and data compressor
JPH0918346A (en) Method of data compression and expansion
CN112968706A (en) Data compression method, FPGA chip and FPGA online upgrading method
EP1266455A1 (en) Method and apparatus for optimized lossless compression using a plurality of coders
EP2055007B1 (en) Data encoder
US6748520B1 (en) System and method for compressing and decompressing a binary code image
KR102068383B1 (en) Entropy modifier and method
JPH08167852A (en) Method and device for compressing data
JPS6376525A (en) Method for probability fitting in arithmetic encoding system
KR101023536B1 (en) Lossless data compression method
JP2023170314A (en) Data processing method and data processing device
US6489903B2 (en) Data encoding method, data encoding apparatus, data decoding method, and data decoding apparatus
Mathpal et al. A research paper on lossless data compression techniques
JP4758494B2 (en) Circuit and method for converting bit length to code
US8072359B2 (en) Binary arithmetic coding device
JP5146708B2 (en) Compressed data transmission / reception device, data compression device, compressed data reception device, and data compression method