Title of Invention

A DATA RECORDING AND REPRODUCTION APPARATUS

Abstract A stream the decision unit (101,201) for deciding whether an data stream supplied from the outside has been compressed or not is provided, and a compression I Deaf lao Fco having a value according to the result of this dedision is attached to the ratio data stream, and the flag-attachted audio data stream is written in the stream storage unit (100b, 200b, 300b, 400b, 500b). After a compressed audio data stream from the outside is read from the stream storage unit, a watermark can be inserted into the compressed audio data stream, the time required for writing the compressed audio data stream into the stream storage unit is reduced, and the sound quality of data stream is prevented from being degraded.
Full Text SPECIFICATION
TECHNOLOGICAL FIELD
The present invention relates to data recording and reproduction apparatuses and, more particularly, to a structure for protecting the copyrights for audio data distributed on networks or audio data supplied in the form of packages.
BACKGROUND ART
In recent years, various kinds of multimedia equipment have been developed, and onerous multimedia software such as game software and education software have been marketed. However, under the-existing circumstances, the copyrights for these software are not satisfactorily protected, and a large number of illegally copied software appear on the market.
With the spread of the Internet in recent years,, "Electronic Commerce (EC)" is spreading throughout users of personal computers (PC), in. which the users can obtain,their favorite audio data or the like by downloading the data from homepages, and pay for the data by settlement means like credit cards.
The spread of network distribution by EC saves the users the trouble of going to record stores and, therefore^ the network distribution by EC has a possibility of greatly changing the

current distribution system of music, especially CD marketing.
By the way, the user can repeatedly listen to audio data obtained by downloading as described above by recording it in a portable recording medium such as a CD-R (Compact Disk Recordable).
Therefore, if the user once obtains audio data in a PC, whether the audio data is obtained through the internet or from a music CD on the market, the user can freely copy the audio data by using a CD-R. In other words, the copyright for the audio data stored in the PC cannot be effectively protected. Accordingly, in such network distribution, to prevent audio data which has once been obtained by downloading, from being copied and transferred to another user, i.e., to prevent illegal copying, is very important in protecting the copyright.
Hereinafter, downloading and reproduction of audio data by using a PC will be described.
Figure 11 is a block diagram illustrating the structure of a PC which performs downloading of audio data and reproduction of the downloaded audio data. The PC performs recording and reproduction of audio data which has been downloaded through a network, and hereinafter the PC is referred to as "data recording and reproduction apparatus".
The data recording and reproduction apparatus 1000 includes a recording medium 1002 in which a compressed audio data stream is recorded as the above-described audio data; a stream writing

3
means for writing a compressed audio data stream ESau downloaded through a network 10a into the recording medium 1002; and a stream reading means 1003 for reading the compressed audio data stream ESau from the recording medium 1002.
Further, the data recording and reproduction apparatus 1000 includes a decoding means 1004 for decompressing, by decoding, the compressed audio data stream ESau output from the stream reading means 1003 to output a non-compressed data stream RSau; and a DA conversion means 1005 for performing DA conversion on the non-compressed audio data stream RSau to output analog audio data Aau to a speaker 20.
In the data recording and reproduction apparatus 1000 so constructed, when the compressed audio data stream ESau is downloaded through the network 10a, the compressed audio data stream ESau is once written in the recording medium 1002 such as a hard disk by the stream writing means 1001.
When reproducing the audio data, in the data recording and reproduction apparatus 1000, the compressed audio data stream ESau is read from the recording medium 1003 by the stream reading means 1003. Further, the compressed audio data stream ESau is decompressed by decoding in the decoding means 1004, whereby a non-compressed audio data stream RSau is restored.
The non-compressed audio data stream RSau is converted to analog audio data Aau by the DA conversion means 1005 to be output to the speaker 20.

4
As described above, in the data recording and reproduction apparatus 1000 implemented by a PC, the audio data distributed on the network 10a can be easily illegally copied by recording the compressed audio data stream ESau which has been downloaded through the network 10a, in the recording medium 1002.
Meanwhile, MD (Mini Disc) players have spread as recording and reproduction apparatuses capable of recording digital audio data recorded on recording media such as CDs.
Figure 12 is a block diagram illustrating the structure of an MD player.
This MD player 1100 includes a recording medium 1103 in which digital audio data is recorded; a coding means 1101 for compressing a non-compressed audio data stream Sau read from a CD 10b by coding to output a compressed audio data stream ESau; and a stream writing means 1102 for writing the compressed audio data stream ESau in the recording medium 1103 as the above-described digital audio data.
Further, the MD player 1100 includes a stream reading means 1104 for reading the compressed audio data stream ESau from the recording medium 1103; a decoding means 1105 for decompressing the read compressed audio data stream ESau by decoding to output a non-compressed audio data stream RSau; and a DA conversion means 1106 for performing DA conversion on the non-compressed audio data stream RSau to output analog audio data Aau to a speaker 20.

5
In the MD player 1100 so constructed, when the digital audio data (non-compressed audio data stream) Sau obtained from the CD 10b is input, the non-compressed audio data stream Sau is compressed by coding in the coding means 1101 to be output as the compressed audio data stream ESau. The compressed audio data stream ESau is once written in the MD 1103 by the writing means 1102.
When reproducing the audio data, in the MD player 1100, the compressed audio data stream ESau is read from the recording medium 1103 by the stream reading means 1104, and the compressed audio data stream ESau is decompressed by decoding in the decoding means 1105 to be output as a non-compressed audio data stream RSau.
The non-compressed audio data stream RSau is converted to analog audio data Aau by the DA conversion means 1005 to be output to the speaker 20.
In the MD player as described above, the digital audio data recorded in the CD can be easily illegally copied by digital-recording the audio data in the MD.
Furthermore, according to the recent trend of technology, there is a demand for a recording and reproduction apparatus such as an MD player which is able to download audio data from home pages on the internet, and a data recording and reproduction apparatus meeting this demand has been developed.
Figure 13 is a block diagram for explaining a data recording

6
and reproduction apparatus which is able to obtain audio data from both of a home page and a CD to reproduce it.
This data recording and reproduction apparatus 1200 includes a recording medium 1204 containing a compressed audio data stream; and a stream attribute decision means 1201 for deciding whether the input audio data stream is compressed or not. Usually, the audio data stream downloaded through the network 10a is compressed while the audio data stream read from the CD 10b is not compressed.
Further, the data recording and reproduction apparatus 1200 includes a coding means 1202 for compressing the non-compressed audio data stream Sau output from the stream attribute decision means 1201 by coding to output a compressed audio data stream ESau; and a stream writing means 1203 for writing the compressed audio data stream ESau output from the coding means 1202 and the non-compressed audio data stream DSau output from the stream attribute decision means 1201 into the recording medium 1204.
Further, the data recording and reproduction apparatus 1200 includes a stream reading means 1205 for reading the compressed audio data stream ESau from the recording medium 1204; a decoding means 1206 for decompressing the read compressed audio data stream ESau by decoding to output a non-compressed audio data stream RSau; and a DA conversion means 1207 for performing DA conversion on the non-compressed audio data stream RSau to output analog audio data Aau to the speaker 20.

7
In the data recording and reproduction apparatus 1200 so constructed, when an audio data stream is input, the stream attribute decision means 1201 decides whether this audio data stream is compressed or not. According to the result of the decision, the audio data stream is output to one of the stream writing means 1203 and the coding means 1202. For example, when the compressed audio data stream ESau is input through the network 10a, this compressed audio data stream ESau is output to the stream writing means 1203 according to the decision of the stream attribute decision means 1201. On the other hand, when the non-compressed audio data stream Sau obtained from the CD 10b is input, this non-compressed audio data stream Sau is output to the coding means 1202 according to the decision of the stream attribute decision means 1201.
The compressed audio data stream ESau is once written in the
MD 1204 by the stream writing means 1203.
When reproducing the audio data, in the data recording and reproduction apparatus 1200, the compressed audio data stream
ESau is read from the recording medium 1204 by the stream reading
means 1205. This compressed audio data stream ESau is
decompressed by decoding in the decoding means 1206 to be output
as a non-compressed audio data stream RSau.
The non-compressed audio data stream RSau is converted to
analog audio data Aau by the DA conversion means 1207 to be
output to the speaker 20.

8
In the data recording and reproduction apparatus shown in figure 13, illegal copying of audio data for which the copyright is to be protected becomes easier and, therefore, preventing such illegal copying of audio data is of greater importance.
By the way, as a countermeasure against illegal copying of audio data, there is a method of inserting a watermark in audio data for which the copyright is to be protected.
This watermark is inserted in digital audio data. Further, the watermark-inserted digital audio data is converted to analog audio data. Whether the analog audio data obtained by DA converting the watermark-inserted digital audio data remains as it is or is converted to digital data, the watermark can be extracted from the analog data or the digital data.
Hereinafter, a description will be given of the general principle of watermark insertion and extraction. Initially, the outline of a process of inserting a watermark in digital audio data will be described.
Figure 14 is a diagram conceptually illustrating insertion and extraction of a watermark in/from digital audio data.
A process Pad of inserting signature data (watermark) Dwmi in digital audio data recorded as an audio data file ODau is performed, and then the digital audio data in which the signature data is inserted is recorded as a signature-data-inserted audio data file SDau.
Then, a process Pex of extracting the signature data Dwmx

9
from the digital audio data in accordance with the digital audio data recorded as the audio data file ODau and the digital audio data recorded as the signature-data-inserted audio data file SDau, is performed.
Figure 15 is a flowchart of the watermark insertion process.
Initially, digital audio data is subjected to blocking (step SI). This process is to divide the digital audio data into a plurality of data groups (blocks) each comprising a predetermined number of sampling data, for convenience in the subsequent process.
Next, each block is subjected to the Fourier transform (step S2). The arithmetic operation for the Fourier transform will be later described in detail.
Thereafter, the following data transform is carried out as the watermark insertion process.
The watermark is composed of multiple bits of digital data (signature data), and each bit of the signature data corresponds to each block.
Initially, it is confirmed that the value of each bit as a component of a block string of the signature data (bit string of the signature data) is "0" or "1" (step S3). A block corresponding to a bit of "0" is not subjected to watermarking. A block corresponding to a bit of "1" is subjected to watermarking, wherein an imaginary part and a real part of Fourier transform coefficients of audio data corresponding to

