Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
The embodiment of the invention discloses a kind of playback of songs method and device, can effectively improve the broadcast hit rate of song.Below be elaborated respectively.
See also Fig. 1, Fig. 1 is the process flow diagram of the disclosed a kind of playback of songs method of the embodiment of the invention.Wherein, the described playback of songs method of Fig. 1 is applicable to audio amplifier (wireless or wired), smart mobile phone (Android mobile phone, iOS mobile phone etc.), panel computer, applause computer and mobile internet device (Mobile Internet Devices, MID), digital media player (Digital Media Player such as PC, DMP), the embodiment of the invention does not limit.As shown in Figure 1, this playback of songs method can may further comprise the steps.
S101, obtain the instruction of song formation and Play Control, at least one song disposes the unified resource identifier (URI is used for the memory location of this song of sign for Uniform Resource Identifier, URI) tabulation in this song formation.
In the embodiment of the invention, DMP(such as audio amplifier) (this playback of songs instruction comprises the sign of this song for Digital Media Controller, the playback of songs that DMC) sends instruction can to receive the Digital Media controller.
In the embodiment of the invention, DMP(such as audio amplifier) can receive the song formation that DMC sends, comprise the sign of each song and the metadata of each song in this song formation, wherein, the metadata of each song comprises the URI tabulation of this song correspondence and the attribute data of this song, comprises at least two kinds of different URI in the URI tabulation of this song correspondence.
S102, according to Play Control instruction, from the URI tabulation of song correspondence, read a unified resource identifier of storage.
For instance, DMP(such as audio amplifier in the embodiment of the invention) lining can store the URI tabulation of each song correspondence in advance, like this when DMP(such as audio amplifier) power on after, at each song, DMP(such as audio amplifier) can from the URI tabulation of this song correspondence, read a URI of storage.
Again for instance, DMP(such as audio amplifier in the embodiment of the invention) lining can store the URI tabulation of each song correspondence in advance, like this when DMP(such as audio amplifier) power on after, DMP(such as audio amplifier) can receive Digital Media controller (Digital Media Controller such as mobile phone, PC, DMC) the playback of songs instruction that sends, this playback of songs instruction comprises the sign of song, correspondingly DMP(such as audio amplifier) can respond this playback of songs instruction, and from the URI tabulation of this song correspondence, read a URI of storage.
In the embodiment of the invention, DMP(such as audio amplifier) before the playback of songs instruction that receives DMC transmissions such as mobile phone, PC, DMP(such as audio amplifier) can also receive the song formation that DMC sends, comprise the sign of each song and the metadata of each song in this song formation, wherein, the metadata of each song comprises the URI tabulation of this song correspondence and the attribute data of this song, comprises at least two kinds of different URI in the URI tabulation of this song correspondence; Correspondingly DMP(such as audio amplifier) can store the song formation that DMC sends.In the embodiment of the invention, DMC can pass through universal plug and play (Universal Plug and Play, UPnP) agreement sends the song formation to audio amplifier, perhaps, DMC can send the song formation to DMP(such as audio amplifier by bluetooth approach), perhaps, DMC can pass through near-field communication (Near Field Communication, NFC) send the song formation to DMP(such as audio amplifier), the embodiment of the invention does not limit.As shown in Figure 2, DMC sends to DMP(such as audio amplifier) the song formation in, not only can comprise the sign of songs such as song 1, song 2 and song 3, can also comprise the metadata of songs such as song 1, song 2, song 3.Metadata with song 1 is example, this metadata can comprise the URI tabulation of song 1 correspondence and the attribute data of song 1, wherein, the URI tabulation of song 1 correspondence can comprise different URI such as URI-1, URI-2 and URI-3, and the attribute data of song 1 can comprise title, singer's name, album name, album cover, song number, song duration, the lyrics and the self-defining data of song 1.In one embodiment, the attribute data of song 1 also can comprise one or more in title, singer's name, album name, album cover, song number, song duration, the lyrics and the self-defining data of song 1, and the embodiment of the invention does not limit.
S103, judge whether success of the link of the unified resource identifier that reads; If it is unsuccessful, then from the unified resource identifier list of this song correspondence, read the next unified resource identifier of storage, when the link success judged the unified resource identifier that reads, play the song of the successful unified resource identifier sign of link, otherwise switch to next song in the song formation.
For instance, in the embodiment of the invention, DMP(such as audio amplifier) can judge whether success of the link of the URI that reads, if success, DMP(such as audio amplifier) can play the song that the successful URI of link identifies; If it is unsuccessful, DMP(such as audio amplifier) can from the URI tabulation of this song correspondence, read the next URI of storage, when the link success judged the URI that reads, play the song that the successful URI of link identifies, otherwise switch to next song in the song formation.
For instance, DMP(such as audio amplifier) from the URI of song 1 correspondence tabulation, read the URI-1 of storage, DMP(such as audio amplifier) can judge whether the link to reading URI-1 is successful, if success, DMP(such as audio amplifier) can play the song that the successful URI-1 of link identifies; If it is unsuccessful, DMP(such as audio amplifier) can from the URI tabulation of song 1 correspondence, read the next URI of storage, up to the URI(such as URI-2 or the URI-3 that judge reading) link when success, play link successful URI(such as URI-2 or URI-3) song that identifies, otherwise switch to next song in the song formation.
In the embodiment of the invention, DMP(such as audio amplifier) URI that reads storage from the URI tabulation of song correspondence can order read; Wherein, the URI in the URI tabulation arranges according to the quality order from high to low of the song of URI sign.For example, URI-1, URI-2 and URI-3 rank order in the URI of the song 1 correspondence tabulation, the quality of the song of URI-1 sign is the highest, the quality of the song of URI-2 sign is time high, the quality of the song of URI-3 sign is minimum.
In the described method of Fig. 1, from the URI of song correspondence tabulation, read a URI of storage after, can judge whether success of the link of the URI that reads; If unsuccessful, then from the URI tabulation of this song correspondence, read the next URI of storage, when the link success judged the URI that reads, play the song that the successful URI of link identifies.As seen, the described method of Fig. 1 is not stored song itself, but a plurality of URI of storage song correspondence, can guarantee finally the link success to the URI that reads like this, thereby can effectively improve the broadcast hit rate of song.
See also Fig. 3, Fig. 3 is the process flow diagram of the disclosed another kind of playback of songs method of the embodiment of the invention.In method shown in Figure 3, need DMC such as mobile phone, PC to insert radio local network environment in advance and add the UPnP network, and need DMP such as audio amplifier to insert WLAN (wireless local area network) in advance and add the UPnP network, DMC can pass through the UPnP discovery mechanism like this, and search also selects DMP as Action Target.On this basis, playback of songs method shown in Figure 3 can may further comprise the steps.
S301, DMP receive the song formation that DMC sends by the UPnP agreement.
In the embodiment of the invention, DMC can carry out the song formation UTF8 coding, and sends to DMP by the UPnP agreement after being organized into the XML form.Wherein, the song formation that DMC sends to DMP can not only can comprise the sign of songs such as song 1, song 2 and song 3 as shown in Figure 2, can also comprise the metadata of songs such as song 1, song 2, song 3.Metadata with song 1 is example, this metadata can comprise the URI tabulation of song 1 correspondence and the attribute data of song 1, wherein, the URI tabulation of song 1 correspondence can comprise different URI such as URI-1, URI-2 and URI-3, and the attribute data of song 1 can comprise title, singer's name, album name, album cover, song number, song duration, the lyrics and the self-defining data of song 1.In one embodiment, the attribute data of song 1 also can comprise one or more in title, singer's name, album name, album cover, song number, song duration, the lyrics and the self-defining data of song 1, and the embodiment of the invention does not limit.
After S302, DMP receive the song formation of DMC by the transmission of UPnP agreement, the song formation that storage DMC sends.
Editing operation instructions such as the insertion at the song formation that S303, DMP reception DMC sends by the UPnP agreement, deletion, replacement.
Wherein, DMC can operate according to the user, sends editing operations such as insertion at the song formation, deletion, replacement by the UPnP agreement and instructs to DMP.
S304, DMP respond this editing operation instruction, and carry out editing operations such as insertion at the song formation, deletion, replacement.
Need to prove that step S303~step S304 is optional, the embodiment of the invention does not limit.
S305, DMP receive the playback of songs instruction that DMC sends by the UPnP agreement, and this playback of songs instruction comprises the sign of song.
After S306, DMP receive the playback of songs instruction of DMC transmission, respond this playback of songs instruction, read a URI of storage in proper order in the URI tabulation of this song correspondence from the song formation of storage.
In the embodiment of the invention, the URI in the URI of this song correspondence tabulation arranges according to the quality order from high to low of the song of URI sign.For example, URI-1, URI-2 and URI-3 rank order in the URI of the song 1 correspondence tabulation, the quality of the song of URI-1 sign is the highest, the quality of the song of URI-2 sign is time high, the quality of the song of URI-3 sign is minimum.
In the embodiment of the invention, URI is used for this song of sign in the memory location of internet.
S307, DMP judge whether success of the link of the URI that reads, if unsuccessful, execution in step S308 then; If success, then execution in step S309.
S308, DMP judge whether the URI of this song correspondence exists next URI in tabulating, if, then continue execution in step S306, read the next URI of storage with order in the URI tabulation of this song correspondence from the song formation of storage; If not, then continue execution in step S310.
S309, DMP play the song of the successful URI sign of link.
S310, DMP judge whether also to exist next song, if, execution in step S311 then; If not, process ends.
S311, DMP select next song in order, and execution in step S306.
In the embodiment of the invention, DMP can receive the selection at song, broadcast that DMC sends by the UPnP agreement, suspend, stop and circulate Broadcast Controls such as (single circulation or whole tabulation circulations) instructs, and respond this Broadcast Control instruction, carry out selection, broadcast at song, suspend, stop and Broadcast Control operation such as circulation.
In the embodiment of the invention, for each song, DMP can attempt each URI in the URI tabulation of this song correspondence in order successively, if to the link success of some URI, just play the song of this URI sign immediately; If failure, next URI in this URI tabulation would be attempted, up to the URI that finds an energy usefulness.If the link of all URI of current song is all failed, then jump to next song and continue to carry out flow process of the present invention.Finish if current song is play, can jump to next song automatically and continue to carry out flow process of the present invention; Perhaps, under the single circulation pattern, can the repeat playing current song.If last playback of songs finishes in the song formation, just finish the broadcast of whole tabulation; Or under whole tabulation loop play pattern, jump to first song automatically and continue to play.
In the embodiment of the invention, the described method of Fig. 3 is applicable to digital home network, not only can realize interconnected between DMC in the digital home network and the DMP, can also realize the control of the DMP of DMC, thereby can in digital home network, effectively improve the playback of songs hit rate of DMP.
In the described method of Fig. 3, DMP does not store song itself, but a plurality of URI of storage song correspondence, can guarantee finally the link success to the URI that reads like this, thereby can effectively improve the broadcast hit rate of song.
See also Fig. 4, Fig. 4 is the structural drawing of the disclosed a kind of playback of songs device of the embodiment of the invention.Wherein, the described playback of songs device of Fig. 4 is applicable to audio amplifier (wireless or wired), smart mobile phone (Android mobile phone, iOS mobile phone etc.), panel computer, applause computer and mobile internet device (Mobile Internet Devices, MID), digital media player (Digital Media Player such as PC, DMP), the embodiment of the invention does not limit.As shown in Figure 4, this playback of songs device 400 can comprise:
Acquiring unit 401 is used for obtaining song formation and Play Control instruction, and at least one song disposes the URI tabulation in this song formation, and URI is used for the memory location of this song of sign;
Reading unit 402 is used for according to the Play Control instruction, reads a URI of storage from the URI tabulation of song correspondence, and wherein, URI is used for the memory location of this song of sign;
Judging unit 403 be used for to be judged whether success of the link of the URI that reads;
Broadcast unit 404, be used for when judging of judging unit 403 is unsuccessful to the link of the URI that reads, notice reading unit 402 reads the next URI of storage from the URI tabulation of this song correspondence, when judging unit 403 is judged link success to the URI that reads, play the song of the successful URI sign of link, otherwise switch to next song in the song formation.
In one embodiment, in the device 400 shown in Figure 4, acquiring unit 401 obtains the Play Control instruction and comprises:
Acquiring unit 401 is used for receiving the playback of songs instruction that DMC sends, and this playback of songs instruction comprises the sign of song.
In one embodiment, in the device 400 shown in Figure 4, acquiring unit 401 obtains the song formation and comprises:
Acquiring unit 401 is used for receiving the song formation that DMC sends, comprise the sign of each song and the metadata of each song in this song formation, wherein, the metadata of each song comprises the URI tabulation of this song correspondence and the attribute data of this song, comprises at least two kinds of different URI in the URI tabulation of this song correspondence.
In the embodiment of the invention, device 400 shown in Figure 4 can also comprise:
Storage unit 405 is used for the song formation that storage DMC sends.
Correspondingly, reading unit 402 reads a URI of storage for the URI tabulation of this song correspondence of storing from storage unit 405.
In the embodiment of the invention, the attribute data of this song comprises one or more in the title of this song, singer's name, album name, album cover, song number, song duration, the lyrics and the self-defining data, and the embodiment of the invention does not limit.
In the embodiment of the invention, reading unit 402 reads storage from the URI tabulation of song correspondence URI is that order reads; Wherein, the URI in the URI tabulation arranges according to the quality order from high to low of the song of URI sign.
In the described device of Fig. 4, do not store song itself, but a plurality of URI of storage song correspondence, the link success to the URI that reads can be guaranteed finally like this, thereby the broadcast hit rate of song can be effectively improved.
The embodiment of the invention further discloses a kind of computer-readable storage medium, and this computer-readable storage medium has program stored therein, and this program comprises the Overall Steps of method as shown in Figure 1 and Figure 2 when carrying out.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to instruct the relevant hardware of playback equipment such as audio amplifier to finish by program, this program can be stored in the computer-readable recording medium of playback equipments such as audio amplifier, and at least one processor in the played equipment carries out, to realize the broadcast of song.Wherein, described storage medium can comprise: flash disk, ROM (read-only memory) (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), disk or CD etc.
More than the disclosed a kind of playback of songs method of the embodiment of the invention and device are described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.