CN101650736B - Method for realizing random playing in multimedia player - Google Patents

Method for realizing random playing in multimedia player Download PDF

Info

Publication number
CN101650736B
CN101650736B CN2009101123455A CN200910112345A CN101650736B CN 101650736 B CN101650736 B CN 101650736B CN 2009101123455 A CN2009101123455 A CN 2009101123455A CN 200910112345 A CN200910112345 A CN 200910112345A CN 101650736 B CN101650736 B CN 101650736B
Authority
CN
China
Prior art keywords
file
random number
tabulation
player
played
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
CN2009101123455A
Other languages
Chinese (zh)
Other versions
CN101650736A (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.)
Rockchip Electronics Co Ltd
Original Assignee
Fuzhou Rockchip Electronics 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 Fuzhou Rockchip Electronics Co Ltd filed Critical Fuzhou Rockchip Electronics Co Ltd
Priority to CN2009101123455A priority Critical patent/CN101650736B/en
Publication of CN101650736A publication Critical patent/CN101650736A/en
Application granted granted Critical
Publication of CN101650736B publication Critical patent/CN101650736B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method for realizing random playing in a multimedia player, which comprises the following steps: initializing an ID list of document by a controller; generating a random number which is less than the document number range of documents which are not played by a random number generator; extracting the ID of a corresponding document of the random number from the ID list ofthe document by using the random number; exchanging the ID with IDs which are sequentially counted from the rear part in the ID list of the document and are not exchanged; searching information of the corresponding document of the ID from a database by using the ID and playing the corresponding document of the ID by using the player; and ending the playing of the document, regenerating the randomnumber which is less than the number range of the document which is not played by the random number generator and ending the playing until all documents are played. The method has the advantages that: 1. each document is only played once; and 2, the played sequence is stored by using less memory, thereby having the function of back playing.

Description

