CN106095910B - Label information analytic method, device and the terminal of a kind of audio file - Google Patents

Label information analytic method, device and the terminal of a kind of audio file Download PDF

Info

Publication number
CN106095910B
CN106095910B CN201610404399.9A CN201610404399A CN106095910B CN 106095910 B CN106095910 B CN 106095910B CN 201610404399 A CN201610404399 A CN 201610404399A CN 106095910 B CN106095910 B CN 106095910B
Authority
CN
China
Prior art keywords
frame
verified
content
default
content frame
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
CN201610404399.9A
Other languages
Chinese (zh)
Other versions
CN106095910A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610404399.9A priority Critical patent/CN106095910B/en
Publication of CN106095910A publication Critical patent/CN106095910A/en
Application granted granted Critical
Publication of CN106095910B publication Critical patent/CN106095910B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/68Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/686Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, title or artist information, time, location or usage information, user ratings

Abstract

The embodiment of the invention discloses label information analytic method, device and the terminal of a kind of audio file.This method includes:Content frame length information according to being included in current label frame obtains corresponding content frame from label information, obtains content frame to be verified;Content frame to be verified is verified, if being verified, content frame to be verified is defined as to the parsing content frame of current label frame.The embodiment of the present invention adds the operation verified to content frame on the basis of existing parsing scheme, ensure that the accuracy of acquired content frame, optimize the label information parsing scheme of existing audio file by using above-mentioned technical proposal.

Description

