Patent Publication Number: US-9838032-B2

Title: Data compression device, data compression method, and computer program product

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is a continuation of PCT international application Ser. No. PCT/JP2013/052245 filed on Jan. 31, 2013 which designates the United States, the entire contents of which are incorporated herein by reference. 
    
    
     FIELD 
     Embodiments described herein relate generally to a data compression device, a data compression method, and a computer program product. 
     BACKGROUND 
     A method of data compression is known in which, from time-series data that is input, point data constituting the time-series data is subjected to thinning. In regard to such a method of data compression; the Box Car algorithm, the Backward Slope algorithm, and the Swinging Door algorithm are available. 
     The Swinging Door algorithm is a representative example of the algorithms in which data thinning is achieved by performing linear approximation in such a way that the error is equal to or smaller than a predetermined threshold value. In the Swinging Door algorithm, a single point is fixed as the starting point, and linear approximation is performed in such a way that the error is equal to or smaller than a predetermined threshold value. 
     There is a trend of an increase in the types and the size of time-series data stored in time-series databases. In that regard, there has been a demand for a method which would enable achieving compression of time-series data in a more efficient manner. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a block diagram illustrating an exemplary configuration of a data compression device according to a first embodiment; 
         FIG. 2  is a diagram illustrating an example of time-series data; 
         FIG. 3  is a diagram for explaining a first method for compression of time-series data; 
         FIG. 4  is a diagram for explaining the first method for compression of time-series data; 
         FIG. 5  is a diagram for explaining the first method for compression of time-series data; 
         FIG. 6  is a diagram for explaining a second method for compression of time-series data; 
         FIG. 7  is a diagram for explaining the second method for compression of time-series data; 
         FIG. 8  is a diagram for explaining the second method for compression of time-series data; 
         FIG. 9  is a diagram for explaining the second method for compression of time-series data; 
         FIG. 10  is a diagram for explaining an example of a method for compression of time-series data according to the first embodiment; 
         FIG. 11  is a diagram for explaining an example of the method for compression of time-series data according to the first embodiment; 
         FIG. 12  is a diagram for explaining an example of the method for compression of time-series data according to the first embodiment; 
         FIG. 13  is a diagram for explaining an example of the method for compression of time-series data according to the first embodiment; 
         FIG. 14  is a flowchart for explaining an overall flow of a data compression operation according to the first embodiment; 
         FIG. 15  is a diagram for explaining an example of post-processing; 
         FIG. 16  is a block diagram illustrating an exemplary configuration of a data compression device according to a second embodiment; 
         FIG. 17  is a diagram for explaining an example of a minimum lower limit slope and a maximum upper limit slope; 
         FIG. 18  is a diagram illustrating an example of an upper limit slope and a lower limit slope; 
         FIG. 19  is a diagram illustrating an example of the upper limit slope and the lower limit slope; 
         FIG. 20  is a diagram illustrating an example of the upper limit slope and the lower limit slope; 
         FIG. 21  is a flowchart for explaining an overall flow of a data compression operation according to the second embodiment; and 
         FIG. 22  is an explanatory diagram illustrating a hardware configuration of the data compression device according to the first embodiment or the second embodiment. 
     
    
    
     DETAILED DESCRIPTION 
     According to an embodiment, a data compression device includes a receiving unit, a generating unit, a selecting unit, and a compressing unit. The receiving receives a plurality of pieces of input data which is input in chronological order. The generating unit generates a plurality of starting point candidates which represents the data having an error within a threshold value with respect to starting point data. The starting point data is the input data input at a first timing. The selecting unit refers to the starting point candidates, end point data which is the input data input at a second timing, and intermediate data which is the input data input at a timing in between the first timing and the second timing; and selects, from among the starting point candidates, the starting point candidate which, as compared to the other starting point candidates, has a greater number of pieces of the intermediate data approximated using the starting point candidate and using the end point data in such a way that the error is within the threshold value. The compressing unit outputs the selected starting point candidate and the end point data as output data obtained by compressing the starting point data, the intermediate data, and the end point data. 
     Various embodiments are described below in detail with reference to the accompanying drawings. 
     First Embodiment 
     As described above, according to the Swinging Door algorithm or the like, a single starting point is set and linear approximation is performed in order to compress time-series data. In a data compression device according to a first embodiment, a plurality of starting points (starting point candidates) is set, and time-series data is compressed using such a starting point candidate which enables achieving compression in a more efficient manner. 
     Herein, the explanation is given about the terms used in the embodiments. 
     Time-series data points to a series of values (a point data string) obtained by observing or measuring temporal changes of a particular phenomenon. Usually, time-series data is measured at predetermined time intervals. Examples of time-series data include share prices and sensor values of an in-plant installation. For example, regarding a number of devices constituting an in-plant installation; a series of values of humidity, a series of values of vibrations, or a series of values of control setting can be said to form a single piece of time-series data. 
     A time-series database is created by compiling time-series data. As a time-series database, a large volume of time-series data is stored in chronological order in a memory of a computer or in an external memory device (a hard disk). 
     A data item which is the smallest unit of data storage is called a tag. A tag is made of a data value, a time stamp, a data status, and the like. The data that is to be collected has types such as operating data which is input from a control system, computational data which is obtained by implementing an online computation function, data which is manually input by an operator, and interface data which is input from other systems. 
     In a time-series database, generally, there are several thousands to several tens of thousands of tags. The data storage period for each tag ranges from one year to several years. As far as the data collection cycle is concerned, although it is dependent on the real-time property of the concerned system (such as an in-plant installation); it ranges from a few seconds to one minute as a rough indication. 
     If it is assumed that the collected data is stored without any modification, then a time-series database needs to have the database capacity of about 10 GB (gigabytes) to 10 TB (terabytes). If the database capacity is increased to that extent, then it is bound to cause deterioration in the retrieval performance. 
     In that regard, for example, in an in-plant installation, a technology of data compression is implemented by making use of the property that, during stable operations, the operating data undergoes only a small change. In an in-plant installation, it is estimated that the behavior of the original data can be understood by referring to compressed data having the compression ratio of 1:20. 
     In this way, since a time-series database needs a large-capacity memory area; there has been a demand for a method which would enable achieving compression of time-series data in a more efficient manner. 
     Given below is the explanation of a data compression device according to a first embodiment.  FIG. 1  is a block diagram illustrating an exemplary configuration of a data compression device  100  according to the first embodiment. As illustrated in  FIG. 1 , the data compression device  100  includes a receiving unit  101 , a registering unit  110 , a searching unit  114 , and a memory unit  121 . 
     The receiving unit  101 , the registering unit  110 , and the searching unit  114  can be implemented, for example, by executing a program in a processor such as a CPU (Central Processing Unit), that is, can be implemented using software; or can be implemented using hardware such as an IC (Integrated Circuit); or can be implemented using a combination of software and hardware. 
     The memory unit  121  is used to store a variety of data. For example, the memory unit  121  is used to store time-series data that has been compressed by a compressing unit  113 . The memory unit  121  can be configured with any commonly-used memory medium such as an HDD (Hard Disk Drive), an optical disk, a memory card, and a RAM (Random Access Memory). 
     The receiving unit  101  receives processing requests and data that are input from external devices such as client devices. A processing request points to, for example, a time-series data registration request or a time-series data search request. In the case of a registration request, the receiving unit  101  receives a plurality of pieces of input data (point data of time-series data) that is input in chronological order. Alternatively, the receiving unit  101  can also receive pieces of point data that are input in real time. For example, the receiving unit  101  stores the pieces of point data, which are input in real time in the memory unit  121 . Still alternatively, the receiving unit  101  can receive pieces of point data in chronological order from the time-series data stored in the memory unit  121 . In the case of receiving input of the time-series data from the memory unit  121 , the configuration can be such that the receiving unit  101  goes back in time to a particular timing serving as the starting point, that is, receives the pieces of point data in a sequential manner starting from an earlier timing. 
     The registering unit  110  performs, based on an allowable error, an operation (a compression operation) of thinning a piece of point data from a series of point data that is input; and registers the post-thinning point data as time-series data in the memory unit  121 . Regarding an algorithm for thinning a piece of point data using starting point candidates and using other pieces of point data; it is possible to use any one of the conventional algorithms such as the Swinging Door algorithm. Meanwhile, the registering unit  110  includes a generating unit  111 , a selecting unit  112 , and the compressing unit  113 . 
     The generating unit  111  generates a plurality of starting point candidates that represents data having an error within a predetermined threshold value with respect to starting point data, which is the point data at a particular timing (a first timing). 
     The selecting unit  112  selects, from among the starting point candidates, such a starting point candidate which enables achieving compression, of the time-series data in a more efficient manner. For example, the selecting unit  112  selects, from among the starting point candidates, such a starting point candidate which has a greater number of pieces of point data (intermediate data) that is approximated using the concerned starting point candidate and using end point data, which is input at a different timing (a second timing) than the timing of the starting point, data, in such a way that the error is within a predetermined threshold value. 
     Then, the compressing unit  113  outputs the selected starting point candidate and the end point data as a piece of post-compression time-series data (output data). The compressing unit  113  stores, for example, the post-compression time-series data in the memory unit  121  in a sequential manner. Alternatively, the compressing unit  113  can also store at once a plurality of pieces of post-compression time-series in the memory unit  121 . 
     The searching unit  114  searches for the time-series data that is stored in the memory unit  121 . For example, when a start timing, an end timing, and a sampling interval are specified; the searching unit  114  searches, at the specified sampling interval, the time-series database for a point data series in a section from the start timing to the end timing. Since there are times when the registering unit  110  performs point data thinning, sometimes point data may not be retrieved at the specified sampling interval. In such a case, the searching unit  114  interpolates the point data using, for example, the linear interpolation method that is an example of the methods to perform interpolation between two points, if (xs, ys) represents the start point and if (xe, ye) represents the end point; then, with respect to an arbitrary x present on the straight line joining the start point and the end point, the value of y can be obtained using Equation (1). Meanwhile, xe≠xs is satisfied.
 
 y=ys +( x−xs )( ye−ys )/( xe−xs )  (1)
 
     Given below is the explanation of a specific example of a data compression operation performed according to the first embodiment.  FIG. 2  is a diagram illustrating an example of time-series data. In  FIG. 2  is illustrated time-series data that contains five pieces of point data, namely, P 1 , P 2 , P 3 , P 4 , and P 5 . As described below, point data represents, for example, a combination of a timing (Time) and a value (Value). Herein, it is not always necessary to have a constant time interval. 
     P 1 &lt;t 1 , v 1 &gt;, P 2 &lt;t 2 , v 2 &gt;, P 3 &lt;t 3 , v 3 &gt;, P 4 &lt;t 4 , v 4 &gt;, and P 5 &lt;t 5 , v 5 &gt; are present. Moreover, t 1 &lt;t 2 &lt;t 3 &lt;t 4 &lt;t 5  is satisfied. 
       FIG. 3  to  FIG. 5  are diagrams for explaining a first method for compression of time-series data. As illustrated in  FIG. 3 , α represents the allowable error specified in advance. Moreover, P 1  is set as the starting point data. When P 2  is input as a new piece of point data, the registering unit  110  obtains an upper limit slope US 2  and a lower limit slope LS 2  with respect to P 2 . 
     Firstly, with respect to the value &lt;t 2 , v 2 &gt; of P 2 , the registering unit  110  obtains two piece of point data P 2 ′&lt;t 2 , v 2 +α&gt; and P 2 ″&lt;t 2 , v 2 −α&gt; that have the largest allowable error at the timing t 2 . The upper limit slope US 2  represents the tilt or the line segment from P 1  to P 2 ′, and can be obtained as US 2 =(v 2 +α−V 1 )/(t 2 −t 1 ). The lower limit slope LS 2  represents the tilt of the line segment from P 1  to P 2 ″, and can be obtained as LS 2 =(v 2 −α−v 1 )/(t 2 −t 1 ). 
     As illustrated in  FIG. 4 , when P 3  is input as a new piece of point data, the registering unit  110  obtains an upper limit slope US 3  and a lower limit slope LS 3  with respect to P 3 . The upper limit slope US 3  represents the tilt of the line segment from P 1  to P 3 ′, and can be obtained as US 3 =(v 3 +α−V 1 )/(t 3 −t 1 ). The lower limit slope LS 3  represents the tilt of the line segment from P 1  to P 3 ″, and can be obtained as LS 3 =(v 3 −α−v 1 )/(t 3 −t 1 ). 
     If the upper limit slope US 3  up to P 3  is smaller than the upper limit slope US 2  up to P 2  and if the lower limit slope LS 3  up to P 3  is greater than the lower limit slope LS 2  up to P 2 , then the older piece of point data P 2  is subjected to thinning. 
     As illustrated in  FIG. 5 , when P 4  is input as a new piece of point data, the registering unit  110  obtains an upper limit slope US 4  and a lower limit slope LS 4  with respect to P 4 . If the upper limit slope US 4  up to P 4  is smaller than the upper limit slope US 3  up to P 3  and if the lower limit slope LS 4  up to P 4  is greater than the lower limit slope LS 3  up to P 3 , then the older piece of point data P 3  is subjected to thinning. 
     However, in the example illustrated in  FIG. 5 , the lower limit slope LS 4  up to P 4  is smaller than the lower limit slope LS 3  an to P 3 . As a result, P 4  cannot be subjected to thinning, and P 3  remains as the end point data. Thus, in the time-series database (in the memory unit  121 ), two pieces of point data P 1  and P 3  get archived. 
       FIG. 6  to  FIG. 9  are diagrams for explaining a second method for compression of time-series data. As illustrated in  FIG. 6 , α represents the allowable error specified in advance. Moreover, P 1  is set as the starting point data. When P 2  is input as a new piece of point data, the registering unit  110  obtains the upper limit slope US 2  and the lower limit slope LS 2  with respect to P 2 . Herein, the registering unit  110  can obtain the upper limit slope US 2  and the lower limit slope LS 2  by implementing a method identical to the method explained with reference to  FIG. 3 . However, from the first method explained with reference to  FIG. 3 , the second method differs in the way that an allowable error range can be obtained. In  FIG. 6 , a portion between oblique lines represents the allowable error range with respect to P 2 . Herein, the allowable error range with respect to P 2  is identified by two parameters, namely, the upper limit slope US 2  and the lower limit slope LS 2 . 
     As illustrated in  FIG. 7 , when P 3  is input as a new piece of point data, the registering unit  110  obtains a provisional upper limit slope US 3  and a provisional lower limit slope LS 3  with respect to P 3 . The allowable error range with respect to P 3  is identified by two parameters, namely, the upper limit slope US 3  and the lower limit slope LS 3 . The registering unit  110  sets, as the allowable error range with respect to P 3 , the overlapping portion between the allowable error range with respect to P 2  and a provisional allowable error range with respect to P 3 . 
     The registering unit  110  calculates, for example, “LS 2 &gt;US 3   LS 3 &gt;US 2 ”. If that value is true, then the registering unit  110  determines that the allowable error range with respect to P 2  does not overlap with the provisional allowable error range with respect to P 3 . However, if that value is false, then the registering unit  110  determines that the allowable error range with respect to P 2  overlaps with the provisional allowable error range with respect to P 3 . 
     In the example illustrated in  FIG. 7 , since there is overlapping of the two allowable error ranges, the registering unit  110  obtains the allowable error range with respect to P 3  in the following manner. Min(A, B) is a function that returns the smaller value from among A and B. Max(A, B) is a function that returns the greater value from among A and B. Herein, P 2  is subjected to thinning.
 