In multimedia player, realize the method for shuffle
[technical field]
The invention relates to a kind of data processing method, be meant the method that in multimedia player, realizes shuffle especially.
[background technology]
The media player that has gone on the market at present substantially all has the function of shuffle, it utilizes random number generator to produce a random number, from file ID tabulation, search corresponding media file according to this random number and play by player then, thereby reach the function of shuffle.Yet said method can't guarantee All Files and only be played once in same circulation, so repeatedly be played and some can not be played when the user can run into some in played file.
To sum up, there is following shortcoming in the shuffle method of existing media player:
1, same file can be repeated to play;
2, can not write down the order of having play.
At above-mentioned first kind of shortcoming, Chinese invention patent application 200510123237.X number, name is called the method that " random playing system and method " disclosed a kind of shuffle, but the method for this shuffle does not have the function of the document order that record play, and operational method is very complicated, and travelling speed is very slow.
[summary of the invention]
Technical matters to be solved by this invention is to provide a kind of can calculate the file that is not played at random with fast speeds, makes each corresponding file of file ID tabulation all can be played once the method that realizes shuffle in multimedia player.
The present invention solves the problems of the technologies described above by the following technical programs: a kind of method that realizes shuffle in multimedia player, wherein said multimedia player comprises controller, random number generator, the file ID tabulation, database, and player, its middle controller control random number generator, the file ID tabulation, database, and player, realize the function of total system, random number generator generates the random number in the specified scope, the file ID list records is not play the ID with the file of having broadcast, database is deposited the information of All Files, can find the information of this document by the ID of file, the player resolution file, the described method of shuffle that realizes in multimedia player comprises the steps:
Step 1: at first controller carries out initialization to file ID tabulation, promptly the corresponding All Files of file ID tabulation is carried out serial number, and according to number order each file is established an ID, establishes the file ID corresponding N file of tabulating;
Step 2: controller controls playing device specifically comprises the steps: N file shuffle one time
Step 21: the random number A that at first generates 1~N scope by random number generator;
Step 22: the ID that from the file ID tabulation, takes out A file;
Step 23: the ID exchange of N file in the ID of A file in the file ID tabulation and the file ID tabulation;
Step 24: the information of removing to search in the database this A file with the ID of A file, and with this A file of player plays;
Step 25: finish the broadcast of this A file;
Step 26: generate a random number less than the file number scope that is not played by random number generator;
Step 27: utilize the random number that generates in the step 26 from the file ID tabulation, to take out the ID of this random number respective file;
Step 28: exchange counting the ID that was not exchanged in ID in the step 27 and the file ID tabulation from behind successively;
Step 29: go to search in the database information of this ID respective file with the ID in the step 27, and with this ID respective file of player plays;
Step 30: the broadcast of file in the end step 29, return step 26, when the file number that is not played is 0, after promptly All Files all is played and finishes, finish to play.
The present invention realizes that in multimedia player the advantage of the method for shuffle is: 1, each file only can be played once; 2, utilize less internal memory that the order of having play is stored, thereby have the function of the broadcast of retreating, can carry out the inverted order playing function by the order of having play; 3, operational method is simple, and travelling speed is very fast.
[embodiment]
The present invention realizes that in multimedia player the multimedia player of the method for shuffle comprises controller, random number generator, file ID tabulation, database, and player.
Its middle controller is used to control random number generator, file ID tabulation, database, and player, realizes the function of total system.Random number generator is used to generate the random number in the specified scope.The file ID tabulation is used to write down the ID of the file of not playing and having broadcast.Database is used for depositing the information of All Files, can find the information of this document by the ID of file.Player is used for resolution file.
The present invention realizes that in multimedia player the method for shuffle comprises the steps:
Step 1: at first controller carries out initialization to file ID tabulation, promptly the corresponding All Files of file ID tabulation is carried out serial number, and according to number order each file is established an ID, establishes the file ID corresponding N file of tabulating;
Step 2: controller controls playing device specifically comprises the steps: N file shuffle one time
Step 21: the random number A that at first generates 1~N scope by random number generator;
Step 22: the ID that from the file ID tabulation, takes out A file;
Step 23: the ID exchange of N file in the ID of A file in the file ID tabulation and the file ID tabulation;
Step 24: the information of removing to search in the database this A file with the ID of A file, and with this A file of player plays;
Step 25: finish the broadcast of this A file;
Step 26: generate a random number less than the file number scope that is not played by random number generator;
Step 27: utilize the random number that generates in the step 26 from the file ID tabulation, to take out the ID of this random number respective file;
Step 28: exchange counting the ID that was not exchanged from behind in ID in the step 27 and the file ID tabulation;
Step 29: go to search in the database information of this ID respective file with the ID in the step 27, and with this ID respective file of player plays;
Step 30: the broadcast of file in the end step 29, return step 26, when the file number that is not played is 0, promptly up to All Files all be played finish after, finish to play.
Be example so that 5 files are carried out shuffle below, specify the present invention realizes shuffle in multimedia player method.
One, initialization is carried out in tabulation to the file file ID, and the ID of the numbering of file and file is provided with shown in following table one after the initialization.
Table one file ID list initialization structure
Tabulation 1? 2? 3? ……? N?
File ID ID1? ID2? ID3? ……? ID?N?
Two, to N file shuffle one time.
If during N=5, step is as follows:
1, generates the random number B of 1-5 scope, suppose B=3;
2, from tabulation, take out B file ID, at this moment file ID=ID3;
3, the B of tabulation file ID and N file ID exchange of tabulation.That at this moment tabulates thes contents are as follows shown in the table two:
The later file ID list structure of table two ID exchange for the first time
Tabulation 1? 2? 3? 4? 5?
File ID ID1? ID2? ID5? ID4? ID3?
4, remove the database lookup fileinfo with ID3, and use player plays.
Finish first file and begin to play second file:
1, generates the random number C of 1-4 scope, suppose C=2;
2, from tabulation, take out C file ID, at this moment file ID=ID2;
3, the C of tabulation file ID and N-1 file ID exchange of tabulation.That at this moment tabulates thes contents are as follows shown in the table three:
The later file ID list structure of table three ID exchange for the second time
Tabulation 1? 2? 3? 4? 5?
File ID ID1? ID4? ID5? ID2? ID3?
4, remove the database lookup fileinfo with ID2, and use player plays.
Finish second file and begin to play the 3rd file:
1, generates the random number D of 1-3 scope, suppose D=2;
2, from tabulation, take out D file ID, at this moment file ID=ID4.
3, the D of tabulation file ID and N-1 file ID exchange of tabulation.That at this moment tabulates thes contents are as follows shown in the table four:
The later file ID list structure of table four ID exchange for the third time
Tabulation 1? 2? 3? 4? 5?
File ID ID1? ID5? ID4? ID2? ID3?
4, remove the database lookup fileinfo with ID4, and use player plays.
Finish the 3rd file and begin to play the 4th file:
1, generates the random number E of 1-2 scope, suppose E=1;
2, from tabulation, take out E file ID, at this moment file ID=ID1.
3, the E of tabulation file ID and N-1 file ID exchange of tabulation.That at this moment tabulates thes contents are as follows shown in the table five:
The 4th later file ID list structure of ID exchange of table five
Tabulation 1? 2? 3? 4? 5?
File ID ID5? ID1? ID4? ID2? ID3?
4, remove the database lookup fileinfo with ID1, and use player plays.
Finish the 4th file and begin to play the 5th file:
1, generates the random number F of 1-1 scope, suppose F=1;
2, from tabulation, take out F file ID, at this moment file ID=ID5.
3, the F of tabulation file ID and N-1 file ID exchange of tabulation.That at this moment tabulates thes contents are as follows shown in the table six:
The 5th later file ID list structure of ID exchange of table six
Tabulation 1? 2? 3? 4? 5?
File ID ID5? ID1? ID4? ID2? ID3?
4, remove the database lookup fileinfo with ID5, and use player plays.
Three, finish to play.