Label information analytic method, device and the terminal of a kind of audio file
Technical field
The present embodiments relate to Audiotechnica field, more particularly to a kind of label information analytic method of audio file, Device and terminal.
Background technology
The related title of audio file, singer, special edition, style can be included in audio file label information and is produced the age It is the important component of audio file etc. information.Common audio file label includes ID3 labels and APE labels etc..Its In, ID3 is a kind of metadata (metadata) container, in more audio files applied to MP3 format.It may include in ID3 labels Title, singer, special edition, style and the produce information such as age related to its affiliated audio file.Broadcast carrying out audio file , it is necessary to be parsed to ID3 label informations when putting.
ID3 labels generally comprise a tag head and several label frames, and each label frame is 10 by a length The content frame composition of the not regular length of the frame head of byte and at least one byte.In the frame that affiliated label frame can be included in frame head The length information of appearance.Label frame is sequentially stored in file, between each label frame and tag head and with other labels There is no special character to separate between frame.Existing ID3 label informations parse scheme:Read in order each in byte stream Label frame, that is, the frame head of first label frame is first read, the content frame of corresponding length is then read according to frame head data, then The frame head of second label frame is read again, by that analogy until all label frames are run through.However, the length of the content frame included in frame head Mistake often occurs in degree information, and existing parsing scheme excessively relies on the content frame length information in frame head, if the information errors, The content frame inaccuracy read can then be caused, the missing of content frame may be caused or be mistakenly considered the content of next label frame It is the content frame of current label frame, more seriously, mistake has chain reaction, each label behind the label frame of mistake occurs The parsing of frame also can equally malfunction.
The content of the invention
The purpose of the embodiment of the present invention is to provide label information analytic method, device and the terminal of a kind of audio file, with Optimize the label information parsing scheme of existing audio file.
In a first aspect, the embodiments of the invention provide a kind of label information analytic method of audio file, including:
Content frame length information according to being included in current label frame obtains corresponding content frame from label information, obtains Content frame to be verified;
The content frame to be verified is verified, if being verified, the content frame to be verified is defined as described The parsing content frame of current label frame.
Second aspect, the embodiments of the invention provide a kind of label information resolver of audio file, including:
Content frame acquisition module to be verified, for being believed according to the content frame length information included in current label frame from label Corresponding content frame is obtained in breath, obtains content frame to be verified;
Authentication module, for being verified to the content frame to be verified;
Content frame determining module is parsed, for when the content frame to be verified is verified, by the frame to be verified Content is defined as the parsing content frame of the current label frame.
The third aspect, the embodiments of the invention provide a kind of terminal, the terminal is integrated with the sound in the embodiment of the present invention The label information resolver of frequency file.
The label information parsing scheme of the audio file provided in the embodiment of the present invention, is included according in current label frame Content frame length information corresponding content frame is obtained from label information after, the content frame of acquisition is verified, checking is logical The content frame of acquisition is just defined as to the parsing content frame of current label frame later.By using above-mentioned technical proposal, existing Have and add the operation verified to content frame on the basis of parsing scheme, ensure that the accuracy of acquired content frame, Optimize the label information parsing scheme of existing audio file.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of the label information analytic method for audio file that the embodiment of the present invention one provides;
Fig. 2 is a kind of schematic flow sheet of the label information analytic method for audio file that the embodiment of the present invention two provides;
Fig. 3 is that a kind of flow of the label information analytic method for preferable audio file that the embodiment of the present invention three provides is shown It is intended to;
Fig. 4 is the structured flowchart of the label information resolver for the audio file that the embodiment of the present invention four provides.
Embodiment
Further illustrate technical scheme below in conjunction with the accompanying drawings and by embodiment.It is appreciated that It is that specific embodiment described herein is used only for explaining the present invention, rather than limitation of the invention.Further need exist for illustrating , for the ease of description, part related to the present invention rather than entire infrastructure are illustrate only in accompanying drawing.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing described as flow chart or method.Although each step is described as the processing of order, many of which by flow chart Step can be implemented concurrently, concomitantly or simultaneously.In addition, the order of each step can be rearranged.When its operation The processing can be terminated during completion, it is also possible to the additional step being not included in accompanying drawing.The processing can be with Corresponding to method, function, code, subroutine, subprogram etc..
Embodiment one
Fig. 1 is a kind of schematic flow sheet of the label information analytic method for audio file that the embodiment of the present invention one provides, This method can be performed by the label information resolver of audio file, and wherein the device can be realized by software and/or hardware, and one As can integrate in the terminal.As shown in figure 1, this method includes:
The content frame length information included in step 101, the frame head according to current label frame obtains phase from label information The content frame answered, obtain content frame to be verified.
It is exemplary, terminal in the present embodiment concretely mobile phone, tablet personal computer, MP3 player and intelligent watch The other-end of audio playing function is supported Deng the mobile terminal for supporting audio playing function, or computer and TV etc.. Audio file may include music file and recording file etc..
Exemplary, label information may include ID3 label informations, APE label informations and Lossless Audio Compression coding (Free Lossless Audio Codec, FLAC) label information etc..In existing label information parsing scheme, label is read in order Each label frame in the byte stream of information, the content frame length information in frame head is needed to obtain when obtaining content frame The byte of corresponding length is used as content frame, if content frame length information is inaccurate, will result in parsing mistake.
Following explanation is carried out in the present embodiment by taking ID3 labels as an example.ID3 label informations are normally at the head of audio file Portion, it is a string of binary numbers.Each label frame in ID3 labels is by frame head that a length is 10 bytes and at least one The content frame composition of the not regular length of byte.The 1st content to the 4th byte in frame head is frame identification (also known as frame Name), common frame identification such as TIT2 (title), TPE1 (author), TALB (special edition), TRCK (track) and APIC (picture) etc. Deng;The 5th content to the 8th byte in frame head is content frame length information, concretely digital;The 9th in frame head Content to the 10th byte is mark (also known as additional mark).For example, the position of current label frame is N, since N+10 10 byte datas are frame head, it is assumed that content frame length is L, then from L byte after N+10 are content frame, obtain the frame Content, obtain content frame to be verified.Exemplary, the content frame of acquisition can be stored in an interim character string, waited to be tested Card.
Exemplary, before content frame is obtained, it can be judged according to the label information length information included in tag head Whether the length for the content frame that will be obtained is beyond label information total length, if exceeding, first content frame length information can be entered Row is corrected, for example, last byte for the content frame that last byte of label information is defined as obtaining.Its In, label information total length is specially the summation of tag head length and the length of all label frames.
Step 102, content frame to be verified is verified, if being verified, content frame to be verified be defined as currently The parsing content frame of label frame.
The operation verified to content frame is added in the present embodiment, the content frame length in some frame head can be avoided to believe Caused parsing mistake when ceasing inaccurate.Exemplary, content frame to be verified can be analyzed, whether judgement wherein contains The data of content frame are not belonging to, such as the part of next label frame or whole header content;Also after can be to content frame to be verified The frame head of next label frame is analyzed, to show whether content frame to be verified is correct, after judging content frame to be verified Whether the frame head of next label frame meets frame head form.
It is understood that different types of label information is because used standard is different, so specific data lattice Formula there may be difference, and those skilled in the art can determine phase according to the features such as the structure composition for the label information applied The concrete mode verified to content frame to be verified answered, the present embodiment are not especially limited.
Exemplary, after being verified to content frame to be verified, if authentication failed, content to be verified can be entangled Mistake, to obtain correct content frame;The parsing to the label frame behind current label frame can also be stopped, preventing chain error situation Generation, it is right so as to avoid broadcast interface or audio details list etc. from needing showing the interface display mess code of audio file information Puzzlement caused by user, improves Consumer's Experience.
Preferably, above-mentioned checking is carried out one by one since first label frame after the tag head of label information, i.e., first Using first label frame as current label frame, after being verified to current label frame, work as next label frame as new Preceding label frame.
The label information analytic method of the audio file provided in the embodiment of the present invention, is included according in current label frame Content frame length information corresponding content frame is obtained from label information after, the content frame of acquisition is verified, checking is logical The content frame of acquisition is just defined as to the parsing content frame of current label frame later.By using above-mentioned technical proposal, existing Have and add the operation verified to content frame on the basis of parsing scheme, ensure that the accuracy of acquired content frame, Optimize the label information parsing scheme of existing audio file.
Embodiment two
Fig. 2 is a kind of schematic flow sheet of the label information analytic method for audio file that the embodiment of the present invention two provides, The present embodiment is optimized based on above-described embodiment, in the present embodiment, " being verified to content frame to be verified " is excellent Turn to:Judge whether the byte of the first predetermined number after content frame to be verified meets frame head form, if meeting, be verified.
Further, after being verified to content frame to be verified, may also include:If authentication failed, to be verified Content frame carries out error correction, obtains the parsing content frame of current label frame.
Accordingly, the method for the present embodiment comprises the following steps:
Step 201, corresponding frame obtained from label information according to the content frame length information included in current label frame Content, obtain content frame to be verified.
Step 202, judge whether the byte of the first predetermined number after content frame to be verified meets frame head form, if so, then Perform step 203;Otherwise, step 204 is performed.
Exemplary, the first predetermined number can determine according to the particular type of label information.By taking ID3 labels as an example, often Preceding 10 bytes of individual label frame are frame head, and the first predetermined number is 10.If content frame length information is accurate, then institute The content frame to be verified obtained is exactly correct, should be the data of next label frame behind content frame to be verified.As before Described in text, the frame head form of ID3 labels is fixed, is followed successively by frame identification, content frame length information and mark, can be carried out one by one Checking.For example, can first verify whether preceding 4 bytes match with one in frame identification, it is explainable not meet frame if mismatching Head form, if being matched with any one frame identification, 4 bytes among checking can be continued and indicate whether that string number (grow by content frame Information is spent to represent the numeral of content frame length), if digital, it is further continued for verifying that most latter two byte indicates whether to indicate.
It is understood that if the byte of first predetermined number meets frame head form after content frame to be verified, can be explained Content frame to be verified is exactly correct content frame;If not meeting frame head form, it is probably endless that content frame to be verified, which can be explained, Whole (value of content frame length information is smaller than right value), or content frame to be verified contain the content in rear face labels frame (value of content frame length information is bigger than right value).
Step 203, it is verified, content frame to be verified is defined as to the parsing content frame of current label frame.
Step 204, authentication failed, error correction is carried out to content frame to be verified, obtains the parsing content frame of current label frame.
Specifically, error correction can be carried out to content frame to be verified as follows:Successively with multiple default frame identifications One default frame identification is that keyword scans for content frame to be verified, and position in the default frame identification being searched most is leaned on The position of preceding default frame identification is defined as first position, by the word before first position in content frame to be verified Section is defined as the parsing content frame of current label frame.
Exemplary, default frame identification can include all frame identifications supported in label information.Preferably, if to be tested Frame identification has been searched in card content frame, the content that next label frame is may included in content to be verified can be explained.Frame mark Know for 4 bytes, the first position in the present embodiment can specifically refer to the first character section of the default frame identification most forward with position Position corresponding to the byte to match, therefore, the byte before first position in content frame to be verified should be current The parsing content frame of label frame, so as to carry out error correction to content frame to be verified.
Further, in order to avoid the byte of printed words identical with frame identification in content frame is mistakenly considered into frame identification, can sentence Whether the disconnected byte of the first predetermined number since first position meets frame head form, if meeting, by content frame to be verified Be located at first position before byte be defined as the parsing content frame of current label frame.Further, if not meeting, Judge that the first byte of next frame identification being searched starts the byte of the first predetermined number and whether meets frame head form, according to It is secondary to analogize.If not meeting, it is believed that not searching default frame identification.
Further, using a default frame identification in multiple default frame identifications it is being successively keyword in frame to be verified After appearance scans for, if not searching any default frame identification, a kind of progress in the following two kinds processing mode can be also used Further processing:
First method, using a default frame identification in multiple default frame identifications it is successively keyword to content frame to be verified The byte of the second predetermined number scans for afterwards, by the most forward default frame identification in position in the default frame identification being searched Position is defined as the second place, and the byte before being located at the second place after content frame to be verified and content frame to be verified is true It is set to the parsing content frame of current label frame.
Exemplary, if not searching any default frame identification in content to be verified, illustrate that content to be verified may be simultaneously The incorrect content frame comprising whole from byte below, it is necessary to find the content frame of missing.Above-mentioned second predetermined number can To be a fixed empirical value (such as 100 bytes), can also be dynamically determined according to the position of current label frame, can be with It is dynamically determined according to the frame identification of current label frame or content frame length information.For example, the second predetermined number can be from treating Verify the first character section behind content frame to the total byte quantity of last byte of whole label information.
Second method, using a default frame identification in multiple default frame identifications it is successively keyword to the frame to be verified After content scans for, it may also include:If not searching default frame identification, by the A word reciprocal in content frame to be verified Section is set as search starting point;It is successively keyword to being opened from search starting point using a default frame identification in multiple default frame identifications The byte of the 3rd predetermined number to begin scans for, by the most forward default frame identification in position in the default frame identification being searched Position be defined as the 3rd position, the previous byte of the first character section of content frame to be verified to the second place is determined For the parsing content frame of current label frame.Wherein, A can be frame head length value (such as 10) or frame identification length value (such as 4).
The difference of above-mentioned second method and first method is the difference of search starting point, and the search starting point of first method is to treat The first character section after content frame is verified, and the search starting point of second method is the A byte reciprocal in content frame to be verified.The The advantage of two modes is, in the part for the frame identification that can avoid obtaining rear face labels frame when obtaining content frame to be verified Hold, such as only obtain 2 bytes, then to content frame to be verified carry out frame identification search when, will search for less than.
The embodiment of the present invention has refined the verification mode of content frame to be verified on the basis of above-described embodiment, goes forward side by side one Step is added in authentication failed, is carried out correction process to content frame to be verified, can be avoided the content frame length in some frame head Caused parsing mistake during information inaccuracy, avoid impacting label frame below, so as to avoid chain wrong appearance, Improve the degree of accuracy of the label information parsing of audio file.In addition, the Tag Information Content after terminal-pair parsing is shown When, be also not in mess code situation, improve the usage experience of user.
Embodiment three
Fig. 3 is that a kind of flow of the label information analytic method for preferable audio file that the embodiment of the present invention three provides is shown It is intended to, the present embodiment is optimized based on above-described embodiment, and is specifically described by taking ID3 labels as an example.
The method of the present embodiment comprises the following steps:
The content of 10 bytes is tag head before step 301, reading audio file.
Step 302, judged whether according to tag head content to include ID3 information, if so, then performing step 303;Otherwise, hold Row step 318.
Exemplary, " ID3 " printed words can be included in ID3 tag head, to show ID3 tag identities.
Step 303, according to tag head content setting label information total length it is M, current label framing bit is set to N.
Step 304, judge whether N+10 is more than M, if so, then performing step 318;Otherwise, step 305 is performed.
Step 305, present frame content-length set as L according to current label frame frame head data, judge whether N+10+L is big In M, if so, then performing step 306;Otherwise, step 307 is performed.
Step 306, L=M- (N+10) is corrected, perform step 307.
Step 307, the bytes of stream data for reading length L, and the content read is stored in character string S, perform step Rapid 308.
Step 308, setting current label framing bit are set to N=N+10+L, perform step 309.
Step 309, the frame head data for reading current label frame, judge whether to meet frame head form, if so, then performing step 305;Otherwise, step 310 is performed.
Exemplary, if the frame head data of current label frame meets frame head form, in the frame of an explainable upper label frame Hold and obtain correctly, the contents extraction in character string S can now be come out to the content frame as a upper label frame, and clear character String S, continue to obtain the content frame of current label frame.
Frame identification K in the conventional frame identification set of step 310, successively use is keyword, is carried out in character string S crucial Word matching search.
Step 311, judge whether search K in character string S, if so, then performing step 312;Otherwise, step is performed 313。
If step 312, the position X in character string S search K, the byte before the X of position in character string S is intercepted Data are the content frame of a upper label frame, and setting current label framing bit is set to N=N+10+X, performs step 304.
Preferably, if position X has searched out K in S, 10 byte datas after the X of position in S is read, judge number According to whether frame head form is met, if so, it is current content frame then to intercept the byte data in character string S before the X of position;Otherwise, Continue to search for, search and continue to judge whether 10 byte datas below meet frame head form;Do not search out, perform Step 313.
Step 313, judge to read whether data length is more than 0 for Y next time, if so, then performing step 314;Otherwise, perform Step 318.
For a label frame, when performing this step first, K is not searched in character string S, illustrates a mark Signing the content frame of frame may not obtain completely, it is necessary in a number of byte data behind the content frame of a upper label frame Find frame identification.When reading Y, the starting point of reading need to be in current read position (the first character section opening position of current label frame) On the basis of subtract 10, in order to avoid header content cutting is just caused misjudgment by character string S for two sections.For example, Y initial values For 100, then Y is modified.If N+10+L+Y-10 is less than M, L=L+Y-10, if N+10+L+Y-10 is more than M, repair Positive Y=M- (N+10+L-10), L=L+Y-10.When performing this step again, illustrate not finding frame mark in the byte of Y length Know, then the end of current Y length bytes can be set as search starting point, continue to read Y length byte data, now even Y More than 0, step 314 can be continued executing with.
Step 314, the data that length is Y byte are read since the position of search starting point, by this data content then Store character string S.
For a label frame, when performing this step first, search starting point is N+L (being obtained by N+10+L-10), when When performing this step again, search starting point is the end of a upper Y length byte.
Step 315, the frame identification K in conventional frame identification set is used to be keyword successively, the character in previous step Keyword match search is carried out in string S.
Step 316, judge whether search K in S, if so, then performing step 317;Otherwise, step 313 is performed.
If step 317, position Z has searched out K in character string S, the content frame length of a upper label frame is L=L+Z, Using position N+10 start read length be L data as the content-data of a upper label frame, current frame position is set For N=N+10+L, step 304 is performed.
Preferably, if position Z has searched out K in S, 10 byte datas after the Z of position in S is read, judge number According to whether frame head form is met, if so, then present frame content-length is L=L+Z;Otherwise, continue to search for, search just after Whether 10 byte datas of continuous judgement below meet frame head form;Then execution step 312 is not searched out.
Step 318, parsing terminate.
The label information analytic method of audio file provided in an embodiment of the present invention, when reading the frame head of mistake, i.e., Into error correction flow, parsing retrieval pair is read out to the data of some bytes after current label frame data and current label frame Than finding correct content frame data, being further continued for the parsing of next frame.It can so avoid some frame originating point information incorrect caused Chain mistake, it is ensured that correctly parse and obtain ID3 label informations.
Example IV
The structured flowchart of the label information resolver for the audio file that Fig. 4 provides for the embodiment of the present invention four, the device Can be realized, be typically integrated in terminal by software and/or hardware, can by perform the label information analytic method of audio file come Parse the label information of audio file.As shown in figure 4, the device includes content frame acquisition module 401 to be verified, authentication module 402 and content frame determining module 403 is parsed.
Wherein, content frame acquisition module 401 to be verified, for according to the content frame length information included in current label frame Corresponding content frame is obtained from label information, obtains content frame to be verified;Authentication module 402, for the frame to be verified Content is verified;Content frame determining module 403 is parsed, described in when the content frame to be verified is verified, inciting somebody to action Content frame to be verified is defined as the parsing content frame of the current label frame.
The label information resolver of audio file provided in an embodiment of the present invention, increase on the basis of existing parsing scheme Add the operation verified to content frame, ensure that the accuracy of acquired content frame, optimize existing audio file Label information parsing scheme.
On the basis of above-described embodiment, the authentication module is used for:Judge after the content frame to be verified that first is default Whether the byte of quantity meets frame head form, if meeting, is verified.
On the basis of above-described embodiment, content frame determining module is parsed and has been additionally operable to:The content frame to be verified is entered After row checking, if authentication failed, error correction is carried out to the content frame to be verified, obtains the parsing of the current label frame Content frame.
On the basis of above-described embodiment, error correction is carried out to the content frame to be verified, obtains the current label frame Content frame has been parsed, including:It is successively keyword to described to be verified using a default frame identification in multiple default frame identifications Content frame is scanned for, and the position of the most forward default frame identification in position in the default frame identification being searched is defined as First position, the byte before the first position in the content frame to be verified is defined as the current label frame Parsing content frame.
On the basis of above-described embodiment, by the byte before the first position in the content frame to be verified It is defined as the parsing content frame of the current label frame, including:Judge the first predetermined number since the first position Whether byte meets frame head form, if meeting, by the word before the first position in the content frame to be verified Section is defined as the parsing content frame of the current label frame.
On the basis of above-described embodiment, successively using a default frame identification in multiple default frame identifications as keyword pair After the content frame to be verified scans for, in addition to:If not searching default frame identification, successively with the multiple default A default frame identification in frame identification is searched for keyword to the byte of the second predetermined number after the content frame to be verified Rope, the position of the most forward default frame identification in position in the default frame identification being searched is defined as the second place, will Byte before being located at the second place after the content frame to be verified and the content frame to be verified is defined as described current The parsing content frame of label frame.
On the basis of above-described embodiment, successively using a default frame identification in multiple default frame identifications as keyword pair After the content frame to be verified scans for, in addition to:If not searching default frame identification, by the content frame to be verified Middle the A byte reciprocal is set as search starting point;Successively using a default frame identification in the multiple default frame identification as pass Key word scans for the byte of the 3rd predetermined number since the search starting point, by the default frame identification being searched The position of the most forward default frame identification in position is defined as the 3rd position, by the first character section of the content frame to be verified Previous byte to the second place is defined as the parsing content frame of the current label frame.
On the basis of above-described embodiment, the label information includes ID3 label informations.
Embodiment five
The present embodiment five provides a kind of terminal, and the terminal is integrated with the mark of the audio file described in the embodiment of the present invention Information resolver is signed, the label information of audio file can be parsed by performing the label information analytic method of audio file.
It is exemplary, terminal in the present embodiment concretely mobile phone, tablet personal computer, MP3 player and intelligent watch The other-end of audio playing function is supported Deng the mobile terminal for supporting audio playing function, or computer and TV etc..
In the terminal in using the present embodiment, terminal is when the label information to audio file parses user, meeting The operation verified to acquired content frame, the accuracy of acquired content frame is ensure that, optimize existing audio The label information parsing scheme of file.
The executable present invention of the label information resolver and terminal of the audio file provided in above-described embodiment is any real The label information analytic method for the audio file that example is provided is applied, possesses and performs the corresponding functional module of this method and beneficial to effect Fruit.Not ins and outs of detailed description in the above-described embodiments, reference can be made to the audio file that any embodiment of the present invention is provided Label information analytic method.
Pay attention to, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious changes, Readjust and substitute without departing from protection scope of the present invention.Therefore, although being carried out by above example to the present invention It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also Other more equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.