US3′=Min(US3,US2)
 
LS3′=Max(LS3,LS2)
 
     As illustrated in  FIG. 3 , when P 4  is input as a new piece of point data, the registering unit  110  obtains a provisional upper limit slope US 4  and a provisional lower limit slope LS 4  with respect to P 4 . Then, in an identical manner to the explanation with reference to  FIG. 7 , the registering unit  110  determines whether or not the allowable error range with respect to P 3  overlaps with the provisional allowable error range with respect to P 4 . In the example illustrated in  FIG. 8 , since there is overlapping of the two allowable error ranges, the registering unit  110  obtains the allowable error range with respect to P 4  in the following manner. Herein, P 3  is subjected to thinning.
 
US4′=Min(US4,US3)
 
LS4′=Max(LS4,LS3)
 
US4=US4′
 
LS4=LS4′
 
As illustrated in  FIG. 9 , when P 5  is input as a new piece of point data, the registering unit  110  obtains a provisional upper limit slope US 5  and a provisional lower limit slope LS 5  with respect to P 5 . Then, the registering unit  110  calculates “LS 4 &gt;US 5   LS 5 &gt;US 4 ”. In the example illustrated in  FIG. 9 , since that value is true, the registering unit  110  determines that the allowable error range with respect to P 4  does not overlap with the allowable error range with respect to P 5 . As a result, P 5  cannot be subjected to thinning, and P 4  remains as the end point data. Thus, in the time-series database (in the memory unit  121 ), two pieces of point, data P 1  and P 4  get archived.
 
     As far as the algorithm in the method for compression is concerned, the registering unit  110  can implement any one of the first method and the second method. Alternatively, the registering unit  110  can implement any other algorithm too. Conventionally, any such algorithm is implemented by setting a single starting point. However, in contrast, the registering unit  110  sets a plurality of starting points (starting point candidates) and implements an abovementioned algorithm with respect to a plurality of starting point candidates. 
       FIG. 10  to  FIG. 13  are diagrams for explaining an example of a method for compression of time-series data according to the first embodiment. In the first and second methods for compression, only a single point serves as the starting point at t 1 . In contrast, in the first embodiment, a plurality of starting point candidates is set, and thinning calculation is performed in parallel while treating each starting point candidate as the starting point. 
     If the number of starting points to be generated is set to three; then the generating unit  111  generates, for example, P 1 &lt;t 1 , v 1 &gt;, P 1 ′&lt;t 1 , v 1 +α&gt;, and P 1 ″&lt;t 1 , v 1 −α&gt; as the starting point candidates. If the number of starting points to be generated is set to N; then the generating unit  111  generates, for example, &lt;t 1 , v 1 +α&gt;, &lt;t 1 , v 1 +α×(1−2/(N−1))x 1 &gt;, &lt;t 1 , v 1 +α×(1−2/(N−1))x 2 &gt;, &lt;t 1 , v 1 &gt;, . . . , and &lt;t 1 , v 1 −α&gt; as the starting point candidates. However, the method of generating the starting point candidates is not limited to this method. That is as long as a value is within the range of the allowable error a centered on the starting point data, any piece of point data can be treated as a starting point candidate. 
     Explained below with reference to  FIG. 11  to  FIG. 13  is an example of a case in which thinning calculation according to the second method for compression is performed. As illustrated in  FIG. 11 , P 1 &lt;t 1 , v 1 &gt;, P 1 ′&lt;t 1 , v 1 +α&gt;, and P 1 ″&lt;t 1 , v 1 −α&gt; serve as the starting point candidates. In  FIG. 11  is illustrated an example in which thinning is performed with P 1 ″&lt;t 1 , v 1 −α&gt; serving as the starting point from among the starting point candidates. As illustrated in  FIG. 11 , when P 1 ″&lt;t 1 , v 1 −α&gt; is treated as the starting point, thinning can be performed up to P 2 , P 3 , and P 4 . However, it is not possible to perform thinning at P 5 . 
     In  FIG. 12  is illustrated an example in which thinning is performed with P 1 &lt;t 1 , v 1 &gt; serving as the starting point. As illustrated in  FIG. 12 , when P 1 &lt;t 1 , v 1 &gt; is treated as the starting point, thinning can be performed on to P 2 , P 3 , and P 4 . However, it is not possible to perform thinning at P 5 . 
     In  FIG. 13  is illustrated an example in which thinning is performed with P 1 ′&gt;t 1 , v 1 +α&gt; serving as the starting point. As illustrated in  FIG. 13 , when. P 1 ′&lt;t 1 , v 1 +α&gt; is treated as the starting point, thinning can be performed up to P 2 , P 3 , P 4 , and P 5 . 
     In this way, in the first and second methods for compression, only a single point serves as the starting point at t 1 . In contrast, in the first embodiment, a plurality of starting point candidates is set, and thinning calculation is performed in parallel while treating each starting point candidate as the starting point. For that reason, in the examples given above, when a single starting point is present, thinning is possible only up to P 4  at a maximum. In contrast, in the method according to the first embodiment, thinning can be performed up to P 5 . In this way, in the method according to the first embodiment, at the same allowable error, a higher compression ratio is achieved. 
     Explained below with reference to  FIG. 14  is a data compression operation performed in the data compression device  100  configured in the abovementioned manner according to the first embodiment.  FIG. 14  is a flowchart for explaining an overall flow of the data compression operation according to the first embodiment.  FIG. 14  represents an example of the case in which the second method for compression described above is implemented. 
     Firstly, the selecting unit  112  selects the starting point data (Step S 101 ). For example, when pieces of time-series data are input in real time; the selecting unit  112  can select, as the starting point data, either the piece of point data that is input at the start or the piece of point data that is input after completion of a thinning operation with respect to already-input pieces of point data. Alternatively, when pieces of point data are sequentially input from already-stored time-series data; the selecting unit  112  can select, as the starting point data, either the piece of point data that is input at the start or the piece of point data that is input after completion of a thinning operation with respect to already-input pieces of point data. 
     Then, the generating unit  111  generates a plurality of starting point candidates that has an error within the allowable error with respect to the selected starting point data (Step S 102 ). 
     Subsequently, the selecting unit  112  selects next point data (Step S 103 ). Herein, the next point data indicates a piece of point data that, with the timing of input of the starting point data (the first timing) serving as the reference timing, is sequentially input at each successive timing (a second timing). The next point data is selected by sequentially shifting the timing until thinning cannot be performed any more. In the following explanation, the next point data selected at the previous timing is called former next-point data. Thus, the former next-point data at the timing at which thinning cannot be performed any more is equivalent to the end point data. The pieces of point data selected prior to the former next point data are equivalent to the intermediate data input in between the starting point data and the end point data (the former next-point data) present in the end. 
     As described above, the timing of input of the next point data can be a timing before or after the timing of input of the starting point data. Moreover, for example, when the pieces of point data are sequentially input, from the already-stored time-series data, there can be a situation in which the starting point data selected at Step S 101  becomes the last piece of point data, and the next point data cannot be selected (obtained). In such a case, although not illustrated in  FIG. 14 , the registering unit  110  can end the data compression operation. Meanwhile, when the pieces of point data are input in real time the selecting unit  112  can hold back from performing the operation at Step S 103  till the next piece of point data (the next point data) is obtained. 
     Subsequently, the selecting unit  112  selects a single starting point candidate from among the starting point candidates that are generated (Step S 104 ). Then, the selecting unit  112  determines whether or not the selected starting point candidate has been disabled (Step S 105 ). Herein, disabling means exempting from the subsequent operations such a starting point candidate at which thinning cannot be performed using the next point data that has been selected. For example, a starting point candidate at which thinning could not be performed during operations for the former next-point data is disabled while processing the former next-point data (Step S 109  described later). In this way, at Step S 105 , it is determined whether the selected starting point candidate has been disabled during the operations performed till the previous step. 
     If the selected starting point candidate has been disabled (Yes at Step S 105 ); then the selecting unit  112  returns to the operation at Step S 104 , selects the next starting point candidate, and repeats the operations. On the other hand, if the selected starting point candidate has not been disabled (No at Step S 105 ), then the selecting unit  112  calculates the upper limit slope and the lower limit slope from the selected starting point candidate up to the next point data (Step S 106 ). Then, the selecting unit  112  compares the calculated upper limit slope and the calculated lower limit slope with the upper limit slope and the lower limit slope calculated with respect to the former next-point data (Step S 107 ). For example, the selecting unit  112  determines whether or not the allowable error range identified by the upper limit slope and the lower limit slope of the former next-point data overlaps with the allowable error range identified by the upper limit slope and the lower limit slope of the next point data. 
     Thus, the selecting unit  112  determines whether or not the two allowable error ranges overlap with each other (Step S 108 ). If the two allowable error ranges do not overlap with each other (No at Step S 108 ), the selecting unit  112  disables the currently-selected starting point candidate (Step S 109 ). Then, the selecting unit  112  returns to the operation at Step S 104 . On the other hand, if the two allowable error ranges overlap with each other (Yes at Step S 108 ), then the selecting unit  112  updates the upper limit slope and the lower limit slope tram the starting point candidate with the upper limit slope and the lower limit slope calculated with respect to the existing next point data (Step S 110 ). 
     Subsequently, the selecting unit  112  determines whether or not all starting point candidates have been processed (Step S 111 ). If all starting point candidates are yet to be processed (No at Step S 111 ), the selecting unit  112  returns to the operation at Step S 104  and repeats the operations. When all starting point candidates are processed (Yes at Step S 111 ), the selecting unit  112  determines whether or not all starting point candidates have been disabled (Step S 112 ). If all starting point candidates are yet to be disabled (No at Step S 112 ), then the selecting unit  112  selects the point data at the next successive timing as the new next point data, and repeats the operations (Step S 103 ). 
     When all starting point candidates are disabled (Yes at Step S 112 ), the selecting unit  112  selects the starting point candidate that is disabled in the last instance (Step S 113 ). As a result of such operations, the selecting unit  112  becomes able to select the starting point candidate at which a greater number of pieces of point data (intermediate data) are approximated to have the error within the allowable error. 
     Meanwhile, if there is a plurality of starting point candidates that is disabled in the last instance, the selecting unit  112  selects one of those starting point candidates. Herein, from among a plurality of starting point candidates that is disabled in the last instance, the selecting unit  112  selects the starting point candidate having a closer value to the starting point data. 
     Depending on the selected starting point candidate, the compressing unit  113  performs post-processing for the purpose of correcting the value of the end point data (the former next-point data) (Step S 114 ). Alternatively, the configuration can be such that the end point data is output without performing post-processing. 
       FIG. 15  is a diagram for explaining an example of post-processing. In  FIG. 15  is illustrated an example in which thinning cannot be performed when P 5  serves as the next point data, and P 4  remains as the former next-point data (the end point data). Herein, it is assumed that P 1 ″ is selected as the starting point candidate. The compressing unit  113  obtains the average slope of the upper limit slope and the lower limit, slope of the former next-point data. Then, the compressing unit  113  treats the straight line having the tilt equal to the abovementioned average slope as the approximated data string, and obtains the value of the data string at t 4 . Subsequently, the compressing unit  113  sets the value as the value (P 4 ′) of the corrected end point data. Then, the compressing unit  113  stores the selected starting point candidate and the corrected end point data in the memory unit  121 . 
     Returning to the explanation with reference to  FIG. 14 , the selecting unit  112  determines whether or not all input data has been processed (Step S 115 ). If all input data is yet to be processed (No at Step S 115 ), then the selecting unit  112  selects the next piece of point data as the new starting point data (Step S 101 ) and repeats the subsequent operations. For example, the next point data present at the time when all starting point candidates are disabled is selected as the new starting point data. 
     In this way, in the data compression according to the first embodiment, a plurality of starting point candidates is set, and thinning calculation is performed while treating each starting point candidate as the starting point. Then, a starting point candidate is selected at which a greater volume of data can be subjected to thinning, and the data subjected to thinning using the selected starting point candidate is output as the resultant data of compression. As a result, it becomes possible to enhance the compression ratio of the time-series data. 
     Second Embodiment 
     As a result of implementing the method according to the first embodiment, although an enhancement in the compression ratio is achieved, there also occurs an increase in the amount of calculation because of the thinning calculation performed in parallel among a plurality of starting point candidates. In that regard, in a data compression device according to a second embodiment, an operation (filtering) for skipping the thinning calculation is also performed. 
       FIG. 16  is a block diagram illustrating en exemplary configuration of a data compression device  100 - 2  according to the second embodiment. As illustrated in  FIG. 16 , the data compression device  100 - 2  includes the receiving unit  101 , a registering unit  110 - 2 , the searching unit  114 , and the memory unit  121 . 
     In the second embodiment, a selecting unit  112 - 2  of the registering unit  110 - 2  has different functions than the first embodiment. Apart from that, the configuration and the functions are identical to  FIG. 1  that is the block diagram illustrating a configuration of the data compression device  100  according to the first embodiment. Hence, the configuration and the functions are referred to by the same reference numerals, and the explanation thereof is not repeated. 
     The selecting unit  112 - 2  not only has the functions of the selecting unit  112  but also has an additional function of filtering. The selecting unit  112 - 2  determines, prior to performing operations with respect to each starting point candidate, whether a range that is approximated to be within the allowable error in the former next-point data and a range that is approximated to be within the allowable error in the next point dare satisfy a predetermined condition. If the condition is satisfied, then the selecting unit  112 - 2  determines that approximation cannot be done to be within the allowable error in the next point data, and does not perform a determination operation with respect to the starting point candidates. 
     For example, the selecting unit  112 - 2  compares the minimum lower limit slope and the maximum upper limit slope of the former next-point data with the minimum lower limit slope and the maximum upper limit, slope of the (existing) next point data, and determines whether a predetermined condition is satisfied. Then, the selecting unit  112 - 2  obtains a determination value (such as true or false) indicating whether or not the condition is satisfied, and skips operations with respect to the starting point candidates according to the determination value. 
     The minimum lower limit slope represents the minimum value from among the slopes (slopes) between the starting point candidates and a value obtained by subtracting the allowable error from the point data. The maximum upper limit slope represents the maximum value from among the slopes (slopes) between the starting point candidates and a value obtained by adding the allowable error to the point data.  FIG. 17  is a diagram for explaining an example of a minimum lower limit slope MinLS and a maximum upper limit slope MaxUS. 
     With respect to P 5 , there are three upper limit slopes (referred to as US 5 , US 5 ′, and US 5 ″) having the starting points P 1 , P 1 ′, and P 1 ″, respectively. The maximum upper limit slope MaxUS indicates the maximum value from among the three upper limit slopes.
 
