Method for coding data
09755661 · 2017-09-05
Assignee
Inventors
Cpc classification
G10L19/018
PHYSICS
International classification
Abstract
A method for coding data includes: representing a first data in digital form as digital information; transforming the digital information into a first Gaussian integer; determining a relationship between the first Gaussian integer and a second Gaussian integer; and deriving, based on the determined relationship, a key for converting between the first Gaussian integer and the second Gaussian integer so as to associate the first data with a second data represented by the second Gaussian integer. The present invention also provides a system and a non-transient computer readable medium for implementing the method.
Claims
1. A method for coding data, comprising: representing a first data in digital form as digital information; transforming the digital information into a first Gaussian integer; determining a relationship between the first Gaussian integer and a second Gaussian integer; deriving, based on the determined relationship, a key for converting between the first Gaussian integer and the second Gaussian integer so as to associate the first data with a second data represented by the second Gaussian integer; and converting the first data to the second data.
2. The method of claim 1, further comprising representing the first data using the second data represented by the second Gaussian integer so as to hide at least some of the first data.
3. The method of claim 1, wherein the relationship is a geometric relationship.
4. The method of claim 1, wherein the digital information is represented in one of: binary basis, octal basis, decimal basis, or hexadecimal basis.
5. The method of claim 1, wherein the transformation of the digital information into a Gaussian integer is based on complex number basis using complex numbers.
6. The method of claim 1, wherein the complex number basis has a base of −1+i or −1−i.
7. The method of claim 1, wherein the key is a third Gaussian integer.
8. The method of claim 1, wherein the first data and the second data each comprises text, image, or audio.
9. The method of claim 8, wherein the image is a binary image; and the step of representing the first data in digital form as digital information comprises representing each pixel of the binary image using binary numbers.
10. The method of claim 8, wherein the image is a greyscale image; and the step of representing the first data in digital form as digital information comprises representing each pixel of the greyscale image using binary numbers.
11. The method of claim 8, wherein the image is a colour image; and the step of representing the first data in digital form as digital information comprises decomposing each pixel of the colour image into at least two separate colour components, and representing the at least two separate colour components of each pixel using binary numbers.
12. The method of claim 8, wherein the first data is text that comprises at least one of: a Chinese character, an English alphabet, a number, and a graphical symbol.
13. The method of claim 12, wherein the text is a Chinese character; and the step of representing the first data in digital form as digital information comprises representing the Chinese character using internal code with hexadecimal basis.
14. The method of claim 12, wherein the text is an English alphabet, a number, or a graphical symbol; and the step of representing the first data in digital form as digital information comprises representing the English alphabet, the number, or the graphical symbol using an ASCII code with binary basis.
15. The method of claim 8, wherein the audio is a digitized audio signal represented in voltage value; and the step of representing the first data in digital form as digital information comprises representing the digitized audio signal in a binary sequence using SQL code.
16. The method of claim 1, wherein the first data represented by the first Gaussian integer and the second data represented by the second Gaussian integer are of the same type.
17. A method for coding data, comprising: representing a first data in digital form as digital information; transforming the digital information into a first Gaussian integer; and determining a relationship between the first Gaussian integer and a second Gaussian integer; deriving, based on the determined relationship, a key for converting between the first Gaussian integer and the second Gaussian integer so as to associate the first data with a second data represented by the second Gaussian integer; and representing the first data using the second data represented by the second Gaussian integer so as to hide at least some of the first data.
18. The method of claim 17, wherein the first data and the second data comprises: (i) text that comprises at least one of: a Chinese character, an English alphabet, a number, and a graphical symbol, (ii) image that comprises at least one of: binary image, a greyscale image, and a colour image; or (iii) audio; wherein when the image is a colour image, the step of representing the first data in digital form as digital information comprises: decomposing each pixel of the colour image into at least two separate colour components, and representing the at least two separate colour components of each pixel using binary numbers; wherein when the audio is a digitized audio signal represented in voltage value, the step of representing the first data in digital form as digital information comprises representing the digitized audio signal in a binary sequence using SQL code.
19. A method for coding data, comprising: representing a first data in digital form as digital information; transforming the digital information into a first Gaussian integer; and determining a relationship between the first Gaussian integer and a second Gaussian integer; and deriving, based on the determined relationship, a key for converting between the first Gaussian integer and the second Gaussian integer so as to associate the first data with a second data represented by the second Gaussian integer; wherein the first data represented by the first Gaussian integer and the second data represented by the second Gaussian integer are of the same type.
20. The method of claim 19, wherein the first data and the second data comprises (i) text that comprises at least one of: a Chinese character, an English alphabet, a number, and a graphical symbol, (ii) image that comprises at least one of: binary image, a greyscale image, and a colour image; or (iii) audio; wherein when the image is a colour image, the step of representing the first data in digital form as digital information comprises: decomposing each pixel of the colour image into at least two separate colour components, and representing the at least two separate colour components of each pixel using binary numbers; wherein when the audio is a digitized audio signal represented in voltage value, the step of representing the first data in digital form as digital information comprises representing the digitized audio signal in a binary sequence using SQL code.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) Embodiments of the present invention will now be described, by way of example, with reference to the accompanying drawings in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
(24)
(25) In some embodiments, the method 100 may further comprise the step of converting the first data to the second data. In some embodiments, the method 100 may further comprise the step of representing the first data using the second data represented by the second Gaussian integer so as to hide at least some of the first data. In one embodiment, the first data is private data belonging in a private domain, and the second data is public data belong in a public domain.
(26) The first data and the second data may each comprise image, text, or audio. The image may be a binary image, a greyscale image, a colour image, a 2D image, a 3D image, etc. The image may comprise of multiple smaller images. The text may comprise at least one of: a Chinese character, an English alphabet, a number, and a graphical symbol. The audio may be a digitized audio signal. Preferably, the first data represented by the first Gaussian integer and the second data represented by the second Gaussian integer are preferably of the same type.
(27) Referring to
(28)
(29) The following description provides a detailed disclosure and illustration on the data coding method in accordance with a preferred embodiment of the present invention.
(30) I. Positional Number System
(31) In a positional number system, a set of numerical symbols or characters is used to represent numbers or values. Usually, an ideal notation can be used to describe a set of numbers effectively. Examples of these notations include natural number, integer, real number, complex number and rational number, each of which corresponds to a unique representation. On the other hand, positional notation, basis notation, and place-value notation are used for representation and coding of numbers. These notations are based on the basis and the limited set of digital symbols respectively. One well-known system is the integer basis, which uses ‘a’ (aε0, 1, 2, . . . ) numerical symbols to represent numbers. In general, a basis ‘a’ numeral system has a basis ‘a’. One example is the decimal system which has a basis of ten. It uses ten numerical symbols: 0-9, and the basic numerical symbol set is {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Another example is the binary numeral system which has a basis of two. Its basic numerical symbol set is {0, 1}. Further examples include the octal system and the hexadecimal system, and their basic numerical symbol sets contain {0, 1, 2, 3, 4, 5, 6, 7} and {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F} respectively.
(32) Each numerical symbol has a unique counting unit, and is associated with a weight that is dependent on its position in the number sequence. The weight for each position is expressed as the power of the basis. In the decimal system, the weight of the ‘units’ position is 10.sup.0, the weight of the ‘tens’ position is 10.sup.1, etc. In the fractional part, the weights are 10.sup.−1, 10.sup.−2, etc., progressing from left to right after the decimal place. In the binary system, the weight of the second position is 2, the weight of the third position is 2.sup.2, the weight of the fourth position is 2.sup.3, etc.
(33) Generally, in a basis ‘a’ numeral system, the weight of the i-th position in the non-fractional part is a.sup.i−1 and the weight of the i-th position in the fractional part is a.sup.−i. Thus, numbers in a basis ‘a’ system can be represented as:
(34)
where the numbers a.sup.k and a.sup.−k are the weights of the corresponding digits.
(35) In the decimal system, every non-negative integer N has a unique decimal representation of:
N=n.sub.p×10.sup.p+n.sub.p−1×10.sup.p−1+ . . . +n.sub.1×10.sup.1+n.sub.0×10.sup.0 (2)
where n.sub.kεS={0, 1, 2, . . . , 9}, k=0, 1, 2, . . . , p.
(36) And in simplified form, it can be represented as:
N=(n.sub.pn.sub.p−1n.sub.p−2 . . . n.sub.1n.sub.0).sub.10 (3)
(37) In the binary system, the arbitrary non-negative integer N has a general form of:
N=n.sub.p×2.sup.p+n.sub.p−1×2.sup.p−1+ . . . +n.sub.1×2.sup.1+n.sub.0λ2.sup.0 (4)
where n.sub.kεS={0, 1} and k=0, 1, 2, . . . , p.
(38) And in simplified form, it can be represented as:
N=(n.sub.pn.sub.p−1n.sub.p−2 . . . n.sub.1n.sub.0).sub.2 (5)
(39) The general form of an arbitrary non-negative integer N when using the letters a as basis can be expressed as:
N=n.sub.p×a.sup.p+n.sub.p−1×a.sup.p−1+ . . . +n.sub.1×a.sup.1+n.sub.0×a.sup.0 (6)
(40) In one embodiment, any positive integer can be used as basis. In fact, r.sub.0εS={0, 1, 2, . . . , a−1} and non-negative integer N.sub.1 can be found for any non-negative integers N, and N=N.sub.1a+r.sub.0. If the minimum numeral symbol set (S={0, 1, 2, . . . , a−1}) has this nature, it is called complete residue system modulo ‘a’. Further, r.sub.1εS={1, 2, . . . , a−1} and non-negative integer N.sub.2 can be found, and N.sub.1=N.sub.2a+r.sub.1. After limited steps, r.sub.kεS={1, 2, . . . , a−1} and r.sub.k−1εS={1, 2, . . . , a−1} can be obtained, and N.sub.k−1=N.sub.ka+r.sub.k−1, N.sub.k=N.sub.k+1a+r.sub.k. If N.sub.k<a, then N.sub.k+1=0. Subsequently, the following equation can be obtained:
N=r.sub.k×a.sup.k+r.sub.k−1×a.sup.k−1+ . . . +r.sub.1×a.sup.1+r.sub.0×a.sup.0 (7)
(41) And in simplified form, it can be represented as:
N=(r.sub.kr.sub.k−1r.sub.k−2 . . . r.sub.1r.sub.0).sub.a (8)
(42) The above provides a general overview of a basis ‘a’ numeral system. A person skilled in the art would appreciate that when a equals to two, the system is binary; when a equals to four, the system is quaternary; when a equals to five, the system is quinary, etc.
(43) II. Complex Number Coding
(44) Various embodiments of the present invention relate to complex number coding, in which the concept of basis is applied to complex numbers. If x and y are real numbers, then z=x+iy is the Gaussian integer, where i is the imaginary unit with i.sup.2=−1. In the following, letter b is used to represent complex number basis. According to the positional number system, the Gaussian integer can be written as Z=Σ.sub.j=0.sup.kr.sub.jb.sup.j, where k=0, 1, 2, . . . , and Z can be represented using basis ‘b’. In the Z representation, if all allowed r.sub.j are the complete residue system modulo ‘b’, then the standard Algorithm of representation number based on the integer basis can be extended to the complex number basis.
(45) In the complex number basis of one embodiment, all of the Gaussian integers can be represented when b=−n+i and b=−n−i (where n is positive integer). If all complex numbers can be represented by a basis then this basis is called an appropriate basis. Examples of this appropriate basis include b=−1+i and b=−1−i. Otherwise, the basis is called an inappropriate basis. Examples of this inappropriate basis include b=1−i and b=1+i.
(46) When operating with Gaussian integers U.sub.0+iV.sub.0, it is necessary to consider the type of complex number basis (b=ξ+iη, where ξ and η are non-zero integer) that is available. Gauss has proven in early times that, if ξ and η are co-prime, then S={0, 1, 2, . . . , ξ.sup.2+η.sup.2−1} is the complete residue system modulo ‘b=ξ+iη’. Otherwise, if ξ and η share common factors, then the common factors are divided into both ξ and η. Effectively, the complete residue system modulo ‘b=ξ+iη’ must contain a number, and the imaginary part of the number is non-zero. In order to represent Gaussian integers based on complex number basis as much as possible, it is preferred that η=±1 as η divides into the imaginary part of ‘b’ basis's power (ξ+iη).sup.j. In another example, basis b=ξ±i, and the numeral symbol set S={0, 1, 2, . . . , ξ.sup.2}.
(47) Considering S={0, 1} then ξ=±1 and η=±1. Preferably, only four complex number basis b are considered: 1+i, 1−i, −1+i and −1−i. In these four complex number basis, −1+i and −1−i are appropriate basis and they are conjugate with each other. 1+i and 1−i are not appropriate basis.
(48) In the following description, b=−1+i is selected as the complex number basis. This selection is based on the characteristics of digital computer and it allows all complex numbers to be represented. However, in other embodiments other complex number basis b can be used. Preferably, any Gaussian integers ‘N’ can be represented as follows:
(49)
where r.sub.jεS={0, 1}, j=0, 1, 2, . . . , k.
(50) A number based on basis.sub.(1) can be converted to Gaussian integer based on basis.sub.(3)=−1+i. A detailed conversion Algorithm is illustrated in Algorithm 1.
(51) TABLE-US-00001 Algorithm 1 Conversion of different positional notations algorithm 1: A is the original number 2: B is the converted number 3: basis.sub.(1) is the basis of original number 4: basis.sub.(2) = 2 5: basis.sub.(3) = −1 + i 6: function CONVERT(A to B) 7: for i = 0 and A[i] ≠′ \0′ and i + + do 8: in A[i] >′ 0′ and A[i] <′ 9′ then 9: j = A[i] −′ 0′ 10: else 11: j = A[i] −′ A′ + 10 12: end if 13: number = number * basis.sub.(1) + t 14: end for 15: end function 16: function number( ) 17: t = number % basis.sub.(2) 18: if t 0 and t
9 then 19: B[i + +] = t +′ 0′ 20: else 21: B[i + +] = t +′ A′ − 10 22: end if 23: number = number/basis.sub.(2); 24: end function 25: function Gaussian integer(N) 26: (r.sub.kr.sub.k−1r.sub.k−2 . . . r.sub.1r.sub.0).sub.2 = B 27: for j = 0 and j
k and j + + do 28: N = Σ.sub.j=0.sup.k r.sub.jbasis.sub.(3).sup.j 29: end for 30: end function A conversion between binary, decimal, and complex number basis b = −1 + i is shown in Table I.
(52) TABLE-US-00002 TABLE I Conversion of the positional number system Decimal Binary basis: b = −1 + i 0 0 0 1 1 1 2 10 −1 + i 3 11 i 4 100 −2i 5 101 1 − 2i 6 110 −1 − i 7 111 −i 8 1000 2 + 2i 9 1001 3 + 2i 10 1010 1 + 3i 11 1011 2 + 3i 12 1100 2 13 1101 3 14 1110 1 + i 15 1111 2 + i . . . . . . . . .
III. Digital Conversion Algorithm Based on Complex Number Basis
A. Gaussian Integer to Digital Information
(53) A Gaussian integer is a complex number where its real and imaginary parts are both non-zero integers. Preferably, Gaussian integer may be used to represent digital information with complex number basis (b=ξ+iη), where ξ=±1 and η=±1. Let Gaussian integer be U.sub.0+iV.sub.0, then its 0˜1 sequence is (e.sub.ne.sub.n−1 . . . e.sub.1e.sub.0). In order to determine {e.sub.j}, j=0, 1, . . . , n, let U.sub.0+iV.sub.0 be:
U.sub.0+iV.sub.0=e.sub.n×b.sup.n+e.sub.n−1×b.sup.n−1+ . . . +e.sub.1×b.sup.1+e.sub.0×b.sup.0) (10)
(54) Applying a recursive calculation method, equation (10) can be rewritten as follows:
U.sub.0+iV.sub.0=(ξ+iη)(U.sub.1+iV.sub.1)+e.sub.0
=ξU.sub.1−ηV.sub.1+(ηU.sub.1+ξV.sub.1)i+e.sub.0 (11)
where e.sub.0εS={0, 1}, j=0, 1, 2, . . . , n.
(55) Then
U.sub.0=ξU.sub.1−ηV.sub.1+e.sub.0
Q.sub.0=ηU.sub.1+ξV.sub.1
and hence
(56)
(57) Preferably, the recursion formula can be expressed as follows:
(58)
where k=0, 1, 2, . . . .
(59) In one example if the parity of U.sub.k and V.sub.k are same, then e.sub.k=0, otherwise e.sub.k=1. When U.sub.k=0 and V.sub.k=0, the recursive counting is stopped. The result is e.sub.ne.sub.n−1e.sub.n−2 . . . e.sub.1e.sub.0. When giving a Gaussian integer (U.sub.0+iV.sub.0), its 0˜1 sequence based on corresponding basis ‘b’ can be obtained using equation (12).
(60) Equation (13) is the recursion formula when b=−1+i is used as the complex number basis.
(61)
where k=0, 1, 2, . . . , e.sub.k=|(U.sub.k−V.sub.k)mod 2|.
(62) It should be noted that equation (13) is obtained from basis ‘b=−1+i’. In other embodiments where other basis is used, the recursive equation will be changed accordingly.
(63) An Algorithm for converting from Gaussian integer to digital information is shown in Algorithm 2.
(64) TABLE-US-00003 Algorithm 2 Gaussian integer to digital information algorithm 1: Gaussian integer = U.sub.0 + iV.sub.0 2: basis b = −1 + i 3: function 4: for k = 0 and n and k + + do 5: U.sub.k+1 = (V.sub.k − U.sub.k + e.sub.k)/2 6: V.sub.k+1 = (−V.sub.k + U.sub.k + e.sub.k)/2 7: e.sub.k = |(U.sub.k − v.sub.k) mod 2| 8: end for 9: 0~1 sequence is e.sub.ne.sub.n−1 . . . e.sub.1e.sub.0 10: end function
B. Digital Information to Gaussian Integer
(65) If the 0˜1 sequence (e.sub.ne.sub.n−1e.sub.n−2 . . . e.sub.1e.sub.0) of a digital information based on the complex number basis (b=ξ+iη), where ξ=±1, η=±1 is known, then the Gaussian integers can be calculated. In one embodiment, the Gaussian integers calculation process is as follows:
(66) Let (ξ+iη).sup.k=r.sub.k+is.sub.k, where k=0, then r.sub.0=1, s.sub.0=0. Then, construct the recursion formula by the following:
(67) Let
(ξ+iη).sup.k=(ξ+iη)(r.sub.k−1+is.sub.k−1)
=ξr.sub.k−1−ηs.sub.k−1+i(ηr.sub.k−1+ξs.sub.k−1) (14)
Then,
r.sub.k=ξr.sub.k−1−ηs.sub.k−1
s.sub.k=ηr.sub.k−1+ξs.sub.k−1 (15)
(68) Thus,
(69)
(70) Equation (16) can be obtained from equation (15) when b=−1+i is used as the complex number basis.
r.sub.k=−r.sub.k−1−s.sub.k−1
s.sub.k=r.sub.k−1−s.sub.k−1 (16)
(71) From
(72)
(73) The following equation is then obtained,
(74)
(75) Accordingly, U.sub.0+iV.sub.0 is the Gaussian integer of this 0˜1 sequence based on the complex number basis ‘b=ξ+iη’. In other words, the corresponding spot on the complex number plane for any given 0˜1 sequences can be found.
(76) It can be seen from the above example that any 0˜1 sequences of digital information can be converted to a point on the complex number plane using equations (15) and (17). Conversely, any corresponding spot of Gaussian integers on the complex number plane can be converted to a 0˜1 sequence using equation (12).
(77) An Algorithm for converting from digital information to Gaussian integer is shown in Algorithm 3.
(78) TABLE-US-00004 Algorithm 3 Digital information to Gaussian integer 1: 0~1 sequence = e.sub.ne.sub.n−1 . . . e.sub.1e.sub.0 2: basis b = −1 + i 3: r.sub.0 = 1 4: s.sub.0 = 0 5: function 6: for k =1 and k n and k + + do 7: r.sub.k = −r.sub.k−1 − s.sub.k−1 8: s.sub.k = r.sub.k−1 − s.sub.k−1 9: end for 10: for k = 0 and k
n and k + + do 11: U.sub.0 = Σ.sub.k=0.sup.n e.sub.kr.sub.k 12: end for 13: for k = 1 and k
n and k + + do 14: V.sub.0 = Σ.sub.k=1.sup.n e.sub.ks.sub.k 15: end for 16: Gaussian integer is U.sub.0 + iV.sub.0 17: end function
IV. Representation of Multimedia Information Based on Complex Number Basis
(79) The method in the present embodiment relates to the projection of multimedia information (such as text, audio, and images) to a complex plane based on a selected complex number basis. Without loss of generality, the present embodiment uses ‘b=−1+i’ as the complex number basis and S={0, 1} as the numeral symbol set. A person skilled in the art would appreciate that, in some embodiments, other complex number basis and numeral symbol set may be used.
(80) By converting digital information data to a point on the complex plane, the relationship between different digital information data can be considered as problem of plane geometry. After all, this projection is the projection of the 0˜1 sequence to the corresponding mapped point on the complex plane. The data coding method in the present embodiment is thus applicable for different digital information including text, audio, images, videos, etc.
(81) A. Text Information Based on Complex Number Basis
(82) Computers usually store and operate with binary numbers: 0, 1. Texts (such as English alphabet, Chinese characters) that are used for communication cannot be stored in a computer directly. In order to solve the problem of storing texts in computer, the words in the text must be digitized, i.e., the words must be coded.
(83) The following description uses Chinese characters and English alphabets as an example for illustration. A person skilled in the art would appreciate that other text, language, symbols, etc., are also applicable to the method in the present invention.
(84) For Chinese characters, three types of coding are generally used on the computer. The first type is input code (Chinese characters outer code), which contains a set of western keyboard symbols (letters, numbers and special symbols). The second type is internal code (NeiMa), which is used to store, handle, and process Chinese characters in the computer. The third type is output code (character code), which is used to output Chinese characters. The operation result of binary coding of information needs to be converted by the character code before outputting on the output device. In the present embodiment, the internal code is used to represent the Chinese character on the complex plane. For example, the internal code of Chinese character ‘’ is ‘D6D0’, the internal code of Chinese character ‘
’ is ‘BFC6’. In the present embodiment, the internal code can be represented as a corresponding 0˜1 sequence.
(85) For English alphabet, there is a relative wider range of information, including 26 alphabetic characters, 10 numerical digits, and from 11 to 25 special graphic symbols. Preferably, these can be indicated using ASCII code. Generally, ASCII codes 128 specified characters into eight-bit integers, and usually the highest bit (parity bit) is set to 0. For example, the ASCII code of letter ‘A’ is ‘01000001’, the ASCII code of number ‘9’ is ‘00111001’, and the ASCII code of symbol ‘!’ is ‘00100001’.
(86) The ASCII code of symbol ‘!’ is 01000001. In this example, the corresponding real part and the corresponding imaginary part can be calculated using the method described in Section II. The result is that
(87)
(88) Accordingly, the symbol ‘!’ is converted to a Gaussian integer (Z.sub.(!)=5−4i) based on the complex number basis (b=−1+i). After that, it can be represented as coordinate is (5,−4) on the complex plane.
(89) B. Audio Information Based on Complex Number Basis
(90) Sounds are audio signals within the acoustic range available to humans. Their audio frequency is generally in the 20 to 20,000 hertz range. In an analog audio signal, sound is represented by a continuous waveform over time. The loudness of sound is reflected in the amplitude of the acoustic pressure, and the pitch is reflected in audio frequency. Analog audio signals are usually recorded and stored in computers or servers in the form of digital audio signals. A digital audio signal contains a number made up of binary numbers 1 and 0.
(91) To apply the method in the present embodiment to an analog audio signal, the first step is to digitize (i.e., sample and quantize) the signal. In one example, the digitization is performed by sampling with a constant sampling rate.
(92) In digital audio technology, the analog voltage of sound intensity is represented in digits in a quantization process. In other words, the magnitude of the voltage within a range may be represented by the same digit. The same principles can be applied to restore the analog data.
(93) The basic number system in computers is binary. Thus, the audio data is coded as computer data format. In the present embodiment, SQL code is used to convert audio to the binary sequence, and to revert the binary sequence to audio. An exemplary SQL code is shown as follows: Audio to binary sequence,
byte[ ] sequence=File.ReadAllBytes (“experimetal.wma”);
Binary sequence to audio,
File.WriteAllBytes (“restoreexperimetal.wma”, sequence);
(94) The corresponding real part and imaginary part of the Gaussian number can be obtained using the method described in Section II. Thus, the resulting audio information can be represented on the complex plane.
(95) C. Digital Image Based on Complex Number Basis
(96) Digital images can be in different forms: binary image, grayscale image, color image, 2D image, 3D image, etc. The following description focuses on 2D digital images, including binary images, gray-scale images, and color images.
(97) A 2D image is a representation of a two-dimensional matrix on a computer. Depending on size, resolution, format, etc., an image may contain a large amount of information. In order to express the image in complex number, it is necessary to transform the two-dimensional image signal to the 0˜1 sequence of one-dimensional space. There are many ways in which this transformation can be performed. In one example, the transformation may be performed using linearization, a method that is particularly suitable for binary images and grayscale images. For color images, in one embodiment, the transformation may be performed separate for the R (red) component, the G (green) component, and the B (blue) component.
(98)
(99)
(100) By applying the linearization method (a) in
(101) Starting from ‘10100011’, the corresponding real part and the corresponding imaginary part can be calculated using the method described in Section II. The result is:
(102)
(103) Essentially, the grayscale pixel block in
(104) In the present example, linearization method (a) in
(105) In one embodiment, a large image may first be divided into several small sub-images for separate processing. In this way, a large number arithmetic can be avoided, and the processing of integer weight will be smaller. Advantageously, this may improve the efficiency of the entire process.
(106) V. Information Hiding Based on Complex Number Basis
(107) The data coding method in the present embodiment may be extended to hide information.
(108) A. Description of the Hiding Algorithm
(109) In information hiding technology, secret or private information may be hidden by putting this information in an unsuspecting regular file (i.e. carrier file). The carrier file may be any computer-readable data, such as image files, documents, or digital audio.
(110) Define the following characters and functions: M.sub.1 is a public information, S is a private information, Function G(x): x.fwdarw.N is a conversion function of binary encoding information, Function G.sup.−1(N): N.fwdarw.x is an inverse process of function of G(x), Function F.sub.b(N): N.fwdarw.(p, q) is a projection processing (in the present embodiment, it is the transformation of binary sequence of information to a point on the complex plane), Function F.sup.−1(N): (p, q).fwdarw.N is the inverse process of function of F.sub.b(N), Function R (P.sub.0, P.sub.1): P.sub.0P.sub.1 is defined as the relationship between P.sub.0 and P.sub.1.
(111) The hiding method in one embodiment of the present invention is as follows: First, the function G(x) is used for the public information M.sub.1. Then a sequence 0˜1 is generated, denoted as G(M.sub.1)=N.sub.M.sub.P.sub.1) between these two points can be found. The hiding object is represented by M.sub.1, and the binary sequence of the secret file can be reconstructed and by a series of inverse transform functions. Because the 0˜1 sequence and the point on the complex plane are mapped one to one, the inverse transform function will also be one to one.
(112) The above processing in the present embodiment is illustrated in Algorithm 4 and Algorithm 5 below.
(113) TABLE-US-00005 Algorithm 4 Coding 1: function (M.sub.1) 2: M.sub.1 .fwdarw. G(x) .fwdarw. G(M.sub.1) = N.sub.M.sub. P.sub.1.
(114) TABLE-US-00006 Algorithm 5 Decoding 1: function 2: M.sub.1 .fwdarw. G(x) .fwdarw. G(M.sub.1) = N.sub.M.sub. P.sub.0 5: P.sub.1 .fwdarw. F.sub.b.sup.−1 (p.sub.1, q.sub.1) .fwdarw. F.sub.−i+1.sup.−1(p.sub.1, q.sub.1) = N.sub.S 6: N.sub.S .fwdarw. G.sup.−1(N) .fwdarw. G.sup.−1(N.sub.S) = S 7: end function
B. Example of the Hiding Algorithm
(115) An example of text information hiding based on the complex number basis is provided in the following description to demonstrate the transformation process. Using complex number basis b=−1+i, the text information ‘A’ is projected to a point on the complex plane O.sub.A=(x.sub.A, y.sub.A) and the text information ‘B’ is projected to a point on the complex plane O.sub.B=(x.sub.B, y.sub.B). The text information ‘A(O.sub.A)’ minus the text information ‘ B(O.sub.B)’ is the difference vector O′=O.sub.A−O.sub.B=(x.sub.A−x.sub.B, y.sub.A−y.sub.B)=(x′, y′) as shown in
(116) Vi. Experiments and Analysis
(117) A. Hiding of the Text Information
(118) In the present example, Chinese characters ‘’ and English characters ‘MUST’ are selected as the private text information. The corresponding public text information is selected to be ‘Warm Welcome’. In this example, the public text information appears to have no correlation with the confidential, private text information.
(119) In operation, the Chinese characters ‘’ is first converted to Internal code, as: ‘B0C4 C3C5 BFC6 BCBC B4F3 D1A7’. Then it is converted to a 0˜1 sequence as ‘1011000011000100 1100001111000101 1011111111000110 1011110010111100 1011010011110011 1101000110100111’. By applying Algorithm 3, its representation of the complex plane based on basis (b=−1+i) can be obtained. In other words, the U values and V values can be obtained. The result is:
The real part U.sub.1=−150115170289844
The imaginary part V.sub.1=−213248109241101
(120) Second, the English characters ‘MUST’ is converted to the ASCII code, as: ‘4D 55 53 54’. Then it is converted to a 0˜1 sequence as ‘01001101 01010101 01010011 01010100’. By applying Algorithm 3, its representation of the complex plane based on basis (b=−1+i) can be obtained. The result is:
The real part U.sub.1=11452
The imaginary part V.sub.1=34454
(121) Third, the public text information ‘Warm Welcome’ is converted to ASCII code, as: ‘57 61 72 6D 20 57 65 6C 63 6F 6D 65’. Then it is converted to a 0˜1 sequence as ‘01010111 01100001 01110010 01101101 00100000 01010111 01100101 01101100 01100011 01101111 01101101 01100101’. By applying Algorithm 3, its representation of the complex plane based on basis (b=−1+i) can be obtained. The result is:
The real part U.sub.1=−64908828457355
The imaginary part V.sub.1=127903172154690
(122) After obtaining these results, the Gaussian integer of ‘’ is marked as Z.sub.1=−150115170289844−213248109241101i, the Gaussian integer of ‘MUST’ is marked as Z.sub.2=11452+34454i, and the Gaussian integer of ‘Warm Welcome’ is marked as Z.sub.3=−64908828457355+127903172154690i. The key of the private Chinese information (
’) can be written as Z′=Z.sub.1−Z.sub.3, and the key of the private English information (MUST) can be written as Z″=Z.sub.2−Z.sub.3. The private information ‘
’ or ‘MUST’ can be restored from the public text information ‘Warm Welcome’ using Algorithm 2, provided that the key of Z′, Z″ and the Gaussian integer (Z.sub.3) of ‘Warm Welcome’ are known. Subsequently, the Gaussian integer Z.sub.1 or Z.sub.2 of the private information can be obtained. With these, the private information ‘
’ or ‘MUST’ can be restored using Algorithm 2. Accordingly, the method in the present embodiment enables the hiding and recovery of the private text information.
(123) In one embodiment, to avoid processing large numbers operation, the original text information may be divided into a number of shorter text information so that they are dealt with separately. This is advantageous in that the weight of the processing of the integer may be reduced.
(124) B. Hiding of the Audio Information
(125) Audio information can also be represented on the complex plane. From the above description, audio information can be converted to the 0˜1 sequence, and can be represented on the complex number basis (b=−1+i) when the 0˜1 sequence is converted to a Gaussian integer. If the Gaussian integer of the private audio information is recorded as Z.sub.a1 and the Gaussian integer of the public audio information is recorded as Z.sub.a2, then in one embodiment the key for converting between the two can be written as Z.sub.a=Z.sub.a1−Z.sub.a2. Likewise, private audio information can be restored provided that the key of Z.sub.a and the Gaussian integer (Z.sub.a2) of the public audio information are known. Accordingly, the hiding and recovery of the private audio information can be performed.
(126)
(127) ’, and it can be represented as a Gaussian integer Z.sub.a2=U.sub.a2+V.sub.a2i. By applying Algorithm 3, it can be determined that U.sub.a2=1.0611×104333 and V.sub.a2=3.3955×104334.
(128) Once the values of Z.sub.a1 and Z.sub.a2 are known, the key Z.sub.a=Z.sub.a1−Z.sub.a2 can be obtained. Again, in the present invention, a variety of selections for the keys are applicable, as long as the operational rules of plane geometry (e.g., addition, subtraction, multiplication, division, dot product of vector, cross product of vector, etc.) are observed.
(129) C. Hiding of the Digital Image Information
(130) 1) Hiding of One Grayscale Image to Another Grayscale Image:
(131) In the following example, all of the selected image are sized as 256×256 pixels, and the complex number basis is b=−1+i. The original public and private images are each divided into 8×8 pixels block, so as to avoid the processing of large numbers operation. In the present embodiment, the linearization method (a) of
(132)
(133) The private grayscale image of
(134) For simplicity, only the first, second, and third term in each progressions are provided below. Using Algorithm 3, the following can be obtained:
Z.sub.ga={−4.4396×10.sup.76−9.2182×10.sup.76i,−5.4972×10.sup.75−7.9490×10.sup.76i,−6.7244×10.sup.76+6.3508×10.sup.76i, . . . }, the progression Z.sub.ga has 1024 terms; and
Z.sub.gb={−3.0878×10.sup.76−9.2634×10.sup.76i,−8.3981×10.sup.76−5.4513×10.sup.76i,−6.9975×10.sup.76−4.7261×10.sup.77i, . . . }, the progression Z.sub.gb has 1024 terms.
(135) It follows that the key is:
Z.sub.g={1.3518×10.sup.76+0.0454×10.sup.76i,−7.8484×10.sup.76+2.4977×10.sup.76i,−0.2729×10.sup.76−4.0910×10.sup.77i, . . . }, the progression Z.sub.g has 1024 terms.
2) Hiding of the Color Image:
(136) For hiding of color image, the method in the present embodiment treats R (red) component, G (green) component, and B (blue) component in a color image separately. In other words, the R component of the public color image is used to hide the R component of the original private color image, the G component of the public color image is used to hide the G component of the original private color image, and the B component of the public color image is used to hide the B component of the original private color image.
(137) The method for processing a color image is as follows. First, the public and the private color images are each divided into 8×8 pixels block as shown in
(138) The linearization method (a) of
(139) The Gaussian integer for other 8×8 pixels blocks from left to right, top to bottom, in the private and public R component of color images can also be obtained. Gaussian integers obtained from the public R component of color image are arranged in a progression Z.sub.cra. Gaussian integers obtained from the private R component of color image are arranged in a progression Z.sub.crb. In this example let Z.sub.crb=Z.sub.crb1−Z.sub.cra1 be the key of the first 8×8 pixels block. Z.sub.crb1 is the first term of Z.sub.crb and Z.sub.cra1 is the first term of Z.sub.cra. The Gaussian integer progression of R component for the key is represented as Z.sub.cr=Z.sub.crb−Z.sub.cra.
(140) The R component of private color image in
(141) The same processing is applies to the G component of private color image and the B component of private color image. Accordingly the Gaussian integer progression Z.sub.cg of the G component for the key and the Gaussian integer progression Z.sub.cb of the B component for the key are also obtained, where Z.sub.cg=Z.sub.cgb−Z.sub.cga and Z.sub.cb=Z.sub.cbb−Z.sub.cba. Gaussian integers obtained from the public G component of color image are arranged in a progression Z.sub.cga. Gaussian integers obtained from the G component of color image are arranged in a progression Z.sub.cgb. Gaussian integers obtained from the public B component of color image are arranged in a progression Z.sub.cba. Gaussian integers obtained from the B component of color image are arranged in a progression Z.sub.cbb. Algorithm 2 and Algorithm 3 are used to restore the G and B components of the private color image. And as such, the hiding and recovery of the private color image are implemented.
(142) For simplicity, only the first, second, and third term in each progressions are provided below. Using Algorithm 3, the following can be obtained:
Z.sub.cra={−1.4458×10.sup.76−6.3196×10.sup.76i,−6.1816×10.sup.76−1.0699×10.sup.77i,−8.9864×10.sup.75+7.5359×10.sup.76i, . . . }, the progression Z.sub.cra has 1024 terms.
Z.sub.crb={−3.0878×10.sup.76−2.3158×10.sup.76i,−2.3820×10.sup.76−3.0729×10.sup.76i,−7.7466×10.sup.76+2.2043×10.sup.76i, . . . }, the progression Z.sub.crb has 1024 terms.
(143) It follows that the key of the R component is:
Z.sub.cr={1.6420×10.sup.76+4.0038×10.sup.76i,3.7796×10.sup.76+7.5961×10.sup.76i,−6.8479×10.sup.76−5.3316×10.sup.76i, . . . }, the progression Z.sub.cr has 1024 terms.
Z.sub.cga={−6.0821×10.sup.76−1.3117×10.sup.76i,−5.3586×10.sup.76−1.3428×10.sup.76i,−4.7221×10.sup.76−6.4984×10.sup.76i . . . }, the progression Z.sub.cga has 1024 terms.
Z.sub.cgb={−6.9475×10.sup.76−6.9475×10.sup.76i,−6.1783×10.sup.76−7.5748×10.sup.76i,−5.4541×10.sup.76−6.2685×10.sup.76i, . . . }, the progression Z.sub.cgb has 1024 terms.
(144) And the key of the G component is:
Z.sub.cg={−0.8654×10.sup.76−5.6358×10.sup.76i,−0.8197×10.sup.76−6.2320×10.sup.76i,−0.7320×10.sup.76+0.2299×10.sup.76i, . . . }, the progression Z.sub.cg has 1024 terms.
Z.sub.cba={−5.4008×10.sup.76−7.9972×10.sup.76i,−5.4063×10.sup.76−1.0165×10.sup.77i,−5.4515×10.sup.76−9.3082×10.sup.76i, . . . }, the progression Z.sub.cba has 1024 terms.
Z.sub.cbb={−1.5439×10.sup.76i,−6.7750×10.sup.75+3.8117×10.sup.76i,2.5060×10.sup.76+2.4630×10.sup.76i, . . . }, the progression Z.sub.cbb has 1024 terms.
(145) And the key of the B component is:
Z.sub.cb={5.4008×10.sup.76+6.4533×10.sup.76i,−1.3687×10.sup.76+1.3977×10.sup.77i,7.9575×10.sup.76+1.1771×10.sup.77i, . . . }, the progression Z.sub.cb has 1024 terms.
3) Hiding of One Grayscale Image to Multiple Grayscale Images:
(146)
(147)
(148) The above embodiments of the present invention provide a data coding method, which utilizes the features of character coding in computer to hide information. In the above embodiments, the public information appears to have no correlation with the private information at all. This makes the key hard to crack. Some embodiments of the present invention further offer the following advantages:
(149) Efficiency:
(150) Generally, the larger the size of the multimedia information, the longer the calculating time would be. The methods in the present embodiments allow division of large sized multimedia information into smaller sizes of multimedia information. Although the resulting number of keys will increase, the calculating time can be substantially reduced.
(151) Security:
(152) The method in the present embodiments will not cause any change in the format of the information. This is because the hiding of the information is based on the complex number basis and the operational relations of points on the complex plane. As a result, the private multimedia information would not easily corrupt.
(153) Robustness:
(154) The method in the present embodiments is robust in that it uses complex number basis. Even when the public information and the key are obtained by an unauthorized party, the private information is still relatively difficult to crack when compared with existing solutions.
(155) The present invention uses complex number as the basis in the positional number system. The present invention provides a data coding method for converting data of multimedia information and Gaussian integer using complex number basis. The data coding method can be extended to apply as a data hiding method, which is suitable not only for text, but also for audio, image, video, and other multimedia information. Other advantages of the present invention will become apparent to the person skilled in the art by referring to the above description and the appended drawings.
(156) Although not required, the embodiments described with reference to the Figures can be implemented as an application programming interface (API) or as a series of libraries for use by a developer or can be included within another software application, such as a terminal or personal computer operating system or a portable computing device operating system. Generally, as program modules include routines, programs, objects, components and data files assisting in the performance of particular functions, the skilled person will understand that the functionality of the software application may be distributed across a number of routines, objects or components to achieve the same functionality desired herein.
(157) It will also be appreciated that where the methods and systems of the present invention are either wholly implemented by computing system or partly implemented by computing systems then any appropriate computing system architecture may be utilized. This will include stand-alone computers, network computers and dedicated hardware devices. Where the terms “computing system” and “computing device” are used, these terms are intended to cover any appropriate arrangement of computer hardware capable of implementing the function described.
(158) It will be appreciated by persons skilled in the art that numerous variations and/or modifications may be made to the invention as shown in the specific embodiments without departing from the spirit or scope of the invention as broadly described. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive.
(159) Any reference to prior art contained herein is not to be taken as an admission that the information is common general knowledge, unless otherwise indicated.