Summary of the invention
The invention provides a kind of method of writing the audio file copyright information, the method can prevent that the copyright information that writes audio file from being cracked easily and wiping.
The invention provides a kind of method of pronunciation frequency file copyright information, the method can prevent that the copyright information that writes audio file from being cracked easily and wiping.
The invention provides a kind of device of writing the audio file copyright information, this device can prevent that the copyright information that writes audio file from being cracked easily and wiping.
The present invention also provides a kind of device of pronunciation frequency file copyright information, and this device can prevent that the copyright information that writes audio file from being cracked easily and wiping.
A kind of method of writing the audio file copyright information, the method comprises:
Original copyright information is encrypted, obtains the copyright ciphertext;
For the copyright ciphertext adds the copyright indexing head, build the virtual audio Frame by the copyright ciphertext that adds the copyright indexing head, virtual audio Frame empty part is filled with quiet data;
Judge whether to search out the quiet zone in audio file, if so, the virtual audio Frame that will build inserts quiet zone; Otherwise the virtual audio Frame that will build inserts head or the tail region of audio file.
A kind of method of pronunciation frequency file copyright information, the method comprises:
Read the Frame in audio file, search the copyright indexing head, extract the virtual audio Frame;
Adopt the decipherment algorithm corresponding with the cryptographic algorithm that original copyright information is encrypted, the virtual audio Frame that extracts is decrypted the copyright information after being deciphered.
A kind of device of writing the audio file copyright information, this device comprises ciphering unit, construction unit and plug-in unit;
Described ciphering unit, be used for original copyright information is encrypted, and obtains the copyright ciphertext, sends described construction unit to;
Described construction unit, be used to the copyright ciphertext to add the copyright indexing head, build the virtual audio Frame by the copyright ciphertext that adds the copyright indexing head, virtual audio Frame empty part is filled with quiet data, and send the virtual audio Frame to described plug-in unit;
Described plug-in unit, for the quiet zone that judges whether to search out audio file, if so, the virtual audio Frame that will build inserts quiet zone; Otherwise the virtual audio Frame that will build inserts head or the tail region of audio file.
A kind of device of pronunciation frequency file copyright information is characterized in that this device comprises reading unit and decryption unit;
Described reading unit,, for the Frame that reads audio file, search the copyright indexing head, extracts the virtual audio Frame, sends described decryption unit to;
Described decryption unit, adopt the decipherment algorithm corresponding with the cryptographic algorithm that original copyright information is encrypted, and the virtual audio Frame that extracts is decrypted the copyright information after being deciphered.
Can find out from such scheme, the present invention is encrypted and obtains the copyright ciphertext original copyright information, and by the copyright ciphertext, constructs the virtual audio Frame, inserts quiet zone, head or afterbody in audio file.The mode of taking to encrypt and insert quiet zone, head or afterbody writes copyright information, makes copyright information be difficult for being cracked and wiping, and still can play the effect that the ownership of audio file is produced evidence.
Embodiment
Clear for the purpose, technical solutions and advantages of the present invention are removed more, below in conjunction with embodiment and accompanying drawing, the present invention is described in more detail.
In order to make copyright information be difficult for being cracked and wiping, the mode that the present invention takes to encrypt and insert quiet zone, head or afterbody writes copyright information.Referring to Fig. 1, write the method indicative flowchart of audio file copyright information for the present invention, it comprises the following steps:
Step 101, be encrypted original copyright information, obtains the copyright ciphertext.
According to cryptographic algorithm, original copyright information is encrypted, cryptographic algorithm can be chosen as required, such as hash mapping algorithm or character string cryptographic algorithm etc.
Step 102,, for the copyright ciphertext adds the copyright indexing head, build the virtual audio Frame by the copyright ciphertext that adds the copyright indexing head, and virtual audio Frame empty part is filled with quiet data.
It is a plurality of that the copyright indexing head can provide, and therefrom selects one while needing.
The length of virtual audio Frame and other audio data frames is identical, and the playing duration of audio data frame is shorter, is generally less than 0.03 second; Construct the virtual audio Frame by the copyright ciphertext that adds the copyright indexing head, with quiet data filling blank parts wherein, its effect that plays back is quiet, like this, has realized with the very short quiet copyright information that carries of a frame duration.
Step 103, judge whether to search out the quiet zone in audio file, and if so, the virtual audio Frame that will build inserts quiet zone; Otherwise the virtual audio Frame that will build inserts head or the tail region of audio file.
Afterwards, can read when needed the copyright information in audio file, specifically comprise:
Read the Frame in audio file, search the copyright indexing head, extract the virtual audio Frame;
With the decipherment algorithm corresponding with the described cryptographic algorithm of step 101, the virtual audio Frame that extracts is decrypted the copyright information after being deciphered.
After copyright information after being deciphered, can also further authenticate copyright information, comprise: the copyright information after deciphering and original copyright information compare, if consistent, by authentication; Otherwise, authentification failure.
Be that the method that audio file is write copyright information is illustrated below by Fig. 2,3 and 4 flow process to the present invention.
Referring to Fig. 2, build the method flow diagram example of virtual audio Frame for the present invention, it comprises the following steps:
Step 201, be encrypted original copyright information according to cryptographic algorithm, obtains the copyright ciphertext.
Copyright information is encrypted, and cryptographic algorithm can be selected voluntarily, makes the ciphertext after encryption be not easy to be resolved out.
Step 202, for the copyright ciphertext adds the copyright indexing head.
, for convenience of later reading, add the copyright indexing head, in order to indicate copyright information.
Step 203,, according to the organization definition of different audio formats, build the virtual audio Frame by the copyright ciphertext that adds the copyright indexing head, and virtual audio Frame empty part is filled with quiet data.
According to the organization definition of different audio formats, build audio data frame, with fixing algorithm, copyright ciphertext character string is filled with quiet data, be written to together in audio data frame, so just completed the structure of virtual audio Frame.Generally, the length of an audio data frame is in hundreds of byte left and right, and playing duration was less than 0.03 second.
Referring to Fig. 3, insert the method flow diagram example of virtual audio Frame in audio file for the present invention, it comprises the following steps:
Step 301, the quiet zone in the search audio file,, if search for successfully, perform step 302, otherwise perform step 303.
Step 302, insert quiet zone with the virtual audio Frame that builds.
Step 303, with head or the tail region of the virtual audio Frame of structure insertion audio file.
After building the virtual audio Frame, this frame need to be inserted into the correct position in audio file.The method of inserting is the quiet zone of first finding in audio file, in general one first song, certain quiet zone is arranged; , if can not find, it directly can be inserted into head or the tail region of audio file.
Referring to Fig. 4, read the method flow diagram example of copyright information from audio file for the present invention, it comprises the following steps:
Step 401, read the Frame in audio file.
Step 402, search the copyright indexing head,, if search successfully, performs step 403; Otherwise perform step 405.
Step 403, extract the virtual audio Frame, uses the decipherment algorithm corresponding with described cryptographic algorithm to be decrypted the virtual audio Frame that extracts, the copyright information after being deciphered.
Step 404, compare copyright information and original copyright information after deciphering, if consistent, by authentication, process ends; Otherwise authentication failed, process ends.
Step 405, judge whether current data frame is last frame, if so, and process ends; Otherwise return to step 401.
While reading copyright information, at first in order read the audio data frame in audio file, content search copyright indexing head at frame, if find, press the Frame construction method reduction copyright information of Fig. 2 flow process, compare with the original copyright information that originally write after decrypting ciphertext, if be identical content, by authentication, if not identical content, authentification failure.
The present invention is encrypted and obtains the copyright ciphertext original copyright information, and by the copyright ciphertext, constructs the virtual audio Frame, inserts quiet zone, head or afterbody in audio file.The mode of taking to encrypt copyright information and fill quiet data builds audio data frame, improved the security of copyright information, and, adopt the mode of inserting quiet zone to write copyright information, the method that non-audio data is removed in existing employing can not have been removed copyright information wherein, make copyright information be difficult for being cracked and wiping, still can play the effect that the ownership of audio file is produced evidence.Simultaneously, be one section very short quiet on music presents due to the virtual audio Frame, can not affect original music content, have good practicality.
Referring to Fig. 5, write the apparatus structure schematic diagram of audio file copyright information for the present invention, this device comprises ciphering unit, construction unit and plug-in unit;
Described ciphering unit, be used for original copyright information is encrypted, and obtains the copyright ciphertext, sends described construction unit to;
Described construction unit, be used to the copyright ciphertext to add the copyright indexing head, build the virtual audio Frame by the copyright ciphertext that adds the copyright indexing head, virtual audio Frame empty part is filled with quiet data, and send the virtual audio Frame to described plug-in unit;
Described plug-in unit, for the quiet zone that judges whether to search out audio file, if so, the virtual audio Frame that will build inserts quiet zone; Otherwise the virtual audio Frame that will build inserts head or the tail region of audio file.
Referring to Fig. 6, be the device of pronunciation frequency file copyright information of the present invention, this device comprises reading unit and decryption unit;
Described reading unit,, for the Frame that reads audio file, search the copyright indexing head, extracts the virtual audio Frame, sends described decryption unit to;
Described decryption unit, adopt the decipherment algorithm corresponding with the cryptographic algorithm that original copyright information is encrypted, and the virtual audio Frame that extracts is decrypted the copyright information after being deciphered.
Alternatively, this device also comprises authentication ' unit, is used for obtaining copyright information after deciphering from described decryption unit, copyright information and original copyright information after deciphering are compared, if consistent, by would authenticating.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, be equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.