Claims (9)

  1. A kind of 1. label information analytic method of audio file, it is characterised in that including:
    Content frame length information according to being included in current label frame obtains corresponding content frame from label information, obtains to be tested Demonstrate,prove content frame;
    Judge whether the byte of the first predetermined number after the content frame to be verified meets frame head form, if meeting, checking is logical Cross;
    If being verified, the content frame to be verified is defined as to the parsing content frame of the current label frame;
    It is successively keyword to the frame to be verified using a default frame identification in multiple default frame identifications if authentication failed Content scans for, if searching the default frame identification in content frame to be verified, the default frame identification that will be searched The position of the most forward default frame identification in middle position is defined as first position, judges that since the first position first is pre- If whether the byte of quantity meets frame head form, if meeting, by the content frame to be verified positioned at the first position it Preceding byte is defined as the parsing content frame of the current label frame, wherein, the first position refers to the position most Position corresponding to the byte that first byte of forward default frame identification matches.
  2. 2. according to the method for claim 1, it is characterised in that successively with a default frame mark in multiple default frame identifications Know after being scanned for for keyword to the content frame to be verified, in addition to:
    If not searching default frame identification, successively using a default frame identification in the multiple default frame identification as keyword The byte of second predetermined number after the content frame to be verified is scanned for, by position in the default frame identification being searched most The position of forward default frame identification is defined as the second place, by the content frame to be verified and the content frame to be verified Byte before being located at the second place afterwards is defined as the parsing content frame of the current label frame.
  3. 3. according to the method for claim 1, it is characterised in that successively with a default frame mark in multiple default frame identifications Know after being scanned for for keyword to the content frame to be verified, in addition to:
    If not searching default frame identification, the A byte reciprocal in the content frame to be verified is set as search starting point;
    It is successively keyword to since the search starting point using a default frame identification in the multiple default frame identification The byte of 3rd predetermined number scans for, by the institute of the most forward default frame identification in position in the default frame identification being searched It is defined as the 3rd position in position, the previous byte by the first character section of the content frame to be verified to the 3rd position It is defined as the parsing content frame of the current label frame.
  4. 4. according to any described methods of claim 1-3, it is characterised in that the label information includes ID3 label informations.
  5. A kind of 5. label information resolver of audio file, it is characterised in that including:
    Content frame acquisition module to be verified, for according to the content frame length information included in current label frame from label information Corresponding content frame is obtained, obtains content frame to be verified;
    Authentication module, judges whether the byte of the first predetermined number after the content frame to be verified meets frame head form, if meeting, Then it is verified;
    Content frame determining module is parsed, for when the content frame to be verified is verified, by the content frame to be verified It is defined as the parsing content frame of the current label frame;
    Content frame determining module has been parsed, has been additionally operable to after being verified to the content frame to be verified, if authentication failed, according to A secondary default frame identification using in multiple default frame identifications scans for as keyword to the content frame to be verified, if treating The default frame identification is searched in checking content frame, then by the most forward default frame in position in the default frame identification being searched The position of mark is defined as first position, judges whether the byte of the first predetermined number since the first position meets Frame head form, if meeting, the byte before the first position in the content frame to be verified is defined as described work as The parsing content frame of preceding label frame, wherein, the first position refers to the of the default frame identification most forward with the position Position corresponding to the byte that one byte matches.
  6. 6. device according to claim 5, it is characterised in that successively with a default frame mark in multiple default frame identifications Know after being scanned for for keyword to the content frame to be verified, in addition to:
    If not searching default frame identification, successively using a default frame identification in the multiple default frame identification as keyword The byte of second predetermined number after the content frame to be verified is scanned for, by position in the default frame identification being searched most The position of forward default frame identification is defined as the second place, by the content frame to be verified and the content frame to be verified Byte before being located at the second place afterwards is defined as the parsing content frame of the current label frame.
  7. 7. device according to claim 5, it is characterised in that successively with a default frame mark in multiple default frame identifications Know after being scanned for for keyword to the content frame to be verified, in addition to:
    If not searching default frame identification, the A byte reciprocal in the content frame to be verified is set as search starting point;
    It is successively keyword to since the search starting point using a default frame identification in the multiple default frame identification The byte of 3rd predetermined number scans for, by the institute of the most forward default frame identification in position in the default frame identification being searched It is defined as the 3rd position in position, the previous byte by the first character section of the content frame to be verified to the 3rd position It is defined as the parsing content frame of the current label frame.
  8. 8. according to any described devices of claim 5-7, it is characterised in that the label information includes ID3 label informations.
  9. 9. a kind of terminal, it is characterised in that the terminal is integrated with the mark of the audio file as described in claim any one of 5-8 Sign information resolver.