MaxUS=Max(US5,US5′,US5″)
 
     In an identical manner, with respect to P 5 , there are three lower limit slopes (referred to as LS 5 , LS 5 ′, and LS 5 ″) having the starting points P 1 , P 1 ′, and P 1 ″, respectively. The minimum upper limit slope MinLS indicates the minimum value from among the three upper limit slopes.
 
MinLS=Min(LS5,LS5′,LS5″)
 
       FIG. 18  to  FIG. 20  are diagrams illustrating examples of the upper limit slope and the lower limit slope with respect to P 4 . In  FIG. 18  is illustrated an upper limit slope US 4 ″ and a lower limit slope LS 4 ″ in the case when P 1 ″ serves as the starting point. In  FIG. 19  is illustrated the upper limit slope US 4  and the lower limit slope LS 4  in the case when P 1  serves as the starting point. In  FIG. 20  is illustrated the upper limit slope US 4 ′ and the lower limit slope LS 4 ′ in the case when P 1 ′ serves as the starting point. 
     With respect to P 4  too, the maximum upper limit slope and the minimum lower limit slope can be obtained in the following manner.
 
MaxUS=(US4,US4′,US4″)
 
MinLS=(LS4,LS4′,LS4″)
 
     Herein, regarding P 4  (the former next-point data), it is assumed that MinLS 4  represents the minimum lower limit slope and MaxUS 4  represents the maximum upper limit slope. Moreover, regarding P 5  (the former next-point data), it is assumed that MinLS 5  represents the minimum lower limit slope and MaxUS 5  represents the maximum upper limit slope. The selecting unit  112 - 2  compares MinLS 4 , MaxUS 4 , MinLS 5 , and MaxUS 5  according to the following condition, and calculates a determination value that indicates whether or not the condition is satisfied.
 
