Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out
Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the present invention, and not
It it is whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making
The every other embodiment obtained under creative work premise, broadly falls into the scope of protection of the invention.
The embodiment of the invention discloses a kind of playback of songs method and device, it is possible to effective raising song
Play hit rate.It is described in detail individually below.
Referring to Fig. 1, Fig. 1 is the flow chart of a kind of playback of songs method disclosed in the embodiment of the present invention.
Wherein, the playback of songs method described by Fig. 1 is applicable to audio amplifier (wirelessly or non-wirelessly), smart mobile phone
(Android phone, iOS mobile phone etc.), panel computer, applause computer and mobile internet device
The digital media player such as (Mobile Internet Devices, MID), PC (Digital Media Player,
DMP), the embodiment of the present invention is not construed as limiting.As it is shown in figure 1, this playback of songs method can include with
Lower step.
S101, acquisition song queue and broadcasting control instruction, in this song queue, at least one song is joined
Being equipped with Uniform Resource Identifier (Uniform Resource Identifier, URI) list, URI is used for marking
Know the storage position of this song.
In the embodiment of the present invention, DMP(such as audio amplifier) digital media controller (Digital Media can be received
Controller, DMC) the playback of songs instruction that sends, the instruction of this playback of songs includes the mark of this song.
In the embodiment of the present invention, DMP(such as audio amplifier) the song queue that DMC sends, this song can be received
Bent queue includes mark and the metadata of each song of each song, wherein, each first song
Bent metadata includes URI List corresponding to this song and the attribute data of this song, and this song is corresponding
URI List includes the URI that at least two is different.
S102, according to play control instruction, from the URI List that song is corresponding, read a system of storage
One resource identifier.
For example, DMP(such as audio amplifier in the embodiment of the present invention) inner can prestore each first song
Bent corresponding URI List, so as DMP(such as audio amplifier) power on after, for each song, DMP
(such as audio amplifier) can read a URI of storage from the URI List that this song is corresponding.
The most for example, DMP(such as audio amplifier in the embodiment of the present invention) inner can prestore each head
The URI List that song is corresponding, so as DMP(such as audio amplifier) power on after, DMP(such as audio amplifier) can
To receive the digital media controller such as mobile phone, PC (Digital Media Controller, DMC) transmission
Playback of songs instruction, the instruction of this playback of songs includes the mark of song, correspondingly DMP(such as audio amplifier)
The instruction of this playback of songs can be responded, and from the URI List that this song is corresponding, read one of storage
URI。
In the embodiment of the present invention, DMP(such as audio amplifier) receiving the song that the DMC such as mobile phone, PC sends
Before play instruction, DMP(such as audio amplifier) the song queue that DMC sends, this song can also be received
Queue includes mark and the metadata of each song of each song, wherein, each song
Metadata include URI List corresponding to this song and the attribute data of this song, this song is corresponding
URI List includes the URI that at least two is different;Correspondingly DMP(such as audio amplifier) DMC can be stored
The song queue sent.In the embodiment of the present invention, DMC can pass through UPnP (Universal
Plug and Play, UPnP) agreement send song queue to audio amplifier, or, DMC can pass through bluetooth
Mode sends song queue to DMP(such as audio amplifier), or, DMC can pass through near-field communication (Near
Field Communication, NFC) send song queue to DMP(such as audio amplifier), the present invention implements
Example is not construed as limiting.As in figure 2 it is shown, DMC is sent to DMP(such as audio amplifier) song queue in, no
Only can include the mark of the songs such as song 1, song 2 and song 3, it is also possible to include song 1, song
The metadata of the songs such as song 2, song 3.As a example by the metadata of song 1, this metadata can include
The URI List of song 1 correspondence and the attribute data of song 1, wherein, the URI of song 1 correspondence
List can include the URI that URI-1, URI-2 and URI-3 etc. are different, the attribute data of song 1
Can include the title of song 1, Ge Shouming, album name, album cover, song number, song duration,
The lyrics and self-defining data.In one embodiment, the attribute data of song 1 can also include song
The title of 1, Ge Shouming, album name, album cover, song number, song duration, the lyrics and from
One or more in definition data, the embodiment of the present invention is not construed as limiting.
S103, judge the whether success of the link to the Uniform Resource Identifier read;If it fails, then
The next Uniform Resource Identifier of storage is read from the uniform resource identifier list that this song is corresponding,
During until judging the link success to the Uniform Resource Identifier read, play the most unified money of link
The song of source identifier mark, otherwise switches to next song in song queue.
For example, in the embodiment of the present invention, DMP(such as audio amplifier) may determine that the URI read
Link whether success, if it is successful, DMP(such as audio amplifier) the successful URI of link can be play identify
Song;If it fails, DMP(such as audio amplifier) can read from the URI List that this song is corresponding
The next URI of storage, during until judging the link success to the URI read, playing and linking successfully
URI mark song, otherwise switch to next song in song queue.
For example, DMP(such as audio amplifier) from the URI List of song 1 correspondence, read the URI-1 of storage,
DMP(such as audio amplifier) may determine that the link to reading URI-1 is the most successful, if it is successful, DMP
(such as audio amplifier) can play the song linking successful URI-1 mark;If it fails, DMP(is such as
Audio amplifier) the next URI of storage can be read from the URI List of song 1 correspondence, until judging
To read URI(such as URI-2 or URI-3) link success time, play link successful URI(such as
URI-2 or URI-3) song that identifies, otherwise switch to next song in song queue.
In the embodiment of the present invention, DMP(such as audio amplifier) from the URI List that song is corresponding, read storage
URI can be that order reads;Wherein, the product of the song that the URI in URI List identifies according to URI
Matter order arrangement from high to low.Such as, in the URI List of song 1 correspondence URI-1, URI-2 with
And URI-3 order sequence, the quality of the song of URI-1 mark is the highest, the product of the song of URI-2 mark
Matter is second highest, the quality of the song of URI-3 mark is minimum.
In the method described by Fig. 1, from the URI List that song is corresponding, read a URI of storage
After, it can be determined that the link to the URI read is the most successful;If it fails, it is then corresponding from this song
URI List in read the next URI of storage, until judging the link success to the URI read
Time, play the song linking successful URI mark.Visible, the method described by Fig. 1 does not store song
Itself, but multiple URI that storage song is corresponding, so may insure that the chain finally to the URI read
It is connected into merit, such that it is able to the broadcasting hit rate of song can effectively be improved.
Referring to Fig. 3, Fig. 3 is the flow chart of another kind of playback of songs method disclosed in the embodiment of the present invention.
In the method shown in Fig. 3, the DMC such as mobile phone, PC is needed to access radio local network environment in advance and add
Enter UPnP network, and need the DMP such as audio amplifier access WLAN in advance and add UPnP network,
So DMC can pass through UPnP discovery mechanism, searches for and selects DMP as operation target.At this
On the basis of, the playback of songs method shown in Fig. 3 may comprise steps of.
S301, DMP receive the song queue that DMC is sent by UPnP protocol.
In the embodiment of the present invention, song queue can be carried out UTF8 coding by DMC, and is organized into XML
It is sent to DMP by UPnP protocol after form.Wherein, DMC be sent to the song queue of DMP can
With as in figure 2 it is shown, be possible not only to include the mark of the songs such as song 1, song 2 and song 3, go back
The metadata of the songs such as song 1, song 2, song 3 can be included.As a example by the metadata of song 1,
This metadata can include URI List and the attribute data of song 1 of song 1 correspondence, wherein, song
The URI List of bent 1 correspondence can include the different URI such as URI-1, URI-2 and URI-3, song
The attribute data of bent 1 can include the title of song 1, Ge Shouming, album name, album cover, song
Numbering, song duration, the lyrics and self-defining data.In one embodiment, the attribute number of song 1
According to including the title of song 1, Ge Shouming, album name, album cover, song number, song
One or more in duration, the lyrics and self-defining data, the embodiment of the present invention is not construed as limiting.
After S302, DMP receive the song queue that DMC is sent by UPnP protocol, store DMC
The song queue sent.
S303, DMP receive DMC sent by UPnP protocol the insertion for song queue, delete
Remove, the edit operation such as replacement instruction.
Wherein, DMC can send inserting for song queue according to user operation by UPnP protocol
Enter, delete, the edit operation such as replacement instructs to DMP.
S304, DMP respond this edit operation instruction, and perform the insertion for song queue, deletion,
The edit operations such as replacement.
It should be noted that step S303~step S304 are optional, the embodiment of the present invention is not construed as limiting.
S305, DMP receive the playback of songs instruction that DMC is sent by UPnP protocol, and this playback of songs refers to
Order includes the mark of song.
After S306, DMP receive the playback of songs instruction that DMC sends, respond the instruction of this playback of songs, from
In URI List corresponding to this song in the song queue of storage, order reads a URI of storage.
In the embodiment of the present invention, the song that the URI in the URI List that this song is corresponding identifies according to URI
The order arrangement from high to low of bent quality.Such as, URI-1, URI-2 in the URI List of song 1 correspondence
And URI-3 order sequence, the song that the quality of the song of URI-1 mark is the highest, URI-2 identifies
Quality is second highest, the quality of the song of URI-3 mark is minimum.
In the embodiment of the present invention, URI is for identifying this song storage position in the Internet.
S307, DMP judge that the link to the URI read is the most successful, if it fails, then perform step
Rapid S308;If it succeeds, perform step S309.
S308, DMP judge whether there is next URI in the URI List that this song is corresponding, if it is,
Then continue executing with step S306, with order in the URI List that this song from the song queue of storage is corresponding
Read the next URI of storage;If it is not, then continue executing with step S310.
S309, DMP play the song linking successful URI mark.
S310, DMP judge whether to there is also next song, if it is, perform step S311;As
The most no, process ends.
S311, DMP select next song in order, and perform step S306.
In the embodiment of the present invention, DMP can receive the choosing for song that DMC is sent by UPnP protocol
Select, play, suspend, stop and circulating Broadcast Control instructions such as (single circulation or whole list circulations),
And respond this Broadcast Control instruction, perform the selection for song, play, suspend, stop and circulation etc. is broadcast
Control operation.
In the embodiment of the present invention, for each song, DMP can attempt this song pair the most successively
Each URI in the URI List answered, if the link success to some URI, soon playing should
The song of URI mark;If it fails, the next URI just attempted in this URI List, until find one
The URI of individual energy.If the link of all URI of current song all failures, then jump to next song
Song continues executing with flow process of the present invention.Terminate if current song is play, next song can be automatic jumped to
Song continues executing with flow process of the present invention;Or, under single circulation pattern, current song can be repeated playing.
If last playback of songs terminates in song queue, just terminate the broadcasting of whole list;Or whole
Under list loop play pattern, automatic jump to First song and continue to play.
In the embodiment of the present invention, the method described by Fig. 3 is applicable to digital home network, is possible not only to reality
The interconnection between DMC and DMP in existing digital home network, it is also possible to realize DMC to DMP
Control such that it is able to the effective playback of songs hit rate improving DMP in digital home network.
In the method described by Fig. 3, DMP does not store song itself, but storage song is corresponding many
Individual URI, so may insure that the link success finally to the URI read, such that it is able to can be effective
Improve the broadcasting hit rate of song.
Referring to Fig. 4, Fig. 4 is the structure chart of a kind of playback of songs device disclosed in the embodiment of the present invention.
Wherein, the playback of songs device described by Fig. 4 is applicable to audio amplifier (wirelessly or non-wirelessly), smart mobile phone
(Android phone, iOS mobile phone etc.), panel computer, applause computer and mobile internet device
The digital media player such as (Mobile Internet Devices, MID), PC (Digital Media Player,
DMP), the embodiment of the present invention is not construed as limiting.As shown in Figure 4, this playback of songs device 400 can wrap
Include:
Acquiring unit 401, is used for obtaining song queue and playing control instruction, in this song queue at least
One song is configured with URI List, and URI is for identifying the storage position of this song;
Read unit 402, for according to playing control instruction, reading from the URI List that song is corresponding
One URI of storage, wherein, URI is for identifying the storage position of this song;
Judging unit 403, for judging that the link to the URI read is the most successful;
Broadcast unit 404, does not becomes for the link judging the URI to reading at judging unit 403
During merit, notice reads unit 402 and reads the next URI of storage from the URI List that this song is corresponding,
During until judging unit 403 judges the link success to the URI read, play and link successful URI
The song of mark, otherwise switches to next song in song queue.
In one embodiment, in the device 400 shown in Fig. 4, acquiring unit 401 obtains to play and controls
Instruction includes:
The playback of songs instruction that acquiring unit 401 sends for receiving DMC, the instruction of this playback of songs includes song
Bent mark.
In one embodiment, in the device 400 shown in Fig. 4, acquiring unit 401 obtains song queue
Including:
Acquiring unit 401 is for receiving the song queue that DMC sends, and this song queue includes each song
Bent mark and the metadata of each song, wherein, the metadata of each song includes this song
Corresponding URI List and the attribute data of this song, URI List corresponding to this song includes at least two
Plant different URI.
In the embodiment of the present invention, the device 400 shown in Fig. 4 can also include:
Memory element 405, for storing the song queue that DMC sends.
Correspondingly, read unit 402 to arrange for the URI corresponding from this song of memory element 405 storage
Table reads a URI of storage.
In the embodiment of the present invention, the attribute data of this song includes the title of this song, Ge Shouming, special edition
One or more in name, album cover, song number, song duration, the lyrics and self-defining data,
The embodiment of the present invention is not construed as limiting.
In the embodiment of the present invention, read unit 402 from the URI List that song is corresponding, read storage
URI is that order reads;Wherein, the quality of the song that the URI in URI List identifies according to URI from
High to Low order arrangement.
In the device described by Fig. 4, do not store song itself, but corresponding multiple of storage song
URI, so may insure that the link success finally to the URI read, such that it is able to can effectively carry
The broadcasting hit rate of high song.
The embodiment of the present invention further discloses a kind of computer-readable storage medium, and this computer-readable storage medium is deposited
Containing program, this program includes the Overall Steps of method as shown in Figure 1 and Figure 2 when performing.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment
Suddenly the program that can be by completes to the hardware instructing the playback equipments such as audio amplifier relevant, and this program can be deposited
It is stored in the computer-readable recording medium of the playback equipments such as audio amplifier, and at least one in played equipment
Processor performs, to realize the broadcasting of song.Wherein, described storage medium may include that flash disk,
Read only memory (Read-Only Memory, ROM), random access device (Random Access
Memory, RAM), disk or CD etc..
Above playback of songs method and device a kind of disclosed in the embodiment of the present invention is described in detail,
Principle and the embodiment of the present invention are set forth by specific case used herein, above example
Explanation be only intended to help to understand method and the core concept thereof of the present invention;Simultaneously for this area
Those skilled in the art, according to the thought of the present invention, the most all have and change
In place of change, in sum, this specification content should not be construed as limitation of the present invention.