CN201610404399.9A 2016-06-08 2016-06-08 Label information analytic method, device and the terminal of a kind of audio file Active CN106095910B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610404399.9A CN106095910B (en) 2016-06-08 2016-06-08 Label information analytic method, device and the terminal of a kind of audio file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610404399.9A CN106095910B (en) 2016-06-08 2016-06-08 Label information analytic method, device and the terminal of a kind of audio file

Publications (2)

Publication Number Publication Date
CN106095910A CN106095910A (en) 2016-11-09
CN106095910B true CN106095910B (en) 2018-01-19

Family

ID=57227634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610404399.9A Active CN106095910B (en) 2016-06-08 2016-06-08 Label information analytic method, device and the terminal of a kind of audio file

Country Status (1)

Country Link
CN (1) CN106095910B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411660A (en) * 2016-11-30 2017-02-15 宇龙计算机通信科技(深圳)有限公司 Call quality detection method and terminal
CN108257625B (en) * 2016-12-29 2020-09-08 北京酷我科技有限公司 Audio file playing method and system
CN113672423A (en) * 2021-08-18 2021-11-19 青岛海信移动通信技术股份有限公司 Method for restoring analysis file of album file and terminal equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588370A (en) * 2009-07-02 2009-11-25 浙江大学 Analytic method of multirate communication data stream format
CN102082633A (en) * 2010-12-27 2011-06-01 华为终端有限公司 Method and device for positioning adaptive multi-rate (AMR) frame header, and player

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030381B (en) * 2007-03-19 2010-12-08 北京中星微电子有限公司 Method and apparatus for extracting MP3 file sampling rate
US7885201B2 (en) * 2008-03-20 2011-02-08 Mediatek Inc. Method for finding out the frame of a multimedia sequence
CN101833513B (en) * 2010-04-22 2012-11-21 瑞斯康达科技发展股份有限公司 Device and reading method for data frame
CN102238393A (en) * 2010-04-30 2011-11-09 北京中星微电子有限公司 Method and device for resynchronizing audio code streams
CN102510323B (en) * 2011-09-22 2014-11-26 航天科工惯性技术有限公司 Frame identifying method for serial data
CN104994433B (en) * 2015-06-30 2017-12-26 上海帝联信息科技股份有限公司 Video file provides method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588370A (en) * 2009-07-02 2009-11-25 浙江大学 Analytic method of multirate communication data stream format
CN102082633A (en) * 2010-12-27 2011-06-01 华为终端有限公司 Method and device for positioning adaptive multi-rate (AMR) frame header, and player