“MaxUS4&lt;MinLS5” “MinLS4&gt;MaxUS5”
 
     This condition indicates that “either the maximum upper limit slope at P 4  is smaller than the minimum lower limit slope at P 5  or the minimum lower limit slope at P 4  is greater than the maximum upper slope at P 5 ”. In such a case, it is clear that the allowable error range with respect to P 4  does not overlap with the allowable error range with respect to P 5 . For that reason, it becomes possible to skip the operation of calculating the slope for each starting point candidate, and to continue with the operations assuming that all starting point candidates have been disabled. That is, it becomes possible to reduce the amount of calculation by means of avoiding unnecessary calculation. 
     Explained below with reference to  FIG. 21  is a data compression operation performed in the data compression device  100 - 2  configured in the abovementioned manner according to the second embodiment.  FIG. 21  is a flowchart for explaining an overall flow of the data compression operation according to the second embodiment. 
     The operations performed from Step S 201  to Step S 203  are identical to the operations performed from Step S 101  to Step S 103  in the data compression device  100  according to the first embodiment. Hence, that explanation is not repeated. 
     In the second embodiment, the selecting unit  112 - 2  calculates the determination value mentioned above (Step S 204 ). Then, the selecting unit  112 - 2  determines whether or not the determination value is true (Step S 205 ). If the determination value is false (No at Step S 205 ), then the selecting unit  112 - 2  performs operations with respect to each starting point candidate (Step S 206  to Step S 214 ). Herein, the operations performed from Step S 206  to Step S 214  are identical to the operations performed from Step S 104  to Step S 112  according to the first embodiment. Hence, that explanation is repeated. 
     On the other hand, if the determination value is true (Yes at Step S 205 ), then the selecting unit  112 - 2  proceeds to the operation at Step S 215  without performing the operations from Step S 206  to Step S 214 . The operations performed from Step S 213  to Step S 217  are identical to the operations performed from Step S 113  to Step S 115  according to the first embodiment. Hence, that explanation is not repeated. 
     In this way, in the data compression device according to the second embodiment, filtering is additionally performed with the aim of skipping the thinning calculation. As a result, it becomes possible to hold down the increase in the amount of calculation attributed to the use of a plurality or starting points. 
     Explained below with reference to  FIG. 22  is a hardware configuration of the data compression device according to the first embodiment or the second embodiment.  FIG. 22  is an explanatory diagram illustrating a hardware configuration of the data compression device according to the first embodiment or the second embodiment. 
     The data compression device according to the first embodiment or the second embodiment includes a control device such as a CPU (Central Processing Unit)  51 ; memory devices such as a ROM (Read Only Memory)  52  and a RAM (Random Access Memory)  53 ; a communication I/F  54  that performs communication by establishing connection with a network; and a bus  61  that interconnects the other constituent elements. 
     Meanwhile, a data compression program executed in the data compression device according to the first embodiment or the second embodiment is stored in advance in the ROM  52  or the like. 
     Alternatively, the data compression program executed in the data compression device according to the first embodiment or the second embodiment can be recorded in the form of an installable or an executable file in a computer-readable recording medium such as a CD-ROM (Compact Disk Read Only Memory), a flexible disk (FD), to CD-R (Compact Read Recordable), or a DVD (Digital Versatile Disk). 
     Still alternatively, the data compression program executed in the data compression device according to the first embodiment or the second embodiment can be saved as a downloadable file on a computer connected to the Internet or can be made available for distribution through a network such as the internet. 
     The data compression program executed in the data compression device according to the first embodiment or the second embodiment can cause a computer to function as each constituent element of the data compression device described above. In that computer, the CPU  51  can read the data compression program from a computer-readable recording medium in a main memory device and then execute the data compression program. 
     While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.