CN103092859B - A kind of method and device obtaining music file information - Google Patents

A kind of method and device obtaining music file information Download PDF

Info

Publication number
CN103092859B
CN103092859B CN201110341260.1A CN201110341260A CN103092859B CN 103092859 B CN103092859 B CN 103092859B CN 201110341260 A CN201110341260 A CN 201110341260A CN 103092859 B CN103092859 B CN 103092859B
Authority
CN
China
Prior art keywords
music file
label information
decoding
filename
song title
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110341260.1A
Other languages
Chinese (zh)
Other versions
CN103092859A (en
Inventor
张坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201110341260.1A priority Critical patent/CN103092859B/en
Publication of CN103092859A publication Critical patent/CN103092859A/en
Application granted granted Critical
Publication of CN103092859B publication Critical patent/CN103092859B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses a kind of method and the device that obtain music file information, belong to computer realm.Described method comprises: the filename obtaining music file; The label information of described music file is decoded, obtains the label information of successfully decoding according to the filename of described music file; From the label information that described success is decoded, obtain music file information, described music file information at least comprises song title.Described device comprises: the first acquisition module, decoding judge module and the second acquisition module.The present invention can improve the correctness obtaining music file information.

Description

A kind of method and device obtaining music file information
Technical field
The present invention relates to computer realm, particularly a kind of method and device obtaining music file information.
Background technology
MP3 (MovingPictureExpertsGroupAudioLayerIII, dynamic image expert compression standard audio frequency aspect 3) file is common a kind of music file, ID3 (IDentity3 is had in the beginning of mp3 file or several bytes at end, mark 3) label information, mp3 file information is stored in ID3 label information, mp3 file information at least comprises song title, can also comprise the information such as singer name and/or album name.
Amendment ID3 label tool can be used at present from ID3 label information to read mp3 file information, be specially: user arranges a kind of decoding process in amendment ID3 instrument, the ID3 label information of decoding process to mp3 file that amendment ID3 label tool is arranged according to user is decoded, from decoded ID3 label information, read mp3 file information.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
The coded system of ID3 label information has multiple, and the coded system that the ID3 label information in different mp3 file adopts is often different, makes the ID3 label information of decoding often occur mess code, thus often cannot correctly read mp3 file information.
Summary of the invention
In order to improve the correctness getting music file information, the invention provides a kind of method and the device that obtain music file information.Described technical scheme is as follows:
Obtain a method for music file information, described method comprises:
Obtain the filename of music file;
The label information of described music file is decoded, obtains the label information of successfully decoding according to the filename of described music file;
Music file information is obtained from the label information that described success is decoded.
Obtain a device for music file information, described device comprises:
First acquisition module, for obtaining the filename of music file;
Decoding judge module, for decoding to the label information of described music file, obtains the label information of successfully decoding according to the filename of described music file;
Second acquisition module, for obtaining music file information in the label information from described success decoding.
In the present invention, obtain the filename of music file, the label information of music file is decoded, obtain the label information of successfully decoding according to the filename of this music file, from the label information that success is decoded, obtain music file information, so improve the correctness obtaining music file information.
Accompanying drawing explanation
Fig. 1 is a kind of method flow diagram obtaining music file information that the embodiment of the present invention 1 provides;
Fig. 2 is a kind of method flow diagram obtaining music file information that the embodiment of the present invention 2 provides;
Fig. 3 is a kind of method flow diagram obtaining music file information that the embodiment of the present invention 3 provides;
Fig. 4 is a kind of method flow diagram obtaining music file information that the embodiment of the present invention 4 provides;
Fig. 5 is a kind of device schematic diagram obtaining music file information that the embodiment of the present invention 5 provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment 1
As shown in Figure 1, embodiments provide a kind of method obtaining music file information, comprising:
Step 101: the filename obtaining music file;
Step 102: decode to the label information of this music file, obtains the label information of successfully decoding according to the filename of this music file;
Step 103: obtain music file information from the label information that success is decoded.
In embodiments of the present invention, obtain the filename of music file, the label information of music file is decoded, the label information of successfully decoding is obtained according to the filename of this music file, from the label information that success is decoded, obtain music file information, so improve the correctness obtaining music file information.
Embodiment 2
As shown in Figure 2, embodiments provide a kind of method obtaining music file information, comprising:
Step 201: the filename reading music file, carries out standardized operation to the filename of this music file;
Particularly, read the filename of music file, remove the redundant information in the filename of this music file, if there is English alphabet in the filename of this music file, then the form of the English alphabet that the filename of this music file comprises is normalized, if there is Word message in the filename of this music file, be then traditional font word by the simplified text conversion that the filename of this music file comprises be maybe simplified word by the traditional font text conversion that the filename of this music file comprises.
Wherein, the form of English alphabet comprises patterns of capitalization and lowercase versions; Correspondingly, to the operation that the form of the English alphabet that the filename of this music file comprises is normalized, can comprise as under type:
First method, according to unicode (UniversalCharacterSet, Unicode) English alphabet of each lowercase versions in the filename of this music file is converted to the English alphabet of patterns of capitalization by code table, and the English alphabet that the filename of this music file is comprised is all the English alphabet of patterns of capitalization.
Wherein, the corresponding relation of the coding of the coding of the English alphabet of lowercase versions and the English alphabet of patterns of capitalization is stored in unicode code table.Particularly, according to the coding of the English alphabet of lowercase versions each in the filename of this music file, the coding of the English alphabet of patterns of capitalization corresponding to the English alphabet of each lowercase versions is got from unicode code table, according to the coding of the English alphabet of patterns of capitalization corresponding to the English alphabet of each lowercase versions, the English alphabet of each lowercase versions is converted to the English alphabet of patterns of capitalization.
Second method, according to unicode code table, the English alphabet of each patterns of capitalization in the filename of this music file is converted to the English alphabet of lowercase versions, the English alphabet that the filename of this music file is comprised is all the English alphabet of lowercase versions.
Particularly, according to the coding of the English alphabet of patterns of capitalization each in the filename of this music file, the coding of the English alphabet of lowercase versions corresponding to the English alphabet of each patterns of capitalization is got from unicode code table, according to the coding of the English alphabet of lowercase versions corresponding to the English alphabet of each patterns of capitalization, the English alphabet of each patterns of capitalization is converted to the English alphabet of lowercase versions.
Wherein, also store the corresponding relation of the coding of simplified word and the coding of traditional font word in unicode code table, correspondingly, the simplified text conversion comprised by the filename of this music file is the operation of traditional font word, can be specially:
According to the coding of each simplified word that the filename of this music file comprises, from unicode code table, obtain the coding of traditional font word corresponding to each simplified word, be traditional font word according to the coding of traditional font word corresponding to each simplified word by each simplified text conversion; And,
The traditional font text conversion comprised by the filename of this music file is the operation of simplified word, can be specially:
According to the coding of each traditional font word that the filename of this music file comprises, from unicode code table, obtain the coding of simplified word corresponding to each traditional font word, be simplified word according to the coding of simplified word corresponding to each traditional font word by each traditional font text conversion.
Wherein, in the present embodiment, music file can be mp3 file or APE file etc.Redundant information comprises the information such as punctuation mark and space.
Step 202: remove suffix name from the filename of this music file;
Wherein, the filename of each music file has a suffix name, and such as, the suffix in the filename of mp3 file is called " .mp3 ", and the suffix in the filename of APE file is called " .ape ".
Wherein, in music file, there is a label information, have Multi-encoding mode to encode to the label information in music file at present, correspondingly, also have the label information of multiple decoding process to music file to decode at present.In the present embodiment, arrange a decoding process list, decoding process list is for storing the decoding process for decoding to the label information of music file existed at present.
Wherein, the label information of mp3 file is ID3 label information, and the label information of APE file is APE label information.
Step 203: select default decode mode from decoding process list, decodes according to the label information of default decode mode to this music file;
Wherein, default decode mode is decoding process the most frequently used at present; Such as, for mp3 file, unicode coded system is usually used to encode to mp3 file at present, correspondingly, also usually use the corresponding mp3 file of unicode decoding process to decode at present, therefore, unicode decoding process can be set to default decode mode.
Wherein, according to decoding process, prior art is decoded as to the label information in music file, in the present embodiment this is no longer described in detail.
Step 204: read song title from the label information of decoding, standardized operation is carried out to this song title;
Particularly, song title is read from the label information of decoding, remove the redundant information in this song title, if there is English alphabet in this song title, then the form of the English alphabet that this song title comprises is normalized, if there is Word message in this song title, be then traditional font word by the simplified text conversion that this song title comprises be maybe simplified word by the traditional font text conversion that this song title comprises.
Wherein, the detailed operation process that the form of the English alphabet that this song title comprises is normalized can see in step 201 to the detailed operation process that the form of the English alphabet that the filename of music file comprises is normalized, no longer describe in detail at this; And, the detailed operation process of the simplified text conversion this song title comprised to be traditional font word by the traditional font text conversion that this song title comprises be maybe simplified word respectively see the detailed process of to be traditional font word or the traditional font text conversion that comprised by the filename of music file by the simplified text conversion in the filename of music file in step 201 be simplified word, no longer can describe in detail at this.
Step 205: calculate the filename of this music file and the similarity of normalized song title;
Particularly, count the number of identical characters in the filename of this song title and this music file, the number of characters that the number of characters comprised according to the filename of the number of characters counted, this music file and this song title comprise, and calculate the filename of this music file and the similarity of this song title by following formula (1).
namesimilarity=(namecount*100)/(namestring+titlestring)……(1)
Wherein, in formula (1), namesimilarity is the filename of music file and the similarity of song title, namecount is the number of identical characters in the filename of music file and song title, namestring is the number of characters that song title comprises, and titlestring is the number of characters that the filename of music file comprises.
Wherein, standardized operation is carried out to the filename of this music file and this song title, the accuracy calculating the filename of this music file and the similarity of this song title can be improved, thus improve the correctness obtaining music file information further.
Wherein, the filename of usual music file is similar to song title, if the decoding process selected is correct, then successfully can decode label information, from the label information of decoding, do not comprise mess code in the song title that reads, the similarity making to calculate the filename of music file and song title is higher; If the decoding process selected is incorrect, then successfully can not decode label information, the song title read from the label information of decoding comprises mess code, makes the similarity of the filename of the music file calculated and song title lower.
Step 206: judge whether the label information successfully decoding this music file according to the filename of this music file and the similarity of this song title, if so, then performs step 207; If not, then step 208 is performed;
Particularly, judge whether the filename of this music file and the similarity of this song title exceed default threshold value, if so, then judge the label information successfully decoding this music file, if not, then the label information successfully not decoding this music file is judged.
Step 207: read music file information from the label information of successfully decoded, end operation;
Wherein, the music file information of reading at least comprises song title, can also comprise: the information such as singer name and/album name.
Step 208: according to other decoding processes stored in decoding process list, respectively the label information in this music file is decoded, decode the label information that often kind of decoding process is corresponding;
Step 209: read song title from each label information decoded, carries out standardized operation to each song title read;
Particularly, song title is read from each label information decoded, remove the redundant information in each song title, if there is the song title of English alphabet, then the form of the English alphabet that this song title comprises is normalized, if there is the song title of Word message, be then traditional font word by the simplified text conversion that this song title comprises be maybe simplified word by the traditional font text conversion that this song title comprises.
Wherein, the detailed operation process that the form of the English alphabet that this song title comprises is normalized can see in step 201 to the detailed operation process that the form of the English alphabet that the filename of music file comprises is normalized, no longer describe in detail at this; And, the detailed operation process of the simplified text conversion this song title comprised to be traditional font word by the traditional font text conversion that this song title comprises be maybe simplified word respectively see the detailed process of to be traditional font word or the traditional font text conversion that comprised by music file by the simplified text conversion in the filename of music file in step 201 be simplified word, no longer can describe in detail at this.
Step 210: according to filename and normalized each song title of this music file, calculate the filename of this music file and the similarity of each song title;
Particularly, for any one song title, count the number of identical characters in the filename of this song title and this music file, the number of characters that the number of characters comprised according to the filename of the number of characters counted, this music file and this song title comprise, and calculate the filename of this music file and the similarity of this song title by above-mentioned formula (1).Wherein, by above-mentioned identical method, calculate the filename of this music file and the similarity of remaining each song title.
Step 211: select the song title that similarity is maximum, if maximum similarity exceedes default threshold value, then judge that label information corresponding to song title selected is the label information of successfully decoded, from the label information that the song title selected is corresponding, read music file information.
Wherein, the music file information of reading at least comprises song title, can also comprise the information such as singer and/or album name.
Wherein, if label information corresponding to the maximum song title of similarity is the label information (namely maximum similarity does not exceed default threshold value) that success is decoded, then can directly using the song title of the filename of this music file as the label of this music file.
In embodiments of the present invention, to the suffix name that the filename of music file carries out standardized operation and removes in the filename of this music file, decode according to the label information of default decode mode to this music file, song title is read the label information obtained from decoding, standardized operation is carried out to the song title read, the filename of this music file and the similarity of this song title is calculated according to the filename of this music file and the song title of reading, judge whether successfully to decode according to the similarity calculated the label information of this music file, if, music file information is read the label information then obtained from decoding, if not, then according to other decoding process in coded system list the label information in this music file decoded and obtain label information corresponding to often kind of decoding process, song title is read from each label information, standardized operation is carried out to each song title read, calculate the filename of this music file and the similarity of each song title, if maximum similarity exceedes default threshold value, label information corresponding to the song title that then similarity is maximum is the label information of successfully decoding, music file information is read from the label information that the song title that similarity is maximum is corresponding, if maximum similarity does not exceed default threshold value, then direct using the song title of the filename of this music file as the label of this music file.So improve the correctness reading music file information, avoid the interference of label mess code to user.
Embodiment 3
As shown in Figure 3, embodiments provide a kind of method obtaining music file information, comprising:
Step 301-302: identical with the step 201-202 of embodiment 2, no longer describes in detail at this;
Step 303: select a kind of decoding process from decoding process list, the label information of decoding process to this music file according to selecting is decoded;
Wherein, can in advance all decoding processes of decoding to the label information of music file existed at present be stored in decoding process list; Or, the coding of each character that can comprise according to the label information of this music file before performing this step determines the coded system of encoding to the label information of this music file, is stored in decoding process list by decoding process corresponding for the coded system determined.
Wherein, adopt different coded systems to carry out encoding for each character that the label information of music file comprises and obtain the coding of each character, the character code of often kind of coded system coding is all in certain numerical range; For any one coded system, there is overlapping region in the numerical range at the coding place of the character that the numerical range at coding place of the character of this coded system coding may be encoded with other coded systems.
Wherein, according to decoding process, prior art is decoded as to the label information in music file, in the present embodiment this is no longer described in detail.
Step 304: read song title from the label information of decoding, standardized operation is carried out to this song title;
Particularly, song title is read from the label information of decoding, remove the redundant information in this song title, if there is English alphabet in this song title, then the form of the English alphabet that this song title comprises is normalized, if there is Word message in this song title, be then traditional font word by the simplified text conversion that this song title comprises be maybe simplified word by the traditional font text conversion that this song title comprises.
Wherein, the detailed operation process that the form of the English alphabet that this song title comprises is normalized can see in step 201 to the detailed operation process that the form of the English alphabet that the filename of music file comprises is normalized, no longer describe in detail at this; And, the detailed operation process of the simplified text conversion this song title comprised to be traditional font word by the traditional font text conversion that this song title comprises be maybe simplified word respectively see the detailed process of to be traditional font text conversion in the filename of traditional font word or music file by the simplified text conversion in the filename of music file in step 201 be simplified word, no longer can describe in detail at this.
Step 305: calculate the filename of this music file and the similarity of normalized song title;
Particularly, count the number of identical characters in the filename of this song title and this music file, the number of characters that the number of characters comprised according to the filename of the number of characters counted, this music file and this song title comprise, and calculate the filename of this music file and the similarity of this song title by following formula (2).
namesimilarity=(namecount*100)/(namestring+titlestring)……(2)
Wherein, in formula (2), namesimilarity is the filename of music file and the similarity of song title, namecount is the number of characters that the filename of music file is identical with song title, namestring is the number of characters that song title comprises, and titlestring is the number of characters that the filename of music file comprises.
Wherein, the filename of usual music file is similar to song title, if the decoding process selected is correct, then successfully can decode label information, from the label information of decoding, do not comprise mess code in the song title that reads, the similarity making to calculate the filename of music file and song title is higher; If the decoding process selected is incorrect, then successfully can not decode label information, the song title read from the label information of decoding comprises mess code, makes the similarity of the filename of the music file calculated and song title lower.
Step 306: judge whether the label information successfully decoding this music file according to the filename of this music file and the similarity of this song title, if not, then performs step 307; If so, then step 308 is performed;
Particularly, judge whether the filename of this music file and the similarity of this song title exceed default threshold value, if so, then judge the label information successfully decoding this music file, if not, then the label information successfully not decoding this music file is judged.
Step 307: select a kind of decoding process in decoding process remaining from decoding process list, the decoding process according to selecting is decoded to the label information in this music file, performs step 304;
Step 308: read music file information the label information obtained from successfully decoding, wherein, the music file information of reading at least comprises song title.
Further, the music file information of reading can also comprise the information such as singer name and album name.
In embodiments of the present invention, to the suffix name that the filename of music file carries out standardized operation and removes in the filename of this music file, a kind of decoding process is selected from decoding process list, the label information of decoding process to this music file according to selecting is decoded, song title is read the label information obtained from decoding, standardized operation is carried out to the song title read, the filename of this music file and the similarity of this song title is calculated according to the filename of this music file and the song title of reading, the label information successfully decoding this music file is judged whether according to the similarity calculated, if not, from decoding process list, then select other decoding process, and by above-mentioned identical method until judge the label information of successfully decoded, then from the label information of successfully decoded, music file information is read, so improve the correctness reading music file information.
Embodiment 4
As shown in Figure 4, embodiments provide a kind of method obtaining music file information, comprising:
Step 401-402: identical with the step 201-202 of embodiment 2 respectively, no longer describes in detail at this;
Step 403: the label information of often kind of decoding process to this music file according to storing in decoding process list is decoded, and decodes different label informations;
Wherein, can in advance all decoding processes of decoding to the label information of music file existed at present be stored in decoding process list; Or, the coding of each character that can comprise according to the label information of this music file before performing this step determines the coded system of encoding to the label information of this music file, is stored in decoding process list by decoding process corresponding for the coded system determined.
Wherein, according to decoding process, prior art is decoded as to the label information in music file, in the present embodiment this is no longer described in detail.
Step 404: read song title from each label information decoded, carries out standardized operation to each song title read;
Particularly, song title is read from each label information decoded, remove the redundant information in each song title, if there is the song title of English alphabet, then the form of the English alphabet that this song title comprises is normalized, if there is the song title of Word message, be then traditional font word by the simplified text conversion that this song title comprises be maybe simplified word by the traditional font text conversion that this song title comprises.
Wherein, the detailed operation process that the form of the English alphabet that this song title comprises is normalized can see in step 201 to the detailed operation process that the form of the English alphabet that the filename of music file comprises is normalized, no longer describe in detail at this; And, the detailed operation process of the simplified text conversion this song title comprised to be traditional font word by the traditional font text conversion that this song title comprises be maybe simplified word respectively see the detailed process of to be traditional font text conversion in the filename of traditional font word or music file by the simplified text conversion in the filename of music file in step 201 be simplified word, no longer can describe in detail at this.
Step 405: calculate the filename of this music file and the similarity of normalized each song title;
Particularly, for any one song title, count the number of identical characters in the filename of this song title and this music file, the number of characters that the number of characters comprised according to the filename of the number of characters counted, this music file and this song title comprise, and calculate the filename of this music file and the similarity of this song title by following formula (3).Wherein, by above-mentioned identical method, calculate the filename of this music file and the similarity of remaining each song title.
namesimilarity=(namecount*100)/(namestring+titlestring)……(3)
Wherein, in formula (3), namesimilarity is the filename of music file and the similarity of song title, namecount is the number of characters that the filename of music file is identical with song title, namestring is the number of characters that song title comprises, and titlestring is the number of characters that the filename of music file comprises.
Wherein, the filename of usual music file is similar to song title, if the decoding process selected is correct, then successfully can decode label information, from the label information of decoding, do not comprise mess code in the song title that reads, the similarity making to calculate the filename of music file and song title is higher; If the decoding process selected is incorrect, then successfully can not decode label information, the song title read from the label information of decoding comprises mess code, makes the similarity of the filename of the music file calculated and song title lower.
Step 406: according to the filename of this music file and the similarity of each song title from each label information of decoding, obtains the label information of successfully decoding;
Particularly, select the maximum song title of similarity, if maximum similarity exceedes default threshold value, then judge that label information corresponding to the maximum song title of similarity is the label information of successfully decoding.
Step 407: the music file information reading this music file from the label information that success is decoded.
In embodiments of the present invention, to the suffix name that the filename of music file carries out standardized operation and removes in the filename of this music file, decode according to the label information of often kind of decoding process to this music file in decoding process list, song title is read each label information obtained from decoding, standardized operation is carried out to each song title read, the filename of this music file and the similarity of each song title is calculated according to the filename of this music file and each song title of reading, if maximum similarity exceedes default threshold value, then judge that label information corresponding to the maximum song title of similarity is the label information of successfully decoding, music file information is read from the label information that the song title that similarity is maximum is corresponding, so improve the correctness reading music file information.
Embodiment 5
As shown in Figure 5, embodiments provide a kind of device obtaining music file information, comprising:
First acquisition module 501, for obtaining the filename of music file;
Decoding judge module 502, for decoding to the label information of this music file, obtains the label information of successfully decoding according to the filename of this music file;
Second acquisition module 503, for obtaining music file information in the label information from success decoding, and this music file information at least comprises song title.
Wherein, the first acquisition module 501 comprises:
Reading unit, for reading the filename of this music file;
Specification unit, for carrying out standardized operation to the filename of this music file;
Removal unit, for removing the suffix name of the filename of this music file.
Wherein, specification unit comprises:
Remove subelement, for removing the redundant information in the filename of this music file;
Normalizing subelement, if for there is English alphabet in the filename of this music file, be then normalized the form of the English alphabet that the filename of this music file comprises;
Conversion subelement if for there is Word message in the filename of this music file, be then the traditional font text conversion that this song title maybe comprises by traditional font word by the simplified text conversion that the filename of this music file comprises is simplified word.
Wherein, judge module 502 of decoding comprises:
Selection unit, for selecting a kind of decoding process from decoding process list;
First decoding unit, for decoding according to the label information of decoding process to this music file selected;
First judging unit, for reading song title in the label information from decoding, the similarity according to the filename of this music file and the song title of reading judges whether the label information successfully decoding this music file.
Wherein, selection unit, specifically for selecting default decode mode from decoding process list;
Correspondingly, judge module 502 of decoding also comprises:
Second decoding unit, if the label information for successfully not decoding this music file, then often planting decoding process according to other in decoding process list, decoding to the label information of this music file;
Second judging unit, for reading song title in each label information from decoding, judges the label information of successfully decoded according to each song title read and the similarity of the filename of this music file.
Wherein, judge module 502 of decoding also comprises:
3rd decoding unit, if the label information for successfully not decoding this music file, then select a kind of decoding process in remaining from decoding process list decoding process, the label information of decoding process to this music file according to selecting is decoded;
3rd judging unit, for reading song title in the label information from decoding, the similarity according to the filename of this music file and the song title of reading judges whether the label information successfully decoding this music file.
Wherein, the first judging unit comprises:
Specification subelement, for reading song title in the label information from decoding, carries out standardized operation to the song title read;
First computation subunit, for the similarity of the song title of the filename and reading that calculate this music file;
First judgment sub-unit, if the similarity for calculating exceedes default threshold value, then judge the label information successfully decoding this music file, if the similarity calculated does not exceed default threshold value, then judge the label information successfully not decoding this music file.
Wherein, judge module 502 of decoding comprises:
4th decoding unit, for decoding according to the label information of often kind of decoding process to this music file stored in decoding process list;
Second judging unit, for reading song title in each label information from decoding, judges the label information of successfully decoded according to each song title read and the similarity of the filename of this music file.
Wherein, the second judging unit comprises:
Reading subelement, for reading the song title in each label information of decoding, standardized operation being carried out to each song title read;
Second computation subunit, for the similarity of the filename of each song title He this music file that calculate reading;
Second judgment sub-unit, if exceed default threshold value for maximum similarity, then judges that label information corresponding to the maximum song title of similarity is the label information of successfully decoded.
Further, the second judging unit also comprises:
Determine subelement, if do not exceed default threshold value for maximum similarity, then using standardization and remove the music file after suffix name filename as the song title in label information.
In embodiments of the present invention, obtain the filename of music file, the label information of music file is decoded, the label information of successfully decoding is judged according to the filename of this music file, from the label information that success is decoded, obtain music file information, so improve the correctness obtaining music file information.
It should be noted that: a kind of device obtaining music file information that above-described embodiment provides is when obtaining music file information, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by device is divided into different functional modules, to complete all or part of function described above.In addition, above-described embodiment provides the device obtaining music file information to belong to same design with the embodiment of the method obtaining music file information, and its specific implementation process refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (18)

1. obtain a method for music file information, it is characterized in that, described method comprises:
Obtain the filename of music file;
The label information of described music file is decoded, obtains the label information of successfully decoding according to the filename of described music file, comprising: from decoding process list, select a kind of decoding process; The label information of decoding process to described music file according to described selection is decoded; From the label information of decoding, read song title, judge whether according to the filename of described music file and the similarity of described song title the label information successfully decoding described music file;
From the label information that described success is decoded, obtain music file information, described music file information at least comprises song title.
2. the method for claim 1, is characterized in that, the filename of described acquisition music file, comprising:
Read the filename of described music file;
Standardized operation is carried out to the filename of described music file;
Remove the suffix name of the filename of described music file.
3. method as claimed in claim 2, is characterized in that, carry out standardized operation, comprising the filename of described music file:
Remove the redundant information in the filename of described music file;
If there is English alphabet in the filename of described music file, then the form of the English alphabet that the filename of described music file comprises is normalized;
If there is Word message in the filename of described music file, be then traditional font word by the simplified text conversion that the filename of described music file comprises or be simplified word by traditional font text conversion.
4. the method for claim 1, is characterized in that, describedly from decoding process list, selects a kind of decoding process, comprising:
Default decode mode is selected from described decoding process list;
Correspondingly, the label information of described music file is decoded, obtains the label information of successfully decoding according to the filename of described music file, also comprise:
If successfully do not decode the label information of described music file, then often plant decoding process according to other in described decoding process list, the label information of described music file is decoded;
From each label information of decoding, read song title, judge the label information of successfully decoded according to the similarity of filename of each song title read and described music file.
5. the method for claim 1, is characterized in that, decodes to the label information of described music file, obtains the label information of successfully decoding, also comprise according to the filename of described music file:
If successfully do not decode the label information of described music file, then select a kind of decoding process in remaining from described decoding process list decoding process, the label information of decoding process to described music file according to selecting is decoded;
From the label information of decoding, read song title, judge whether according to the filename of described music file and the similarity of described song title the label information successfully decoding described music file.
6. the method any one of claim 1,4 or 5 as described in claim, it is characterized in that, song title is read the described label information from decoding, judge whether according to the filename of described music file and the similarity of described song title the label information successfully decoding described music file, comprising:
From the label information of described decoding, read song title, standardized operation is carried out to described song title;
Calculate the filename of described music file and the similarity of described song title;
If described similarity exceedes default threshold value, then judge the label information successfully decoding described music file, if described similarity does not exceed default threshold value, then judge the label information successfully not decoding described music file.
7. the method for claim 1, is characterized in that, decodes to the label information of described music file, obtains the label information of successfully decoding, comprising according to the filename of described music file:
The label information of often kind of decoding process to described music file according to storing in decoding process list is decoded;
From each label information of decoding, read song title, judge the label information of successfully decoded according to the similarity of filename of each song title read and described music file.
8. the method as described in claim 4 or 7, it is characterized in that, describedly from each label information of decoding, read song title, judge the label information of successfully decoded according to the similarity of filename of each song title read and described music file, comprising:
Read the song title in each label information of described decoding, standardized operation is carried out to each song title read;
Calculate the similarity of the filename of described each song title and described music file;
If maximum similarity exceedes default threshold value, then judge that label information corresponding to the maximum song title of similarity is the label information of successfully decoded.
9. method as claimed in claim 8, is characterized in that, if maximum similarity does not exceed default threshold value, then using standardization and remove the described music file after suffix name filename as the song title in label information.
10. obtain a device for music file information, it is characterized in that, described device comprises:
First acquisition module, for obtaining the filename of music file;
Decoding judge module, for decoding to the label information of described music file, obtains the label information of successfully decoding according to the filename of described music file,
Decoding judge module comprises: selection unit, for selecting a kind of decoding process from decoding process list; First decoding unit, decodes for the label information of decoding process to described music file according to described selection; First judging unit, for reading song title in the label information from decoding, judges whether according to the filename of described music file and the similarity of described song title the label information successfully decoding described music file;
Second acquisition module, for obtaining music file information in the label information from described success decoding, described music file information at least comprises song title.
11. devices as claimed in claim 10, it is characterized in that, described first acquisition module comprises:
Reading unit, for reading the filename of described music file;
Specification unit, for carrying out standardized operation to the filename of described music file;
Removal unit, for removing the suffix name of the filename of described music file.
12. devices as claimed in claim 11, it is characterized in that, described specification unit comprises:
Remove subelement, for removing the redundant information in the filename of described music file;
Normalizing subelement, if there is English alphabet in the filename for described music file, is then normalized the form of the English alphabet that the filename of described music file comprises;
Conversion subelement, if there is Word message in the filename for described music file, is then traditional font word by the simplified text conversion that the filename of described music file comprises or is simplified word by traditional font text conversion.
13. devices as claimed in claim 10, is characterized in that,
Described selection unit, specifically for selecting default decode mode from described decoding process list;
Correspondingly, described decoding judge module also comprises:
Second decoding unit, if the label information for successfully not decoding described music file, then often plants decoding process according to other in described decoding process list, decodes to the label information of described music file;
Second judging unit, for reading song title in each label information from decoding, judges the label information of successfully decoded according to the similarity of filename of each song title read and described music file.
14. devices as claimed in claim 10, it is characterized in that, described decoding judge module also comprises:
3rd decoding unit, if for the label information successfully not decoding described music file, select a kind of decoding process in then remaining from described decoding process list decoding process, the label information of decoding process to described music file according to selecting is decoded;
3rd judging unit, for reading song title in the label information from decoding, judges whether according to the filename of described music file and the similarity of described song title the label information successfully decoding described music file.
15. devices any one of claim 10,13 or 14 as described in claim, it is characterized in that, described first judging unit comprises:
Specification subelement, for reading song title in the label information from described decoding, carries out standardized operation to described song title;
First computation subunit, for the similarity of the filename and described song title that calculate described music file;
First judgment sub-unit, if exceed default threshold value for described similarity, then judge the label information successfully decoding described music file, if described similarity does not exceed default threshold value, then judge the label information successfully not decoding described music file.
16. devices as claimed in claim 10, it is characterized in that, described decoding judge module comprises:
4th decoding unit, for decoding according to the label information of often kind of decoding process to described music file stored in decoding process list;
Second judging unit, for reading song title in each label information from decoding, judges the label information of successfully decoded according to the similarity of filename of each song title read and described music file.
17. devices as described in claim 13 or 16, it is characterized in that, described second judging unit comprises:
Reading subelement, for reading the song title in each label information of described decoding, standardized operation being carried out to each song title read;
Second computation subunit, for calculating the similarity of the filename of described each song title and described music file;
Second judgment sub-unit, if exceed default threshold value for maximum similarity, then judges that label information corresponding to the maximum song title of similarity is the label information of successfully decoded.
18. devices as claimed in claim 17, it is characterized in that, described second judging unit also comprises:
Determine subelement, if do not exceed default threshold value for maximum similarity, then using standardization and remove the described music file after suffix name filename as the song title in label information.
CN201110341260.1A 2011-11-02 2011-11-02 A kind of method and device obtaining music file information Active CN103092859B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110341260.1A CN103092859B (en) 2011-11-02 2011-11-02 A kind of method and device obtaining music file information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110341260.1A CN103092859B (en) 2011-11-02 2011-11-02 A kind of method and device obtaining music file information

Publications (2)

Publication Number Publication Date
CN103092859A CN103092859A (en) 2013-05-08
CN103092859B true CN103092859B (en) 2016-03-23

Family

ID=48205439

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110341260.1A Active CN103092859B (en) 2011-11-02 2011-11-02 A kind of method and device obtaining music file information

Country Status (1)

Country Link
CN (1) CN103092859B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294553B (en) * 2016-07-26 2019-07-19 Oppo广东移动通信有限公司 Data information is sent and big envelope information display method, device, speaker and terminal speaker
CN109040061A (en) * 2018-08-01 2018-12-18 吉林大学珠海学院 A kind of data Auto-matching analytic method, system, device and storage medium
CN109325166B (en) * 2018-09-21 2020-11-10 真相网络科技(北京)有限公司 Method and device for configuring analysis rules in crawler system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222074A (en) * 2010-04-16 2011-10-19 腾讯科技(深圳)有限公司 Method and device for online lyrics data matching and background data device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080047830A (en) * 2006-11-27 2008-05-30 삼성전자주식회사 Method for providing file information according to language assumption and apparatus for reproducing file thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222074A (en) * 2010-04-16 2011-10-19 腾讯科技(深圳)有限公司 Method and device for online lyrics data matching and background data device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
VisualC#读取MP3文件曲目标签信息;王森;《电脑编程技巧与维护》;20111003(第19期);第10-14页 *
巧用ID3管理音乐;罗勇;《电脑迷》;20090415(第8期);第53页 *

Also Published As

Publication number Publication date
CN103092859A (en) 2013-05-08

Similar Documents

Publication Publication Date Title
CN101256561B (en) Method, apparatus and system for storing and accessing database data
CN101315639A (en) Search system and method
CN110147536B (en) Data processing method, device and equipment based on file mapping
CN103092859B (en) A kind of method and device obtaining music file information
CN101571850A (en) Display packing and device of text document in support of page turn function
JP5476346B2 (en) Method for encoding and decoding data in matrix code symbols
CN100458697C (en) User program guiding method and system
CN112698868B (en) Unified error code method applied to multiple systems and storage device
CN101145157A (en) XML format embedded type apparatus characteristic information analysis method
CN105975607A (en) Picture storing and reading methods and picture storing system
CN105243168A (en) Data migration method and system
CN103761095B (en) Method for generating universal upgrade file head data information
CN109086256B (en) Method for generating and using variable-length word stock dot matrix
CN101551820B (en) Generation method and apparatus for index database of points of interest attribute
CN101008940A (en) Method and device for automatic processing font missing
EP2442256B1 (en) Method of encoding and decoding text on a matrix code symbol
CN106528437A (en) Data storage system and related method thereof
CN101345952A (en) Data storing and reading method, device and system for client identification card
CN102063342A (en) Method and system for managing data of flash memory storage equipment
CN104021806A (en) Data processing method and data processing equipment
CN102723067B (en) A kind of character display method and device
CN103595415A (en) Coding method, decoding method, coding system and decoding system
CN202602827U (en) Variable-length decoding device based on universal format code table
CN111241352A (en) Two-dimensional code, and two-dimensional code data storage method and device
CN102456400A (en) Control method and controller for flash memory

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant