CN106095909B - 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 PDFInfo
- Publication number
- CN106095909B CN106095909B CN201610404359.4A CN201610404359A CN106095909B CN 106095909 B CN106095909 B CN 106095909B CN 201610404359 A CN201610404359 A CN 201610404359A CN 106095909 B CN106095909 B CN 106095909B
- Authority
- CN
- China
- Prior art keywords
- frame
- content
- target frame
- frame identification
- identification
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/60—Information retrieval; Database structures therefor; File system structures therefor of audio data
- G06F16/68—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/686—Retrieval 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Library & Information Science (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention discloses label information analytic method, device and the terminal of a kind of audio file.This method includes:Determine target frame identification;Label information is scanned for according to target frame identification;If searching target frame identification in label information, content frame corresponding with target frame identification is obtained.The embodiment of the present invention is by using above-mentioned technical proposal, frame identification label information corresponding to the label content frame of desired acquisition can be matched, corresponding label content frame is obtained after the match is successful, the label information parsing scheme of existing audio file is optimized, and effectively increases the analyzing efficiency of label information.
Description
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 and APE labels etc..Wherein, ID3
It is a kind of metadata (metadata) container, in more audio files applied to MP3 format.It may include in ID3 labels and its institute
The related title of dominant frequency file, singer, special edition, style and the information such as age of producing.When carrying out audio file broadcasting, need
ID3 label informations are parsed.
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:
Determine target frame identification;
Label information is scanned for according to the target frame identification;
If searching the target frame identification in the label information, frame corresponding with the target frame identification is obtained
Content.
Second aspect, the embodiments of the invention provide a kind of label information resolver of audio file, including:
Determining module, for determining target frame identification;
Search module, for being scanned for according to the target frame identification to label information;
Acquisition module, during for searching the target frame identification in the label information, then obtain and the target
Content frame corresponding to frame identification.
The third aspect, the embodiments of the invention provide a kind of terminal, the terminal is integrated with described in the embodiment of the present invention
The label information resolver of audio file.
The label information parsing scheme of the audio file provided in the embodiment of the present invention, it is determined that after target frame identification, root
Label information is scanned for according to target frame identification, if searching target frame identification in label information, judges target frame mark
Whether the byte of the predetermined number after knowledge meets frame head form, if so, then obtaining content frame corresponding with target frame identification.Pass through
Using above-mentioned technical proposal, frame identification corresponding to the label content frame of desired acquisition can be matched with label information,
With corresponding label content frame is obtained after success, the label information parsing scheme of existing audio file is optimized, and is effectively carried
The high analyzing efficiency of label information.
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 a kind of schematic flow sheet of the label information analytic method for audio file that the embodiment of the present invention three provides;
Fig. 4 is that a kind of flow of the label information analytic method for preferable audio file that the embodiment of the present invention four provides is shown
It is intended to;
Fig. 5 is that a kind of flow of the label information analytic method for preferable audio file that the embodiment of the present invention five provides is shown
It is intended to;
Fig. 6 is a kind of structured flowchart of the label information resolver for audio file that the embodiment of the present invention six 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:
Step 101, determine target frame identification.
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).
Exemplary, frame identification corresponding to the content frame that target frame identification will concretely obtain.Such as, if it is desired to
The author information of music file is obtained, then TPE1 is defined as target frame identification.In terminal or the application journey being integrated in terminal
When sequence (such as music player) needs to play out audio file, the content frame obtained in label information is generally required, is used for
Shown at the interface that broadcast interface or audio details list etc. need to show audio file information, due to terminal or using journey
The broadcasting configuration of sequence or the difference of broadcast interface are, it is necessary to which the content frame of display also can be different.
Preferably, target frame identification is determined in the present embodiment, concretely:Configuration or currently playing is played according to default
Interface determines target frame identification.If for example, cover the content of 10 label frames in label information, and terminal or application program
Default broadcasting configuration be only capable of support show wherein 2 label frames content, then this 2 label frames can be defined as target frame
Mark.And for example, different broadcast interfaces may need to show different contents, if currently playing interface need show the lyrics when
Wait, frame identification corresponding to the lyrics is defined as target frame identification;If currently playing interface needs to show album picture,
Frame identification corresponding to album picture is defined as target frame identification.
Step 102, according to target frame identification label information is scanned for.
Exemplary, can sequentially it be scanned in the data word throttling of label information;Also can be by the data of label information
Storage is read out into an interim character string (caching character string), then is scanned in character string is cached.As above
Citing, if target frame is identified as TPE1, can data word throttling in byte-by-byte be compared, can also TPE1 be keyword
Matched in character string is cached, so as to reach the purpose of search target frame identification.
If step 103, searching target frame identification in label information, obtain in frame corresponding with target frame identification
Hold.
Exemplary, obtain content frame corresponding with target frame identification concretely:Obtain corresponding with target frame identification
Content frame length information;Corresponding content frame is extracted from label information according to content frame length information.Assuming that searched at the N of position
Rope is to target frame identification, four byte representation content frame length informations behind target frame identification, it is assumed that and content frame length is L, that
It is content frame corresponding with target frame identification from L byte after N+10, obtains the content frame.
Exemplary, when needing to obtain content frame corresponding to multiple target frame identifications, each target frame identification can be directed to
Above-mentioned steps are performed, obtain corresponding content frame one by one.
The label information analytic method for the audio file that the embodiment of the present invention one provides, can be by the label frame of desired acquisition
Frame identification is matched with label information corresponding to content, is obtained corresponding label content frame after the match is successful, is optimized existing
Audio file label information parsing scheme.In addition, the method for the embodiment of the present invention is obtained based on the mode obtained on demand
Corresponding content frame, it is not necessary to all label frames of label information are parsed, so the solution of label information can be effectively improved
Analyse efficiency.
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, will " if searching target frame identification in label information, obtain with
Content frame corresponding to target frame identification " is optimized for:If searching target frame identification in label information, target frame identification is judged
Whether the byte of predetermined number afterwards meets frame head form, if so, then obtaining content frame corresponding with target frame identification.Such as Fig. 2
Shown, this method specifically comprises the following steps:
Step 201, determine target frame identification.
Step 202, according to target frame identification label information is scanned for.
If step 203, searching target frame identification in label information, the predetermined number after target frame identification is judged
Whether byte meets frame head form, if so, obtaining content frame length information corresponding with target frame identification.
Exemplary, judge whether the byte of the predetermined number after target frame identification meets the mesh of frame head form in this step
, avoid the byte in content frame with target frame identification same word sample being mistakenly considered target frame identification.For example, target frame mark
Know for " TRCK ", and the printed words of " TRCK " are also contains in the content frame (such as lyrics or name) of some label frame, will lead
The target frame identification that cause searches is incorrect.
Exemplary, predetermined number can determine according to the particular type of label information.By taking ID3 labels as an example, Mei Gebiao
Preceding 10 bytes of label frame are frame head, and frame identification is preceding 4 bytes, and rear 6 bytes are respectively content frame length information and mark,
So predetermined number is 6.For example, it can first verify that 4 bytes after target frame mark indicate whether string number (content frame length
Information is to represent the numeral of content frame length), if not it is digital, it is explainable not meet frame head form, if digital, it is further continued for testing
Last 2 bytes are demonstrate,proved to indicate whether to indicate.
Exemplary, if it is determined that the byte of the predetermined number after the target frame identification searched does not meet frame head form,
Then continue to search for, until finding correct target frame identification.
Step 204, corresponding content frame extracted from label information according to content frame length information.
The embodiment of the present invention two, when searching target frame identification, determines whether on the basis of above-described embodiment one
Whether the byte of the predetermined number after target frame identification meets frame head form, can be according in frame if meeting frame head form
Hold length information and extract corresponding content frame.The search degree of accuracy can further improve by this method, improve the solution of label information
Analyse efficiency and accuracy rate.
Embodiment three
Fig. 3 is a kind of schematic flow sheet of the label information analytic method for audio file that the embodiment of the present invention three provides,
The present embodiment is optimized based on above-described embodiment, as shown in figure 3, this method specifically comprises the following steps:
Step 301, determine target frame identification.
Step 302, the tag length information included according to tag head in label information read the byte fluxion of corresponding length
According to, and bytes of stream data is stored in caching character string.
Exemplary, tag head is the content in 10 bytes of the stem journal of audio file in the present embodiment.
Step 303, according to target frame identification to caching character string scan for.
It is exemplary, in character string is cached it can carry out matching search using target frame identification as keyword.
If step 304, searching the target frame identification in character string is cached, acquisition and mesh from caching character string
Mark content frame corresponding to frame identification.
Exemplary, the bytes of stream data of label information is all read in the present embodiment and is stored in an interim character string
In, then with want obtain frame identification such as TIT2 (title of selected song) for keyword in this interim character string
Appearance scans for, if searching TIT2 in interim character string, is obtained from the interim character string in frame corresponding with TIT2
Hold the title of the i.e. song.
The embodiment of the present invention three is on the basis of above-described embodiment two, by the refinement to label information way of search, with
Keyword scans for for unit, can further improve the degree of accuracy and the efficiency of search.
Example IV
Fig. 4 is that a kind of flow of the label information analytic method for preferable audio file that the embodiment of the present invention four 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.Such as Fig. 4 institutes
Show, this method includes:
Step 401, the tag head for reading music file.
Specifically, tag head is the content of first 10 bytes of music file.
Step 402, judged whether according to the content of tag head to include ID3 information, if so, then performing step 403;Otherwise,
Perform step 416.
Exemplary, " ID3 " printed words can be included in ID3 tag head, to show ID3 tag identities.
Step 403, according to the content setting label information total length of tag head it is L.
Label information total length is specially the summation of tag head length and the length of all label frames.
The entitled XXXX of label obtained is wanted in step 404, as needed setting, concurrently sets first character section after tag head
Position be reading position N.
In the present embodiment, tag name is frame identification, it is desirable to which the tag name of acquisition is target frame identification.The tag name has
There are the length of 4 bytes, such as TIT2, TALB, TPE2, TRCK and APIC etc..
Exemplary, a label information is made up of a tag head and multiple label frames.Wherein, tag head and mark
There is no special Character segmentation between label frame, label frame and other other label frames.Obtain the content of a complete frame only
Having could read after content size is obtained from frame head.So first character section after tag head set in step 404
Position is the position where the frame head of first label frame.
Step 405, judge whether N is less than L, if so, then performing step 406;Otherwise, step 416 is performed.
The first character joint number evidence that step 406, reading position N start, and judge the of tag name set with step 404
Whether one byte matches, if so, then performing step 407;Otherwise, step 417 is performed.
Second byte data that step 407, reading position N start, and judge the of tag name set with step 404
Whether two bytes match, if so, then performing step 408;Otherwise, step 418 is performed.
The 3rd byte data that step 408, reading position N start, and judge the of tag name set with step 404
Whether three bytes match, if so, then performing step 409;Otherwise, step 419 is performed.
The of the tag name that the 4th byte data that step 409, reading position N start and judging is set with step 404
Whether four bytes match, if so, then continuing executing with step 410;Otherwise, step 420 is performed.
The data for 10 bytes that step 410, reading position N start, and whether the character data for judging to read meets frame
Head form, if so, then performing step 411;Otherwise, step 420 is performed.
Step 411, by the curriculum offering of this 10 bytes it is target frame head.
Step 412, the data for reading target the 5th, 6,7 and 8 four byte of frame head, are arranged to target length I, set N+10
For target frame location of content M.
Step 413, judge whether M+I is less than L, if so, then performing step 414;Otherwise, step 416 is performed.
Step 414, reading M start the byte data that length is I.
Step 415, obtain successfully, return to target data content.
Step 416, failure is obtained, return to no target data.
Step 417, the position of position N next byte is set to new reading position N, is i.e. N=N+1, then performed
Step 405.
Step 418, the position of position N lower two bytes is set to new reading position N, is i.e. N=N+2, then performed
Step 405.
Step 419, the position of position N lower three bytes is set to new reading position N, is i.e. N=N+3, then performed
Step 405.
Step 420, the position of position N lower four bytes is set to new reading position N, is i.e. N=N+4, then performed
Step 405.
Exemplary, if it is desired to the entitled TIT2 of label of acquisition, then TIT2 is set as target frame identification.Simultaneously from mark
The position of first character section after label head starts to read, and the position is arranged to N.If the length of N positions is less than L,
Illustrate position N in the range of label information, then the data for the first character section that reading position N starts, and with the TIT2 of setting
First character section T is matched, if the data for the first character section that position N starts also are T, the match is successful, then to I after
It is continuous to be matched.By that analogy, the data of the 4th byte after matching N.In the process, if one of byte
Match unsuccessful, for example, the data of second byte after the N of position are not I, then it fails to match, it is necessary to position current N for explanation
Put and be moved rearwards two, turn into the position of NEW BEGINNING reading, and four bytes are re-started successively since this position
Matching.If all the match is successful for the data of this four bytes, the data for 10 bytes that N starts are read, and are judged whether
Meet frame head form, be target frame head by the curriculum offering of this 10 bytes if meeting, and read 4 among target frame head
The data of individual byte, if the data of this four bytes represent that content frame length is I, meet N+10+I<L, then show content frame
Data still in the range of label information, then can read the authors' name of data, i.e. song that the length is I.If opened from N
The data of 10 bytes to begin do not meet frame head form, are all although the content of byte data is identical when then explanation matches
TIT2, but this 10 bytes are not frame head.At this moment be also required to current read position N being moved rearwards four, restart with
TIT2 is matched successively.
The label information analytic method for a kind of audio file that the embodiment of the present invention four provides, by by the frame of desired acquisition
Frame identification corresponding to content carries out byte contrast with the data byte flow content read and matched one by one, and the byte for running into matching is then sentenced
Whether this byte of breaking is located at frame head, is not the contrast matching for continuing next byte, eventually finds target frame identification and read
Take corresponding content frame.It can so avoid some frame head not to caused chain mistake, want to obtain as long as in label information containing
The label frame taken and corresponding content frame information, surely get with regard to one.
Embodiment five
Fig. 5 is that a kind of flow of the label information analytic method for preferable audio file that the embodiment of the present invention five 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.Such as Fig. 5 institutes
Show, this method includes:
Step 501, the tag head for reading music file.
Specifically, tag head is the content of first 10 bytes of music file.
Step 502, judged whether according to the content of tag head to include ID3 information, if so, then performing step 503;Otherwise,
Perform step 513.
Step 503, according to the label information total length L provided in tag head, read corresponding length bytes of stream data, and will
The content read is stored in character string S.
Exemplary, in the data Cun Chudao character strings S that L byte can be read, L-10 byte also can be read (from label
Head behind first character section start to read) data Cun Chudao character strings S in.
The entitled K of label obtained is wanted in step 504, as needed setting.
Exemplary, K content is XXXX, and the length of the content is 4 bytes, such as TIT2, TALB, TPE2, TRCK
With APIC etc..
Step 505, it is keyword using K, the search starting point in character string S proceeds by keyword match search.
Exemplary, initial ranging starting point when searching for for the first time is the first byte of first label frame in character string S.Afterwards
, can dynamic adjustment search starting point during continuous search.
Step 506, judge whether search K in character string S, if so, then performing step 507;Otherwise, step is performed
513。
10 bytes that K position N starts are searched in step 507, reading character string S.
Whether step 508,10 byte datas for judging to read meet frame head form, if so, then performing step 509;It is no
Then, step 514 is performed.
Exemplary, frame head form is 10 bytes of total length, and first 4 are frame name (tag name), care label frame it is interior
Hold.Middle 4 bytes are the length of content frame, and length cannot be less than 1.Latter two byte is additional mark.
Step 509, the data for reading target the 5th, 6,7 and 8 four byte of frame head, obtain target length I, while set N+
10 be object content position M.
The target frame head of this step is 10 byte datas obtained in step 508.
Step 510, judge whether M+I is less than L, if so, then performing step 512;Otherwise, step 513 is performed.
Step 511, reading position M start the character string that length is I.
Step 512, obtain successfully, return to target data content.
Step 513, failure is obtained, return to no target data.
Step 514, the position of position N rear four bytes is set to new search starting point, then performs step 505.
New search starting point is N+4.
Exemplary, if it is desired to the entitled character string TIT2 of label of acquisition, then this character string is set as K, then
Matching search is carried out to K in character string S, if searching K in position N, read that position N starts in character string S 10
Character, and judge whether character data meets frame head form, if meeting frame head form, read 4 bytes among frame head
(length of content frame);If not meeting frame head form, position N is moved rearwards 4 bytes, is set to new search
Start position, then proceed in the location finding either with or without K.
The label information analytic method for a kind of audio file that the embodiment of the present invention five provides, by will be right in label information
Should all label frames byte stream all read deposit one interim character string in, then with want acquisition tag name information,
The content of this interim character string is scanned for, if searching out the character of matching, judges whether byte is located at frame head, is not
Then continue to search for, be to be judged as wanting the label frame of acquisition and read content frame.It can so avoid some frame head not right
Caused chain mistake, as long as label information contains the label frame for wanting acquisition and corresponding content frame information, surely obtained with regard to one
Get.
Embodiment six
Fig. 6 is a kind of structured flowchart of the label information resolver for audio file that the embodiment of the present invention six provides, should
Device can be realized by software and/or hardware, be typically integrated in terminal.As shown in fig. 6, the device includes determining module 601, searched
Rope module 602 and acquisition module 603.
Wherein it is determined that module 601, for determining target frame identification;Search module 602, for according to target frame identification pair
Label information scans for;Acquisition module 603, during for searching target frame identification in label information, then obtain and target
Content frame corresponding to frame identification.
The label information resolver for the audio file that the embodiment of the present invention six provides, can be by the label frame of desired acquisition
Frame identification is matched with label information corresponding to appearance, is obtained corresponding label content frame after the match is successful, is optimized existing
The label information parsing scheme of audio file, and effectively increase the analyzing efficiency of label information.
On the basis of above-described embodiment, label information includes ID3 label informations.
On the basis of above-described embodiment, determining module can be specifically used for:Configuration or currently playing is played according to default
Interface determines target frame identification.
On the basis of above-described embodiment, acquisition module includes:Judging unit, for searching target in label information
During frame identification, judge whether the byte of the predetermined number after target frame identification meets frame head form;Content frame acquiring unit, is used for
When the byte of the predetermined number after judging unit judges target frame identification meets frame head form, obtain and target frame identification pair
The content frame answered.
On the basis of above-described embodiment, acquisition module also includes:Length information acquiring unit, for acquisition and target frame
Content frame length information corresponding to mark;Extraction unit, it is corresponding for being extracted according to content frame length information from label information
Content frame.
On the basis of above-described embodiment, search module includes:Reading unit, for according to tag head bag in label information
The tag length information contained reads the bytes of stream data of corresponding length;Memory cell, for bytes of stream data to be stored in into caching
In character string;Search unit, for being scanned for according to target frame identification to caching character string;Accordingly, the acquisition module
For when searching target frame identification in caching character string, being obtained from caching character string in frame corresponding with target frame identification
Hold.
Embodiment seven
The present embodiment seven provides a kind of terminal, and the terminal includes the label of the audio file described in the embodiment of the present invention
Information resolver, the label information of music 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..
For user during the terminal in using the present embodiment, terminal can be corresponding by the label content frame of desired acquisition
Frame identification matched with label information, corresponding label content frame is obtained after the match is successful, optimizes existing audio text
The label information parsing scheme of part, and effectively increase the analyzing efficiency of label information.
The executable present invention of the label information resolver and mobile terminal of the audio file provided in above-described embodiment appoints
The label information analytic method of audio file that meaning embodiment is provided, possess and perform the corresponding functional module of this method and beneficial
Effect.Not ins and outs of detailed description in the above-described embodiments, reference can be made to the audio text that any embodiment of the present invention is provided
The label information analytic method of part.
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 (5)
- A kind of 1. label information analytic method of audio file, it is characterised in that including:Determine target frame identification;The tag length information included according to tag head in label information reads the bytes of stream data of corresponding length, and by the word Throttle data is stored in caching character string;Scanned for using target frame identification as keyword in the caching character string;Institute It is ID3 label informations to state label information;If searching the target frame identification in the caching character string, the predetermined number after the target frame identification is judged Byte whether meet frame head form, if so, corresponding with target frame identification content frame length information is then obtained, according to institute State content frame length information and extract corresponding content frame from the caching character string;Wherein, the predetermined number is 6, judges whether the byte of the predetermined number after the target frame identification meets frame head lattice Formula, including:4 bytes after checking target frame identification indicate whether string number, if not it is digital, then judge not meeting frame head Form, if digital, then verify that last 2 bytes indicate whether to indicate, if mark, then judge to meet frame head form, if not It is mark, judgement does not meet frame head form;Corresponding with target frame identification content frame length information is obtained, according to the content frame length information from the caching Corresponding content frame is extracted in character string, including:From 4 byte getting frame content-length information L behind the target frame identification, Content frame corresponding with the target frame identification is obtained from L byte after N+10, N is to search the target frame identification Position.
- 2. according to the method for claim 1, it is characterised in that target frame identification is determined, including:Target frame identification is determined according to default broadcasting configuration or currently playing interface.
- A kind of 3. label information resolver of audio file, it is characterised in that including:Determining module, for determining target frame identification;Search module, specifically include:Reading unit, the tag length information for being included according to tag head in label information are read The bytes of stream data of corresponding length;Memory cell, for the bytes of stream data to be stored in caching character string;Search unit, for being scanned for using target frame identification as keyword in the caching character string;The label information For ID3 label informations;Acquisition module, specifically include:Judging unit, for it is described caching character string in search the target frame identification when, Judge whether the byte of the predetermined number after the target frame identification meets frame head form;Content frame acquiring unit, in institute When stating judging unit and judging that the byte of the predetermined number after the target frame identification meets frame head form, obtain and the target Content frame corresponding to frame identification;Length information acquiring unit, for obtaining content frame length corresponding with the target frame identification Information;Extraction unit, for extracting corresponding content frame from the caching character string according to the content frame length information;Wherein, the predetermined number is 6, judges whether the byte of the predetermined number after the target frame identification meets frame head lattice Formula, including:4 bytes after checking target frame identification indicate whether string number, if not it is digital, then judge not meeting frame head Form, if digital, then verify that last 2 bytes indicate whether to indicate, if mark, then judge to meet frame head form, if not It is mark, judgement does not meet frame head form;Corresponding with target frame identification content frame length information is obtained, according to the content frame length information from the caching Corresponding content frame is extracted in character string, including:From 4 byte getting frame content-length information L behind the target frame identification, Content frame corresponding with the target frame identification is obtained from L byte after N+10, N is to search the target frame identification Position.
- 4. device according to claim 3, it is characterised in that the determining module be used for according to it is default play configuration or Currently playing interface determines target frame identification.
- 5. 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 3-4 Sign information resolver.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610404359.4A CN106095909B (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 |
---|---|---|---|
CN201610404359.4A CN106095909B (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 |
---|---|
CN106095909A CN106095909A (en) | 2016-11-09 |
CN106095909B true CN106095909B (en) | 2018-03-23 |
Family
ID=57227586
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610404359.4A Active CN106095909B (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) | CN106095909B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1860481A (en) * | 2003-09-30 | 2006-11-08 | 皇家飞利浦电子股份有限公司 | Using content identifiers to download cd-cover pictures to represent audio content items |
CN101030381A (en) * | 2007-03-19 | 2007-09-05 | 北京中星微电子有限公司 | Method and apparatus for extracting MP3 file sampling rate |
CN101325720A (en) * | 2008-07-24 | 2008-12-17 | 中兴通讯股份有限公司 | Data fault-tolerant terminal and method |
CN101833513A (en) * | 2010-04-22 | 2010-09-15 | 瑞斯康达科技发展股份有限公司 | Storage method and device and reading method and device for data frame |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7143353B2 (en) * | 2001-03-30 | 2006-11-28 | Koninklijke Philips Electronics, N.V. | Streaming video bookmarks |
-
2016
- 2016-06-08 CN CN201610404359.4A patent/CN106095909B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1860481A (en) * | 2003-09-30 | 2006-11-08 | 皇家飞利浦电子股份有限公司 | Using content identifiers to download cd-cover pictures to represent audio content items |
CN101030381A (en) * | 2007-03-19 | 2007-09-05 | 北京中星微电子有限公司 | Method and apparatus for extracting MP3 file sampling rate |
CN101325720A (en) * | 2008-07-24 | 2008-12-17 | 中兴通讯股份有限公司 | Data fault-tolerant terminal and method |
CN101833513A (en) * | 2010-04-22 | 2010-09-15 | 瑞斯康达科技发展股份有限公司 | Storage method and device and reading method and device for data frame |
Also Published As
Publication number | Publication date |
---|---|
CN106095909A (en) | 2016-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8200490B2 (en) | Method and apparatus for searching multimedia data using speech recognition in mobile device | |
US7680853B2 (en) | Clickable snippets in audio/video search results | |
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 | |
US20030065655A1 (en) | Method and apparatus for detecting query-driven topical events using textual phrases on foils as indication of topic | |
US20070156404A1 (en) | String matching method and system using phonetic symbols and computer-readable recording medium storing computer program for executing the string matching method | |
EP1821286B1 (en) | Apparatus, system and method for extracting the structure of song lyrics by identifying repetitive patterns therein | |
US8892565B2 (en) | Method and apparatus for accessing an audio file from a collection of audio files using tonal matching | |
US7212972B2 (en) | Audio features description method and audio video features description collection construction method | |
CN103150356B (en) | A kind of the general demand search method and system of application | |
AU2006325555B2 (en) | A method and apparatus for accessing a digital file from a collection of digital files | |
CN106095910B (en) | Label information analytic method, device and the terminal of a kind of audio file | |
CN111723235A (en) | Music content identification method, device and equipment | |
CN1273400A (en) | Multi-media content extraction system and method using user described data recording medium | |
CN106095909B (en) | Label information analytic method, device and the terminal of a kind of audio file | |
CN1228760C (en) | System and method for searching word according to speech | |
CN106446280A (en) | Song data processing method and device | |
CN112231512B (en) | Song annotation detection method, device and system and storage medium | |
WO2008044669A1 (en) | Audio information search program and its recording medium, audio information search system, and audio information search method | |
CN113763947A (en) | Voice intention recognition method and device, electronic equipment and storage medium | |
CN114222193B (en) | Video subtitle time alignment model training method and system | |
US20070047823A1 (en) | System and method for structuring and searching sets of signals | |
US20080046488A1 (en) | Populating a database | |
JP2005084422A (en) | Speech recognizing and retrieving device | |
EP2058799B1 (en) | Method for preparing data for speech recognition and speech recognition system |
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 |