CN104966526B - A kind of shuffle method and device - Google Patents

A kind of shuffle method and device Download PDF

Info

Publication number
CN104966526B
CN104966526B CN201510019186.XA CN201510019186A CN104966526B CN 104966526 B CN104966526 B CN 104966526B CN 201510019186 A CN201510019186 A CN 201510019186A CN 104966526 B CN104966526 B CN 104966526B
Authority
CN
China
Prior art keywords
multimedia file
cyclic structure
shuffle
playlist
multimedia
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510019186.XA
Other languages
Chinese (zh)
Other versions
CN104966526A (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
Guangzhou Kugou Computer Technology 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 Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201510019186.XA priority Critical patent/CN104966526B/en
Publication of CN104966526A publication Critical patent/CN104966526A/en
Priority to PCT/CN2016/070798 priority patent/WO2016112852A1/en
Priority to EP16737077.4A priority patent/EP3247125A4/en
Priority to JP2017554636A priority patent/JP6595617B2/en
Priority to MYPI2017702558A priority patent/MY178495A/en
Priority to US15/542,830 priority patent/US20170371882A1/en
Application granted granted Critical
Publication of CN104966526B publication Critical patent/CN104966526B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

A kind of shuffle method and device, the method includes:All of multimedia file in playlist to be played is divided at least one set, and one multimedia file cyclic structure of every group of generation;To each multimedia file cyclic structure, multimedia file is extracted according to the decimation rule for pre-setting, and be ranked up according to extraction order, obtain each corresponding shuffle playlist of multimedia file cyclic structure;Shuffle playlist according to obtaining is played out.Decimation rule by generating multimedia file cyclic structure and according to pre-setting extracts multimedia file generation shuffle playlist, so that the played probability of multimedia file is identical, a small number of multimedia files are repeated playing and situation that other multimedia files are never played when avoiding the occurrence of shuffle, can effectively improve Consumer's Experience.

Description

A kind of shuffle method and device
Technical field
The present invention relates to multimedia play technology field, more particularly to a kind of shuffle method and device.
Background technology
In the various apparatus for media playing of multimedia or system is related to, such as PC, mobile phone, portable media Playback equipment, network program request etc., a conventional function are to carry out shuffle to the multimedia file of certain amount, to play As a example by song, user after shuffle song is selected, multimedia play equipment or system play a song it Afterwards, the random song of selection one is played out.
However, in actual random selection process, being frequently encountered the multimedia file played in the short time Inside choose at random again and repeat playing, the number of times that some multimedia files are repeated playing is relatively more, and causes other not play Multimedia file be not selected at random broadcasting slowly, influence Consumer's Experience.
The content of the invention
In view of this, the present invention provides some multimedia files when one kind solves shuffle in the prior art and repeats playing Number of times it is more and some are either with or without the problem played.
A kind of shuffle method provided in an embodiment of the present invention, including:
All of multimedia file in playlist to be played is divided at least one set, and every group of generation is more than one Media file cyclic structure;
To multimedia file cyclic structure each described, multimedia file is extracted according to the decimation rule for pre-setting, and It is ranked up according to extraction order, obtains the corresponding shuffle playlist of described each described multimedia file cyclic structure;
The shuffle playlist according to obtaining is played out.
Shuffle device provided in an embodiment of the present invention, including:
Generation module is divided, for all of multimedia file in playlist to be played to be divided into at least one Group, and one multimedia file cyclic structure of every group of generation;
Abstraction module, for after the division generation module generation multimedia file cyclic structure, to described in each Multimedia file cyclic structure, extracts multimedia file, and arranged according to extraction order according to the decimation rule for pre-setting Sequence, obtains the corresponding shuffle playlist of described each described multimedia file cyclic structure;
Playing module, after obtaining the shuffle playlist in the abstraction module, according to obtaining with Machine playlist is played out.
As can be seen from the above technical solutions, the embodiment of the present invention has advantages below:
All of multimedia file in playlist to be played is divided at least one set, and every group by shuffle device One multimedia file cyclic structure of generation, to each multimedia file cyclic structure, takes out according to the decimation rule for pre-setting Multimedia file is taken, and is ranked up according to extraction order, obtain each corresponding shuffle of multimedia file cyclic structure List, and played out according to the multiple shuffle playlists for obtaining.By generating multimedia file cyclic structure and according to pre- The decimation rule for first setting extracts multimedia file generation shuffle playlist so that the played probability phase of multimedia file Together, it is to avoid a small number of multimedia files are repeated playing and situation that other multimedia files are never played when there is shuffle, Consumer's Experience can effectively be improved.
It is that above and other objects, features and advantages of the invention can be become apparent, preferred embodiment cited below particularly, And coordinate institute's accompanying drawings, it is described in detail below.
Brief description of the drawings
Fig. 1 is a schematic diagram of the structure of terminal in the embodiment of the present invention;
Fig. 2 is a schematic diagram of the flow of shuffle method in the embodiment of the present invention;
Fig. 3 is another schematic diagram of the flow of shuffle method in the embodiment of the present invention;
Fig. 4 is a schematic diagram of multimedia file cyclic structure in the embodiment of the present invention;
Fig. 5 is a schematic diagram of the structure of shuffle device in the embodiment of the present invention;
Fig. 6 is another schematic diagram of the structure of shuffle device in the embodiment of the present invention.
Specific embodiment
Further to illustrate the present invention to realize technological means and effect that predetermined goal of the invention is taken, below in conjunction with Accompanying drawing and preferred embodiment, to according to specific embodiment of the invention, structure, feature and its effect, describing in detail as after.
In embodiments of the present invention, the device of shuffle can be a part of device of terminal or terminal, refer to Fig. 1, in being the embodiment of the present invention, the schematic diagram of the structure of terminal, as shown in figure 1, terminal includes memory 102, storage control Device 104, one or more (one is only shown in figure) processor 106, Peripheral Interface 108, radio-frequency modules 110, locating module 112nd, photographing module 114, audio-frequency module 116, Touch Screen 118 and key-press module 120.These components pass through one or more Communication bus/holding wire 122 is mutually communicated.
It is appreciated that the structure shown in Fig. 1 is only to illustrate, terminal may also include more more or less than shown in Fig. 1 Component, or with the configuration different from shown in Fig. 1.Each component shown in Fig. 1 can be real using hardware, software or its combination It is existing
Memory 102 can be used to store software program and module, and the character in terminal such as in the embodiment of the present invention is defeated Enter the corresponding programmed instruction/module of method and device, processor 102 is by running software program of the storage in memory 104 And module, so as to perform various function application and data processing, that is, realize above-mentioned shuffle method.
Memory 102 may include high speed random access memory, may also include nonvolatile memory, such as one or more magnetic Property storage device, flash memory or other non-volatile solid state memories.In some instances, memory 102 can be further included The memory remotely located relative to processor 106, these remote memories can be by network connection to terminal.Above-mentioned network Example include but is not limited to internet, intranet, LAN, mobile radio communication and combinations thereof.Processor 106 and its He can be carried out under the control of storage control 104 in access of the possible component to memory 102.
Various input/output devices are coupled to CPU and memory 102 by Peripheral Interface 108.The operation of processor 106 is deposited Various softwares in reservoir 102, instruction are performing the various functions of terminal and carry out data processing.
In certain embodiments, Peripheral Interface 108, processor 106 and storage control 104 can be in one single chips Realize.In some other example, they can be realized by independent chip respectively.
Radio-frequency module 110 is used to receive and send electromagnetic wave, realizes the mutual conversion of electromagnetic wave and electric signal, so that with Communication network or other equipment are communicated.Radio-frequency module 110 may include the various existing electricity for performing these functions Circuit component, for example, antenna, RF transceiver, digital signal processor, encryption/deciphering chip, subscriber identity module (SIM) card, Memory etc..Radio-frequency module 110 can be communicated or led to various networks such as internet, intranet, wireless network Wireless network is crossed to be communicated with other equipment.Above-mentioned wireless network may include cellular telephone networks, WLAN or Metropolitan Area Network (MAN).Above-mentioned wireless network can use various communication standards, agreement and technology, and the including but not limited to whole world is mobile logical Letter system (Global System for Mobile Communication, GSM), enhanced mobile communication technology (Enhanced Data GSM Environment, EDGE), Wideband CDMA Technology (wideband code division Multiple access, W-CDMA), CDMA (Code division access, CDMA), tdma (time division multiple access, TDMA), bluetooth, adopting wireless fidelity technology (Wireless, Fidelity, WiFi) (such as IEEE-USA's standard IEEE 802.11a, IEEE 802.11b, IEEE802.11g and/ Or IEEE 802.11n), the networking telephone (Voice over internet protocal, VoIP), worldwide interoperability for microwave accesses (Worldwide Interoperability for Microwave Access, Wi-Max), other be used for mail, IMU The agreement of news and short message, and any other suitable communications protocol, or even may include that those are not developed currently yet Agreement.
Locating module 112 is used to obtain the current location of terminal.The example of locating module 112 includes but is not limited to the whole world and defends Star alignment system (GPS), the location technology based on WLAN or mobile radio communication.
Photographing module 114 is used to shoot photo or video.The photo or video of shooting can be stored to memory 102 It is interior, and can be sent by radio-frequency module 110.
Audio-frequency module 116 provides a user with COBBAIF, and it may include one or more microphones, one or more raises Sound device and voicefrequency circuit.Voicefrequency circuit receives voice data from Peripheral Interface 108, and voice data is converted into power information, Power information is transmitted to loudspeaker.Power information is converted to the sound wave that human ear can be heard by loudspeaker.Voicefrequency circuit is also from microphone Place receives power information, converts electrical signals to voice data, and by data transmission in network telephony to Peripheral Interface 108 entering traveling one The treatment of step.Voice data can be obtained from memory 102 or by radio-frequency module 110.Additionally, voice data can also Store into memory 102 or be transmitted by radio-frequency module 110.In some instances, audio-frequency module 116 may also include One earphone broadcasts hole, for providing COBBAIF to earphone or other equipment.
Touch Screen 118 provides an output and inputting interface simultaneously between terminal and user.Specifically, Touch Screen 118 show video frequency output to user, and the content of these video frequency outputs may include word, figure, video and its any combination.One A little output results correspond to some user interface objects.Touch Screen 118 also receives the input of user, the point of such as user The gesture operation such as hit, slide, the input so as to user interface object to these users is responded.Detect the technology of user input Can be based on resistance-type, condenser type or other any possible touch control detection technologies.The tool of the display module of Touch Screen 118 Body example includes but is not limited to liquid crystal display or light emitting polymer displays.
Key-press module 120 equally provides the interface that is input into terminal of user, user can by press it is different by Key is so that terminal performs different functions.
In order to be better understood from the technical scheme in the embodiment of the present invention, Fig. 2 is referred to, be random in the embodiment of the present invention The embodiment of player method, including:
201st, all of multimedia file in playlist to be played is divided at least one set, and every group of generation one Individual multimedia file cyclic structure;
In embodiments of the present invention, a number of multimedia file is included in multimedia play equipment or system, When user determines to carry out shuffle to a number of multimedia file, the device (hereinafter referred to as device) of shuffle will All of multimedia file in playlist to be played is divided at least one set, and one multimedia file ring of every group of generation Shape structure.
Wherein, multimedia file cyclic structure refers to and will be divided into one group of multimedia file to be arranged in a ring-type node Form.
Wherein, device can be smart mobile phone, PC, and PAD, Play System or portable multimedia broadcasting put equipment Etc..
202nd, to each multimedia file cyclic structure, multimedia file is extracted according to the decimation rule for pre-setting, and It is ranked up according to extraction order, obtains each corresponding shuffle playlist of multimedia file cyclic structure;
In embodiments of the present invention, device will be advised to each multimedia file cyclic structure according to the extraction for pre-setting Multimedia file is then extracted, and is ranked up according to extraction order, obtain each multimedia file cyclic structure corresponding random Playlist.If for example, generate four multimedia cyclic structures, to each multimedia cyclic structure according to setting in advance The decimation rule put generates a corresponding shuffle playlist, finally obtains four shuffle playlists.
Wherein, from multimedia file cyclic structure extract a multimedia file after, the multimedia file equivalent to Deleted from the multimedia file cyclic structure, the multimedia file will be no longer included in the multimedia file cyclic structure.
203rd, played out according to the shuffle playlist for obtaining.
In embodiments of the present invention, after shuffle playlist is obtained, then played according to the shuffle playlist for obtaining Multimedia file.
In embodiments of the present invention, all of multimedia file in playlist to be played is divided at least one by device Group, and one multimedia file cyclic structure of every group of generation, to each multimedia file cyclic structure, according to taking out for pre-setting Rule extraction multimedia file is taken, and is ranked up according to extraction order, obtain each multimedia file cyclic structure corresponding Shuffle playlist, and played out according to the multiple shuffle playlists for obtaining.By generating multimedia file cyclic structure And extract multimedia file generation shuffle playlist according to the decimation rule for pre-setting so that what multimedia file was played Probability is identical, it is to avoid when there is shuffle a small number of multimedia files repeated playing and what other multimedia files were never played Situation, can effectively improve Consumer's Experience.
Fig. 3 is referred to, is the embodiment of shuffle method in the embodiment of the present invention, including:
301st, by all of multimedia file in playlist to be played be divided into sequence it is at least one set of or Random division is at least one set, and one multimedia file cyclic structure of every group of generation;
In embodiments of the present invention, user after shuffle multimedia file is selected, device is by broadcasting to be played It is at least one set that all of multimedia file in list is divided at least one set of or random division in sequence, and every group of life Into a multimedia file cyclic structure.Wherein, the number of the multimedia file in each group can be the same or different, example Such as, if there are 100 multimedia files, two groups, every group of 50 multimedia files can be divided into, it is also possible to one group of 30 multimedia File, another group of 70 multimedia files.
Wherein, when all of multimedia file in playlist to be played being randomly divided into at least one set, Ke Yishi Non-conterminous multimedia file is randomly selected from playlist to be played and constitutes one group.
302nd, to each multimedia file cyclic structure, multimedia file is extracted according to the decimation rule for pre-setting, and It is ranked up according to extraction order, obtains each corresponding shuffle playlist of multimedia file cyclic structure;Perform step 303 Or step 304;
In embodiments of the present invention, device by each multimedia file cyclic structure according to the decimation rule for pre-setting Multimedia file is extracted, and is ranked up according to extraction order, obtain each multimedia file cyclic structure corresponding with machine sowing Table is emplaced, specifically:
To each multimedia file cyclic structure, the initial value of i is 1, and i is positive integer, and the 1st multimedia file is Any one multimedia file in multimedia file cyclic structure;And perform following steps:
Step 1:In multimedia file cyclic structure, forward or m multimedia is counted up from i-th multimedia file File, using the m+1 multimedia file as i+1 multimedia file, m is positive integer;
Step 2:The i-th multimedia file is extracted, as i-th multimedia file in shuffle playlist, i=i+1 is made, Return perform in step 1 from i-th multimedia file forward or the step of count up m multimedia file.
Method in order to be better understood from above-mentioned generation shuffle playlist, refers to Fig. 4, is a multimedia file The schematic diagram of cyclic structure, wherein, the numeral in a node on behalf one multimedia file, and node is multimedia file Mark.
Wherein, if the 1st multimedia file node 5, and according to clockwise direction extract multimedia file, the number of m It is 3, then according to the generation method of above-mentioned shuffle playlist, the 2nd multimedia file is node 9, extracts the 1st multimedia File is node 5, continues clockwise direction 3 nodes of number, using node 13 as the 3rd multimedia file, extracts matchmaker more than the 2nd Body file is node 9, by that analogy, the playing sequence of the shuffle playlist for finally obtaining is node 5,9,13,2,7,12,3, 10、1、11、6、4、8、15、14。
In embodiments of the present invention, for each multimedia file cyclic structure, can also generate as follows Shuffle playlist, specifically:
The initial value of i is 1, and i is positive integer, and the 1st multimedia file is appointing in multimedia file cyclic structure One multimedia file of meaning;And perform following steps:
Step 1:I-th multimedia file is extracted from multimedia file cyclic structure as in shuffle playlist I multimedia file;
Step 2:Start forward or count up with position of i-th multimedia file in multimedia file cyclic structure M multimedia file, using the m+1 multimedia file as i+1 multimedia file, makes i=i+1, returns and performs from many Step of i-th multimedia file as i-th multimedia file in shuffle playlist is extracted in media file cyclic structure Suddenly, m is positive integer.
In order to be better understood from the generation of above-mentioned shuffle playlist, Fig. 4 is referred to, Fig. 4 is multimedia file ring-type The schematic diagram of structure, wherein, node represents multimedia file, and the numeral of node represents the mark of multimedia file.
If the 1st multimedia file is node 10, the 1st multimedia file is extracted from multimedia file cyclic structure I.e. node 10,2 multimedia files of number forward are started with the position of node 10, the 3rd multimedia file that will be counted to as with The 2nd multimedia file in machine playlist is node 13, and continues to extract, broadcasting in the shuffle playlist for finally obtaining Sequence is put forward for node 10,13,1,4,7,11,15,5,9,2,8,3,14,6,12.
It is it should be noted that in embodiments of the present invention, the numerical value of m can be arranged as required to and many for different Media file cyclic structure, the numerical value of m can be the same or different, and not limit herein.
If it should be noted that the number of the last remaining node of multimedia file cyclic structure is less than
M+1, then when m+1 multimedia file is extracted, same node can be counted at least one times, for example:If last Remaining node 10 and node 5, and the number of m is 4, and since node 10, then several modes is node 10, node 5, node 10, node 5, node 10, the 5th node counted to is node 10, then extract node 10;If multimedia file cyclic structure is last The number of remaining node be 1 when, using the last remaining node as shuffle playlist last multimedia File.
If the 303, only one of which shuffle playlist, broadcast according to the order of multimedia file in shuffle playlist Put;
If the 304, having two and two or more shuffle playlist, two and two or more shuffle playlist are combined Played out into a list and by the order of multimedia file.
In embodiments of the present invention, device is by all of multimedia file when at least one set is divided into, if only one group, Then only one of which shuffle playlist, and if only one of which shuffle playlist, device is by according in the shuffle playlist The order of multimedia file is played out so that can not only realize the shuffle of multimedia file, and each multimedia File will all be played to, and the experience of user is preferable.Device by all of multimedia file when at least one set is divided into, if having two Individual or more than two group, then two or more shuffle playlists will be obtained, and if having two or more Shuffle playlist, then can be combined into a list and according to multimedia file by two or more shuffle playlists Order play out.
Wherein, two or more shuffle playlists being combined into a list can be:With shuffle playlist Be unit, two or more shuffle playlists be ranked into a total shuffle playlist, according to this it is total with The order of the multimedia file in machine playlist is played out, for example:It is respectively list 1 if there is three shuffle playlists, List 2, list 3, and total shuffle playlist is constituted according to list 1, list 3, list 2, therefore, finish list 1 in order In multimedia file after, by the 1st multimedia file in playlist 3, and many matchmakers in list 3 is finished in order After body file, by the 1st multimedia file in playlist 2, and the multimedia file in list 2 is finished in order.
Or, two or more shuffle playlists are combined into a list can also be:First determine this two Or the extraction of two or more shuffle playlist is sequentially, and according to extraction order successively from this two or more with machine sowing The multimedia file that the casing that sorts in each shuffle playlist is extracted in table is emplaced, and obtains a total shuffle row Table, for example:If having 3 shuffle playlists, respectively list 1, list 2, list 3, if extraction order for list 3, list 1, List 2, then according to the extraction sequentially, first extract the 1st multimedia file in list 3, then extract in list 1 more than the 1st Media file, then the 1st multimedia file in list 2 is extracted, then, the 2nd multimedia file in list 3 is extracted, then The 2nd multimedia file in list 1 is extracted, then extracts the 2nd multimedia file in list 2, by that analogy, finally obtained total Shuffle playlist, and if list 1 and list 2 are different with the number of the multimedia file in list 3, in extraction process In, it is surplus during the list, and continuation are extracted from original extraction order to remaining list after a list has been extracted Remaining multimedia file is extracted according to the order in shuffle playlist, for example:If the multimedia file in list 1 Number is 30, and multimedia file number in list 2 is 40, and the multimedia file number in list 3 is 50, then extracted it is each Extracted after the 30th multimedia file 1 in individual shuffle playlist, in list 1 and be over, then extract the 31st in list 2 Multimedia file, then the 31st multimedia file in list 3 is extracted, continue to extract the 31st multimedia file in list 2, And extract successively, until after the 40th multimedia file in having extracted list 2 and list 3, the multimedia file in list 2 Also extract and be over, 10 multimedia files are there remains in list 3, then arrange remaining 10 multimedia files in the list 3 It is listed in the last of total shuffle playlist.
In embodiments of the present invention, device can in sequence be drawn all multimedia files in playlist to be played It is at least one set to be divided at least one set of or random division, and one multimedia file cyclic structure of every group of generation, many to each Media file cyclic structure, multimedia file is extracted according to the decimation rule for pre-setting, and is ranked up according to extraction order, Obtain each corresponding shuffle playlist of multimedia file cyclic structure, and if only one of which shuffle playlist, according to The order of multimedia file is played out in the shuffle playlist, if there is two or more shuffle playlists, will Two or more shuffle playlists are combined into a list and are played out by the order of multimedia file.By life Into multimedia file cyclic structure and multimedia file is extracted from multimedia file cyclic structure by way of extracting to generate Shuffle playlist so that multimedia file is identical by the probability of shuffle, it is to avoid when appearing in shuffle some The broadcasting time of multimedia file is more and situation that some multimedia files are not all played once, can effectively improve use The experience at family.
In embodiments of the present invention, if under shuffle state, the multimedia file in the shuffle playlist of generation It has been played that, then the multimedia file in the loop play shuffle playlist, or according to the skill in the embodiment of the present invention Art scheme, regenerates shuffle playlist and plays out, in actual applications, can as needed depending on, do not limit herein.
It should be noted that being that multimedia is realized by way of generating shuffle playlist in embodiments of the present invention The shuffle of file, in actual applications, if the time interval of adjacent shuffle twice be less than pre-set when Between be worth, then when shuffle is carried out for the second time, can be used last shuffle playlist, and from last shuffle knot Next multimedia file of multimedia file during beam is commenced play out, or, new shuffle playlist is regenerated, if phase The time interval of adjacent shuffle twice is more than the time value for pre-setting, then when shuffle is carried out for the second time, can make With last shuffle playlist, and can be from next multimedia of the multimedia file at the end of last shuffle text Part is commenced play out, it is also possible to commenced play out from the starting position of the shuffle playlist.Shuffle playlist in actual applications Renewal and using that can set according to specific circumstances, do not limit herein.
Fig. 5 is referred to, is a kind of embodiment of the structure of shuffle device in the embodiment of the present invention, including:
Generation module 501 is divided, for all of multimedia file in playlist to be played to be divided at least One group, and one multimedia file cyclic structure of every group of generation;
Abstraction module 502, for after the division generation module 501 generation multimedia file cyclic structure, to every The individual multimedia file cyclic structure, multimedia file is extracted according to the decimation rule for pre-setting, and according to extraction sequentially It is ranked up, obtains the corresponding shuffle playlist of described each described multimedia file cyclic structure;
Playing module 503, after obtaining the shuffle playlist in the abstraction module 502, according to what is obtained The shuffle playlist is played out.
In embodiments of the present invention, the division generation module 501 in shuffle device is by playlist to be played All of multimedia file be divided at least one set, and one multimedia file cyclic structure of every group of generation;Then by extracting Module 502 extracts multimedia file, and press to multimedia file cyclic structure each described according to the decimation rule for pre-setting It is ranked up according to extraction order, obtains the corresponding shuffle playlist of described each described multimedia file cyclic structure;Finally Playing module 503 is played out according to the shuffle playlist for obtaining.
In embodiments of the present invention, all of multimedia file in playlist to be played is divided at least one by device Group, and one multimedia file cyclic structure of every group of generation, to each multimedia file cyclic structure, according to taking out for pre-setting Rule extraction multimedia file is taken, and is ranked up according to extraction order, obtain each multimedia file cyclic structure corresponding Shuffle playlist, and played out according to the multiple shuffle playlists for obtaining.By generating multimedia file cyclic structure And extract multimedia file generation shuffle playlist according to the decimation rule for pre-setting so that what multimedia file was played Probability is identical, it is to avoid when there is shuffle a small number of multimedia files repeated playing and what other multimedia files were never played Situation, can effectively improve Consumer's Experience.
In order to be better understood from the technical scheme in the embodiment of the present invention, Fig. 6 is referred to, be random in the embodiment of the present invention The embodiment of the structure of playing device, including:Division generation module 501 in embodiment as shown in Figure 5, abstraction module 502 and Playing module 503, and it is similar to the content described in embodiment illustrated in fig. 5, do not limit herein.
In embodiments of the present invention, abstraction module 502 includes the first determining module 601 and the first file abstraction module 602, And be 1 in the initial value of i to multimedia file cyclic structure each described, and i is positive integer, and the 1st multimedia file is On the premise of any one multimedia file in the multimedia file cyclic structure:
First determining module 601, in the multimedia file cyclic structure, from i-th multimedia file to Preceding or count up m multimedia file, using the m+1 multimedia file as i+1 multimedia file, the m is just whole Number;
First file abstraction module 602, for extracting i-th multimedia file, as in the shuffle playlist I-th multimedia file, make i=i+1, return and perform first determining module 601.
In order to be better understood from above-mentioned the first determining module 601 and the first file abstraction module 602, Fig. 4 is referred to, be One schematic diagram of multimedia file cyclic structure, wherein, the numeral in a node on behalf one multimedia file, and node It is the mark of multimedia file.
Wherein, if the 1st multimedia file node 5, and according to clockwise direction extract multimedia file, the number of m It is 3, then according to the generation method of above-mentioned shuffle playlist, the 2nd multimedia file is node 9, extracts the 1st multimedia File is node 5, continues clockwise direction 3 nodes of number, using node 13 as the 3rd multimedia file, extracts matchmaker more than the 2nd Body file is node 9, by that analogy, the playing sequence of the shuffle playlist for finally obtaining is node 5,9,13,2,7,12,3, 10、1、11、6、4、8、15、14。
Or, in embodiments of the present invention, abstraction module 502 includes that the second file abstraction module 603 and second determines mould Block 604, is 1 in the initial value of i, and i is positive integer, and the 1st multimedia file is in the multimedia file cyclic structure Any one multimedia file on the premise of:
The second file abstraction module 603, for extracting i-th multimedia text from the multimedia file cyclic structure Part is used as i-th multimedia file in the shuffle playlist;
Second determining module 604, for i-th multimedia file in the multimedia file cyclic structure Position start forward or count up m multimedia file, using the m+1 multimedia file as i+1 multimedia text Part, makes i=i+1, returns and performs the second file abstraction module 603, and the m is positive integer.
In order to be better understood from above-mentioned second file abstraction module 603 and the second determining module 604, Fig. 4, Fig. 4 are referred to It is the schematic diagram of multimedia file cyclic structure, wherein, node represents multimedia file, and the numeral of node represents multimedia file Mark.
If the 1st multimedia file is node 10, the 1st multimedia file is extracted from multimedia file cyclic structure I.e. node 10,2 multimedia files of number forward are started with the position of node 10, the 3rd multimedia file that will be counted to as with The 2nd multimedia file in machine playlist is node 13, and continues to extract, broadcasting in the shuffle playlist for finally obtaining Sequence is put forward for node 10,13,1,4,7,11,15,5,9,2,8,3,14,6,12.
It is it should be noted that in embodiments of the present invention, the numerical value of m can be arranged as required to and many for different Media file cyclic structure, the numerical value of m can be the same or different, and not limit herein.
If it should be noted that the number of the last remaining node of multimedia file cyclic structure is less than m+1, extracting During m+1 multimedia file, same node can be counted at least one times, for example:If last residue node 10 and node 5, and m Number be 4, and since node 10, then several modes is node 10, node 5, node 10, node 5, the number of node the 10, the 5th The node for arriving is node 10, then extract node 10;If the number of the last remaining node of multimedia file cyclic structure is 1 When, using the last remaining node as shuffle playlist last multimedia file.
In embodiments of the present invention, playing module 503 specifically for:If shuffle playlist described in only one of which, presses Order according to multimedia file in the shuffle playlist is played out;If there is shuffle described in two and two or more to arrange Table, then be combined into shuffle playlist described in described two and two or more a list and enter by the order of multimedia file Row is played.
Wherein, two or more shuffle playlists are combined into a list by playing module 503 can be:With with Machine playlist is unit, and two or more shuffle playlists are ranked into a total shuffle playlist, is pressed Order according to the multimedia file in total shuffle playlist is played out, for example:If there is three shuffle playlists, point It is not list 1, list 2, list 3, and total shuffle playlist is constituted according to list 1, list 3, list 2, therefore, in order Finish after the multimedia file in list 1, by the 1st multimedia file in playlist 3, and finishing list in order After multimedia file in 3, by the 1st multimedia file in playlist 2, and many matchmakers in list 2 are finished in order Body file.
Or, two or more shuffle playlists are combined into a list can also be:First determine this two Or the extraction of two or more shuffle playlist is sequentially, and according to extraction order successively from this two or more with machine sowing The multimedia file that the casing that sorts in each shuffle playlist is extracted in table is emplaced, and obtains a total shuffle row Table, for example:If having 3 shuffle playlists, respectively list 1, list 2, list 3, if extraction order for list 3, list 1, List 2, then according to the extraction sequentially, first extract the 1st multimedia file in list 3, then extract in list 1 more than the 1st Media file, then the 1st multimedia file in list 2 is extracted, then, the 2nd multimedia file in list 3 is extracted, then The 2nd multimedia file in list 1 is extracted, then extracts the 2nd multimedia file in list 2, by that analogy, finally obtained total Shuffle playlist, and if list 1 and list 2 are different with the number of the multimedia file in list 3, in extraction process In, it is surplus during the list, and continuation are extracted from original extraction order to remaining list after a list has been extracted Remaining multimedia file is extracted according to the order in shuffle playlist, for example:If the multimedia file in list 1 Number is 30, and multimedia file number in list 2 is 40, and the multimedia file number in list 3 is 50, then extracted it is each Extracted after the 30th multimedia file 1 in individual shuffle playlist, in list 1 and be over, then extract the 31st in list 2 Multimedia file, then the 31st multimedia file in list 3 is extracted, continue to extract the 31st multimedia file in list 2, And extract successively, until after the 40th multimedia file in having extracted list 2 and list 3, the multimedia file in list 2 Also extract and be over, 10 multimedia files are there remains in list 3, then arrange remaining 10 multimedia files in the list 3 It is listed in the last of total shuffle playlist.
In embodiments of the present invention, divide generation module 501 specifically for:By the institute in the playlist to be played It is at least one set that some multimedia files are divided at least one set of or random division in sequence, and every group of generation matchmaker more than Body file cyclic structure.
Wherein, the number of the multimedia file in each group can be the same or different, if for example, having matchmaker more than 100 Body file, then can be divided into two groups, every group of 50 multimedia files, it is also possible to one group of 30 multimedia file, another group 70 Multimedia file.
In embodiments of the present invention, generation module 501 is divided by the played column to be played in shuffle device It is at least one set that all of multimedia file in table is divided at least one set of or random division in sequence, and every group of generation One multimedia file cyclic structure;Then by abstraction module 502 to multimedia file cyclic structure each described, according to advance The decimation rule of setting extracts multimedia file, and is ranked up according to extraction order, obtains described each described multimedia text The corresponding shuffle playlist of part cyclic structure;Specifically, to multimedia file cyclic structure each described, in the initial value of i It is 1, and i is positive integer, and the 1st multimedia file is any one multimedia text in the multimedia file cyclic structure On the premise of part, the first determining module 601 in abstraction module 502 from i-th multimedia file forward or count up m it is many Media file, using the m+1 multimedia file as i+1 multimedia file, the m is positive integer;And taken out by the first file Modulus block 602 extracts i-th multimedia file, as i-th multimedia file in the shuffle playlist, makes i=i + 1, return and perform first determining module 601, or, the second file abstraction module 603 in abstraction module 502 is from described I-th multimedia file is extracted in multimedia file cyclic structure as the i-th multimedia text in the shuffle playlist Part;And the position by the second determining module 604 with i-th multimedia file in the multimedia file cyclic structure is opened Begin forward or count up m multimedia file, using the m+1 multimedia file as i+1 multimedia file, make i=i + 1, return and perform the second file abstraction module 603, the m is positive integer.If shuffle row described in last only one of which Table, then playing module 503 played out according to the order of multimedia file in the shuffle playlist;If there is two and two The above shuffle playlist, then playing module 503 shuffle playlist described in described two and two or more is combined into One list is simultaneously played out by the order of multimedia file.
In embodiments of the present invention, device can in sequence be drawn all multimedia files in playlist to be played It is at least one set to be divided at least one set of or random division, and one multimedia file cyclic structure of every group of generation, many to each Media file cyclic structure, multimedia file is extracted according to the decimation rule for pre-setting, and is ranked up according to extraction order, Obtain each corresponding shuffle playlist of multimedia file cyclic structure, and if only one of which shuffle playlist, according to The order of multimedia file is played out in the shuffle playlist, if there is two or more shuffle playlists, will Two or more shuffle playlists are combined into a list and are played out by the order of multimedia file.By life Into multimedia file cyclic structure and multimedia file is extracted from multimedia file cyclic structure by way of extracting to generate Shuffle playlist so that multimedia file is identical by the probability of shuffle, it is to avoid when appearing in shuffle some The broadcasting time of multimedia file is more and situation that some multimedia files are not all played once, can effectively improve use The experience at family.
The above, is only presently preferred embodiments of the present invention, and any formal limitation is not made to the present invention, though So the present invention is disclosed above with preferred embodiment, but is not limited to the present invention, any to be familiar with this professional technology people Member, without departing from the scope of the present invention, when making a little change or modification using the technology contents of the disclosure above It is the Equivalent embodiments of equivalent variations, as long as being without departing from technical solution of the present invention content, according to technical spirit pair of the invention Any simple modification, equivalent variations and modification that above example is made, still fall within the range of technical solution of the present invention.

Claims (10)

1. a kind of shuffle method, it is characterised in that including:
All of multimedia file in playlist to be played is divided at least one set, and one multimedia of every group of generation File cyclic structure;
To multimedia file cyclic structure each described, according to the decimation rule extraction multimedia file for pre-setting, and according to Extraction order is ranked up, and obtains the corresponding shuffle playlist of described each described multimedia file cyclic structure;
The shuffle playlist according to obtaining is played out;
It is described to multimedia file cyclic structure each described, according to the decimation rule for pre-setting extract multimedia file it Afterwards, also include:
To multimedia file cyclic structure each described, the multimedia file that will be extracted is from the multimedia file cyclic structure Middle deletion;
Methods described also includes:
If the time interval of adjacent shuffle twice is less than default time value, when shuffle is carried out for the second time, It is using last shuffle playlist and literary from next multimedia of the multimedia file at the end of last shuffle Part is commenced play out, if the time interval of adjacent shuffle twice is more than the default time value, from it is last with First multimedia file of machine playlist is commenced play out.
2. method according to claim 1, it is characterised in that described to multimedia file cyclic structure each described, presses Multimedia file is extracted according to the decimation rule that pre-sets, and is ranked up according to extraction order, obtain that described each is described more The corresponding shuffle playlist of media file cyclic structure, including:
To multimedia file cyclic structure each described, following steps are performed:
The initial value of i is 1, and i is positive integer, and the 1st multimedia file is appointing in the multimedia file cyclic structure One multimedia file of meaning;
In the multimedia file cyclic structure, forward or m multimedia file is counted up from i-th multimedia file, Using the m+1 multimedia file as i+1 multimedia file, the m is positive integer;
I-th multimedia file is extracted, as i-th multimedia file in the shuffle playlist, i=i+1 is made, returned Described in receipt row from i-th multimedia file forward or the step of count up m multimedia file.
3. method according to claim 1, it is characterised in that described to multimedia file cyclic structure each described, presses Multimedia file is extracted according to the decimation rule that pre-sets, and is ranked up according to extraction order, obtain that described each is described more The corresponding shuffle playlist of media file cyclic structure, including:
To multimedia file cyclic structure each described, following steps are performed:
The initial value of i is 1, and i is positive integer, and the 1st multimedia file is appointing in the multimedia file cyclic structure One multimedia file of meaning;
I-th multimedia file is extracted from the multimedia file cyclic structure as i-th in the shuffle playlist Individual multimedia file;
Start forward or count up m with position of i-th multimedia file in the multimedia file cyclic structure Individual multimedia file, using the m+1 multimedia file as i+1 multimedia file, makes i=i+1, return perform it is described from I-th multimedia file is extracted in the multimedia file cyclic structure as i-th in the shuffle playlist The step of multimedia file, the m is positive integer.
4. the method according to claims 1 to 3 any one, it is characterised in that it is described with machine sowing that the basis is obtained Emplace table play out including:
If shuffle playlist described in only one of which, broadcast according to the order of multimedia file in the shuffle playlist Put;
If there is shuffle playlist described in two and two or more, by shuffle playlist described in described two and two or more It is combined into a list and is played out by the order of multimedia file.
5. the method according to claims 1 to 3 any one, it is characterised in that described by playlist to be played All of multimedia file be divided at least one set, and one multimedia file cyclic structure of every group of generation includes:
All of multimedia file in the playlist to be played is divided into sequence at least one set of or random It is divided at least one set, and one multimedia file cyclic structure of every group of generation.
6. a kind of shuffle device, it is characterised in that including:
Generation module is divided, for all of multimedia file in playlist to be played to be divided into at least one set, and One multimedia file cyclic structure of every group of generation;
Abstraction module, for after the division generation module generation multimedia file cyclic structure, to many matchmakers each described Body file cyclic structure, multimedia file is extracted according to the decimation rule for pre-setting, and is ranked up according to extraction order, is obtained To the corresponding shuffle playlist of described each described multimedia file cyclic structure;
Playing module, after obtaining the shuffle playlist in the abstraction module, with machine sowing according to obtaining Table is emplaced to play out;
The playing module, is additionally operable to:
To multimedia file cyclic structure each described, the multimedia file that will be extracted is from the multimedia file cyclic structure Middle deletion;
The playing module, is additionally operable to:
If the time interval of adjacent shuffle twice is less than default time value, when shuffle is carried out for the second time, It is using last shuffle playlist and literary from next multimedia of the multimedia file at the end of last shuffle Part is commenced play out, if the time interval of adjacent shuffle twice is more than the default time value, is carried out for the second time During shuffle, commenced play out from first multimedia file of last shuffle playlist.
7. device according to claim 6, it is characterised in that to multimedia file cyclic structure each described, i's is initial It is 1 to be worth, and i is positive integer, and the 1st multimedia file is any one multimedia in the multimedia file cyclic structure File;
The abstraction module includes:
First determining module, in the multimedia file cyclic structure, from i-th multimedia file forward or backward M multimedia file of number, using the m+1 multimedia file as i+1 multimedia file, the m is positive integer;
First file abstraction module, for extracting i-th multimedia file, as i-th in the shuffle playlist Multimedia file, makes i=i+1, returns and performs first determining module.
8. device according to claim 6, it is characterised in that to multimedia file cyclic structure each described, i's is initial It is 1 to be worth, and i is positive integer, and the 1st multimedia file is any one multimedia in the multimedia file cyclic structure File;
The abstraction module includes:
Second file abstraction module, for extracting i-th multimedia file as institute from the multimedia file cyclic structure State i-th multimedia file in shuffle playlist;
Second determining module, opens for the position with i-th multimedia file in the multimedia file cyclic structure Begin forward or count up m multimedia file, using the m+1 multimedia file as i+1 multimedia file, make i=i + 1, return and perform the second file abstraction module, the m is positive integer.
9. the device according to claim 6 to 8 any one, it is characterised in that the playing module specifically for:If only There is a shuffle playlist, then played out according to the order of multimedia file in the shuffle playlist;If having Two and shuffle playlist described in two or more, then be combined into one by shuffle playlist described in described two and two or more Individual list is simultaneously played out by the order of multimedia file.
10. the device according to claim 6 to 8 any one, it is characterised in that the division generation module is specifically used In:
All of multimedia file in the playlist to be played is divided into sequence at least one set of or random It is divided at least one set, and one multimedia file cyclic structure of every group of generation.
CN201510019186.XA 2015-01-14 2015-01-14 A kind of shuffle method and device Active CN104966526B (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
CN201510019186.XA CN104966526B (en) 2015-01-14 2015-01-14 A kind of shuffle method and device
PCT/CN2016/070798 WO2016112852A1 (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
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
US15/542,830 US20170371882A1 (en) 2015-01-14 2016-01-13 Shuffle play method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510019186.XA CN104966526B (en) 2015-01-14 2015-01-14 A kind of shuffle method and device

Publications (2)

Publication Number Publication Date
CN104966526A CN104966526A (en) 2015-10-07
CN104966526B true CN104966526B (en) 2017-06-23

Family

ID=54220553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510019186.XA Active CN104966526B (en) 2015-01-14 2015-01-14 A kind of shuffle method and device

Country Status (1)

Country Link
CN (1) CN104966526B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MY178495A (en) * 2015-01-14 2020-10-14 Guangzhou Kugou Computer Tech Co Ltd Shuffle play method and device
CN105468764B (en) * 2015-12-02 2019-07-02 广州欢聚时代信息科技有限公司 A kind of data processing method, device and cluster service system
CN109033409B (en) * 2018-08-03 2022-03-01 华北水利水电大学 Double random extraction method
CN109561323B (en) * 2019-01-02 2021-11-12 武汉珈铭汉象教育科技有限公司 MP4 file encryption and decryption method and device
CN112527737B (en) * 2020-12-21 2022-06-17 武汉光庭信息技术股份有限公司 Vehicle-mounted media file scanning method, transmission method and system

Citations (2)

* 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
CN102054509A (en) * 2009-10-30 2011-05-11 炬力集成电路设计有限公司 Random playing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
US9147435B2 (en) * 2011-06-09 2015-09-29 Sony Computer Entertainment America Llc Weighted playlist

Patent Citations (2)

* 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
CN102054509A (en) * 2009-10-30 2011-05-11 炬力集成电路设计有限公司 Random playing method and device

Also Published As

Publication number Publication date
CN104966526A (en) 2015-10-07

Similar Documents

Publication Publication Date Title
CN104966526B (en) A kind of shuffle method and device
CN109246671B (en) Data transmission method, device and system
CN103607678B (en) A kind of wireless synchronization audio amplifier
CN105722059B (en) Mobile terminal and communication method of dual-modem system
CN109792746A (en) Time-domain resource distribution method, data transmission method for uplink, base station and terminal
CN104183250A (en) Method and system for synchronizing function of music player of intelligent device and Bluetooth headset
CN109273017A (en) Coding control method, device and electronic equipment
RU2733208C1 (en) Method and device for transmitting data, as well as computer-readable data medium
CN108476508A (en) Downlink data packet configuration method and device
CN104837057A (en) Video file playing method, device and system
CN107613369A (en) Video broadcasting method, device and electronic equipment based on GStreamer frameworks
CN106101868A (en) Reduced graph generating method and generating means
CN108124056A (en) The anti-interference method and Related product of electronic equipment
CN106653068A (en) Audio data playing method, device and terminal
CN105653195B (en) Screenshotss method and mobile terminal
CN104167216B (en) A kind of audio file sharing method, device and audio amplifier
CN106095132B (en) Playback equipment keypress function setting method and device
CN106599173A (en) Lyric matching method and terminal
CN105704106B (en) A kind of visualization IVR implementation method and mobile terminal
CN106294707A (en) A kind of countdown information output intent and device
CN104092720B (en) The sharing method of playlist and device
CN110115088A (en) Resource indicating method, device, system and storage medium in unlicensed spectrum
CN104978981B (en) A kind of music shuffle method and device
CN104575548A (en) File playing positioning method and device as well as terminal
CN106060620A (en) One-key interaction method and system based on remote controller, and first client

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.