Claims (1)

1. method that in multimedia player, realizes shuffle, wherein said multimedia player comprises controller, random number generator, the file ID tabulation, database, and player, its middle controller control random number generator, the file ID tabulation, database, and player, realize the function of total system, random number generator generates the random number in the specified scope, the file ID list records is not play the ID with the file of having broadcast, database is deposited the information of All Files, can find the information of this document by the ID of file, the player resolution file is characterized in that: the described method of shuffle that realizes in multimedia player comprises the steps:
Step 1: at first controller carries out initialization to file ID tabulation, promptly the corresponding All Files of file ID tabulation is carried out serial number, and according to number order each file is established an ID, establishes the file ID corresponding N file of tabulating;
Step 2: controller controls playing device specifically comprises the steps: N file shuffle one time
Step 21: the random number A that at first generates 1~N scope by random number generator;
Step 22: the ID that from the file ID tabulation, takes out A file;
Step 23: the ID exchange of N file in the ID of A file in the file ID tabulation and the file ID tabulation;
Step 24: the information of removing to search in the database this A file with the ID of A file, and with this A file of player plays;
Step 25: finish the broadcast of this A file;
Step 26: generate a random number less than the file number scope that is not played by random number generator;
Step 27: utilize the random number that generates in the step 26 from the file ID tabulation, to take out the ID of this random number respective file;
Step 28: exchange counting the ID that was not exchanged in ID in the step 27 and the file ID tabulation from behind successively;
Step 29: go to search in the database information of this ID respective file with the ID in the step 27, and with this ID respective file of player plays;
Step 30: the broadcast of file in the end step 29, return step 26, when the file number that is not played is 0, promptly up to All Files all be played finish after, finish to play.
CN2009101123455A 2009-08-11 2009-08-11 Method for realizing random playing in multimedia player Active CN101650736B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101123455A CN101650736B (en) 2009-08-11 2009-08-11 Method for realizing random playing in multimedia player

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101123455A CN101650736B (en) 2009-08-11 2009-08-11 Method for realizing random playing in multimedia player

Publications (2)

Publication Number Publication Date
CN101650736A CN101650736A (en) 2010-02-17
CN101650736B true CN101650736B (en) 2011-05-11

Family

ID=41672975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101123455A Active CN101650736B (en) 2009-08-11 2009-08-11 Method for realizing random playing in multimedia player

Country Status (1)

