Specific embodiment
For further illustrating the present invention for realizing technological means and effect that predetermined goal of the invention taken, below in conjunction with
Accompanying drawing and preferred embodiment, the tool to the update method according to audio file proposed by the present invention, updating device and more new system
Body embodiment, structure, feature and its effect, describe in detail as after.
The flow chart of the structure audio fingerprint database that Fig. 1 is provided for first embodiment.As shown in figure 1, the method includes:
Each audio file in step S110, traversal music storehouse;This step is the collection for obtaining all audio files in music storehouse
Close, and one by one audio file is processed;
Step S120, in ergodic process, each one pending audio file of output;
Step S130, the description information for extracting pending audio file are simultaneously preserved to audio fingerprint database;Above-mentioned
Description information for example may include the ID of audio file, title, singer, songwriter, composer, album name etc. information.
Step S140, the audio-frequency fingerprint for extracting pending audio file are simultaneously stored in audio fingerprint database;Can be with
Understand, in audio fingerprint database, the description information of each audio file is that corresponding preservation, i.e. audio frequency refer to audio-frequency fingerprint
Stricture of vagina can be indexed each other with description information and carry out mating retrieval.
Fig. 2 is referred to, which is the audio-frequency fingerprint for extracting audio file, i.e. the concrete steps schematic flow sheet of step S140, its
Including:
Step S141, judge whether audio file is WAV forms.When the audio file is WAV forms, then go to step
S143;When the audio file is not WAV forms, then go to step S142.
Step S142, the audio file is converted to WAV forms;In WAV forms, voice data is adjusted with pulse code
System(Pulse-code modulation, PCM)Data form is preserved, and therefore, above-mentioned transformation process is actually to adopt
Audio file is converted to PCM data with transcoder.
Step S143, sub-frame processing is carried out to the audio file using Hamming window (Hamming Window);Furthermore, it is possible to
Understand, however it is not limited to only with Hamming window, for example, can also adopt rectangular window etc..
Step S144, fast fourier transform is carried out to every frame(Fast Fourier Transform, FFT)Obtain every frame
Energy frequency spectrum.
Step S145, according to bark scale(Bark Scale)Divide each frame into several pieces, it will be understood that specific number
Depend on the digit of sub- fingerprint.In the present embodiment, 32 parts are classified as.
Step S146, for its sub- fingerprint is calculated per frame, as described above, due to dividing each frame into 32 in the present embodiment
Part, its sub- fingerprint mutually should be the data of 32.
Step S147, the audio-frequency fingerprint for calculating the audio file according to the sub- fingerprint of all frames, for example, by all sub- fingerprints
The audio-frequency fingerprint as the audio file is sequentially connected according to frame sequential.
Through above-mentioned steps, you can complete the extraction of audio file audio-frequency fingerprint, it will be understood that for same audio frequency text
Part, even if being preserved with different code checks, that is, is had different tonequality, but its audio-frequency fingerprint is identical.
In above-mentioned structure audio fingerprint database method, in addition to preserving description information in audio fingerprint database
The audio-frequency fingerprint of audio file is also correspondingly preserved, subsequently can be used for recognizing different audio files, such that it is able to avoid due to writing
Record information errors cause the maloperation to audio file.
The flow chart of the audio file update method that Fig. 3 is provided for second embodiment, as shown in figure 3, the method includes:
Step S200, by server construction audio fingerprint database.Its detailed process can be with further reference to Fig. 1, Fig. 2 and phase
Close description.
Step S210, the audio-frequency fingerprint for extracting audio file to be updated from client, its detailed process can be with further reference to
Fig. 2 and associated description.Client can be the terminal arbitrarily using high in the clouds music storage service, for example computer, panel computer, handss
Machine etc..
Step S220, the audio-frequency fingerprint of the audio file to be updated is uploaded onto the server;For example, can be passed using hypertext
During defeated agreement sends audio-frequency fingerprint to server.Client can be communicated with the server by network.
After step S230, server receive the audio-frequency fingerprint of audio file to be updated of client upload, this is treated more
The audio-frequency fingerprint of new audio file is mated with the audio-frequency fingerprint in audio fingerprint database, if the match is successful, returns coupling
Successful audio file is to client, and goes to the audio file in step S240 renewal client.
Step S240, the audio file of download the reception server return simultaneously utilize the audio file of server return more
The audio file to be updated in new client.It is, for example, that the audio file returned using server replaces the machine to update operation
Current version, or separately preserve the audio file that server is returned.
Furthermore, it is to be understood that in addition to the audio file that the reception server is returned, can also to server request filename and
The other informations such as metadata, verify whether the filename of the machine and metadata are correct, can be according to server end when wrong
Data update the information such as the filename of the machine audio file to be updated and metadata.
In the audio file update method of the present embodiment, it is to send the audio-frequency fingerprint of audio file to server, therefore
Server be able to can be kept away using the audio file whether in the audio-frequency fingerprint retrieval music storehouse for uploading with identical audio-frequency fingerprint
Exempt from the maloperation brought due to filename and metadata error.
The flow chart of the audio file update method that Fig. 4 is provided for 3rd embodiment.As shown in figure 4, the method includes:
Step S300, by server construction audio fingerprint database;Its detailed process can be with further reference to Fig. 1, Fig. 2 and phase
Close description.
Step S310, the audio-frequency fingerprint and frequency spectrum height h1 that extract audio file to be updated from client;Extract audio frequency to refer to
The detailed process of stricture of vagina can be with further reference to Fig. 2 and associated description.The process for calculating frequency spectrum height h1 is similar with audio-frequency fingerprint is extracted,
Can be referring again to Fig. 2, its difference is, carries out not being to carry out fractionation acquisition after fast fourier transform obtains energy frequency spectrum
Sub- fingerprint, but calculate the height of energy frequency spectrum.
Step S320, the audio-frequency fingerprint of the audio file to be updated and frequency spectrum height h1 are uploaded onto the server;
Step S330, server receive the audio-frequency fingerprint of the audio file to be updated of client upload and frequency spectrum height h1
Afterwards, the audio-frequency fingerprint of the audio file to be updated is mated with the audio-frequency fingerprint in audio fingerprint database, if mating into
Work(, then go to step S340.
Step S340, the frequency spectrum height h2 for extracting the audio file that the match is successful.Its detailed process can further regard to walk
Rapid S310.It is appreciated that for the unified benchmark for comparing, the frequency spectrum height h2 of the calculating in step S340 is fallen into a trap with step S310
The frequency spectrum height h1 of calculation is calculated for same frame(For different audio files, it is considered as at identical time point same
Frame).
Step S350, compares h1 and h2, it will be understood that show the audio file with existing audio frequency when h1 is not equal to h2
File has different tonequality, and frequency spectrum height is higher, and tonequality is better, can make different disposal, this enforcement according to concrete situation
In example when h1 is more than or equal to h2, step S360 is gone to, when h1 is less than h2, go to step S370.
Step S360, when h1 be more than or equal to h2 when, illustrate client audio file to be updated than server matches success
Audio file tonequality good or identical, then be not required to from server download audio file be updated replacement.
Step S370, when h1 be less than h2 when, the successful audio file of the server matches sound more to be updated than client is described
The tonequality of frequency file is good, then download the simultaneously audio file of the reception server return and utilize the audio file of server return more
The audio file to be updated in new client.Furthermore, it is to be understood that can not be replaced, still can retain not in the machine
Audio file with tonequality is so that user has more abundant selection.Further, can also be by the audio frequency of the high-quality of the machine
Files passe makes server end that there is the version of more high tone quality, so as to be available for other users to be updated to server.
Additionally, in the present embodiment, it is that the frequency spectrum of audio file to be updated highly uploads onto the server, by server end
It is compared, it being understood, however, that the present embodiment is not limited to this mode, for example, can also be first to server request
Frequency spectrum height with successful audio file, compares frequency spectrum height by client, when the frequency spectrum height of the audio file that the match is successful
Degree just downloads the audio file that the match is successful to server request when being more than the frequency spectrum height of audio file to be updated.
Tonequality and server in the audio file update method of the present embodiment, with further reference to audio file to be updated
The tonequality of the audio file at end, the audio file that preserve can the machine will not be covered by the audio file of bass matter, can also be made
There is in the machine the version audio file of different tonequality.
The schematic diagram of the audio file update device that Fig. 5 is provided for fourth embodiment.As shown in figure 5, which includes client
510 with server 520.Wherein, client 510 is for arbitrarily using the terminal of high in the clouds music storage service, such as computer, flat board electricity
Brain, mobile phone etc..Server 520 provides high in the clouds music storage service and upgrade service.
Client 510 includes:Audio-frequency fingerprint extraction unit 511, frequency spectrum height extraction unit 512, uploading unit 513 and
Updating block 514.
Wherein, audio-frequency fingerprint extraction unit 511 is used for the audio-frequency fingerprint for extracting audio file to be updated;Uploading unit 513
For the audio-frequency fingerprint uploads onto the server, by server by the audio-frequency fingerprint of the audio file to be updated and audio-frequency fingerprint number
Audio-frequency fingerprint according to storehouse is mated;If updating block 514 is used for server matches success, downloads and the reception server is returned
Audio file and the audio file that returned using the server updates the audio file to be updated.
Specifically, as shown in Fig. 2 audio-frequency fingerprint extraction unit 511 is used for:Judge whether audio file to be updated is pre-
Fix formula;When the audio file to be updated non-for predetermined format when call transcoder to be converted into the predetermined format;To this
Audio file to be updated carries out sub-frame processing;Fourier transform is carried out to every frame and obtains energy frequency spectrum;According to energy frequency spectrum meter
Calculate the sub- fingerprint per frame;And the audio-frequency fingerprint of the audio file is obtained according to the sub- fingerprint of all frames.
Frequency spectrum height extraction unit 512 is used for the frequency spectrum height for extracting audio file to be updated, and uploading unit 513 can also be by
The frequency spectrum of audio file to be updated highly uploads onto the server, by the frequency spectrum height of the successful audio file of server comparison match
Frequency spectrum height with audio file to be updated.If the frequency spectrum of audio file to be updated is highly less than the audio file that the match is successful
Frequency spectrum height updating block 514 downloads the audio file of coupling to be used for updating audio file to be updated.
Server 520 includes that audio fingerprint database builds module 521 and update module 522.Audio fingerprint database structure
Modeling block 521 is responsible for building audio fingerprint database, and which includes that Traversal Unit 501 and extraction unit 503, Traversal Unit 501 are used
Each audio file in traversal music storehouse, extraction unit 503 are used for extracting the audio-frequency fingerprint of each audio file and record letter
Cease and be stored in audio fingerprint database, and its concrete operation can further regard to Fig. 1, Fig. 2 and associated description.
Update module 522 is responsible for processing the audio file of client and updates request.Specifically, which includes that audio-frequency fingerprint mates
Unit 502, frequency spectrum height extraction unit 504, frequency spectrum height comparing unit 506 and returning unit 508.Wherein, audio-frequency fingerprint
It is used for the audio-frequency fingerprint that retrieval user uploads in audio fingerprint database, the sound of output matching when the match is successful with single 502
Frequency file;Frequency spectrum height extraction unit 504 is used for the frequency spectrum height for extracting the audio file that the match is successful;Frequency spectrum height is more single
Unit 506 is used for the frequency of the audio file to be updated that the frequency spectrum height of the successful audio file of comparison match is uploaded with client 510
Spectrum height;And returning unit 508 is used for determining specific operation according to the result of frequency spectrum height comparing unit 506, for example, return
The audio file that the match is successful is to client 510, and specific operational logic can further regard to aforementioned each audio file and update
The description of method.
Additionally, client 510 may also include frequency spectrum altitude request unit 515, for the audio frequency mated to server request
The frequency spectrum height of file, updating block 514 are used for, if the frequency spectrum of audio file to be updated is highly less than the audio frequency text that the match is successful
The frequency spectrum height of part, the download audio file that the match is successful simultaneously update audio frequency text to be updated using the audio file that downloads
Part;If the frequency spectrum of audio file to be updated is highly more than the frequency spectrum height of the audio file that the match is successful, by the audio frequency to be updated
Files passe is to server.
With regard to the other details of above-mentioned audio file update device, can be with further reference to the audio frequency of foregoing embodiments text
Part upgrade method.
In the audio file update device of the present embodiment, also right in addition to preserving description information in audio fingerprint database
The audio-frequency fingerprint of audio file should be preserved, subsequently can be used for recognizing different audio files, such that it is able to avoid due to recording letter
Breath mistake causes the maloperation to audio file.
The above, is only presently preferred embodiments of the present invention, not makees any pro forma restriction to the present invention, though
So the present invention is disclosed as above with preferred embodiment, but is not limited to the present invention, and any those skilled in the art, not
Depart from the range of technical solution of the present invention, make a little change or be modified to equivalent when the technology contents using the disclosure above and becoming
The Equivalent embodiments of change, as long as be that the technical spirit according to the present invention is to above enforcement without departing from technical solution of the present invention content
Any brief introduction modification, equivalent variations and modification that example is made, still fall within the range of technical solution of the present invention.