Also Published As

Publication number Publication date
CN106095910A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
US7991609B2 (en) Web-based proofing and usage guidance
US7024351B2 (en) Method and apparatus for robust efficient parsing
US6671684B1 (en) Method and apparatus for simultaneous highlighting of a physical version of a document and an electronic version of a document
US8606559B2 (en) Method and apparatus for detecting errors in machine translation using parallel corpus
US7921116B2 (en) Highly meaningful multimedia metadata creation and associations
CA2813608C (en) Structured searching of dynamic structured document corpuses
CN104704851B (en) Program recommendation apparatus and program commending method
US8176419B2 (en) Self learning contextual spell corrector
CN110276071B (en) Text matching method and device, computer equipment and storage medium
CN106095910B (en) Label information analytic method, device and the terminal of a kind of audio file
US8938383B2 (en) Enabling test script play back in different locales
CN1920812B (en) Language processing system
EP1172729A3 (en) Apparatus and method for cataloguing symbolic data for use in performance analysis of computer programs
CN103440330A (en) Music program information acquisition method and equipment
US20100138712A1 (en) Apparatus and method for verifying training data using machine learning
CN101501681B (en) Methods, computer-readable media, and data structures for building an authoritative database of digital audio identifier elements and identifying media items
JP6857983B2 (en) Metadata generation system
CN112562684B (en) Voice recognition method and device and electronic equipment
US20130054226A1 (en) Recognizing chemical names in a chinese document
CN107844531B (en) Answer output method and device and computer equipment
CN112581297B (en) Information pushing method and device based on artificial intelligence and computer equipment
CN111723235A (en) Music content identification method, device and equipment
CN112016305A (en) Text error correction method, device, equipment and storage medium
CN116185853A (en) Code verification method and device
Vahedi et al. Summarizing relevant parts from technical videos

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder