CN104978981A - Random playing method and device of music - Google Patents

Random playing method and device of music Download PDF

Info

Publication number
CN104978981A
CN104978981A CN201510046532.3A CN201510046532A CN104978981A CN 104978981 A CN104978981 A CN 104978981A CN 201510046532 A CN201510046532 A CN 201510046532A CN 104978981 A CN104978981 A CN 104978981A
Authority
CN
China
Prior art keywords
sequence
music file
group
spacing value
sequence number
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.)
Granted
Application number
CN201510046532.3A
Other languages
Chinese (zh)
Other versions
CN104978981B (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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510046532.3A priority Critical patent/CN104978981B/en
Publication of CN104978981A publication Critical patent/CN104978981A/en
Priority to US15/542,830 priority patent/US20170371882A1/en
Priority to PCT/CN2016/070798 priority patent/WO2016112852A1/en
Priority to JP2017554636A priority patent/JP6595617B2/en
Priority to MYPI2017702558A priority patent/MY178495A/en
Priority to EP16737077.4A priority patent/EP3247125A4/en
Application granted granted Critical
Publication of CN104978981B publication Critical patent/CN104978981B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Reverberation, Karaoke And Other Acoustics (AREA)

Abstract

The invention relates to a random playing method and device of music. The method comprises the following steps: sorting music files to be played, and identifying serial numbers; dividing the serial numbers of the sorted music files into a plurality of groups; according to the amount of each group of music files, determining an interval value, wherein the interval value is used for carrying out cross interval mixing on the serial number of each group of music files; carrying out the cross interval mixing on the serial numbers of each group of music files according to the interval value to generate a random playing list; and according to the serial numbers in the random playing list, playing the corresponding music file. The method and the device can effectively improve the balance of a music file playing probability during random playing.

Description

A kind of music shuffle method and device
Technical field
The present invention relates to field of computer technology, particularly a kind of music shuffle method and device.
Background technology
Due to the development of computer technology, along with the development of Internet technology, there is various music player devices or online Play System, such as, the portable music player device such as mobile phone, the online player such as QQ music.Usually shuffle is carried out to the music file of some, that is, play the multiple randomly ordered music file be present in playlist.
In prior art, pseudo-random algorithm for shuffle generates, technological deficiency be some music file shuffle many times, usually repeat, and other music file is never played, cause playing efficiency low, the broadcasting probability of each music file is unbalanced, for user brings inconvenience.
Summary of the invention
In view of this, the invention provides a kind of music shuffle method and device, when effectively can improve shuffle, the harmony of probability play by music file.
The embodiment of the present invention provides a kind of music shuffle method, comprising:
Music file to be played is carried out sequence and identifier number;
The described sequence number of the described music file after sequence is divided into multiple groups;
The quantity determination spacing value of music file according to each group, described spacing value is used for the sequence number of music file described in each group to carry out transpostion interval mixing;
The sequence number of music file described in each group is carried out transpostion interval mixing according to described spacing value, to generate shuffle playlist;
According to the sequence number in described shuffle playlist, play corresponding music file.
The embodiment of the present invention provides a kind of music shuffle device, comprising:
Order module, for sorting music file to be played;
Identification module, for being the described music file identifier number after described order module sequence;
Grouping module, the described sequence number for the described music file after the described sequence that identified by described identification module is divided into multiple groups;
Determination module, for the quantity determination spacing value of each group of described music file divided according to described grouping module, described spacing value is used for the sequence number of music file described in each group to carry out transpostion interval mixing;
Mixing module, carries out transpostion interval mixing, to generate shuffle playlist for the described spacing value determined according to described determination module by the sequence number of music file described in each group;
Playing module, for the sequence number in the described shuffle playlist that generates according to described mixing module, plays corresponding music file.
According to music shuffle method and the device of above-described embodiment, the sequence number of music file is divided into groups, and according to the quantity determination spacing value of each group of music file, the sequence number of each group of music file is carried out transpostion interval mixing according to this spacing value, to generate shuffle playlist, and the music file corresponding according to this shuffle playlist shuffle, effectively during raising shuffle, each music file is played the harmony of probability.
For above and other object of the present invention, feature and advantage can be become apparent, preferred embodiment cited below particularly, and coordinate institute's accompanying drawings, be described in detail below.
Accompanying drawing explanation
Fig. 1 is a kind of terminal device structural representation;
The process flow diagram of the music shuffle method that Fig. 2 provides for first embodiment of the invention;
The process flow diagram of the music shuffle method that Fig. 3 provides for second embodiment of the invention;
The process flow diagram of the music shuffle method that Fig. 4 provides for third embodiment of the invention;
The structural representation of the music shuffle device that Fig. 5 provides for fourth embodiment of the invention;
The structural representation of the music shuffle device that Fig. 6 provides for fifth embodiment of the invention.
Embodiment
For further setting forth the present invention for the technological means that realizes predetermined goal of the invention and take and effect, below in conjunction with accompanying drawing and preferred embodiment, to according to the specific embodiment of the present invention, structure, feature and effect thereof, be described in detail as follows.
Music shuffle method in the present invention can be applicable to for playing in the terminal device of music, namely terminal device shuffle music is used user, also can be applicable in the mobile terminal device comprising smart mobile phone, panel computer, notebook etc., namely user is listened to by music application (APP, Application) or is watched music.
Refer to Fig. 1, Fig. 1 is a kind of terminal device structural representation.Wherein, terminal device comprises mobile terminal device.
Terminal device 100 comprises storer 102, memory controller 104, one or more (only illustrating one in figure) processor 106, Peripheral Interface 108, radio-frequency module 110, locating module 112, photographing module 114, audio-frequency module 116, Touch Screen 118 and key-press module 120.These assemblies are by one or more communication bus/signal wire 122 communication mutually.
Be appreciated that the structure shown in Fig. 1 is only signal, terminal device 100 also can comprise than assembly more or less shown in Fig. 1, or has the configuration different from shown in Fig. 1.Each assembly shown in Fig. 1 can adopt hardware, software or its combination to realize
Storer 102 can be used for storing software program and module, as the method for music shuffle in terminal device in the embodiment of the present invention and programmed instruction/module corresponding to device, processor 106 is by running the software program and module that are stored in storer 102, thus perform the application of various function and data processing, namely realize the method for above-mentioned music shuffle in terminal device.
Storer 102 can comprise high speed random access memory, also can comprise nonvolatile memory, as one or more magnetic storage device, flash memory or other non-volatile solid state memories.In some instances, storer 102 can comprise the storer relative to the long-range setting of processor 106 further, and these remote memories can be connected to terminal device 100 by network.The example of above-mentioned network includes but not limited to internet, intranet, LAN (Local Area Network), mobile radio communication and combination thereof.Processor 306 and other possible assemblies can carry out the access of storer 102 under the control of memory controller 304.
Various input/output device is coupled to CPU and storer 102 by Peripheral Interface 108.Various softwares in processor 106 run memory 102, instruction are to perform the various function of terminal device 100 and to carry out data processing.
In certain embodiments, Peripheral Interface 108, processor 106 and memory controller 104 can realize in one single chip.In some other example, they can respectively by independently chip realization.
Radio-frequency module 110, for receiving and sending electromagnetic wave, realizes the mutual conversion of electromagnetic wave and electric signal, thus carries out communication with communication network or other equipment.Radio-frequency module 110 can comprise the various existing circuit component for performing these functions, such as, and antenna, radio-frequency (RF) transceiver, digital signal processor, encrypt/decrypt chip, subscriber identity module (SIM) card, storer etc.Radio-frequency module 110 can with various network as internet, intranet, wireless network carry out communication or carry out communication by wireless network and other equipment.Above-mentioned wireless network can comprise cellular telephone networks, WLAN (wireless local area network) or Metropolitan Area Network (MAN).Above-mentioned wireless network can use various communication standard, agreement and technology, include, but are not limited to global system for mobile communications (Global System for MobileCommunication, GSM), enhancement mode mobile communication technology (Enhanced Data GSMEnvironment, EDGE), Wideband CDMA Technology (wideband code division multipleaccess, W-CDMA), CDMA (Code Division Multiple Access) (Code division access, CDMA), tdma (time division multiple access, TDMA), bluetooth, adopting wireless fidelity technology (Wireless, Fidelity, WiFi) (as IEEE-USA standard IEEE 802.11a, IEEE 802.11b, IEEE802.11g and/or IEEE 802.11n), the networking telephone (Voiceover internet protocal, VoIP), worldwide interoperability for microwave access (Worldwide Interoperabilityfor Microwave Access, Wi-Max), other are for mail, the agreement of instant messaging and short message, and any other suitable communications protocol, even can comprise those current agreements be developed not yet.
Locating module 112 is for obtaining the current location of terminal device 100.The example of locating module 112 includes but not limited to Global Positioning System (GPS) (GPS), location technology based on WLAN (wireless local area network) or mobile radio communication.
Photographing module 114 is for taking pictures or video.Photo or the video of shooting can be stored in storer 102, and send by radio-frequency module 110.
Audio-frequency module 116 provides audio interface to user, and it can comprise one or more microphone, one or more loudspeaker and voicefrequency circuit.Voicefrequency circuit receives voice data from Peripheral Interface 108, voice data is converted to telecommunications breath, and telecommunications breath is transferred to loudspeaker.Telecommunications breath is changed the sound wave can heard into people's ear by loudspeaker.Voicefrequency circuit also from microphone receive telecommunications breath, convert electrical signals to voice data, and by data transmission in network telephony to Peripheral Interface 108 to be further processed.Voice data can obtain from storer 102 or by radio-frequency module 110.In addition, voice data also can be stored in storer 102 or by radio-frequency module 110 and send.In some instances, audio-frequency module 116 also can comprise an earphone and broadcast hole, for providing audio interface to earphone or other equipment.
Touch Screen 118 provides one simultaneously and exports and inputting interface between terminal device 100 and user.Particularly, Touch Screen 118 exports to user's display video, and the content of these video frequency output can comprise word, figure, video and combination in any thereof.Some Output rusults correspond to some user interface object.Touch Screen 118 also receives the input of user, and the gesture operation such as click, slip of such as user, so that response is made in the input of user interface object to these users.The technology detecting user's input can be based on resistance-type, condenser type or other touch control detection technology possible arbitrarily.The instantiation of Touch Screen 118 display unit includes, but are not limited to liquid crystal display or light emitting polymer displays.
Key-press module 120 provides user to carry out the interface inputted to terminal device 100 equally, and user can perform different functions by pressing different buttons to make terminal device 100.
First embodiment
See Fig. 2, be a kind of music shuffle method that first embodiment of the invention provides, the method comprises:
S201, music file to be played carried out sequence and identifier number;
The music file that music file to be played can store for terminal device 100 this locality or the music file being stored in server.Music file to be played sorts by the terminal device 100 for playing music, and is each music file identifier number accordingly.If the total quantity of music file is N, N is natural number, the sequence number of music file is X (i), and wherein, i is respectively 0,1,2 ..., N-1.
Such as, music file to be played has 10, then by these 10 music file sequences, can be randomly ordered, also can be sort according to the title initial character of music file, and the sequence number X (0) that 10 music file marks are corresponding for this reason, X (1), X (2) ..., X (9).
S202, the sequence number of music file after sequence is divided into multiple groups;
After N number of music file sequence, the sequence number of this N number of music file is divided into multiple groups.
Such as, by sequence number X (0), X (1), X (2) ..., X (9) is divided into two groups, wherein, sequence number X (0), X (1), X (2), X (3), X (4) is first group, X (5), X (6), X (7), X (8), X (9) are second group.
Or, by sequence number X (0), X (1), X (2) ..., X (9) is divided into three groups, wherein, sequence number X (0), X (1), X (2) is first group, X (3), X (4), X (5) is second group, X (6), X (7), X (8), X (9) are the 3rd group.
S203, quantity determination spacing value according to each group of music file;
A random or appointment spacing value according to the quantity of each group of music file, this spacing value is for by the sequence number of the music file of each group, every this spacing value, just transpostion interval is together, namely, by the sequence that the sequence number of the music file of each group is formed, every the just transpostion interval mixing of this spacing value, be generated as a new sequence.
S204, the sequence number of each group of music file is carried out transpostion interval mixing according to this spacing value, to generate shuffle playlist;
The sequence number of each group of music file is carried out transpostion interval mixing according to this spacing value, can be specifically that the sequence number often organizing music file is arranged generation sequence separately respectively, transpostion interval mixing is carried out according to this spacing value, to generate shuffle playlist by often organizing sequence corresponding to music file.
S205, play corresponding music file according to the sequence number in this shuffle playlist.
After generating shuffle playlist, according to sequence number wherein, play each music file corresponding with sequence number.
Each step also can be carry out at server end above, if server end performs above-mentioned steps, then sends to playback terminal to play the shuffle playlist of generation.
The music shuffle method that the embodiment of the present invention provides, by the sequence number of music file is divided into groups, and according to the quantity determination spacing value of each group of music file, the sequence number of each group of music file is carried out transpostion interval mixing according to this spacing value, to generate shuffle playlist, and the music file corresponding according to this shuffle playlist shuffle, effectively during raising shuffle, each music file is played the harmony of probability.
Second embodiment
See Fig. 3, be a kind of music shuffle method that second embodiment of the invention provides, the method comprises:
S301, music file to be played carried out sequence and identifier number;
Music file to be played sorts by the terminal device 100 for playing music, and is each music file identifier number accordingly.If the total quantity of music file is N, N is natural number, the sequence number of music file is X (i), and wherein, i is respectively 0,1,2 ..., N-1.
S302, the sequence number of music file after sequence is divided into multiple groups;
After N number of music file sequence, the sequence number of this N number of music file is divided into multiple groups.Can be divided into two groups, three groups etc., music file quantity is more, correspondingly can be divided into more groups.Usually, after being divided into multiple groups, the music file quantity of each group is equal or close.
S303, quantity determination spacing value according to each group of music file;
A random or appointment spacing value according to the quantity of each group of music file, this spacing value is used for the sequence number of music file described in each group to carry out transpostion interval mixing, namely, by the sequence that the sequence number of the music file of each group is formed, every the just transpostion interval mixing of this spacing value, be generated as a new sequence.
For two groups of music files, in another sequence that a sequence in two sequences that the sequence number of these two groups of music files is formed respectively is inserted in these two sequences every this spacing value, carry out transpostion interval mixing, generate a new sequence.
The minimum value of this spacing value can be 1, and maximal value is the arbitrary value of the quantity being less than this group music file, and preferred value is 5.
S304, in each group of music file, arbitrarily select two groups of music files, and the sequence number of these two groups of music files is arranged as two sequences separately;
After determining this spacing value, just the sequence number of each group of music file is carried out transpostion interval mixing according to this spacing value, to generate shuffle playlist.For ease of describing, be mixed into example with the transpostion interval of two groups of music files, the transpostion interval mixing of many group music files can reference accordingly.
Particularly, in each group of music file, select two groups of music files arbitrarily, and the sequence number of these two groups of music files is arranged as two sequences separately.
In an example, be that the music file of N is divided into many groups by quantity, optionally wherein two groups of music files, wherein the sequence number of first group is X1 (i), and the sequence number of second group is X2 (j), wherein, i and j is natural number, and i < j.The quantity that the present embodiment does not limit each group of music file is necessary identical.First ray and the second sequence is generated respectively according to this sequence number of first group and the arrangement of this sequence number of second group correspondence.
S305, by these two sequences every this spacing value carry out transpostion interval mixing generate mixed sequence;
According to this spacing value by this First ray and the mixing of this second sequence crossover interval, the sequence number of second group of X2 (j) is inserted in the sequence number of first group of X1 (i).
Particularly, when this spacing value is 2, the sequence number of X1 (i) just inserts the sequence number of 1 X2 (j) every 2; When this spacing value is 1, the sequence number of X1 (i) and the sequence number of X2 (j) are mixed into this shuffle playlist every a sequence number transpostion interval.For 10 music files, by two groups that these 10 music files are divided into quantity identical, wherein one group of sequence number is respectively X1 (0), X1 (1), X1 (2), X1 (3), X1 (4), another group sequence number is respectively X2 (5), X2 (6), X2 (7), X2 (8), X2 (9), so, when this spacing value is 1, the sequence number of these two groups of music files is mixed into shuffle sequence every a sequence number transpostion interval, and the concrete order of this shuffle sequence is X1 (0), X2 (5), X1 (1), X2 (6), X1 (2), X2 (7), X1 (3), X2 (8), X1 (4), X2 (9), so, when this spacing value is 2, the sequence number that first group of X1 (i) organizes just inserts 1 sequence number that second group of X2 (j) organizes every 2, and the concrete order of the shuffle sequence of formation is X1 (0), X1 (1), X2 (5), X1 (2), X1 (3), X2 (6), X1 (4), X2 (7), X2 (8), X2 (9), continues mixing, until the sequence number that all second group of X2 (j) organize is inserted at traversal interval.
S306, in each group of music file, arbitrarily select one group of music file, and the sequence that the sequential orders of this group of music file generates is carried out transpostion interval with this mixed sequence every this spacing value and mixed, until the sequence crossover interval mixing generation shuffle playlist that each group music file is corresponding;
After this First ray and this second sequence being carried out transpostion interval mixing generation mixed sequence, optional one group of music file in other respectively group music file again, the sequential orders of this group music file is generated the 3rd sequence, 3rd sequence is carried out transpostion interval with this mixed sequence every this spacing value mix, transpostion interval hybrid mode is with the transpostion interval hybrid mode of this First ray above-mentioned and this second sequence, so carry out, until sequence crossover interval mixing generation shuffle playlist that each group music file is corresponding.
Further, this shuffle playlist is carried out be grouped into multiple new sequence, the quantity of the music file of answering according to each this new sequence pair determines new spacing value, this new spacing value is used for each this new sequence to carry out transpostion interval mixing, each group of this new sequence is carried out transpostion interval mixing according to this new spacing value, to generate new shuffle playlist, according to the sequence number in the new shuffle playlist generated, play corresponding music file, repeatedly above-mentioned steps, repeatedly generate new shuffle playlist, what the sequence number of music file can be mixed is more abundant, the probability of each music file shuffle of further increase.
S307, the sequence number in this shuffle playlist is divided into many groups, and exchanges the order of many groups;
Such as, sequence number corresponding for the music file in this shuffle playlist is divided into 2 groups, exchanges the order of these 2 groups of sequence numbers, further the sequence number of music file is mixed.
S308, according to the sequence number in the new shuffle playlist generated after reversed order, play corresponding music file.
After this random list grouping reversed order, generates a new shuffle playlist, it is more abundant that the sequence number that the music file in this new shuffle playlist is corresponding mixes, and plays the music file that sequence number in this new shuffle playlist is corresponding.
The music shuffle method that the embodiment of the present invention provides, by the sequence number of music file is divided into groups, and according to the quantity determination spacing value of each group of music file, the sequence number of each group of music file is carried out transpostion interval mixing according to this spacing value, to generate shuffle playlist, and the music file corresponding according to this shuffle playlist shuffle, effectively during raising shuffle, each music file is played the harmony of probability.
3rd embodiment
See Fig. 4, be a kind of music shuffle method that third embodiment of the invention provides, the method comprises:
S401, music file to be played carried out sequence and identifier number;
Music file to be played sorts by the terminal device 100 for playing music, and is the corresponding identifier number of each music file.If the total quantity of music file is N, N is natural number, the sequence number of music file is X (i), and wherein, i is respectively 0,1,2 ..., N-1.
S402, the sequence number of music file after sequence is divided into multiple groups;
After N number of music file sequence, the sequence number of this N number of music file is divided into multiple groups.Can be divided into two groups, three groups etc., music file quantity is more, correspondingly can be divided into more groups.Usually, after being divided into multiple groups, the music file quantity of each group is equal or close.
S403, quantity determination spacing value according to each group of music file;
A random or appointment spacing value according to the quantity of each group of music file, this spacing value is used for the sequence number of music file described in each group to carry out transpostion interval mixing, namely, by the sequence that the sequence number of the music file of each group is formed, every the just transpostion interval mixing of this spacing value, be generated as a new sequence.
For two groups of music files, in another sequence that a sequence in two sequences that the sequence number of these two groups of music files is formed respectively is inserted in these two sequences every this spacing value, carry out transpostion interval mixing, generate a new sequence.
S404, the sequence number often organizing music file arranged separately generate corresponding sequence;
After determining this spacing value, just the sequence number of each group of music file is carried out transpostion interval mixing according to this spacing value, to generate shuffle playlist.For ease of describing, the present embodiment is mixed into example with the transpostion interval of two groups of music files, and the transpostion interval mixing of many group music files can reference accordingly.
Particularly, the sequence number often organizing music file in each group of music file is arranged separately the sequence being generated as correspondence.
S405, in the sequence generated, arbitrarily select two sequences, and these two sequences are carried out transpostion interval mixing every this spacing value generate mixed sequence;
Such as, first time selects First ray and the second sequence, and these two sequences are carried out transpostion interval mixing generation first mixed sequence every this spacing value, and the process that transpostion interval mixes is shown in the description of previous embodiment, repeats no more herein.Second time selects the 3rd sequence and the 4th sequence, and these two sequences are carried out transpostion interval mixing generation second mixed sequence every this spacing value; Third time selects the 5th sequence and the 6th sequence that these two sequences are carried out transpostion interval mixing generation the 3rd mixed sequence every this spacing value, by that analogy.
S406, each mixed sequence is carried out transpostion interval mixing every this spacing value, until sequence crossover interval mixing corresponding to each group music file generates this shuffle playlist;
The mixed sequences such as the first mixed sequence, the second mixed sequence, the 3rd mixed sequence are carried out transpostion interval mixing every this spacing value mutually, until this shuffle playlist of sequence crossover interval mixing generation that each group music file is corresponding.
And after first sequence crossover interval corresponding for the sequence number of two groups of music files being mixed in the second embodiment, different with the mode that mixes of sequence crossover interval corresponding to the sequence number of the 3rd group of music file again, the present embodiment sequence corresponding for each group of music file sequence number is first crossed one another after interval mixing generates mixed sequence between two, again each mixed sequence is continued the interval mixing that crosses one another between two, until generate a shuffle playlist.
Further, this shuffle playlist is carried out be grouped into multiple new sequence, the quantity of the music file of answering according to each this new sequence pair determines new spacing value, this new spacing value is used for each this new sequence to carry out transpostion interval mixing, each group of this new sequence is carried out transpostion interval mixing according to this new spacing value, to generate new shuffle playlist, according to the sequence number in the new shuffle playlist generated, play corresponding music file, repeatedly above-mentioned steps, repeatedly generate new shuffle playlist, what the sequence number of music file can be mixed is more abundant, the probability of each music file shuffle of further increase.
S407, the sequence number in this shuffle playlist is divided into many groups, and exchanges the order of many groups;
Such as, sequence number corresponding for the music file in this shuffle playlist is divided into 3 groups, exchanges the order of these 3 groups of sequence numbers, further the sequence number of music file is mixed.
S408, according to the sequence number in the new shuffle playlist generated after reversed order, play corresponding music file.
After this random list grouping reversed order, generates a new shuffle playlist, it is more abundant that the sequence number that the music file in this new shuffle playlist is corresponding mixes, and plays the music file that sequence number in this new shuffle playlist is corresponding.
The music shuffle method that the embodiment of the present invention provides, by the sequence number of music file is divided into groups, and according to the quantity determination spacing value of each group of music file, the sequence number of each group of music file is carried out transpostion interval mixing according to this spacing value, to generate shuffle playlist, and the music file corresponding according to this shuffle playlist shuffle, effectively during raising shuffle, each music file is played the harmony of probability.
4th embodiment
Referring to Fig. 5, is the structural representation of a kind of music shuffle device that fourth embodiment of the invention provides.The music shuffle device 50 that the present embodiment provides can run in the terminal device 100 shown in Fig. 1, for realizing the music shuffle method in above-described embodiment.As shown in Figure 5, music shuffle device 50 comprises:
Order module 501, for sorting music file to be played;
Identification module 502, for being this music file identifier number after order module 501 sequence;
Grouping module 503, this sequence number for this music file after this sequence of being identified by identification module 502 is divided into multiple groups;
Determination module 504, for the quantity determination spacing value of each group of this music file divided according to grouping module 503, this spacing value is used for the sequence number of each group of this music file to carry out transpostion interval mixing;
Mixing module 505, carries out transpostion interval mixing, to generate shuffle playlist for this spacing value determined according to determination module 504 by the sequence number of each group of this music file;
Playing module 506, for the sequence number in this shuffle playlist of generating according to mixing module 505, plays corresponding music file.
The present embodiment, to the detailed process of each Implement of Function Module of music shuffle device 50 function separately, refers to the particular content of above-mentioned Fig. 1 to middle description embodiment illustrated in fig. 4, repeats no more herein.
The music shuffle device that the embodiment of the present invention provides, by the sequence number of music file is divided into groups, and according to the quantity determination spacing value of each group of music file, the sequence number of each group of music file is carried out transpostion interval mixing according to this spacing value, to generate shuffle playlist, and the music file corresponding according to this shuffle playlist shuffle, effectively during raising shuffle, each music file is played the harmony of probability.
5th embodiment
Referring to Fig. 6, is the structural representation of a kind of music shuffle device that fifth embodiment of the invention provides.The music shuffle device 60 that the present embodiment provides can run in the terminal device 100 shown in Fig. 1, for realizing the music shuffle method in above-described embodiment.As shown in Figure 6, music shuffle device 60 comprises:
Order module 501, for sorting music file to be played;
Identification module 502, for being this music file identifier number after order module 501 sequence;
Grouping module 503, this sequence number for this music file after this sequence of being identified by identification module 502 is divided into multiple groups;
Determination module 504, for the quantity determination spacing value of each group of this music file divided according to grouping module 503, this spacing value is used for the sequence number of each group of this music file to carry out transpostion interval mixing;
Mixing module 505, carries out transpostion interval mixing, to generate shuffle playlist for this spacing value determined according to determination module 504 by the sequence number of each group of this music file;
Playing module 506, for the sequence number in this shuffle playlist of generating according to mixing module 505, plays corresponding music file.
Further, grouping module 503, is also grouped into multiple new sequence for repeatedly being carried out by this shuffle playlist;
Determination module 504, the quantity also for the music file of answering according to each this new sequence pair determines new spacing value;
Mixing module 505, also for each group of this new sequence is carried out transpostion interval mixing according to this new spacing value, to generate new shuffle playlist;
Playing module 506, also for according to the sequence number in this shuffle playlist, plays corresponding music file.
Further, mixing module 505 comprises:
Select module 5051, for selecting two groups of these music files arbitrarily in each group of this music file;
Sequence generating module 5052, for being arranged as two sequences separately by the sequence number of these two groups of music files;
Mixing submodule 5053, generates mixed sequence for these two sequences are carried out transpostion interval mixing every this spacing value;
Select module 5051, also for selecting one group of this music file arbitrarily in each group of this music file;
Mixing submodule 5053, sequence also for will the sequential orders of module 5051 optional one group of this music file in each group of this music file be selected to generate, carry out transpostion interval with this mixed sequence every this spacing value to mix, until this shuffle playlist of sequence crossover interval mixing generation that each this music file of group is corresponding.
Further, sequence generating module 5052, also generates corresponding sequence for being arranged separately by the sequence number often organizing music file;
Select module 5051, also for selecting two sequences arbitrarily in the sequence generated;
Mixing submodule 5053, also generates mixed sequence for these two sequences are carried out transpostion interval mixing every this spacing value;
Mixing submodule 5053, also for each this mixed sequence is carried out transpostion interval mixing every this spacing value, until sequence crossover interval mixing corresponding to each group music file generates this shuffle playlist.
Further, mixing submodule 5053, also carries out transpostion interval mixing in another sequence of a sequence in these two sequences being inserted in these two sequences every this spacing value, generates this mixed sequence.
Further, music shuffle device 60 also comprises:
Adjust sequence module 607, for the sequence number in this playlist is divided into many groups, and exchange the order of many groups;
Playing module 506, also for according to the sequence number in the new shuffle playlist generated after reversed order, plays corresponding music file.
The present embodiment, to the detailed process of each Implement of Function Module of music shuffle device 60 function separately, refers to the particular content of above-mentioned Fig. 1 to middle description embodiment illustrated in fig. 4, repeats no more herein.
The music shuffle device that the embodiment of the present invention provides, by the sequence number of music file is divided into groups, and according to the quantity determination spacing value of each group of music file, the sequence number of each group of music file is carried out transpostion interval mixing according to this spacing value, to generate shuffle playlist, and the music file corresponding according to this shuffle playlist shuffle, effectively during raising shuffle, each music file is played the harmony of probability.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For device class embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or device.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the device comprising key element and also there is other identical element.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
Above, it is only preferred embodiment of the present invention, not any pro forma restriction is done to the present invention, although the present invention discloses as above with preferred embodiment, but and be not used to limit the present invention, any those skilled in the art, do not departing within the scope of technical solution of the present invention, make a little change when the technology contents of above-mentioned announcement can be utilized or be modified to the Equivalent embodiments of equivalent variations, in every case be do not depart from technical solution of the present invention content, according to any simple modification that technical spirit of the present invention is done above embodiment, equivalent variations and modification, all still belong in the scope of technical solution of the present invention.

Claims (12)

1. a music shuffle method, is characterized in that, comprising:
Music file to be played is carried out sequence and identifier number;
The described sequence number of the described music file after sequence is divided into multiple groups;
The quantity determination spacing value of music file according to each group, described spacing value is used for the sequence number of music file described in each group to carry out transpostion interval mixing;
The sequence number of music file described in each group is carried out transpostion interval mixing according to described spacing value, to generate shuffle playlist;
According to the sequence number in described shuffle playlist, play corresponding music file.
2. the method for claim 1, is characterized in that, described the sequence number of music file described in each group is carried out transpostion interval mixing according to described spacing value, also comprises after generating shuffle playlist:
Repeatedly described shuffle playlist is carried out being grouped into multiple new sequence, the quantity of the music file of answering according to sequence pair new described in each determines new spacing value, and sequence new described in each group is carried out transpostion interval mixing according to described new spacing value, to generate new shuffle playlist
Then described according to the sequence number in described shuffle playlist, play corresponding music file and comprise:
According to the sequence number in the new shuffle playlist generated, play corresponding music file.
3. the method for claim 1, is characterized in that, described the sequence number of music file described in each group is carried out transpostion interval mixing according to described spacing value, comprises to generate shuffle playlist:
Music file select two groups arbitrarily in music file described in each group described in, and the sequence number of music file described in described two groups is arranged as two sequences separately;
Described two sequences are carried out transpostion interval mixing every described spacing value and generates mixed sequence;
Music file select one group arbitrarily in music file described in each group described in, and the sequence that the sequential orders of described one group of music file generates is carried out transpostion interval with described mixed sequence every described spacing value and mixed, until the described shuffle playlist of sequence crossover interval mixing generation that the described music file of each group is corresponding.
4. the method for claim 1, is characterized in that, described the sequence number of music file described in each group is carried out transpostion interval mixing according to described spacing value, comprises to generate shuffle playlist:
The sequence number often organizing music file is arranged separately and generates corresponding sequence;
Two sequences are selected arbitrarily in the sequence generated;
Described two sequences are carried out transpostion interval mixing every described spacing value and generates mixed sequence;
Each described mixed sequence is carried out transpostion interval mixing every described spacing value, until the described shuffle playlist of sequence crossover interval mixing generation that the described music file of each group is corresponding.
5. the method as described in claim 3 or 4, is characterized in that, described by described two sequences every described spacing value carry out transpostion interval mixing generate mixed sequence comprise:
Carry out transpostion interval mixing in another sequence sequence in described two sequences inserted in described two sequences every described spacing value, generate described mixed sequence.
6. the method for claim 1, is characterized in that, described method also comprises:
Sequence number in described shuffle playlist is divided into many groups, and exchanges the order of many groups;
According to the sequence number in the new shuffle playlist generated after reversed order, play corresponding music file.
7. a music shuffle device, is characterized in that, comprising:
Order module, for sorting music file to be played;
Identification module, for being the described music file identifier number after described order module sequence;
Grouping module, the described sequence number for the described music file after the described sequence that identified by described identification module is divided into multiple groups;
Determination module, for the quantity determination spacing value of each group of described music file divided according to described grouping module, described spacing value is used for the sequence number of music file described in each group to carry out transpostion interval mixing;
Mixing module, carries out transpostion interval mixing, to generate shuffle playlist for the described spacing value determined according to described determination module by the sequence number of music file described in each group;
Playing module, for the sequence number in the described shuffle playlist that generates according to described mixing module, plays corresponding music file.
8. device as claimed in claim 7, is characterized in that,
Described grouping module, is also grouped into multiple new sequence for repeatedly being carried out by described shuffle playlist;
Described determination module, the quantity also for the music file of answering according to sequence pair new described in each determines new spacing value;
Described mixing module, also for sequence new described in each group is carried out transpostion interval mixing according to described new spacing value, to generate new shuffle playlist;
Described playing module, also for according to the sequence number in described shuffle playlist, plays corresponding music file.
9. device as claimed in claim 7 or 8, it is characterized in that, described mixing module comprises:
Select module, for music file described in selection two groups any in music file described in each group;
Sequence generating module, for being arranged as two sequences separately by the sequence number of music file described in described two groups;
Mixing submodule, generates mixed sequence for described two sequences are carried out transpostion interval mixing every described spacing value;
Described selection module, also for music file described in selection one group any in music file described in each group;
Described mixing submodule, sequence also for the sequential orders of described selection module music file described in optional a group in music file described in each group is generated, carry out transpostion interval with described mixed sequence every described spacing value to mix, until the described shuffle playlist of sequence crossover interval mixing generation that the described music file of each group is corresponding.
10. device as claimed in claim 9, is characterized in that,
Described sequence generating module, also generates corresponding sequence for being arranged separately by the sequence number often organizing music file;
Described selection module, also for selecting two sequences arbitrarily in the sequence generated;
Described mixing submodule, also generates mixed sequence for described two sequences are carried out transpostion interval mixing every described spacing value;
Described mixing submodule, also for each described mixed sequence is carried out transpostion interval mixing every described spacing value, until the described shuffle playlist of sequence crossover interval mixing generation that the described music file of each group is corresponding.
11. devices as claimed in claim 10, is characterized in that,
Described mixing submodule, also carries out transpostion interval mixing in another sequence of a sequence in described two sequences being inserted in described two sequences every described spacing value, generates described mixed sequence.
12. devices as claimed in claim 11, is characterized in that,
Described device also comprises:
Adjust sequence module, for the sequence number in described playlist is divided into many groups, and exchange the order of many groups;
Described playing module, also for according to the sequence number in the new shuffle playlist generated after reversed order, plays corresponding music file.
CN201510046532.3A 2015-01-14 2015-01-29 A kind of music shuffle method and device Active CN104978981B (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
CN201510046532.3A CN104978981B (en) 2015-01-29 2015-01-29 A kind of music shuffle method and device
US15/542,830 US20170371882A1 (en) 2015-01-14 2016-01-13 Shuffle play method and device
PCT/CN2016/070798 WO2016112852A1 (en) 2015-01-14 2016-01-13 Shuffle play method and device
JP2017554636A JP6595617B2 (en) 2015-01-14 2016-01-13 Shuffle reproduction method and apparatus
MYPI2017702558A MY178495A (en) 2015-01-14 2016-01-13 Shuffle play method and device
EP16737077.4A EP3247125A4 (en) 2015-01-14 2016-01-13 Shuffle play method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510046532.3A CN104978981B (en) 2015-01-29 2015-01-29 A kind of music shuffle method and device

Publications (2)

Publication Number Publication Date
CN104978981A true CN104978981A (en) 2015-10-14
CN104978981B CN104978981B (en) 2017-08-01

Family

ID=54275432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510046532.3A Active CN104978981B (en) 2015-01-14 2015-01-29 A kind of music shuffle method and device

Country Status (1)

Country Link
CN (1) CN104978981B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016112852A1 (en) * 2015-01-14 2016-07-21 腾讯科技(深圳)有限公司 Shuffle play method and device
CN108255460A (en) * 2018-01-11 2018-07-06 上海展扬通信技术有限公司 Music shuffle method, mobile terminal and computer readable storage medium
CN113838488A (en) * 2020-06-24 2021-12-24 北京字节跳动网络技术有限公司 Audio playing packet generation method and device and audio playing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002061750A1 (en) * 2001-01-31 2002-08-08 Sonicblue Incorporated Method and apparatus for parametrically sorting music files
US20050152519A1 (en) * 2004-01-13 2005-07-14 Rush Scott A. Music navigator for digital audio playback
US20060269230A1 (en) * 2005-05-19 2006-11-30 Lg Electronics Inc. Method for randomly reproducing audio files
CN102054509A (en) * 2009-10-30 2011-05-11 炬力集成电路设计有限公司 Random playing method and device
US20120315012A1 (en) * 2011-06-09 2012-12-13 James Donald Mees Weighted Playlist

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002061750A1 (en) * 2001-01-31 2002-08-08 Sonicblue Incorporated Method and apparatus for parametrically sorting music files
US20050152519A1 (en) * 2004-01-13 2005-07-14 Rush Scott A. Music navigator for digital audio playback
US20060269230A1 (en) * 2005-05-19 2006-11-30 Lg Electronics Inc. Method for randomly reproducing audio files
CN102054509A (en) * 2009-10-30 2011-05-11 炬力集成电路设计有限公司 Random playing method and device
US20120315012A1 (en) * 2011-06-09 2012-12-13 James Donald Mees Weighted Playlist

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016112852A1 (en) * 2015-01-14 2016-07-21 腾讯科技(深圳)有限公司 Shuffle play method and device
CN108255460A (en) * 2018-01-11 2018-07-06 上海展扬通信技术有限公司 Music shuffle method, mobile terminal and computer readable storage medium
CN113838488A (en) * 2020-06-24 2021-12-24 北京字节跳动网络技术有限公司 Audio playing packet generation method and device and audio playing method and device
CN113838488B (en) * 2020-06-24 2023-03-14 北京字节跳动网络技术有限公司 Audio playing packet generation method and device and audio playing method and device

Also Published As

Publication number Publication date
CN104978981B (en) 2017-08-01

Similar Documents

Publication Publication Date Title
CN103490466B (en) Battery electric quantity shares method, device and server
CN104183250A (en) Method and system for synchronizing function of music player of intelligent device and Bluetooth headset
CN105094861A (en) Webpage application program loading method, device and system
CN105354093A (en) Memory management method and mobile terminal
CN106657528A (en) Incoming call management method and device
CN102595521A (en) Communication operating method, portable device including dual sim card and, network system supporting the same
CN104935744A (en) Verification code display method, verification code display device and mobile terminal
CN104660549A (en) Identity verification method and device
CN104683422A (en) Method and device for transmitting data
CN102149046B (en) Wireless Telecom Equipment and wireless communications method
CN104731808A (en) Browser webpage loading method and browser webpage loading device
CN106033337A (en) Instant-messaging emoticon generating method and device
CN104837057A (en) Video file playing method, device and system
CN104966526A (en) Random play method and apparatus
CN104239317A (en) Method and device for compiling pictures in browser
CN104978981B (en) A kind of music shuffle method and device
CN105704106B (en) A kind of visualization IVR implementation method and mobile terminal
CN108924647A (en) Video editing method, video editing apparatus, terminal
CN105681886B (en) Bluetooth connection control method, device and the playback equipment of playback equipment
CN106095132A (en) Playback equipment keypress function method to set up and device
CN105653195A (en) Screen capturing method and mobile terminal
CN104536781A (en) Terminal
CN104426685A (en) Information management method and apparatus
CN111857473B (en) Audio playing method and device and electronic equipment
CN105933492A (en) Phone number obtaining method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20161130

Address after: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F

Applicant after: Guangzhou KuGou Networks Co., Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518000 Zhenxing Road, SEG Science Park 2 East Room 403

Applicant before: Tencent Technology (Shenzhen) Co., Ltd.

GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: No. 315, Huangpu Avenue middle, Tianhe District, Guangzhou City, Guangdong Province

Patentee after: GUANGZHOU KUGOU COMPUTER TECHNOLOGY Co.,Ltd.

Address before: 510000 13F, building B1, 16 Keyun Road, Tianhe District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU KUGOU COMPUTER TECHNOLOGY Co.,Ltd.