Country Link
CN (1) CN101650736B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544974A (en) * 2012-07-17 2014-01-29 北京千橡网景科技发展有限公司 Random playing method and device
CN104967906B (en) * 2015-01-15 2017-11-10 广州酷狗计算机科技有限公司 A kind of shuffle method and device
CN105047210B (en) * 2015-08-25 2018-09-04 广东欧珀移动通信有限公司 A kind of the striding equipment synchronous method and device of shuffle playlist

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441953A (en) * 2000-10-10 2003-09-10 皇家菲利浦电子有限公司 Audio system with variable random-play option
CN1777931A (en) * 2003-02-28 2006-05-24 Lg电子株式会社 Recording medium having data structure for managing random/shuffle reproduction of video data recorded thereon and recording and reproducing methods and apparatuses
CN1967520A (en) * 2005-11-15 2007-05-23 英业达股份有限公司 Random playing system and method
CN101341544A (en) * 2005-12-20 2009-01-07 索尼爱立信移动通讯有限公司 Electronic equipment with shuffle operation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441953A (en) * 2000-10-10 2003-09-10 皇家菲利浦电子有限公司 Audio system with variable random-play option
CN1777931A (en) * 2003-02-28 2006-05-24 Lg电子株式会社 Recording medium having data structure for managing random/shuffle reproduction of video data recorded thereon and recording and reproducing methods and apparatuses
CN1967520A (en) * 2005-11-15 2007-05-23 英业达股份有限公司 Random playing system and method
CN101341544A (en) * 2005-12-20 2009-01-07 索尼爱立信移动通讯有限公司 Electronic equipment with shuffle operation

Also Published As

Publication number Publication date
CN101650736A (en) 2010-02-17

Similar Documents

Publication Publication Date Title
CN101446962B (en) Data conversion method, device thereof and data processing system
CN101650736B (en) Method for realizing random playing in multimedia player
Wang et al. MetaCluster-TA: taxonomic annotation for metagenomic data based on assembly-assisted binning
JP2010529705A5 (en)
CN102306168B (en) Log operation method and device and file system
WO2009029460A3 (en) Direct mass storage device file indexing
CN101329676B (en) Data paralleling abstracting method and apparatus and database system
CN101174225A (en) Device and method for implementing message communication
CN102289962A (en) Information processing method and device thereof
CN104317899A (en) Big-data analyzing and processing system and access method
CN105677915A (en) Distributed service data access method based on engine
CN107679104A (en) Big surface low formula parallel high-speed data comparison method
CN104702876B (en) A kind of Multi-path synchronous back method and device
CN103136244A (en) Parallel data mining method and system based on cloud computing platform
CN108228606A (en) The wiring method and device of data
CN108335340A (en) Pressure touch screen handwriting input is rendered as the method with type feature person's handwriting
CN101271400A (en) Computer command line parameter processing method and device
CN104268227A (en) Automatic high-quality related sample selection method based on reverse k adjacent image search
CN101369442A (en) Multi-CD driver synchronous recording method
JP2007513439A5 (en)
CN106512410A (en) Data processing method and device for interacting with off-line players and server
JP2007156995A5 (en)
CN104133909A (en) Multi-layer file system
CN101556590A (en) Method for accessing small high-volume file by classification
Zheng et al. Optimal Crowdsourcing Scheme for Open Questions on Web

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP03 Change of name, title or address

Address after: 350000 Fuzhou Gulou District, Fujian, software Avenue, building 89, No. 18

Patentee after: FUZHOU ROCKCHIP ELECTRONICS CO., LTD.

Address before: 350011, building 1, building 550, No. 601, industrial road, West Suburbs, Hongshan Town, Gulou District, Fujian, Fuzhou

Patentee before: Fuzhou Rockchip Semiconductor Co., Ltd.

CP01 Change in the name or title of a patent holder

Address after: 350000 building, No. 89, software Avenue, Gulou District, Fujian, Fuzhou 18, China

Patentee after: Ruixin Microelectronics Co., Ltd

Address before: 350000 building, No. 89, software Avenue, Gulou District, Fujian, Fuzhou 18, China

Patentee before: Fuzhou Rockchips Electronics Co.,Ltd.

CP01 Change in the name or title of a patent holder