10
this block are replaced with each other, and the real part is multiplied with -1 (step S4). This process is performed for each block.
Then, each block is subjected to the inverse Fourier transform (step S5). Thereby, audio data of each block is restored. The inverse Fourier transform will be later described in more detail.
Through the above-described processes, a watermark to which a normal human ear does not respond is inserted in the audio data. Hereinafter, the respective processes of the watermarking technique will be described in more detail.
Initially, the Fourier transform and the inverse Fourier transform will be briefly described. The Fourier transform employed in the process of inserting a watermark (information to be embedded) is called "discrete Fourier transform" which is defined as follows.
When a discrete one-dimensional real number function f(n) (nGZ,0^n one-dimensional complex number function F(k) (kez,0^k Here, Z denotes the set of whole integers. Further, formula (1) satisfies the conditions given by formulae (2) and (3).

11

Further, the inverse discrete Fourier transform will be described hereinafter.
When a discrete one-dimensional real number function f(n) (nez,0^n Here, Z denotes the set of whole integers. Further, formula (4) satisfies the conditions given by formulae (5) and (6).

Next, the watermark embedding process for audio data will be described more specifically.
First of all, blocking of audio data will be described with reference to figure 16.
Blocking is a process to represent sample values Sound(i) of digital audio data in which a watermark is to be embedded (hereinafter, referred to as target audio data) as a set of

12
blocks each comprising samples as many as the n-th power of 2 (2n) Here, it is assumed that the total number of blocks obtained by blocking the target audio data is (t+1), the first block is block Bo, the k-th block (k: arbitrary number) is block Bk, and the last block is block Bt. Further, the sample values of the k-th block are represented by Bk(j).
The relationship between the sample values Sound(i) of the target audio data and the respective sample values Bk(j) in the block is represented by the following formula (7).
Bk(j) = Sound(i) (7)
where Z denotes the set of whole integers, k and j satisfy k,j^Z, and i satisfies i=2nk+j (0^j It is needless to say that the variables n and k used here are different from the variables n and k used in formula (1) which defines the general discrete one-dimensional Fourier transform and formula (4) which defines the discrete one-dimensional inverse Fourier transform.
Next, the watermark embedding process will be described.
Initially, the audio data (sample values) Bk(j) of the k-th block Bk are subjected to the discrete Fourier transform to obtain data Fk(m). Here, k is a variable indicating an arbitrary block
amongst the blocks B0-Bt, and it satisfies k^Z, ke[0,t(total number of blocks)].
Further, a data bit string to be inserted is defined by a one-dimensional discrete integral number function U(d), and data

13
which is obtained by embedding information in the data Fk(in)(mG Z,m€[l,2n]) according to the value of each bit in the data bit string defined by the function U(d), is represented by F'k(m).
Here, d and dn satisfy the condition (d,dnGZ). When dn satisfies dn Then, F'Jm) is represented by the following formulae
(8)-{15), wherein m satisfies inGZ, mG[l,2n].
Re(F\(m)) = -lm(Fk(m)) (when U(m)=l) -.-(8)
Re(F'k (JW)) = Re(F,(m)) (when U(m) - 0) .. . (9 )
lm(F\(m)) = Re(Fk(m)) (when U(m)-1) ...(10)
Im(F \ (m)) = lm(Fk (m)) (when U(m) = 0) . . . (11)
Re(F \ (2" - w +1)) = - lm(Fk (m)) (when U(m) =1) ...(12) Rt(F\ (2" - m +1)) = Re(Fk(m)) (when U(m) = 0) . . . (13 ) \m(F\(2"-m + l)) = Re(Fk(m)) (when U(m) = l) --.(14) lm(F\ (2" - m +1)) = lm(Fk(m)) (when U(m) = 0) . . . (15 ) The above-described formulae (8)-(ll) are applied to the low-frequency components amongst the 2n pieces of data (frequency components) Fk(m) obtained by subjecting the 2n pieces of data (sample values) Bk(j) to the discrete Fourier transform. On the other hand, the above-described formulae (12)-(15) are applied to the high-frequency components of the 2n pieces of data (frequency components) Fk(m) obtained by subjecting the 2n pieces of data (sample values) Bk(j) to the discrete Fourier transform.
Further, as represented by formulae (9), (ll)f (13) and (15),

14
a block corresponding to a bit of 0 in the signature data bit string is not subjected to the watermark embedding process. On the other hand, as represented by formulae (8), (10), (12) and (14), a block corresponding to a bit of 1 in the signature data bit string is subjected to the watermark embedding process, in which the imaginary part and the real part of the data Fk(m) obtained by the Fourier transform of the audio data (sample values) Bk(j) corresponding to this block are replaced with each other, and the real part is multiplied with -1.
Further, the watermark embedding process is performed on pairs of the Fourier transformed data on the low-frequency side and the corresponding Fourier transformed data on the high-frequency side so that the target audio data in which information is embedded is not offensive to the ear of the listener. Here, the m-th Fourier transformed data F'k(m) which has been subjected to the watermark embedding process corresponds to the (2n-m+l)th Fourier transformed data F'k(2n-m+l) which has been subjected to the watermark embedding process.
Next, the watermark extraction process will be described. Figure 17 is a flowchart of the watermark extraction process Initially, audio data which has been subjected to the watermark embedding process is divided into plural blocks (step Slla), and each block is subjected to the Fourier transform (step S12a). Further, audio data which has not been subjected to the watermark embedding process is divided into plural blocks (step

15
Sllb), and the audio data of each block is subjected to the Fourier transform (step S12b).
Then, the data obtained as the results of the above-described Fourier transform steps are compared, block by block, between the blocks of the audio data which has been subjected to the watermark embedding process and the corresponding blocks of the audio data which has not been subjected to the watermark embedding process (step S13).
As the result of the comparison, when the data of the corresponding blocks agree with each other, it is decided that no watermark is embedded in the block which has been subjected to . the watermark embedding process, and the signature data bit is 0 (step S14a).
When the data of the corresponding blocks are different from each other, it is decided that a watermark is embedded in the block which has been subjected to the watermark embedding process, and the signature data bit is 1 (step S15).
This process is repeated block by block to extract the bit string (embedded information) constituting the signature data. Next, the watermark embedding process and the watermark extracting process will be described more specifically.
Initially, the process of embedding a watermark in each block will be described.
In the following description, Sound(n) indicates audio data (sample values) in one block in which signature data is to be

16

embedded, and syomei[u] indicates a signature data bit string to be embedded in data which is obtained by subjecting the audio data Sound(n) in one block to the Fourier transform. Further, F[Sound]{p) indicates data obtained by subjecting the target audio data Sound(n) to the discrete Fourier transform, and F1[Sound](p) indicates data obtained by embedding the signature data bit string in the F[Sound](p).
Here, the audio data Sound(n) is a function defined in the integral space and having an integer as its value. Note that n = 0,1,.*.,N.
Further, the signature data bit,string syomei[u] is also a
function defined in the integral space (refer to formula (16))
and having only 0 or 1 as its value. Note that u = 0,1.
syomei[u] - {1,0} ... (16)
When the audio data Sound(n) is subjected to the Fourier transform, the corresponding Fourier transformed data F[Sound](p) is obtained as follows.

...(17)
This F[Sound](p) is a function defined in the integral space and having a complex number as its value. Note that p = 0,1,...N.
Assuming that the real part of the Fourier transformed data F[Sound](p) which is a complex number is Re{F[Sound](p)} while the imaginary part thereof is Im{F[Sound](p)}, the data F1[Sound](p) can be represented by using the above-described

17
formulae (8)-(15) in accordance with the value of the signature data bit string syomei[u].
Assuming that the signature data bit string to be embedded in the Fourier transformed data F[Sound](p) corresponding to one block is syomei[0]=l, the first bit value F[Sound](l) of the Fourier transformed data F[Sound](p) and the N-th bit value F[Sound](N) thereof are subjected to the information embedding process by using the above-described formulae (8), (10), (12) and (14).
The following formulae (18)-(21) represent the Fourier transformed data F1[Sound](1) and F'[Sound](N) obtained in the watermark embedding process.
Re{F'[SoM"rf](l)} = -lm{F[Sound](l)} . . . (18 )
lm{F'[Sound](l)}=Re{F[Sound](l)} .. . (19)
KelF'lSound^N)} = - lm{F[Sound](N)} . .. {20 )
imiF'lSound^N)} = Re{F[Sound](N)} ... (21)
where Re and Im indicate the real part and the imaginary part of the complex number in { }, respectively.
On the other hand, assuming that the signature data bit string to be embedded in the audio data Sound(n) corresponding to one block is syomei[l]=0, the second bit value F[Sound](2) of the Fourier transformed data F[Sound](p) and the (N-l)th bit value F[Sound](N-l) thereof are subjected to the watermark embedding process by using the above-described formulae (9), (11), (13) and (15).

18

The following formulae (22)-(25) represent the Fourier transformed data F1[Sound](2) and F1[Sound](N-l) obtained in the watermark embedding process.
Ke{F'[Sound](2)} = Ke{F[Sound](2)} . . . (22 )
lm{F'[Sound](2)} = lm{F[Sound](2)} ... {23 )
Ke{Ff[Sound](N-l)} = Rt{F[Sound](N-l)} ... (24) lm{F'[Sound](N -1)} = lm{F[Sound](N -1)} .. . (25 ) By performing the inverse discrete Fourier transform on the data F'[Sound](p) which has been obtained by subjecting the Fourier transformed data F[Sound](p) corresponding to the audio data Sound(n) in one block to the watermark embedding process by using the above-described formulae (8)-(15), watermark-embedded audio data Sound1(n) is obtained as represented by the following formula (26) .

. . . (26)
Next, the watermark extraction process will be described briefly.
In this process, the Sound(n) and the Sound'(n) are respectively subjected to the Fourier transform, and the respective Fourier-transformed data are compared. When the values of these data are different from each other, the signature data bit string is extracted with the signature bit data being 1. When the values of these data are identical, the signature data bit string is extracted with the signature bit data being 0.

19
The algorithm will be briefly described in the following. In { }, n moves from 1 to N in order.
{ If F[Sound]{n) = F[Sound'](n) does not hold, syomei[n-l]=1
If F[Sound](n) = F[Sound'](n) holds, syomei[n-l]=0
}
By the way, in the existing reproduction apparatuses such as
MD players which do not detect watermarks, audio data streams in which watermarks are embedded as described above can be recorded and reproduced, like audio data streams in which no watermark is embedded.
If reproduction apparatuses such as MD players which will be manufactured in the future are only those which do not record audio data streams in which watermarks of "copy inhibit" are embedded but record audio data streams in which no watermarks of "copy inhibit" are embedded, illegal copying of the audio data streams can be restricted by watermarking in the future.
However, since watermarks are embedded in non-compressed audio data streams, it is difficult to simply apply the above-described watermark embedding process to the data recording and reproduction apparatus 1200 which receives compressed audio data streams from the homepage and non-compressed audio data streams from the CD.
Consequently, in the data recording and reproduction apparatus 1200 which can obtain audio data from both of the

20
homepage and the CD and reproduce the audio data, illegal copying of the audio data cannot be effectively prevented by using watermarking.
The present invention is made to solve the above-described problems and has for its object to provide a data recording and reproduction apparatus which can record and reproduce audio data whether it is supplied in the form of a non-compressed audio data stream or a compressed audio data stream, and which can satisfactorily protect the copyright for the audio data by embedding watermarks in these audio data streams, thereby effectively preventing illegal copying of the audio data.
DISCLOSURE OF THE INVENTION
A data recording and reproduction apparatus according to the present invention (Claim 1) is a data recording and reproduction apparatus for recording and reproducing an audio data stream as digital audio data, and comprises a stream storage unit for storing the audio data stream, a stream writing unit for writing the audio data stream into the stream storage unit, and a stream reading unit for reading the audio data stream from the stream storage unit. The stream writing unit includes a stream attribute decision means for deciding whether or not the audio data stream has been subjected to a data conversion process for digital audio data, and a stream writing means for attaching a conversion ID flag having a value according to the result of the

21
decision to the audio data stream, and writing the flag-attached audio data stream into the stream storage unit. The stream reading unit including a stream reading means for reading the audio data stream to which the conversion ID flag is attached, from the stream storage unit, and a watermarking means for inserting a watermark in the read audio data stream. The read audio data stream in which the watermark is to be inserted is subjected to an inverse conversion process of the data conversion process, according to the value of the conversion ID flag attached to the audio data stream.
According to the present invention (Claim 2), in the data recording and reproduction apparatus described in Claim 1, the stream reading unit has a DA conversion means for converting the audio data stream in which the watermark has been inserted by the watermarking means, to analog audio data, and outputs the analog audio data.
According to the present invention (Claim 3), in the data recording and reproduction apparatus described in Claim 1, the conversion process performed on the digital audio data is a compression process for compressing the digital audio data by coding; the inverse conversion process of the data conversion process is a decompression process for decompressing the compressed digital audio data by decoding; and the stream writing means attaches a compression ID flag to the audio data stream as the conversion ID flag having a value according to the result of

22
the decision, the compression ID flag indicating whether or not the audio data stream has been subjected to the digital audio data compression process.
According to the present invention (Claim 4), in the data recording and reproduction apparatus described in Claim 3, the stream reading unit includes a stream flag decision means for deciding whether or not the audio data stream read from the stream storage unit has been subjected to the compression process, on the basis of the compression ID flag of the read audio data stream, and a decoding means for decompressing, by decoding, the audio data stream which is decided as being subjected to the compression process by the stream flag decision means. The audio data stream which is decided as being not subjected to the compression process by the stream flag decision means, and the decompressed audio data stream output from the decoding means are supplied to the watermarking means.
According to the present invention (Claim 5), in the data recording and reproduction apparatus described in Claim 4, the stream reading unit has a DA conversion means for converting the audio data stream in which the watermark is inserted by the watermarking means, to analog audio data, and outputs the analog audio data.
According to the present invention {Claim 6), in the data recording and reproduction apparatus described in Claim 1, the conversion process performed on the digital audio data includes

23
at least one of a compression process for compressing digital audio data by coding and a scramble process for scrambling digital audio data or compressed digital audio data; the inverse conversion process of the data conversion process includes at least one of a decompression process for decompressing compressed digital audio data by decoding and a descramble process for descrambling scrambled digital audio data or scrambled compressed digital audio data; and the stream writing means attaches a compression ID flag and a scramble ID flag to the audio data stream as the conversion ID flag having a value corresponding to the result of the decision, the compression ID flag indicating whether or not the audio data stream has been subjected to the digital audio data compression process, and the scramble ID flag indicating whether or not the audio data stream or the compressed audio data stream has been subjected to the digital audio data scramble process.
According to the present invention (Claim 7), in the data recording and reproduction apparatus described in Claim 6, the stream writing unit includes a scramble key writing means for writing a scramble key adapted to the audio data stream which has been subjected to the scramble process, into the stream storage unit. The stream reading unit includes a scramble key reading means for reading the scramble key adapted to the audio data stream which has been subjected to the scramble process, from the stream storage unit; a first stream flag decision means for

24
deciding whether or not the audio data stream read from the stream storage unit has been subjected to the scramble process, on the basis of the scramble ID flag of the read audio data stream; a descrambling means for descrambling the audio data stream which is decided as being scrambled by the first stream flag decision means, by using the corresponding scramble key; a second stream flag decision means for deciding whether or not the audio data stream which is decided as being not scrambled by the first stream flag decision means, and the descrambled audio data stream output from the descrambling means have been subjected to the compression process, on the basis of the compression ID flags of these audio data streams; and a decoding means for decompressing, by decoding, the audio data stream which is decided as being compressed by the second stream flag decision means. The audio data stream which is decided as being not scrambled by the first stream flag decision means and the descrambled audio data stream output from the descrambling means are supplied to the second stream flag decision means, while the audio data stream which is decided as being not compressed by the second stream flag decision means and the decompressed audio data stream output from the decoding means are supplied to the watermarking means.
According to the present invention (Claim 8), in the data recording and reproduction apparatus described in Claim 7, the stream reading unit has a DA conversion means for converting the

25
audio data stream in which the watermark is inserted by the watermarking means, to analog audio data, and outputs the analog audio data.
According to the present invention (Claim 9), in the data recording and reproduction apparatus described in Claim 1, the stream reading unit is constituted by a single apparatus for reproducing a data stream, and this stream reproduction apparatus includes an apparatus type information holding means for holding apparatus type information which indicates the type of this apparatus. The stream storage unit includes a stream storage means for storing the audio data stream supplied from the stream writing unit; an authorized apparatus type information storage means for storing authorized apparatus type information indicating stream reproduction apparatuses which are permitted to read the audio data stream from the stream storage means; an apparatus type information obtaining means for obtaining the apparatus type information held by the apparatus type information holding means; and a stream read permission decision means for searching the authorized apparatus type information storage means for the apparatus type information obtained by the apparatus type information obtaining means, and permitting the stream reading unit to read the audio data stream from the stream storage unit only when an authorized apparatus type information corresponding to the obtained apparatus type information is present.
According to the present invention (Claim 10) in the data

26
recording and reproduction apparatus described in Claim 4, the stream reading unit is constituted by a single stream reproduction apparatus, and this stream reproduction apparatus has an apparatus type information holding means for holding apparatus type information indicating the type of this apparatus. The stream storage unit includes a stream storage means for storing the audio data stream supplied from the stream writing means; an authorized apparatus type information storage means for storing authorized apparatus type information indicating stream reproduction apparatuses which are permitted to read the audio data stream from the stream storage means; an apparatus type information obtaining means for obtaining the apparatus type information held by the apparatus type information holding means; and a stream read permission decision means for searching the authorized apparatus type information storage means for the apparatus type information obtained by the apparatus type information obtaining means, and permitting the stream reading unit to read the audio data stream from the stream storage unit only when an authorized apparatus type information corresponding to the obtained apparatus type information is present.
According to the present invention {Claim 11), in the data recording and reproduction apparatus described in Claim 7, the stream reading unit is constituted by a single apparatus for reproducing a data stream, and this stream reproduction apparatus has an apparatus type information holding means for holding

27
apparatus type information indicating the type of this apparatus. The stream storage unit includes a stream storage means for storing the audio data stream supplied from the stream writing unit; a scramble key storage means for storing the scramble key supplied from the stream writing means; an authorized apparatus type information storage means for storing authorized apparatus type information indicating stream reproduction apparatuses which are permitted to read the audio data stream from the stream storage means; an apparatus type information obtaining means for obtaining the apparatus type information held by the apparatus type information holding means; and a stream read permission decision means for searching the authorized apparatus type information storage means for the apparatus type information obtained by the apparatus type information obtaining means, and permitting the stream reading unit to read the audio data stream from the stream storage means only when an authorized apparatus type information corresponding to the obtained apparatus type information is present.
According to the present invention (Claim 12), in the data recording and reproduction apparatus described in Claim 7, the stream reading unit is constituted by a single apparatus for reproducing a data stream, and this stream reproduction apparatus has an apparatus type information holding means for holding apparatus type information indicating the type of this apparatus. The stream storage unit includes a stream storage means for

28
storing the audio data stream supplied from the stream writing unit; a scramble key storage means for storing the scramble key-output from the stream writing unit; an authorized apparatus type information1 storage means for holding authorized apparatus type information* indicating stream reproduction apparatuses which are authorized to read the audio data stream from the stream storage means; an apparatus type information obtaining means for obtaining the apparatus type information held by the apparatus type information holding means; and a scramble key' read permission decision means for searching the authorized apparatus type information storage means for the apparatus type information obtained by the apparatus type information obtaining means, and permitting the scramble key reading means to read the scramble key from the scramble key storage means only when an authorized apparatus type information corresponding to the obtained apparatus type information is present.
According to a thirteenth aspect of the present invention, in the data recording and reproduction apparatus described in Claim 1, the stream storage unit is constituted by an IC card on which a RAM for storing audio data stream and a CPU for controlling access to the audio data stream stored in the RAM are mounted.
According to the present invention (Claim 14), in the data recording and reproduction apparatus described in Claim 9, the stream storage unit1 is constituted by an IC card on which a RAM

29
for storing an audio data stream and a CPU for controlling access to the audio data stream stored in the RAM are mounted; the stream storage means and the authorized apparatus type information storage means are constituted by the RAM; and the apparatus type information obtaining means and the stream read permission decision means are constituted by the CPU.
According to a fifteenth aspect of the present invention, in the data recording and reproduction apparatus described in Claim
11, the stream storage unit is constituted by an IC card on which
a RAM for storing an audio data stream and a CPU for controlling
access to the audio data stream stored in the RAM are mounted;
the stream storage means, the scramble key storage means, and the
authorized apparatus type information storage means are
constituted by the RAM; and the apparatus type information
obtaining means and the stream read permission decision means are
constituted by the CPU.
According to a sixteenth aspect of the present invention, in the data recording and reproduction apparatus described in Claim
12, the stream storage unit is constituted by an IC card on which
a RAM for storing an audio data stream and a CPU for controlling
access to the audio data stream stored in the RAM are mounted;
the stream storage means, the scramble key storage means, and the
authorized apparatus type information storage means are
constituted by the RAM; and the apparatus type information
obtaining means and the scramble key read permission decision

30
means are constituted by the CPU.
As described above, the data recording and reproduction apparatus according to the present invention (Claim 1) is provided with a stream storage unit for storing the audio data stream; a stream writing unit for writing the audio data stream into the stream storage unit; and a stream reading unit for reading the audio data stream from the stream storage unit. The stream writing unit includes a stream attribute decision means for deciding whether or not the audio data stream has been subjected to a data conversion process for digital audio data, and the audio data stream is given a conversion ID flag having a value according to the result of the decision to the audio data stream and then written in the stream storage unit. Therefore, a watermark can be inserted in the audio data stream, not when * recording the audio data stream in the stream storage unit but when reading the audio data stream from the stream storage unit.
Thereby, this apparatus can dispense with an inverse conversion process of the data conversion process, which is required in the case where a watermark is inserted in a converted audio data stream when the stream is recorded in the stream storage unit, and a subsequent data conversion process. As the result, the reproduced audio data stream is prevented from being degraded in sound quality, and the recording time is reduced.
According to the present invention (Claim 2), the data recording and reproduction apparatus described in Claim 1 is

31
provided with a DA conversion means for converting the audio data stream in which the watermark is inserted by the watermarking means, to analog audio data, and the analog audio data is output from the stream reading unit. Therefore, the analog audio data can be protected by the watermark, and the reproduced analog audio data stream is prevented from being degraded in sound quality, and moreover, the recording time is reduced.
According to the present invention (Claim 3), in the data recording and reproduction apparatus described in Claim 1, the data conversion process performed on the digital audio data is a compression process for compressing the digital audio data by coding, the inverse conversion process is a decdmpression process for decompressing the compressed digital audio data by decoding, and a compression ID flag indicating whether the audio data stream has been subjected to the compression process or not is used as the conversion ID flag. Therefore, this apparatus can dispense with the decoding process which is required in the case where a watermark is inserted in an audio data stream compressed by coding when the stream is recorded in the stream storage unit, and the subsequent compression process. As the result, the reproduced audio data stream is prevented from being degraded in sound quality, and the recording time is reduced.
According to the present invention (Claim 4), the data recording and reproduction apparatus described in Claim 3 is provided with a stream flag decision means for deciding whether

32
or not the audio data stream read from the stream storage unit has been subjected to the compression process, on the basis of the compression ID flag of the read audio data stream. Therefore, in the stream reading unit, only the compressed audio data streams can be selectively decompressed by decoding, amongst the audio data streams read from the stream storage unit.
According to the present invention (Claim 5), the data recording and reproduction apparatus described in Claim 4 is provided with a DA conversion means for converting the audio data stream in which the watermark is inserted by the watermarking means, to analog audio data, and the analog audio data is output from the stream reading unit. Therefore, the analog audio data can be protected by the watermark, and the reproduced analog audio data stream is prevented from being degraded in sound quality, and moreover, the recording time can be reduced.
According to the present invention (Claim 6), in the data recording and reproduction apparatus of the first aspect, the conversion process performed on the digital audio data includes at least one of a compression process for compressing digital audio data by coding and a scramble process for scrambling digital audio data or compressed digital audio data, and the inverse conversion process includes at least one of a decompression process for decompressing compressed digital audio data by decoding and a descramble process for descrambling scrambled digital audio data or scrambled compressed digital

33
audio data. Further, a compression ID flag indicating whether or not the audio data stream has been subjected to the digital audio data compression process, and a scramble ID flag indicating whether or not the audio data stream or the compressed audio data stream has been subjected to the digital audio data scramble process, are used as the compression ID flag. Therefore, this apparatus can dispense with the descrambling process and the decoding process which are required in the case where a watermark is inserted in an audio data stream compressed by coding when the stream is recorded in the stream storage unit, and the subsequent compression process. As the result, the reproduced audio data stream is prevented from being degraded in sound quality, and the recording time is reduced.
According to the present invention (Claim 7), the data recording and reproduction apparatus described in Claim 6 is provided with a first stream flag decision means for deciding whether the audio data stream read from the stream storage unit has been subjected to the scramble process or not, on the basis of the scramble ID flag of the read audio data stream, and a second stream flag decision means for deciding whether the read audio data stream has been subjected to the compression process or not, on the basis of the compression ID flag of the read audio data stream. Therefore, in the stream reading unit, amongst the audio data streams read from the stream storage unit, only the scrambled audio data streams can be selectively descrambled, and

34
only the compressed audio data streams can be selectively decompressed by decoding.
According to the present invention (Claim 8), the data recording and reproduction apparatus described in Claim 7 is provided with a DA conversion means for converting the audio data stream in which the watermark is inserted by the watermarking means, to analog audio data, and the analog audio data is output from the stream reading unit. Therefore, the analog audio data can be protected by the watermark, and the reproduced analog audio data stream is prevented from being degraded in sound quality, and moreover, the recording time is reduced.
According to the present invention (Claim 9), the data recording and reproduction apparatus described in Claim 1 is provided with an apparatus type information holding means for holding apparatus type information indicating the type of a stream reproduction apparatus constituting the stream reading unit, and an authorized apparatus type information storage means for storing authorized apparatus type information indicating stream reproduction apparatuses which are permitted to read the audio data stream from the stream storage means. Reading of the audio data stream from the stream storage unit is permitted only when the apparatus type information matches the authorized apparatus type information. Therefore, this apparatus can prevent that the audio data stream stored in the stream storage unit is undesirably read by an audio data recording and

35
reproduction apparatus having no watermarking means, and the read audio data stream is reproduced or copied without being subjected to watermarking.
According to the present invention (Claim 10), the data recording and reproduction apparatus described in Claim 4 is provided with an apparatus type information holding means for holding apparatus type information indicating the type of a stream reproduction apparatus constituting the stream reading unit, and an authorized apparatus type information storage means for storing authorized apparatus type information indicating stream reproduction apparatuses which are permitted to read the audio data stream from the stream storage means. Reading of the audio data stream from the stream storage unit is permitted only when the apparatus type information matches the authorized apparatus type information. Therefore, this apparatus can prevent that the audio data stream stored in the stream storage unit is undesirably read by an audio data recording and reproduction apparatus having no watermarking means, and the read audio data stream is reproduced or copied without being subjected to watermarking.
According to the present invention (Claim 11), the data recording and reproduction apparatus described in Claim 7 is provided with an apparatus type information holding means for holding apparatus type information indicating the type of a stream reproduction apparatus constituting the stream reading

36
unit, and an authorized apparatus type information storage means for storing authorized apparatus type information indicating stream reproduction apparatuses which are permitted to read the audio data stream from the stream storage means. Reading of the audio data stream from the stream storage unit is permitted only when the apparatus type information matches the authorized apparatus type information. Therefore, this apparatus can prevent that the audio data stream stored in the stream storage unit is undesirably read by an audio data recording and reproduction apparatus having no watermarking means, and the read audio data stream is reproduced or copied without being subjected to watermarking.
According to the present invention (Claim 12), the data recording and reproduction apparatus described in Claim 7 comprises an apparatus type information holding means for holding apparatus type information indicating the type of a stream reproduction apparatus constituting a stream reading unit, and an authorized apparatus type information storage means for holding authorized apparatus type information indicating stream reproduction apparatuses which are authorized to read the audio data stream from the stream storage means. Only when the apparatus type information matches the authorized apparatus type information, reading of a scramble key corresponding to the audio data stream from the stream storage unit is permitted. Therefore this apparatus prevents the scramble key stored in the stream

37
storage unit from being read by an audio data recording and reproduction apparatus having no watermarking means. Accordingly, even if the audio data stream is read from the stream storage unit, since this audio data stream cannot be descrambled, the audio data stream this audio data stream is prevented from being reproduced or copied without being subjected to watermarking.
According to the present invention (Claim 13), in the data recording and reproduction apparatus described in Claim 1, the stream storage unit is constituted by an IC card on which a RAM for storing audio data stream and a CPU for controlling access to the audio data stream stored in the RAM are mounted. Therefore, a compact and portable stream storage unit is realized.
According to the present invention {Claim 14), in the data recording and reproduction apparatus described in Claim 9, the stream storage unit is constituted by an IC card on which a RAM for storing an audio data stream and a CPU for controlling access to the audio data stream stored in the RAM are mounted. Therefore, readout control or the like for the audio data stream from the stream storage unit can be easily realized by the CPU.
According to the present invention (Claim 15), in the data recording and reproduction apparatus described in Claim 11, the stream storage unit is constituted by an IC card on which a RAM for storing an audio data stream and a CPU for controlling access to the audio data stream stored in the RAM are mounted. Therefore, readout control or the like for the scrambled audio

38
data stream from the stream storage unit can be easily realized by the CPU.
According to the present invention (Claim 16), in the data recording and reproduction apparatus described in Claim 12, the stream storage unit is constituted by an IC card on which a RAM for storing an audio data stream and a CPU for controlling access to the audio data stream stored in the RAM are mounted. Therefore, readout control or the like for the scramble key of the scrambled audio data stream from the stream storage unit can be easily realized by the CPU.
BRIEF DESCRIPTION OF THE DRAWINGS
Figure 1 is a conceptual diagram illustrating the schematic structure of a data recording and reproduction apparatus according to a first embodiment of the present invention.
Figures 2(a)-2(c) are diagrams for explaining the data structures of audio data streams, wherein figure 2(a) shows the data structure of an audio data stream supplied from the outside, figure 2(b) shows the data structure of a flag-attached audio data stream, and figure 2(c) shows the data structure of a watermark-inserted audio data stream.
Figure 3 is a block diagram illustrating the structure of the data recording and reproduction apparatus according to the first embodiment.
Figure 4 is a block diagram for explaining a data recording

39
and reproduction apparatus according to a second embodiment of the present invention.
Figure 5 is a diagram illustrating the data structure of a flag-attached audio data stream according to a fifth embodiment of the present invention.
Figure 6 is a block diagram for explaining a data recording and reproduction apparatus according to a third embodiment of the present invention.
Figure 7 is a diagram for explaining the contents stored in an authorized apparatus type information storage means in the data recording and reproduction apparatus of the third embodiment.
Figure 8 is a block diagram for explaining a data recording and reproduction apparatus according to a fourth embodiment of the present invention.
Figure 9 is a block diagram for explaining a data recording and reproduction apparatus according to a fifth embodiment of the present invention.
Figure 10 is a diagram illustrating another example of a detachable recording medium which constitutes a stream storage unit according to any of the aforementioned embodiments.
Figure 11 is a block diagram illustrating the structure of a conventional PC which performs downloading and reproduction of audio data.
Figure 12 is a block diagram for explaining a recording and reproduction apparatus (MD player) which is able to record

40
digital audio data recorded on a recording medium such as a CD.
Figure 13 is a block diagram for explaining a data recording and reproduction apparatus which is able to obtain audio data from either a homepage or a CD to reproduce it.
Figure 14 is a diagram for explaining an outline of a process of inserting and extracting a watermark.
Figure 15 is a diagram illustrating the flow of the watermark insertion process.
Figure 16 is a schematic diagram for explaining blocking of a non-compressed audio data stream in the watermark insertion process.
Figure 17 is a diagram illustrating the flow of the watermark extraction process.
Figure 18 is a block diagram for explaining a data recording and reproduction apparatus which is able to insert a watermark in either a non-compressed audio data stream or a compressed audio data stream.
BEST MODE TO EXECUTE THE INVENTION
The inventors of the present invention have earnestly studied the problem that the conventional method of inserting a watermark in an audio data stream cannot be simply applied to a data recording and reproduction apparatus to which both of a compressed audio data stream and a non-compressed audio data stream are supplied as audio data, and finally developed a data

41
recording and reproduction apparatus which can insert a watermark into an audio data stream, whether the supplied audio data stream is a non-compressed audio data stream or a compressed audio data stream.
Figure 18 is a block diagram for explaining a data recording and reproduction apparatus 1400 which can insert a watermark in both of a non-compressed audio data stream and a compressed audio data stream.
The data recording and reproduction apparatus 1400 is constructed so that it can obtain audio data from both of a homepage on a network 10b and a CD 10a. The apparatus 1400 includes a recording medium 1406 in which audio data is recorded, and a stream attribute decision means 1401 for deciding whether the input audio data stream is a compressed audio data stream Sau or a non-compressed audio data stream ESau.
Further, the data recording and reproduction apparatus 1400 includes a decoding means 1402 and a watermarking means 1403. The decoding means 1402 decompresses, by decoding, the compressed audio data stream ESau output from the stream attribute decision means 1401 to output a non-compressed audio data stream RSau. The watermarking means 1403 inserts watermarks in the non-compressed audio data stream Sau from the stream attribute decision means 1401 and the non-compressed audio data stream RSau from the decoding means 1402.
Further, the data recording and reproduction apparatus 1400

42
includes a coding means 1404 and a stream writing means 1405. The coding means 1404 compresses the watermark-inserted audio data stream Sauw by coding to output a compressed audio data stream ESauw. The stream writing means 1405 writes the compressed audio data stream ESauw into the recording medium 1406
Further, the data recording and reproduction apparatus 1400 includes a stream reading means 1407, a decoding means 1408, and a DA conversion means 1409. The stream reading means 1407 reads the compressed audio data stream ESauw from the recording medium 1406. The decoding means 1408 decompresses the compressed audio data stream ESauw by decoding to output a non-compressed audio data stream RSauw. The DA conversion means 1409 performs DA conversion on the non-compressed audio data stream RSauw to output analog audio data Aauw to a speaker 20.
In the data recording and reproduction apparatus 1400 so constructed, as in the conventional apparatus 1200 shown in figure 12, an input audio data stream is decided as to whether it is compressed or not, in the stream attribute decision means 1401. According to the result of the decision, the data stream is output to either the watermarking means 1403 or the decoding means 1402. For example, in the case where the compressed audio data stream ESau is input to the apparatus 14 00 through the network 10a, this compressed audio data stream ESau is output to the decoding means 1402 according to the decision of the stream attribute decision means 1401. In the decoding means 1402, the

43
compressed audio data stream ESau is decompressed by decoding, and the non-compressed audio data stream RSau is output to the watermarking means 1403.
On the other hand, in the case where the non-compressed audio data stream Sau obtained from the CD 10b is input to the apparatus 1400, this non-compressed audio data stream Sau is output to the watermarking means 14 03 according to the decision of the stream attribute decision means 1401.
In the watermarking means 1403, a watermark is inserted in the non-compressed audio data stream Sau. The watermark-inserted non-compressed audio data stream Sauw is compressed by coding in the coding means 14 04 to be output as the compressed audio data stream ESauw. Further, the compressed audio data stream ESauw is once written in the recording medium 1406 by the stream writing means 1405.
When reproducing the audio data, in the data recording and reproduction apparatus 1400, the compressed audio data stream ESauw is read from the recording medium 1406 by the stream reading means 1407. Then, the compressed audio data stream ESauw is decompressed by decoding in the decoding means 1408, and the non-compressed audio data stream RSauw is output from the decoding means 1408.
The non-compressed audio data stream RSauw is converted to the analog audio data Aauw by the DA conversion means 1409 to be output to the speaker 20.

44
In the data recording and reproduction apparatus 1400, however, there arises a new problem that recording of audio data takes much time because decoding of compressed audio data or coding of non-compressed audio data is carried out when recording it in the recording medium. Further, coding and decoding performed on an audio data stream (digital audio data) are usually non-reversible coding and decoding adapted to this coding, respectively, and therefore these processes may degrade the quality of audio data supplied from the outside.
So, the inventors of the present invention have made further study to develop a data recording and reproduction apparatus by which the above-described problems are solved.
Hereinafter, a description will be given of a data recording and reproduction apparatus which reduces the time required for recording audio data supplied from the outside, and minimizes degradation of the quality of reproduced audio data. (Embodiment 1)
Figure 1 is a conceptual diagram illustrating the schematic structure of a data recording and reproduction apparatus according to a first embodiment of the present invention.
The data recording and reproduction apparatus 100 comprises an apparatus body 110a which performs recording and reproduction of audio data, and a recording medium 110b which is detachably mounted on the apparatus body 110a and stores the audio data. The data recording and reproduction apparatus 100 is supplied

45
with, as audio data, a compressed audio data stream ESau and a non-compressed audio data stream Sau. In this first embodiment, the compressed audio data stream ESau is supplied from a network 10a by downloading. The non-compressed audio data stream Sau is supplied from a portable recording medium 10b such as a CD. Further, analog audio data Aau output from the apparatus body 110a is input to a speaker 20 to be converted to a speech.
The recording medium 110b is constituted by an IC card which can be inserted into a slot llOal of the apparatus body 110a. This IC card has a RAM (Random Access Memory) 11 Obi for storing audio data, and a CPU 110b2 for controlling writing of data into the RAM HObl.
In the disk drive apparatus 100 so constructed, when the compressed audio data stream ESau from the network 10a or the non-compressed audio data stream Sau from the CD is input to the apparatus, the data stream is recorded in the recording medium (IC card) 110b in the apparatus body 110a. On the other hand, when reproducing the audio data, the audio data stream read from the recording medium 110b is converted to the analog audio data Aau to be output to the speaker 20. The analog audio data Aau is converted to a speech by the speaker 20.
Figure 2(a) is a diagram illustrating the data structure of an audio data stream. Since the compressed audio data stream ESau and the non-compressed audio data stream Sau have the same data structure, these are shown as an audio data stream S in

46
figure 2(a).
The audio data stream S is composed of a stream header Sh containing information about the stream attribute, and a stream data area Sd containing audio data itself {digital audio data). The stream header Sh contains the following information as the information about the stream attribute: information Ico indicating the compression method for this stream S {compression method information), information Isa indicating the sampling frequency (sampling frequency information), information Ibi indicating the number of bits expressing digital data (bit number information), and information Isc indicating whether this stream S is scrambled or not (scrambling information).
To be specific, the value "0" of the compression method information Ico indicates that the audio data stream S is a non-compressed audio data stream obtained by LPCM (Linear Pulse Code Modulation). The value "1", "2", or "3" of the information Ico indicates that the audio data stream S is a compressed audio data stream obtained by the AC3 method, the dts (Digital Theater System) method, or the AAC (Advanced Audio Coding) method, respectively.
The AC3 method is an audio coding method for audio of movies such as 5.1ch and 2ch, and it is used in DVD-VIDEO. The dts method is also an audio coding method for audio of movies such as 5.1ch and 2ch, and this is used in theaters and DVD-VIDEO. The ACC method is an audio coding method for transmission of audio

47
data at a low bit rate.
The value "0", "1", or "2" of the sampling frequency information Isa indicates that the sampling frequency of the digital audio data is 48kHz, 96kHz, or 192kHz, respectively. The value "0", "1", or "2" of the bit number information Ibi indicates that the digital audio data is digital data of 16 bits, 20 bits, or 24 bits, respectively. The value "0" of the scrambling information Isc indicates that the audio data stream is not scrambled, and the value "1" of the information Isc indicates that the audio data stream is scrambled.
It is not necessary to describe the structure of the stream data area Sd in detail because the stream data area Sd is not the main subject of the present invention.
Hereinafter, the data recording and reproduction apparatus 100 will be described in detail.
Figure 3 is a block diagram illustrating the structure of the data recording and reproduction apparatus 100.
The data recording and reproduction apparatus 100 receives the compressed audio data stream ESau from the network 10a or the non-compressed audio data stream Sau from the recording medium 10b such as a CD, as the audio data stream S having the data structure shown in figure 2(a).
That is, the data recording and reproduction apparatus 100 comprises a stream storage unit 100b for storing the audio data streams ESau and Sau, a stream writing unit 100a for writing

48
these audio data streams into the stream storage unit 100b, and a stream reading unit 100c for reading these audio data streams from the stream storage unit 100b.
The stream writing unit 100a and the stream reading unit 100c are mounted on the apparatus body 110a shown in figure 1. The stream storage unit 100b corresponds to the recording medium 110b shown in figure 1, and it is constituted by the above-described IC card 110b on which a semiconductor memory device (RAM) is mounted.
The stream writing unit 100a comprises a stream attribute decision means 101 which decides whether the audio data stream S supplied from the outside is compressed or not, and outputs attribute decision information Iajl indicating the result of the decision; and a flag-attached stream writing means 102 which attaches a compression ID flag Fco that is set at a predetermined value, to the header Sh of the audio data stream S in accordance with the attribute decision information Iajl, and writes the audio data stream Safl with the compression ID flag Fco (refer to figure 2(b)) in the stream storage unit 100b. The flag-attached stream writing means 102 sets the value of the compression ID flag Fco to "0" when the attribute decision information Iajl indicates that the input audio data stream is a non-compressed stream. On the other hand, it sets the value of the compression ID flag Fco to "1" when the attribute decision information Iajl indicates that the input audio data stream is a compressed stream.

49
The non-compressed audio data stream is a data stream in which digital audio data stored in its stream data area is not compressed. The compressed audio data stream is a data stream in which digital audio data stored in its stream data area is compressed.
The stream reading unit 100c includes a stream reading means 104 which reads the audio data stream Safl from the stream storage unit 100b; and a stream flag decision means 105 which decides whether the audio data stream Safl is a non-compressed stream or a compressed stream in accordance with the value of the compression ID flag Fco included in the audio data stream Safl that has been read, and outputs these streams separately.
The stream reading unit 100c further includes a decoding means 106 which decompresses, by decoding, the compressed audio data stream output from the stream flag decision means 105 to output a decompressed audio data stream RSafl; and a watermarking means 107 which inserts a watermark Dwm into the stream data area Sd of the non-compressed audio data stream Safl output from the stream flag decision means 105 or into the stream data area Sd of the decompressed audio data stream RSafl output from the decoding means 106, and outputs a watermark-inserted audio data stream Sawl (refer to figure 2(c)).
Further, the stream reading unit 100c includes a DA conversion means 108 which performs DA conversion on the watermark-inserted audio data stream Sawl to output analog audio

50
data Aaw to a speaker 20, and this analog audio data Aaw is converted to a speech by the speaker 20.
The watermark Dwm inserted in the audio data stream by the watermarking means 107 is a flag indicating "copy inhibit" to protect the copyright for the audio data stream.
This watermark is inserted in a non-compressed digital audio data (audio data stream), and the watermark-inserted audio data stream is converted to analog audio data.
Generally, a watermark can be detected by comparison between digital audio data (audio data stream) including a watermark and digital audio data (audio data stream) including no watermark. Further, a watermark can be detected by comparison between analog audio data including a watermark (DA-converted digital audio data including a watermark) and analog audio data including no watermark (DA-converted digital audio data including no watermark).
In this first embodiment, with respect to the analog audio data Aaw obtained by DA converting the watermark-inserted audio data stream Saw, it is possible to detect the watermark from this analog audio data Aaw by analyzing this data Aaw or analyzing the audio data stream obtained by AD converting this data Aaw. Next, the operation will be described.
Initially, a description will be given of the operation of writing an audio data stream into the IC card (recording medium) constituting the stream storage unit 100b.

51
When an audio data stream S is supplied from the outside to the data recording and reproduction apparatus of the first embodiment, the stream attribute decision means 101 decides whether the input audio data stream S is a compressed audio data stream ESau or a non-compressed audio data stream Sau, and outputs attribute decision information Iajl indicating the result of the decision. To be specific, the decision by the stream attribute decision means 101 is performed according to the compression method information Ico included in the stream header Sh of the input audio data stream S. For example, when the value of the compression method information Ico is "0", information indicating that the audio data stream S is not compressed is output as the attribute decision information Iajl from the stream attribute decision means 101. When the value of the compression method information Ico is "1", "2" or "3", information indicating that the audio data stream S is compressed is output as the attribute decision information Iajl from the stream attribute decision means 101.
Usually, the audio data stream S downloaded through the network 10a is the compressed audio data stream ESau, and the audio data stream S read from the portable recording medium 10b such as a CD is the non-compressed audio data stream Sau.
Thereafter, in the flag-attached stream writing means 102, a compression ID flag Fco is attached to the stream header Sh of the audio data stream S in accordance with the attribute decision

52
information Iajl, and the flag-attached audio data stream Safl (refer to figure 2(b)) is written in the stream storage unit 100b by the writing means 102. For example, when the stream attribute decision means 101 decides that the audio data stream downloaded through the network 10a is compressed, the flag-attached stream recording means 102 sets the compression ID flag Fco to "1". On the other hand, when the stream attribute decision means 101 decides that the audio data stream read from the CD is not compressed, the flag-attached stream recording means 102 sets the compression ID flag Fco to "0".
Next, a description will be given of the operation of reading the audio data stream from the stream storage unit 100b. When reproducing the audio data, initially a stream read request is output from the stream reading means 104 to the stream storage unit 100b and, thereafter, the flag-attached audio data stream Safl is read from the stream storage unit 100b by the stream reading means 104. Then, the stream flag decision means 105 decides whether the audio data stream Safl is compressed or not according to the value of the compression ID flag Fco in the stream header Sh of the audio data stream Safl.
When it is decided that the read audio data stream is compressed, the audio data stream Safl is output from the stream flag decision means 105 to the decoding means 106. On the other hand, when it is decided that the read audio data stream is not compressed, the non-compressed audio data stream Safl is output

53
from the stream flag decision means 105 to the watermarking means 107.
In the decoding means 106, the compressed audio data stream Safl is decompressed by decoding, and the decompressed audio data stream RSafl is output from the decoding means 106 to the watermarking means 107.
In the watermarking means 107, a watermark Dwm is inserted in the non-compressed audio data stream, i.e., either the non-compressed audio data stream Safl from the stream flag decision means 105 or the decompressed audio data stream RSafl from the decoding means 106.
The watermark-inserted audio data stream Sawl (refer to figure 2(c)) is converted to analog audio data Aaw by the DA conversion means 108 to be output to the speaker 20. In the speaker 20, the analog audio data Aaw is converted to a speech to which a normal human ear responds.
As described above, the data recording and reproduction apparatus 100 of the first embodiment is provided with the stream attribute decision means 101 which decides whether an audio data stream supplied from the outside is compressed or not, and generates a compression ID flag Fco having a value according to the result of the decision. This flag Fco is attached to the audio data stream, and the audio data stream with the flag Fco is written in the stream storage unit 100b. Therefore; it is possible to decide whether or not the audio data stream read from

54
the stream storage unit 100b is to be decompressed by decoding, in accordance with the compression ID flag Fco attached to the audio data stream.
Accordingly, after reading the compressed audio data stream from the stream storage unit, it is decompressed and a watermark is inserted in the non-compressed audio data stream obtained by the decompression.
In other words, with respect to the compressed audio data stream supplied from the outside, it is written in the stream storage unit immediately after the simple process of attaching a compression ID flag to the stream, whereby the time required for writing the compressed audio data stream in the stream storage unit can be reduced.
Further, the quality of analog audio data obtained by reproducing the compressed audio data stream supplied from the outside is prevented from being degraded.
In the case where watermarking is performed before writing the compressed audio data stream in the stream storage unit, the following processes are required: a decompression process of converting the compressed audio data stream to the non-compressed audio data stream by decoding, a watermarking process of inserting a watermark in the non-compressed audio data stream, and a compression process of compressing the watermark-inserted non-compressed audio data stream by coding. In this case, since the decompression and compression processes are adapted to non-

55
reversible coding, degradation of sound quality occurs due to these processes. In contrast with this, in the case where watermarking is performed after reading the compressed audio data stream from the stream storage unit, only the above-described decompression and watermarking processes are required, and therefore degradation of sound quality due to compression can be avoided.
Further, in this first embodiment, a flag indicating that audio data including the flag is,copy inhibited is used as a watermark to restrict copying of the audio data including the watermark. However, the copyright protection method using watermarking is not restricted thereto.
For example, there is a method called "generation management" in which, a flag indicating how many times (generations) an audio data stream has been copied in past is inserted in the audio data stream as a watermark, and copying of the audio data stream is inhibited when a predetermined number of times (generations) is exceeded. Furthermore, there is a method in which information indicating the name or the like of the copyright holder of an audio data stream is inserted in the stream as a watermark and, when the audio data stream is copied without permission, the name of the copyright holder is extracted from the audio data stream according to the watermark to clarify the copyright holder. (Embodiment 2)

56
Figure 4 is a block diagram for explaining a data recording and reproduction apparatus according to a second embodiment of the present invention.
The schematic structure of the data recording and reproduction apparatus 200 of this second embodiment is identical to that of the apparatus 100 of the first embodiment shown in figure 1. That is, the data recording and reproduction apparatus 200 is composed of an apparatus body which performs recording and reproduction of audio data, and a recording medium which is detachably mounted on the body and stores the audio data.
The data recording and reproduction apparatus 200 is supplied with, as audio data, a compressed audio data stream ESau, a non-compressed audio data stream Sau, or a scrambled compressed audio data stream ESau. When the scrambled compressed audio data stream ESau is input to the apparatus 200, a scramble key for descrambling is also input to the apparatus 200.
In this second embodiment, to simplify the description, it is premised that a scrambled compressed audio data stream ESau with the corresponding scramble key or a non-scrambled compressed audio data stream ESau is downloaded through a network 10a to the apparatus 200, while a non-scrambled non-compressed audio data stream is supplied from a portable recording medium 10b such as a CD to the apparatus 200. Further, each of the audio data streams has the data structure shown in figure 2(a).
To be specific, the data recording and reproduction

57
apparatus 200 comprises a stream storage unit 200b for storing audio data streams supplied from the outside, a stream writing unit 200a for writing the audio data streams into the stream storage unit 200b, and a stream reading unit 200c for reading the audio data streams from the stream storage unit 200b.
The stream writing unit 200a and the stream reading unit 200c are mounted on the apparatus body (refer to figure 1). The stream storage unit 200b corresponds to the recording medium, and it is constituted by the above-described IC card on which a semiconductor memory device (RAM) is mounted.
The stream writing unit 200a includes a stream attribute decision means 201 which decides whether the audio data stream S supplied from the outside is compressed or not and whether the audio data stream S is scrambled or not, and outputs attribute decision information Iaj2 indicating the result of the decision; and a scramble key writing means 203 which writes a scramble key Ksc for descrambling the scrambled audio data stream in the stream storage unit 200b, which scramble key Ksc is supplied from the outside of the apparatus 200.
Further, the stream writing unit 200a includes a flag-attached stream writing means 2 02 which attaches a compression ID flag Fco having a predetermined value and a scramble ID flag Fsc having a predetermined value, to the header Sh of the audio data stream S in accordance with the attribute decision information Iaj2, and writes the audio data stream Saf2 with these flags Fco

58
and Fsc (refer to figure 5) in the stream storage unit 200b.
The flag-attached stream writing means 202 sets the values of the compression ID flag Fco and the scramble ID flag Fsc as follows. When the attribute decision information Iaj2 indicates that the input audio data stream is a non-compressed stream, the value of the compression ID flag Fco is set to "0". When the attribute decision information Iaj2 indicates that the input audio data stream is a compressed stream, the value of the compression ID flag Fco is set to "1". When the attribute decision information Iaj2 indicates that the input audio data stream is not scrambled, the value of the scramble ID flag Fsc is set to "0". When the attribute decision information Iaj2 indicates that the input audio data stream is scrambled, the value of the scramble ID flag Fsc is set to "1".
The non-compressed audio data stream is a data stream in which digital audio data stored in its stream data area is not compressed, while the compressed audio data stream is a data stream in which digital audio data stored in its stream data area is compressed. The non-scrambled audio data stream is a data stream in which digital audio data stored in its stream data area is not scrambled, while the scrambled audio data stream is a data stream in which digital audio data stored in its stream data area is scrambled.
The stream reading unit 200c includes a stream reading means 206 which reads the audio data stream Saf2 from the stream

59
storage unit 200b; and a first stream flag decision means 207 which decides whether the audio data stream Saf2 is a non-compressed stream or a compressed stream in accordance with the value of the compression ID flag Fco included in the.audio data stream Saf2 which has been read, and outputs these streams separately.
The stream reading unit 200c further includes a scramble key reading means 205 which reads the scramble key Ksc from the stream storage unit 200b; and a descrambling means 208 which descrambles the scrambled audio data stream output from the first stream flag decision means 207 by using the scramble key Ksc, and outputs a descrambled audio data stream DSaf2.
Further, the stream reading unit 200c includes a second stream flag decision means 209 which receives either the non-scrambled audio data stream Saf2 output from the first stream flag decision means 207 or the descrambled audio data stream DSaf2 output from the descrambling means 208, and decides whether the audio data streams Saf2 and DSaf2 are non-compressed data streams or compressed data streams in accordance with the values of the compression ID flags Fco included in these streams, and outputs these streams separately; and a decoding means 210 which decompresses the compressed audio data stream DSaf2 output from the decision means 209 by decoding to output a decompressed audio data stream RSaf2.
The stream reading unit 2 00c further includes a watermarking

60
means 211 which inserts a watermark Dwm into the data area Sd of the non-compressed audio data stream Saf2 or DSaf2 output from the second stream flag decision means 209 or into the data area Sd of the decompressed audio data stream RSafl output from the decoding means 210, to output a watermark-inserted audio data stream Saw2 (refer to figure 2(c)), and a DA conversion means 212 which performs DA conversion on the watermark-inserted audio data stream Saw2 to output analog audio data Aaw to a speaker 20. The analog audio data Aaw is converted to a speech by the speaker 20.
In many cases, the stream writing unit 200a is constructed as an apparatus for wiring the audio data stream and the scramble key into the stream storage unit 200b, and the stream reading unit 200c is constructed as another apparatus for reading the audio data stream and the scramble key from the stream storage unit 200b.
Further, the watermark Dwm to be inserted in the audio data stream by the watermarking means 210 is a flag indicating "copy inhibit" as in the first embodiment of the invention. Next, the operation will be described.
Initially, the operation of writing an audio data stream into the recording medium 20 0b will be described.
When an audio data stream is supplied from the outside to the data recording and reproduction apparatus 200, the stream attribute decision means 201 decides whether the input audio data stream is compressed or not and whether the input audio data

61
stream is scrambled or not, and outputs attribute decision information Iaj2 according to the result of the decision.
To be specific, decision of the stream attribute decision means 201 depends on the values of the compression method information Ico and the scrambling information Isc which are stored in the stream header Sh of the input audio data stream. For example, when the value of the compression method information Ico is "0", the audio data stream S is decided as being not compressed. When the value of the compression method information Ico is "1", "2" or "3", the audio data stream S is decided as being compressed. Further, when the value of the scrambling information Isc is "0", the audio data stream S is decided as being not scrambled. When the value of the scrambling information Isc is "1", the audio data stream S is decided as being scrambled.
Usually, in many cases, the audio data stream downloaded from the network 10a is either the scrambled compressed audio data stream ESau or the non-scrambled compressed audio data stream ESau, while the audio data stream read from the portable recording medium 10b such as a CD is the non-scrambled non-compressed audio data stream Sau.
Thereafter, in the flag-attached stream writing means 202, the compression ID flag Fco and the scramble ID flag Fsc are attached to the stream header Sh of the audio data stream in accordance with the attribute decision information Iaj2, and the

62
flag-attached audio data stream Saf2 (refer to figure 5) is written in the stream storage unit 200b by the writing means 202. For example, when the input audio data stream is decided as being compressed and scrambled, the values of the compression ID flag Fco and the scramble ID flag Psc are set to "1". When the input audio data stream is decided as being compressed but not scrambled, the value of the compression ID flag Fco is set to "1" and the value of the scramble ID flag Fsc is set to "0". When the input audio data stream is decided as being not compressed but scrambled, the value of the compression ID flag Fco is set to "0" and the value of the scramble ID flag Fsc is set to "1". Further, when the input audio data stream is decided as being not compressed nor scrambled, the values of the compression ID flag Fco and the scramble ID flag Fsc are set to "0",
Further, when the input audio data stream is scrambled, the scramble key Ksc for descrambling this audio data stream is input to the data recording and reproduction apparatus 200, and this scramble key Ksc is written in the stream storage unit 200b by
the writing means 203.
Next, the operation of reading the audio data stream from
the stream storage unit 200b will be described.
When reproducing the audio data, initially a stream read request is output from the stream reading means 206 to the stream storage unit 200b, and thereafter the flag-attached audio data stream Saf2 is read from the stream storage unit 200b by the

63
stream reading means 206. Then, the first stream1flag: decision means 207 decides whether the audio data stream Saf2 is scrambled or not, according to4the value of the"scramble ID flag Fsc included in the stream header Sh of the audio data stream Saf2.
When the read'audio data stream Saf2 is decided as being scrambled, the audio data stream Saf2 is output from^the stream flag decision means i|!207 to the descrambling means 208. Further, the scramble key Ksc' corresponding to the read audio data stream Saf2 is read from1 the stream storage unit 200b to be output to the descrambling means 208. In the descrambling means 208, the read audio data stream Saf2 is descrambled by using the corresponding scramble key Ksc, and the descrambled audio data stream DSaf2 is output to the^ second stream flag decision means 209.
On the other hand/ when the first stream flag decision means 207 decides that the read audio data stream is not scrambled, the audio data stream Saf2 is output from the stream flag decision means 207 to the second stream flag decision means 209.
In the second stream flag decision means 209, it is decided whether the audio data stream Saf2 or the descrambled audio data stream DSaf2 is compressed or not, according to the value of the compression ID flag Fco included in the stream header Sh of the audio data stream Saf2.
When the audio:i:data stream is decided as being compressed, the audio data stream Saf2 or DSaf2 is output from the second

64
stream flag decision means 109 to the decoding means 210. In the decoding means 210, the compressed audio data stream Saf2 or DSa£2 is decompressed by decoding, and the decompressed audio data stream RSaf is output from the decoding means 210 to the watermarking means 211.
On the other hand, when the second stream flag decision means 209 decides that the read audio data stream Saf2 or DSa£2 is not compressed, the audio data stream Saf2 or DSaf2 is output from the second stream flag decision means 209 to the watermarking means 211.
In the watermarking means 211, a watermark Dwm is inserted in the non-compressed audio data stream, i.e., the non-compressed audio data stream Saf2 or DSaf2 output from the second stream flag decision means 209, or the decompressed audio data stream RSaf output from the,decoding means 210.
The watermark-inserted audio data stream Saw2 is converted to analog audio data Aaw by the DA conversion means 212 to be output to the speaker 20. In the speaker 20, the analog audio data Aaw is converted to a speech to which a normal human ear responds.
As described above, the data recording and reproduction apparatus 200 of the second embodiment is provided with the stream attribute decision means 201 which decides whether an audio data stream supplied from the outside is compressed or not and whether the audio data stream is scrambled or not, and

65
ogenerates a compression ID flag Fco and a scramble ID flag Fsc according to the result of the decision. These ID flags Fco and Fsc are attached to the audio data stream, and the audio data stream with these flags is written in the stream storage unit 200b. Therefore, it is possible to decide that the audio data stream read from the stream storage unit 100b is to be subjected to both of decoding and descrambling, or one of these processes, or non of these processes, in accordance with the ID flags Fco and Fsc included in the audio data stream.
Accordingly, after reading the compressed audio data stream or the scrambled audio data stream from the stream storage unit, it is decompressed or descrambled, and a watermark is inserted in the non-scrambled non-compressed audio data stream. Thereby, the quality of reproduced audio data is prevented from being degraded, as described for the first embodiment.
Further, with respect to the compressed audio data stream or scrambled compressed audio data stream supplied from the outside, it is written in the stream storage unit immediately after the simple process of attaching a compression ID flag and a scramble ID flag Fsc to the stream, whereby the time required for writing the compressed audio data stream in the stream storage unit can be reduced.
Further, this second embodiment employs, as a watermark, a flag indicating that audio data including it is copy inhibited, thereby restricting copying of the audio data including the

66
watermark. However, the copyright protection method using watermarking is not restricted thereto, and those methods described for the first embodiment may be employed. (Embodiment 3)
Figure 6 is a block diagram for explaining a data recording and reproduction apparatus according to a third embodiment of the present invention.
The data recording and reproduction apparatus 300 is composed of a stream storage unit 300b for storing an audio data stream supplied from the outside, a stream writing unit 300a for writing the audio data stream into the stream storage unit 300b, and a stream reading unit 300c for reading the audio data stream from the stream storage unit 300b.
The stream writing unit 3 00a and the stream reading unit 300c are mounted on the apparatus body (refer to figure 1). The stream storage unit 3 00b corresponds to the recording medium which is detachably mounted on the apparatus body, and it is constituted by an IC card on which a semiconductor memory device (RAM) is mounted. However, the stream storage unit 300b is not restricted to an IC card type device, it may be constituted by a memory stick type device.
Further, the audio data stream supplied from the outside is either a compressed audio data stream ESau or a non-compressed audio data stream Sau, as in the first embodiment of the invention. For example, the compressed audio data stream ESau is

67
downloaded through a network 10a, and the non-compressed audio data stream Sau is supplied from a portable recording medium such as a CD.
Hereinafter, the constituents of the apparatus will be described in detail.
The stream writing unit 3 00a is identical to the stream writing unit 100a of the first embodiment including the stream attribute decision means 101 and the stream writing means 102.
The stream reading unit 300c includes an apparatus type information holding means 315 for holding information which indicates the type of the data recording and reproduction apparatus 300 (apparatus type information Ity), in addition to the constituents of the stream reading unit 100c of the first embodiment. In the apparatus type information holding means 315, a predetermined value, for example, "1" or "0", is stored in advance as the value of the apparatus type information Ity.
The stream storage unit 300b includes a stream storage means 311 which stores the audio data stream output from the stream writing means 102; and an authorized apparatus type information storage means 312 which stores the value of information indicating the apparatus type that is permitted to read the audio data stream from the stream storage means 311 (authorized apparatus type information Ity).
Figure 7 is a diagram illustrating the contents stored in the authorized apparatus type information storage means 312. The

68
value "0" of the authorized apparatus type information Ity stored in the storage means 312 indicates that the corresponding data recording and reproduction apparatus is a player having the function of inserting a watermark at the time of reproduction. The value "1" of:, the authorized'apparatus type information Ity stored in the storage means 312 indicates that the corresponding data recording and reproduction apparatus is a recorder having the function of inserting a watermark at the time of reproduction.
The stream storage unit 300b further includes an apparatus type information obtaining means 314 which reads the value of the apparatus type information Ity of the data recording and reproduction apparatus 300, from the apparatus type information storage means 315 in the stream reading unit 300c, in response to a read request from the stream reading unit 300c; and a stream read permission decision means 313 which searches the apparatus type information Ity stored in the authorized apparatus type information storage means 312 for the value of the read apparatus type information Ity, and decides whether reading of the audio data stream from the stream storage means 311 is to be permitted or not in accordance with the result of the search.
To be specific, the stream read permission decision means 313 permits the stream reading means 104 to read the audio data stream when the value of the apparatus type information Ity read from the apparatus type information holding means 315 agrees with any of the values of the apparatus type information Ity stored in

69
the authorized apparatus type information storage means 312. On the other hand, the stream read permission decision means 313 inhibits the stream reading means 104 from reading the audio data stream when the value of the apparatus type information Ity read from the apparatus type information holding- means 315 agrees with none of the values of the apparatus type information Ity stored in the authorized apparatus type information storage means 312.
For example, when the value of the apparatus type information Ity held by the apparatus type information holding means 315 is "1" (a recorder with the function of inserting a watermark at reproduction), since the value "1" of the apparatus type information Ity is stored in the authorized apparatus type information storage means 312 as shown in figure 7, reading of the audio data stream is permitted. In this case, the stream reading means 104 can read the audio data stream from the stream storage means 311.
On the other hand, when a value not shown in figure 1f for example, "2" is held in the apparatus type information holding means 315 or when the stream reading unit 300c does not have the apparatus type information holding means 315 and so the apparatus type information obtaining means 314 cannot obtain the value of the apparatus type information Ity, reading of the audio data stream is inhibited. In this case, the stream reading means 104 cannot read the audio data stream from the stream storage means 311.

70
In this third embodiment, since the stream storage unit 300b is constituted by an IC card as shown in figure 1, the stream storage means 311 and the authorized apparatus type information storage means 312 are implemented by a RAM mounted on the IC card. The stream read permission decision means 313 and the apparatus type information obtaining means 314 are implemented by a CPU mounted on the IC card.
Further, in many cases, the stream writing unit 300a is constructed as an apparatus for performing writing of the audio data stream into the'stream storage unit 300b, while the stream reading unit 300c*is constructed as another apparatus for performing reading of the audio data stream from the stream storage unit 300b. - 'o¦
Next, the operation will be described.
The operation of writing the audio data stream into the IC card (recording medium) constituting the stream storage unit 300b is identical to that already described for the first embodiment and, therefore, this operation will be briefly described hereinafter.
In the stream attribute decision means 101, it is decided whether an audio data stream S supplied from the outside is a compressed audio data stream ESau or a non-compressed audio data stream Sau, and attribute decision information Iajl indicating the result of the decision is output from the decision means 101. Thereafter, in the flag-attached stream writing means 102, a

71
compression ID flag Fco is attached to the stream header Sh of the audio data stream S in accordance with the attribute decision information Iajl, and the flag-attached audio data stream Safl (refer to figure 2(b)) is written in the stream storage unit 300b by the writing means 102. In this third embodiment, the flag-attached audio data stream Safl is written in the stream storage means 311 of the stream storage unit 300b.
Next, the operation of reading the audio data stream from the stream storage unit 300b will be described.
Initially, a stream read request is output from the stream reading means 104 to the stream storage unit 300b. Then, the value of the apparatus type information ity held by the apparatus type information holding means 315 in the stream reading unit 3 00c is read by the apparatus type information obtaining means 314 to be output to the stream read permission decision means 313.
In the stream read permission decision means 313, searching is carried out as to whether the value of the apparatus type information Ity which has been read is stored in the authorized apparatus type information storage means 312 or not. When the value of the read apparatus type information Ity is stored in the storage means 312, the permission decision means 313 decides that the stream reading means 104 is permitted to read the audio data stream. When the value of the read apparatus type information Ity is not stored in the storage means 312, the permission decision means 313 decides that the stream reading means 104 is

72
inhibited from reading the audio data stream.
In other words, the audio data stream stored in the stream storage means 311 can be read by the stream reading means 104 only when the stream read permission decision means 313 decides that reading is permitted. Thereby, the audio data stream Safl is read from the stream storage means 311 by the stream reading means 104.
For example, when the value of the apparatus type information Ity held by the apparatus type information holding means 315 is "1" (a recorder with the function of inserting a watermark at reproduction), this value agrees with one of the plural values of the apparatus type information Ity stored in the authorized apparatus type information storage means 312. Therefore, in the stream read permission decision means 313, the same value as the value of the apparatus type information Ity read by the apparatus type information obtaining means 314 is detected from the authorized apparatus type information storage means 312. At this time, the permission decision means 313 decides that reading is permitted, and this decision permits the stream reading means 104 to read the audio data stream from the stream storage means 311.
On the other hand, when a value other than the plural values of the apparatus type information Ity stored in the authorized apparatus type information storage means 312, for example, "2" is held by the apparatus type information holding means 315, the

73
stream read permission decision means 313 decides that reading should be inhibited. Further, when the stream reading unit 300c does not have the apparatus type holding means 315 and so the apparatus type information obtaining means 314 cannot obtain any value as the apparatus type information Ity, the stream read permission decision means 313 decides that reading is inhibited, and this decision disables the stream reading means 104 to read the audio data stream from the stream storage means 311.
The purpose of deciding whether reading of the audio data stream is permitted or not (inhibited) by the stream read permission decision means 313 is to avoid that the audio data stream is undesirably read from the stream storage unit 300b by a reproduction apparatus which does not perform watermarking when reproducing the audio data stream and thereby the audio data stream is reproduced or copied without being subjected to watermarking to protect the copyright.
The audio data stream read from the stream storage unit 300b by the stream reading means 104 is subjected to watermarking in the same manner as described for the first embodiment, and the watermark-inserted audio data stream is converted to analog audio
data.
In brief, the stream flag decision means 105 decides whether the read audio data stream Safl is compressed or not in accordance with the value of the compression ID flag Fco included in the audio data stream Safl. Only when the audio data stream

74
Safl is compressed, it is decompressed by decoding in the decoding means 106, and the decompressed audio data stream RSafl is output to the watermarking means 107.
In the watermarking means 107, a watermark is inserted in the non-compressed data stream, i.e., the decompressed audio data stream RSafl from the decoding means 106 or the audio data stream which has been decided as being not compressed by the stream flag decision means 105. Thereby, the audio data stream read from the stream storage unit 300b is in the copyright protected state. The watermark-inserted audio data stream Sawl is converted to analog audio data Aaw by the DA conversion means 108, and the analog audio data Aaw is converted to a speech to which a normal human ear responds, by the speaker 20.
As described above, in the data recording and reproduction apparatus 300 of this third embodiment, the stream reading unit 300c includes the means 315 for holding the value of the apparatus type information Ity of this apparatus 300, and the stream storage unit 300b includes the means 312 for storing the information indicating the types of apparatuses which are permitted to read the audio data stream. In the stream storage unit 300b, it is checked by searching as to whether the value of the apparatus type information Ity of this apparatus 300 is stored in the storage means 312 or not, and reading of the audio data stream is permitted or inhibited according to the result of the search. Therefore, in addition to the effects of the first

75
embodiment, it is possible to avoided that the audio data stream is undesirably read from the stream storage unit 300b by a reproduction apparatus which does not perform watermarking when reproducing the audio data stream and so the audio data stream is reproduced or copied without being subjected to watermarking to protect the copyright. (Embodiment 4)
Figure 8 is a block diagram for explaining a data recording and reproduction apparatus 4 00 according to a fourth embodiment of the present invention.
The data recording and reproduction apparatus 4 00 is composed of a stream storage unit 400b for storing an audio data stream supplied from the outside, a stream writing unit 400a for writing the audio data stream into the stream storage unit 400b, and a stream reading unit 400c for reading the audio data stream from the stream storage unit 400b, like the data recording and reproduction apparatus 200 according to the second embodiment shown in figure 4.
The stream writing unit 4 00a and the stream reading unit 400c are mounted on the apparatus body (refer to figure 1). The stream storage unit 400b corresponds to the recording medium which is detachably mounted on the apparatus body, and it is constituted by an IC card on which a semiconductor memory device (RAM) is mounted. The stream storage unit 400b is not restricted to an IC card type device, it may be constituted by a memory

76
stick type device.
Further, the audio data stream supplied from the outside is a compressed audio data stream ESau, or a non-compressed audio data stream Sau, or a scrambled compressed audio data stream ESau, as described for the second embodiment of the invention. When the scrambled compressed audio data stream ESau is supplied, a scramble key Ksc for descrambling is also supplied to the data recording and reproduction apparatus 400.
In this fourth embodiment, to simplify the description, it is premised that a scrambled compressed audio data stream ESau with the corresponding scramble key or a non-scrambled compressed audio data stream ESau is downloaded through a network 10a to the apparatus 200, while a non-scrambled non-compressed audio data stream is supplied from a portable recording medium 10b such as a CD to the apparatus 200. Further, each audio data stream has the data structure shown in figure 2(a).
Hereinafter, the constituents of the apparatus will be described in detail.
The stream writing unit 400a is identical to the stream writing unit 200a of the second embodiment including the stream attribute decision means 201, the flag-attached stream writing means 202, and the scramble key writing means 203.
The stream reading unit 400c includes an apparatus type information holding means 416 for holding the value of information which indicates the type of the data recording and

77
reproduction apparatus 400 (apparatus type information Ity), in addition to the constituents of the stream reading unit 200c of the second embodiment. In the apparatus type information holding means 416, a predetermined value, for example, "1" or "0", is stored in advance as a value of the apparatus type information Ity. These values "1" and "0" of the apparatus type information Ity indicate the same contents as those of the third embodiment. That is, the value "0" of the apparatus type information Ity means that the corresponding data recording and reproduction apparatus is a player having the function of inserting a watermark at the time of reproduction. The value "1" of the apparatus type information Ity means that the corresponding data recording and reproduction apparatus is a recorder having the function of inserting a watermark at the time of reproduction.
The stream storage unit 400b includes a stream storage means 413 which stores the audio data stream Saf2 output from the flag-attached stream writing means 202; a scramble key storage means 412 which stores the scramble key Ksc output from the scramble key writing means 203; and an authorized apparatus type information storage means 411 which stores the values of information indicating the types of apparatuses which are permitted to read the audio data stream Saf2 from the stream storage means 413 (authorized apparatus type information Ity).
The stream storage unit 400b further includes an apparatus type information obtaining means 414 which reads the value of the

78
apparatus type information Ity of the data recording and reproduction apparatus 400 from the apparatus type information storage means 416 of the stream reading unit 400c, in accordance with a read request from the stream reading unit 400c; and a stream read permission decision means 415 which searches the values of the apparatus type information Ity stored in the authorized apparatus type information storage means 411 for the value of the apparatus type information Ity which has been read, and decides whether reading of the audio data stream from the stream storage means 413 is to be permitted or not, according to the result of the search.
In the stream read permission decision means 415, the decision as to whether reading of the audio data stream is to be permitted or not is carried out in the same manner as described for the stream read permission decision means 313 of the third embodiment.
For example, when the value of the apparatus type information Ity held by the apparatus type information holding means 416 is "1" (a recorder with the function of inserting a watermark at reproduction), since the value "1" of the apparatus type information Ity is stored in the authorized apparatus type information storage means 411 as shown in figure 7, reading of the audio data stream is permitted. On the other hand, when a value not shown in figure 7, for example, "2", is held in the apparatus type information holding means 416 or when the stream

79
reading unit 400c does not have the apparatus type information holding means 416 and so the apparatus type information obtaining means 414 cannot obtain the value of the apparatus type information Ity, reading of the audio data stream is inhibited.
In this fourth embodiment, since the stream storage unit 400b is constituted by an IC card as shown in figure 1, the stream storage means 413, the scramble key storage means 412, and the authorized apparatus type information storage means 411 are implemented by a RAM mounted on the IC card. The stream read permission decision means 415 and the apparatus type information obtaining means 414 are implemented by a CPU mounted on the IC card.
Further, in many cases, the stream writing unit 400a is constructed as an apparatus for writing the audio data stream into the stream storage unit 400b, while the stream reading unit 400c is constructed as another apparatus for reading the audio data stream from the stream storage unit 400b.
Next, the operation will be described.
Initially, the operation of writing the audio data stream into the IC card (recording medium) constituting the stream storage unit 400b is identical to that already described for the second embodiment and, therefore, this operation will be briefly described hereinafter.
The stream attribute decision means 201 decides whether the audio data stream S (Sau or ESau) supplied from the outside is

80
compressed or not and whether the audio data stream S is scrambled or not, and outputs the attribute decision information Iaj2 indicating the result of the decision. For example, when the input audio data stream is compressed, "1" is set as the value of the compression ID flag Fco. When the input audio data stream is not compressed, "0" is set as the value of the compression ID flag Fco. When the input audio data stream is scrambled, "1" is set as the value of the scramble ID flag Fsc. When the input audio data stream is not scrambled, "0" is set as the value of the scramble ID flag Fsc.
In the flag-attached stream writing means 202, the compression ID flag Fco and the scramble ID flag Fsc are attached to the stream header Sh of the audio data stream S, and the flag-attached audio data stream Saf2 (refer to figure 5) is written in the stream storage unit 400b by the writing means 202. In this fourth embodiment, the flag-attached audio data stream Saf2 is written in the stream storage means 413 of the stream storage unit 400b.
When the input audio data stream S is scrambled,
simultaneously with wiring the audio data stream, a scramble key for descrambling the scrambled audio data stream is written in the scramble key storage means 412 by the scramble key writing means 203.
Next, the operation of reading the audio data stream Saf2 from the stream storage unit 400b will be described.

81
Initially, a stream read request is output from the stream reading means 206 to the stream storage unit 400b. Then, the value of the apparatus type information Ity held by the apparatus type information holding means 416 of the stream reading unit 4 00c is read by the apparatus type information obtaining means 414 to be output to the stream read permission decision means 415
Next, in the stream read permission decision means 415, it is decided whether reading of the audio data stream is permitted or not, in the same manner as described for the stream read permission decision means 313 of the third embodiment. That is, in the stream read permission decision means 415, searching is carried out as to whether the value of the apparatus type information Ity which has been read is stored in the authorized apparatus type information storage means 411 or not. When the value of the read apparatus type information Ity is stored in the storage means 411, the permission decision means 415 decides that the stream reading means 206 is permitted to read the audio data stream. When the value of the read apparatus type information Ity is not stored in the storage means 411, the permission decision means 415 decides that the stream reading means 206 is inhibited from reading the audio data stream.
In other words, the audio data stream stored in the stream storage means 413 can be read by the stream reading means 206 only when the stream read permission decision means 415 decides that reading is permitted. Thereby, the audio data stream Saf2

82
is read from the stream storage means 413 by the stream reading means 2 06.
Further, when the audio data stream Saf2 read from the stream storage means 413 is scrambled, the scramble key Ksc for descrambling the audio data stream is read from the scramble key storage means 412 by the scramble key reading means 412.
Thereafter, the audio data stream read from the stream storage unit 400b by the stream reading means 206 is subjected to watermarking in the same manner as described for the second embodiment, and the watermark-inserted audio data stream is converted to analog audio data.
To be brief, in the first stream flag decision means 207, it is decided whether the audio data stream is scrambled or not, in accordance with the value of the scramble ID flag Fsc included in the read audio data stream Saf2. Only when the audio data stream is scrambled, the audio data stream is descrambled in the descrambling means 208 by using the scramble key Ksc read by the scramble key reading means 205.
Next, in the second stream flag decision means 2 09, it is decided whether the descrambled audio data stream DSaf2 from the descrambling means 208 or the non-scrambled audio data stream Saf2 from the first stream flag decision means 2 07 is compressed or not, according to the value of the compression ID flag Fco included in the audio data stream DSaf2 or Saf2.
Only when the audio data stream DSaf2 or Saf2 is compressed,

83
the audio data stream is decompressed by decoding in the decoding means 210, and the decompressed audio data stream RSaf2 is output to the watermarking means 211.
In the watermarking means 211, a watermark is inserted in the non-compressed audio data stream, i.e., the decompressed audio data stream RSaf2 output from the decoding means 210, or the audio data stream DSaf2 or Saf2 which has been decided as being not compressed by the second stream flag decision means 209. Thereby, the audio data stream read from the stream storage unit 400b goes in the copyright protected state. The watermark-inserted audio data stream Saw2 is converted to analog audio data Aaw by the DA conversion means 212, and the analog audio data Aaw is converted by the speaker 20 to a speech to which a normal human ear responds.
As described above, in the data recording and reproduction apparatus 400 of this fourth embodiment, in addition to the constituents of the apparatus 200 of the second embodiment, the stream reading unit 400c includes the means 416 for holding the value of the apparatus type information Ity of this apparatus 400, and the stream storage unit 400b includes the means 411 for storing the information indicating the types of apparatuses which are permitted to read the audio data stream. In the stream storage unit 400b, it is checked by searching as to whether the value of the apparatus type information Ity of this apparatus 400 is stored in the storage means 411 or not, and reading of the

84
audio data stream is permitted or inhibited according to the result of the search. Therefore, in addition to the effects of the first embodiment, it is avoided that the audio data stream is undesirably read from the stream storage unit 400b by a reproduction apparatus which does not perform watermarking when reproducing the audio data stream and so the audio data stream is reproduced or copied without being subjected to watermarking to protect the copyright. (Embodiment 5)
Figure 9 is a block diagram for explaining a data recording and reproduction apparatus 500 according to a fifth embodiment of the present invention.
The data recording and reproduction apparatus 500 is provided with a stream storage unit 500b for storing an audio data stream supplied from the outside, a stream writing unit 500a for writing the audio data stream into the stream storage unit 500b, and a stream reading unit 500c for reading the audio data stream from the stream storage unit 500b, like the data recording and reproduction apparatus 4 00 according to the fourth embodiment shown in figure 8.
The stream writing unit 500a and the stream reading unit 500c are identical to the stream writing unit 400a and the stream reading unit 400c according to the fourth embodiment, respectively.
The stream storage unit 500b includes a scramble key readout

85
permission decision means 515 instead of the stream readout permission decision means 415 of the stream storage unit 400b according to the fourth embodiment.
To be specific, the stream storage unit 500b includes a stream storage means 413 which stores the audio data stream Saf2 output from the flag-attached stream writing means 202; a scramble key storage means 412 which stores the scramble key Ksc output from the scramble key writing means 2 03; and an authorized apparatus type information storage means 411 which stores the values of information indicating the types of apparatuses that are permitted to read the audio data stream Saf2 from the stream storage means 413 (authorized apparatus type information Ity). The stream storage unit 500b further includes an apparatus type information obtaining means 414 which reads the value of the apparatus type information Ity of the data recording and reproduction apparatus 500 from the apparatus type information storage means 416 of the stream reading unit 500c, in accordance with a read request from the stream reading unit 500c; and a scramble key read permission decision means 515 which searches the values of the apparatus type information Ity stored in the authorized apparatus type information storage means 411 for the value of the apparatus type information Ity which has been read, and decides whether reading of the scramble key Ksc from the scramble key storage means 412 is to be permitted or not, according to the result of the search.

86
In the scramble key read permission decision means 515, the decision as to whether reading of the scramble key Ksc is to be permitted or not is carried out in the same manner as described for the stream read permission decision means 415 of the fourth embodiment.
For example, when the value of the apparatus type information Ity held by the apparatus type information holding means 416 is "1" (a recorder with the function of inserting a watermark at reproduction), since the value "1" of the apparatus type information Ity is stored in the authorized apparatus type information storage means 411 as shown in figure 7, reading of the scramble key is permitted. On the other hand, when a value not shown in figure 7, for example, "2", is held in the apparatus type information holding means 416 or when the stream reading unit 500c does not have the apparatus type information holding means 416 and so the apparatus type information obtaining means 414 cannot obtain the value of the apparatus type information Ity, reading of the scramble key is inhibited.
In this fifth embodiment, since the stream storage unit 500b is constituted by an IC card as shown in figure 1, the stream storage means 413, the scramble key storage means 412, and the authorized apparatus type information storage means 411 are implemented by a RAM mounted on the IC card. The scramble key read permission decision means 515 and the apparatus type information obtaining means 414 are implemented by a CPU mounted

87
on the IC card.
Further, in many cases, the stream writing unit 500a is constructed as an apparatus for writing the audio data stream into the stream storage unit 500b, while the stream reading unit 500c is constructed as another apparatus for reading the audio data stream from the stream storage unit 500b. Next, the operation will be described.
Initially, the operation of writing the audio data stream into the IC card (recording medium) constituting the stream storage unit 500b is identical to that already described for the fourth embodiment.
That is, the stream attribute decision means 201 decides whether the audio data stream S supplied from the outside is compressed or not and whether the audio data stream is scrambled or not, and outputs attribute decision information Iaj2 indicating the result+of the decision.
In the flag-attached stream writing means 202, a compression ID flag Fco and a scramble ID flag Fsc are attached to the stream header Sh of the audio data stream S in accordance with the attribute decision information Iaf2, and the flag-attached audio data stream Saf2 (refer to figure 5) is written in the stream storage unit 500b by the writing means 202. In this fifth embodiment, the flag-attached audio data stream Saf2 is written in the stream storage means 413 of the stream storage unit 500b. When the input audio data stream S is scrambled,

88
simultaneously with wiring the audio data stream, a scramble key for descrambling the scrambled audio data stream is written in the scramble key storage means 412 by the scramble key writing means 203.
Next, the operation of reading the audio data stream Saf2 from the stream storage unit 500b will be described.
Initially, a stream read request is output from the stream reading means 206 to the stream storage unit 500b. Then, the value of the apparatus type information Ity held by the apparatus type information holding means 416 of the stream reading unit 500c is read by the apparatus type information obtaining means 414 to be output to the scramble key read permission decision means 515.
In the scramble key read permission decision means 515, decision as to whether reading of the scramble key is permitted or not is carried out in the same manner as the decision by the stream read permission decision means 415 of the fourth embodiment. That is, in this decision means 515, searching is performed as to whether the value of the apparatus type information Ity which has been read is stored in the authorized apparatus type information storage means 411 or not. When the value of the read apparatus type information Ity is stored in the storage means 411, the permission decision means 515 decides that the scramble key reading means 205 is permitted to read the scramble key. When the value of the read apparatus type

89
information Ity is not stored in the storage means 411, the permission decision means 515 decides that the scramble key reading means 205 is inhibited from reading the scramble key.
In other words, the scramble key stored in the scramble key storage means 412 can be read by the scramble key reading means 205 only when the scramble key read permission decision means 515 decides that reading is permitted. Thereby, the scramble key Ksc is read from the scramble key storage means 412 by the scramble key reading means 205.
The audio data stream Saf2 is read from the stream storage means 413 to the first stream flag decision means 207 by the stream reading means 206.
Thereafter, the audio data stream read from the stream storage unit 500b by the stream reading means 206 is subjected to watermarking in the same manner as described for the fourth embodiment, and the watermark-inserted audio data stream is converted to analog audio data.
To be brief, in the first stream flag decision means 207, it is decided whether the audio data stream is scrambled or not, in accordance with the value of the scramble ID flag Fsc included in the read audio data stream Saf2. Only when the audio data stream is scrambled, the audio data stream is descrambled in the descrambling means 208 by using the scramble key Ksc read by the scramble key reading means 205.
Next, in the second stream flag decision means 209, it is

90
decided whether the descrambled audio data stream DSaf2 from the descrambling means 208 or the non-scrambled audio data stream Saf2 from the first stream flag decision means 207 is compressed or not, according to the value of the compression ID flag Fco included in the audio data stream DSaf2 or Saf2.
Only when the audio data stream DSaf2 or Saf2 is compressed, the audio data stream is decompressed by decoding in the decoding means 210, and the decompressed audio data stream RSaf2 is output to the watermarking means 211o
In the watermarking means 211, a watermark is inserted in the non-compressed audio data stream, i.e., the decompressed audio data stream RSaf2 from the decoding means"210, or the audio data stream DSaf2 or Saf2 which has been decided as being not compressed by the second stream flag decision means 209. Thereby, the audio data stream read from the stream storage unit 500b is in the copyright protected state. The watermark-inserted audio data stream Saw2 is converted to analog audio data Aaw by the DA conversion means 212, and the analog audio data Aaw is converted to a speech to which a normal human ear responds, by the speaker 20.
As described above, in the data recording and reproduction apparatus 500 of this fifth embodiment, in addition to the constituents of the apparatus 200 of the second embodiment, the stream reading unit 500c includes the means 416 for holding the value of the apparatus type information Ity of this apparatus 500,

91
and the stream storage unit 500b includes the means 411 for storing the information indicating the types of apparatuses which are permitted to read the audio data stream. In the stream storage unit 500b, it is checked by searching as to whether the value of the apparatus type information Ity of this apparatus 500 is stored in the storage means 411 or not, and reading of the audio data stream is permitted or inhibited according to the result of the search. Therefore, in addition to the effects of the second embodiment, it is avoided that the scrambled audio data stream read from the stream storage unit 500c is undesirably decrypted by a reproduction apparatus which does not perform watermarking when reproducing the audio data stream and so the audio data stream is reproduced or copied without being subjected to watermarking to protect the copyright.
In other words, the scramble key stored in the data storage unit is prevented from being read by an audio data stream recording and reproduction apparatus having no watermarking means. Therefore, even if the audio data stream is read by such apparatus, the apparatus cannot descramble the audio data stream, thereby preventing the audio data stream from being reproduced or copied without being subjected to watermarking.
In the aforementioned embodiments of the present invention, emphasis has been placed on a data recording and reproduction apparatus in which a recording medium (stream storage unit) detachably mounted on the body of the apparatus is implemented by

92
an IC card using a semiconductor memory device as its main component. However, the detachable recording medium (stream storage unit) is not restricted thereto.
For example, the recording medium may be a rewritable disk unit 600 as shown in figure 10. This disk unit 600 comprises a digital audio data rewritable disk 602 {e.g., DVD AUDIO RAM), a caddy 601 containing the disk 602, and a control unit 900a placed inside the caddy 601. The control unit 900a comprises a unit-side access terminal 906 connected to an access terminal on the unit body side, a CPU 904 for controlling data access between the unit body and the disk 602, a memory 903 for storing data processed by the CPU 904, and an access I/F 905 placed between the CPU 904 and the unit-side access terminal 906.
APPLICABLE FIELD IN INDUSTORY
The present invention relates to the structure for protecting the copyrights for audio data distributed on networks or audio data supplied in the form of packages, in a data recording and reproduction apparatus. Especially, under the situation in future that all of regular recording and reproduction apparatuses such as MD players will be constructed so that they do not record audio data streams in which watermarks of "copy inhibit" are embedded but record audio data streams in which no watermarks of "copy inhibit" are embedded, illegal copying of the audio data streams can be restricted by embedding

93
the watermarks and, therefore, the present invention will be very useful in the future.

94.
WE CLAIMS
1- A data recording and reproduction apparatus a stream storage unit (100b),(200b),(300b,(400b),(500b) for
storing the audio data stream;
a stream writing unit (100a),(200a),(300a),(400a)"(500a) for
writing the audio data stream into said stream storage unit;
and
a stream reading unit reading the audio data stream from said stream storage unit for inserting a watermark into the read audio data stream, and for outputting the watermark-inserted audio data stream?
said stream writing unit (100a),(200a),(300a),(400a),(500a)
comprising
a stream attribute decision unit (101),(201) operable to decide whether or not the audio data stream has been subjected to the data conversion process for digital audio data, and

95.
a writing and attaching unit (101),(102), operable to attach a conversion ID flag having a value indicating the result of the decision of said stream attribute and decision unit to the audio data stream, and to write the flag-attached audio data stream into said stream storage unit; and
said stream reading unit a reading unit (404),(206) operable to read the flag-attached audio data stream from said stream storage unit,
a data converting unit (105,106), (205,207-210) operable to subject the read flag-attached audio data stream to an inverse conversion process which is inverse to the data conversion process that the read flag-attached audio data stream has been subjected to when the conversion ID flag of the read flao-attached audio data stream indicates that the read flag-attached audio data stream is a stream which has been subjected to the data conversion process and to output the read flag-attached audio data stream after being subjected to the inverse conversion process and to output the read flag-attached audio data stream without performing the inverse conversion process when the conversion ID flag of the read flat-attached audio data stream indicates that the read flag-attached audio data stream is a stream which has not been subjected to the data conversion process and,

96.
a watermarking unit (107),(211) operable to insert a watermark in the flag-attached audio data stream which is outputted by data converting unit.
2. The data recording and reproduction apparatus as claimed in claim 1 wherein said stream reading unit ,300c),(400c),(500c) further comprises a DA conversion unit (108),(212) operable to convert the flag-attached audio data stream in which the watermark is inserted by said watermarking unit to analog audio data, and to output the analog audio data.
3- The data recording and reproduction apparatus as claimed in claim 1 whereins
the data conversion process performed on the digital audio data is a data compression process for compressing the digital audio data by coding;
the inverse conversion process is a decompression process for decompressing compressed digital audio data by decoding? and
said writing and attaching unit (102) is operable to attach a composition ID flag to the audio data stream as the conversion ID f laggh&"4fflgQaava&&eeirada!ffastriigcitRitaereeailitta
97
4. The data recording and reproduction apparatus as claimed in claim 3, wherein said stream reading unit (400c>,(300c) further comprises:
a stream flag decision unit (105) operable to decide whether or not the flag-attached audio data stream read from said stream storage unit has been subjected to the data compression process according to the compression ID flag of the read f lao- attached audio data stream; and
a decoding unit (106) operable to decompress, by decoding, the flag-attached audio data stream which is decided as being subjected to the data compression process by said stream flag decision unit, and to output a decompressed audio data stream;
wherein the flat-attached audio data stream which is decided as being not subjected to the data compression process by said stream flag decision unit, and the decompressed audio data stream output from said decoding unit are supplied to said watermarking unit (107).
3. The data recording and reproduction apparatus as claimed in claim 4, wherein said stream reading unit (100c),(300c) further comprises a DA con v e rs i on un i t (1OS > ope rab1e to con vert the audio data stream in which the watermark is inserted by said watermarking unit to analog audio data, and to output the analog audio data.
A. The data recording and reproduction apparatus as claimed in claim 1, wherein:

98.
the data conversion process performed on the digital audio data includes at least one of a data compression process for compressing digital audio data by coding and a scramble process for scrambling digital audio data or compressed digital audio data;
the inverse conversion process includes at least one of a decompression process for decompressing compressed digital audio data by decoding and a descramble process for descrambling scrambled digital audio data or scrambled compressed digital audio data; and
said writing and attaching unit (202) is operable to attach a campression ID f1ag and a scramble ID flag to the audio data otroam aw the conversion ID flag having a valve corresponding to the result of the decision of said stream attribute decision unit, the compression ID flag indicating whether or not the audio data stream has been subjected to the data compression process, and the scramble ID flag indicating whether or not the audio data streeam or a compressed audio data stream has been subjected to the scramble process.
7. The data record anddreppoddcKttoanappiaEBfctkssass cd&schedd inn claim 6, wherein said stream writing unit
99.
wherein said stream reading unit (200c),(400c),(500c) further comprises:
3 scramble key reading unit (205) operable to read the scramble key adapted to the audio data stream which has been subjected to the scramble process from said stream storage unit;
a first stream flag decision unit (207) operable to decide whether or not the flag-attached audio data stream read from said stream storage unit has been subjected to the scramble process according to the scramble ID flag of the read flag-attached audio data stream;
a descramb1 ing uni t (208) operab1e to descramb1e, by using the scramble key, the flag-attached audio data stream which is decid&d, as being scrambled by said first stream flag decision means, and to output a descrambie audio data stream;
a second stream flag decision unit (209) operable to decide whether or not the flag-attached audio data stream which is decided as being not scrambled by said first stream flag decision unit and the descrambled audio data stream output from said descrsmbling unit have been subjected to the data compression process according to their respective compression ID flags; and
a decoding unit (210) operable to decompress, by decoding, the flag-attached audio data stream which is decided as being compressed by said second stream flag decision unit, and to output a decompressed audio data stream; and
wherein the flag-attached audio data stream which is decided as being not scrambled by said first stream flag decision unit

100
and the descrambled audio data stream output from said descrambling unit are supplied to said second stream flag decisan unit, while the flag-attached audio data stream which is decided as tie ing not compressed by said second stream flag dec i son unit and the decompressed audio data stream output from said decoding unit are supplied to said watermaking unit C211>.
8" The data recording and reproduction apparatus as claimed in claim 7, wherein said stream reading unit 9. The data recording and reproduction apparatus as claimed in claim 1, wherein said stream reading unit (300c), (4O0c), (5O0c) is constituted by a single apparatus for reproducing a data stream which is separate from said writing unit and said storage unit, and said single apparatus comprises an apparatus type information holding unit operable to hold apparatus type information which indicates a type of said single apparatus, and
wherein said stream storage unit (300b), , (500b) comprises:
a storage device (311,413), operable to store the fla§-aitacned audio data stream output from said writing and attaching unit;

101.
an authorized apparatus type information storage unit (312), an apparatus type information obtaining unit (314), (414) operable to obtain the apparatus type information held by said apparatus type information holding unit; and
a stream read permission decision unit (313), (415) operable to search said authorized apparatus type information storage unit far the apparatus type information obtained by said apparatus type information obtaining unit, and to permit said reading unit to read the flag-attached audio data stream from said storage device only when an authorized apparatus type information correspoding to the obtained apparatus type information is present.
10. The data recording and reproduction apparatus as claimed in claim 4, wherein said stream reading unit (300c) is constituted by a single apparatus far reproducing a data stream which is separate from said writing unit and said storage unit, and said single apparatus comprises an apparatus type information holding unit operable to hold apparatus type information indicating a type of said single apparatus, and
wherein said stream storage unit (300b) comprises:
a storage device (311) operable to store the flag-attached audio data stream output from said writing and attaching unit?

102.
an authorised apparatus type information storage unit an apparatus type information obtaining unit a stream read permission decision unit (313) operable to search ©aid authorized apparatus type information storage unit for the apparatus type information obtained by said apparatus type information obtaining unit, and to permit said reading unit to read the flag-attached audio data stream from said storage device only when an authorized apparatus type information corresponding to the obtained apparatus type information is present.
11. The data recording &rt& reproduction apparatus as claimed in claim 7, wherein said stream reading unit wherein said stream unit (400b) commprises:
a storage device (413) operable to store the flag-attached audio data stream output from said writing and attaching unit?

103.
a scramble key storage unit (412) operable to store the scramble key output from said scramble key writing unit;
an authorized apparatus type information storage unit (411) operable to store authorized apparatus type information indicating stream reproduction apparatuses which are permitted to read the flag-attached audio data stream from said storage device;
an apparatus type information obtaining unit (414) operable to obtain the apparatus type information held by said apparatus type information holding unit; and
a stream read permission decision unit (415) operable to search said authorized apparatus type information storage means for the apparatus type information obtained by said apparatus type information obtaining unit, and to permit said reading unit to read the flag-attached audio data stream from said storage device only when an authorized apparatus type information corresponding to the obtained apparatus type information is present.
12. The data recording and reproduction apparatus as claimed in claim 7, wherein said stream reading unit (500c) is constituted by a single apparatus for reproducing a data stream, and said single apparatus comprises apparatus type information holding means for holding apparatus type information indicating a type of said single apparatus, and

104
wherein said stream storage unit A storage device (413) operable to store the flag-attached audio data stream output from said writing and attaching unit;
a scramble key storage unit (412) operable to store the scramble key output from said scramble key writing unit?
an authorized apparatus type information storage unit (411) operable to hold authorized apparatus type information indicating stream reproduction apparatuses which are authorized to read the flag attached audio data stream from said storage device;
an apparatus type information obtaining unit a scramble key read permission decision unit (515) operable search the authorized apparatus type information storage unit far the apparatus type information obtained by said apparatus type information obtaining unit, and to permit said scramble key reading unit to r&nti the scramble key from said scramble key storage unit only when an authorized apparatus type information corresponding to the obtained apparatus type information is present.
13. The data recording and reproduction apparatus as claimed in claim 1, wherein said stream storage unit (100b),2Q0b)f(300b),
105
14. The data recording and reproduction apparatus as claimed in
claim 4, wherein:
said stream storage unit C, for controlling access to the audio data stream stored in said RAM are mounted thereon;
said storage device C31i>, (413) and said authorized apparatus type information storage unit (312),(411) are implemented by said RAIi; and
said apparatus type information obtaining unit (314),(414) and said stream read permission decision , unit ar& implemented by said CPU.
15, The data recording and reproduction apparatus as claimed
in claim 11, wherein:
said stream storage (400b) is implemented by an IC card for controlling access to the audio data stream stored in said RAM are mounted thereonj
said storage device (413) , said scramble key storage unit (412) and said authorized apparatus type information storage unit
106.
said apparatus type information obtaining unit (414) and said stream read permission decision unit (415) are implemented by said CPU.
16. Th© data recording and reproduction apparatus as claimed in claim 12, wherein:
said stream storage unit (5ODb) is implemented by an IC card (110b) on which a RAM (llObl) for storing an audio data stream and a CPU (110b2) for control 1 ing access to the audio data stream stored in said RAM are mounted thereon;
said storage device (413), said scramble key storage unit
(412), and said authorized apparatus type information storage unit (411) are implemented by said RAM; and
said apparatus type information obtian ing unit (414) and said scramble key read permission decision unit (515) are implemented by said CPU.
A stream the decision unit (101,201) for deciding whether an data stream supplied from the outside has been compressed or not is provided, and a compression I Deaf lao Fco having a value according to the result of this dedision is attached to the ratio data stream, and the flag-attachted audio data stream is written in the stream storage unit (100b, 200b, 300b, 400b, 500b).
After a compressed audio data stream from the outside is read from the stream storage unit, a watermark can be inserted into the compressed audio data stream, the time required for writing the compressed audio data stream into the stream storage unit is reduced, and the sound quality of data stream is prevented from being degraded.

Documents:


Patent Number 201705
Indian Patent Application Number IN/PCT/2000/00091/KOL
PG Journal Number 07/2007
Publication Date 16-Feb-2007
Grant Date 16-Feb-2007
Date of Filing 20-Jun-2000
Name of Patentee MATSUSHITA ELECTRIC INDUSTRIAL CO. LTD.
Applicant Address 1006 OAZA KADOMA, KADOMA-SHI, OSAKA 571-8501
Inventors:
# Inventor's Name Inventor's Address
1 NONOMURA TOMOYUKI 11-3, NISHIIMAGAWA 3-CHOME HIGASHISUMIYOSHI-KU, OSAKA-SHI, OSAKA 546-0042
2 INOUE MITSUHIRO 3-12-19, TAKEJIMA, NISHIYODOGAWA-KU, OSAKA-SHI, OSAKA 555-0011, JAPAN, NEW ADDRESS: 10989 BLUFFSIDE DR., 3310 STUDIO CITY, CALIFORNIA 91604 U.S.A
3 MINAMI MASATAKA 2349-1, KURUMA, HIGASHIURA-CHO, TSUNA-GUN, HYOGO 656-2311, JAPAN NEW ADDRESS: 1555 SCOTT RD. APT. 103, BURBANK, CALIFORNIA 91504, U.S.A.
4 KOZUKA MASAYUKI 19-1-1207, ISHIZUMINAMIMACHI, NEYAGAWA-SHI, OSAKA 572-0024, JAPAN NEW ADDRESS: 501 COYLE AVENUE, ARCHDIA, CALIFORNIA 91008, U.S.A.
PCT International Classification Number G 11B 20/1
PCT International Application Number PCT/JP99/05566
PCT International Filing date 1999-10-08
PCT Conventions:
# PCT Application Number Date of Convention Priority Country
1 10/287085 1998-10-08 Japan