CN102929982A - Media scanned file indexing method and device - Google Patents

Media scanned file indexing method and device Download PDF

Info

Publication number
CN102929982A
CN102929982A CN2012103965074A CN201210396507A CN102929982A CN 102929982 A CN102929982 A CN 102929982A CN 2012103965074 A CN2012103965074 A CN 2012103965074A CN 201210396507 A CN201210396507 A CN 201210396507A CN 102929982 A CN102929982 A CN 102929982A
Authority
CN
China
Prior art keywords
file
document
multimedia
name
scanning
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
CN2012103965074A
Other languages
Chinese (zh)
Other versions
CN102929982B (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.)
TCL Tongli Electronics Huizhou Co Ltd
Original Assignee
TCL Tongli Electronics Huizhou 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 TCL Tongli Electronics Huizhou Co Ltd filed Critical TCL Tongli Electronics Huizhou Co Ltd
Priority to CN201210396507.4A priority Critical patent/CN102929982B/en
Publication of CN102929982A publication Critical patent/CN102929982A/en
Application granted granted Critical
Publication of CN102929982B publication Critical patent/CN102929982B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention discloses a media scanned file indexing method and device. The method comprises the following steps of: A. when the media scanning process is implemented, judging whether the names of the scanned files conform to the naming rule which can be indexed through media scanning, if not, carrying out the step B, and if so, directly indexing the files into a media database; B. naming the files according to the naming rule; and C. indexing the files into the media database according to the file aliases after naming. By adopting the method and the device, on the Marvell Android platform, the files with names not conforming to the naming rule which can be indexed through media scanning can be also indexed through media scanning and media files can not be omitted, thus improving the user experience to a certain extent.

Description

Multimedia scanning document indexing means and device
Technical field
The present invention relates to multimedia technology field, in particular to a kind of multimedia scanning document indexing means and device.
Background technology
At present, when carrying out based on the scanning of the multimedia under the intelligent operating platforms such as Marvell Android (MediaScanner), may have partial document can't be by successful index (namely can't be stored in the index data base), its reason mainly is: but these file names are more special, the naming rule that do not meet multimedia scanning index, cause multimedia scanning to carry out index to it.
For example, the file that the multimedia scan service of Android system can't index comprises: be referred to as the file of filename with the name of unallowable instruction digit beginning, described unallowable instruction digit is the character except the legal characters such as numeral, letter, underscore; The file that filename is long, for example filename surpasses the file of 255 characters; The file that has the space in the middle of the filename, for example file of file " newly-built text document .txt " by name.Although these files are necessary beings, because the at present restriction of multimedia scan function, cause these files can't be by correct index.
Summary of the invention
When scanning execution in order to solve multimedia, the partial document that may occur can't by the technical matters of successful index, the object of the present invention is to provide a kind of multimedia scanning document indexing means and device.
In order to reach purpose of the present invention, the present invention realizes by the following technical solutions:
A kind of multimedia scanning document indexing means comprises:
When A, the execution of multimedia scan procedure, but judge that whether the title of the file that scans meets the naming rule of multimedia scanning index, if not, then carries out step B; If, with this document direct index to multimedia database;
But B, according to the naming rule of multimedia scanning index this document is carried out the name of file another name in addition;
File another name after C, the foundation name is indexed to multimedia database with this document.
Further, after execution of step C, described multimedia scanning document indexing means also comprises:
D, the mapping relations between the absolute path of file another name and corresponding document are recorded to multimedia database.
Further, described step B comprises:
B1, resolve this document, obtain raw filename information and the file mime type information of this document;
B2, according to the file type information of file mime type acquisition of information this document;
The file another name that B3, the current time in system information that file type information, file mime type information and the system of the file that obtains provided and flowing water character string information splice and combine into this document.
Further, in described step B1, deposit the raw filename information of this document of obtaining in the title variable, deposit the file mime type information of this document of obtaining in the file type variable.
Further, after execution in step D, also comprise:
E, during index, obtaining corresponding file according to the absolute path of corresponding document, and the raw filename of this document is being shown in multimedia database according to the file another name after the name.
A kind of multimedia scanning document indexing unit comprises:
Scanning element is used for starting the multimedia scan procedure, execute file scanning;
Judging unit, be used for obtaining the file that its scanning obtains from scanning element, and but whether the title of judging this document meets the naming rule of multimedia scanning index, if not, then trigger the name unit and this document is carried out the name of file another name in addition, if, then trigger processing unit with this document direct index to multimedia database;
The name unit is used under the triggering of judging unit, but according to the naming rule of multimedia scanning index this document is carried out the name of file another name in addition;
Processing unit is used for according to the another name of the file after the name this document being indexed to multimedia database.
Further, described processing unit also is used for the mapping relations between the absolute path of file another name and corresponding document are recorded to multimedia database.
Further, name unit resolves described file, but and according to the naming rule of multimedia scanning index the treatment step that this document carries out the name of file another name is in addition comprised:
Resolve this document, obtain raw filename information and the file mime type information of this document;
File type information according to file mime type acquisition of information this document;
The file another name that the current time in system information that file type information, file mime type information and the system of the file that obtains provided and flowing water character string information splice and combine into this document.
Further, the name unit deposits the raw filename information of this document of obtaining in the title variable after resolving this document, deposits the file mime type information of this document of obtaining in the file type variable.
Further, described multimedia scanning document indexing unit also comprises:
Acquiring unit is used for obtaining corresponding file according to the absolute path of corresponding document, and the raw filename of this document being shown when calling at the multimedia database index according to the file after the name.
Technical scheme by the invention described above can be found out, adopt the present invention, for example under Marvell Android platform, but not meeting the file of the naming rule of multimedia scanning index for those such as file name also can be by the multimedia scanning index, for example be referred to as the file of filename for the name with the unallowable instruction digit beginning, when multimedia scans and detects this document, but the present invention carries out renaming of file another name according to the naming rule of multimedia scanning index to this document, and the file after will renaming another name is associated and is recorded to the absolute path of actual file and carries out index in the multimedia database, thereby so that this multimedia scanning can not omitted file, adopt the present invention can improve to a certain extent the user and experience.
In addition, the present invention is except the intelligent television that can be applicable to present Marvell Android platform/electronic equipments such as intelligent multimedia BOX, can also be in the situation that do not increase extra cost, it is extended to the smart machine based on android that has same problem, thereby the present invention has good availability.
Description of drawings
Fig. 1 is the multimedia scanning document indexing means schematic flow sheet that the embodiment of the invention provides;
Fig. 2 is the multimedia scanning document indexing unit structural representation that the embodiment of the invention provides.
The realization of the object of the invention, functional characteristics and excellent effect are described further below in conjunction with specific embodiment and accompanying drawing.
Embodiment
Below in conjunction with the drawings and specific embodiments technical scheme of the present invention is described in further detail, can be implemented so that those skilled in the art can better understand the present invention also, but illustrated embodiment is not as a limitation of the invention.
The core concept of multimedia scanning document indexing means provided by the invention is, for special name (wherein, but the title of the file of described special name does not meet the naming rule of multimedia scanning index) the satisfactory file another name of file set up, and call file index that the absolute path of related this document should correspondence in multimedia database by the file of this name.
When index, carry out index with file another name, and when obtaining with display file, shown with the raw filename of file.
Wherein, " association " of above-mentioned indication refers to: the absolute store path of file another name and respective file is stored in the multimedia database in the data record, and it has common record major key to identify;
In addition, " index " of above-mentioned indication refers to: be to realize the mapping table that the fast finding of data in multimedia database set up, it has been stored the raw filename of file and file another name and actual file data and has been recorded in storaging mark in the multimedia database or the mapping relations between the memory location.
As shown in Figure 1, a kind of multimedia scanning document indexing means that the embodiment of the invention provides comprises following implementation step:
When S10, the execution of multimedia scan procedure, but judge that whether the title of the file that scans meets the naming rule of multimedia scanning index, if not, then carries out step S20; If, with this document direct index to multimedia database;
But S20, according to the naming rule of multimedia scanning index this document is carried out the name of file another name in addition;
File another name after S30, the foundation name is indexed to multimedia database with this document.
In described step S10, in the present embodiment, but file name does not meet the file of the naming rule of multimedia scanning index to be comprised: be referred to as the file of filename with the name of unallowable instruction digit beginning, described unallowable instruction digit is the character except the legal characters such as numeral, letter, underscore; The file that filename is long, for example filename surpasses the file of 255 characters; The file that has the space in the middle of the filename, be called the file of " newly-built text document .txt " etc. such as file, when the multimedia scan procedure when scanning this class file, but judge that namely its file name does not meet the file of the naming rule of multimedia scanning index, i.e. special named file.
In the present embodiment, after execution of step S30, described multimedia scanning document indexing means also comprises:
S40, the mapping relations between the absolute path of file another name and corresponding document are recorded to multimedia database.
Correspondingly, in described step S10, when when this document direct index is to the multimedia database, then will preserve the mapping relations between the absolute path of raw filename and corresponding document in the multi-medium data, this paper does not run business into particular one to it and states.
Further, described step S20 comprises:
S201, resolve this document, obtain raw filename information and the file mime type information of this document;
S202, according to the file type information of file mime type acquisition of information this document;
The file another name that S203, the current time in system information that file type information, file mime type information and the system of the file that obtains provided and flowing water character string information splice and combine into this document.
For example, but the embodiment of the invention provides that a kind of another name naming rule that meets multimedia scanning index is:
File another name=[file type] [file mime type] [date+time] [file type suffix];
For example: video MPG20120704153000.mpg.
In computing machine, Chinese normally represents with 4 16 system numbers, namely is the numeral beginning, therefore be legal with " video " as the beginning of calling.
Further, in described step S201, deposit the raw filename information of this document of obtaining in the title variable, deposit the file mime type information of this document of obtaining in the file type variable.
Further, after execution in step S40, also comprise:
S50, during index, obtaining corresponding file according to the absolute path of corresponding document, and the raw filename of this document is being shown in multimedia database according to the file another name after the name.
For example, in a kind of concrete methods of realizing that the present embodiment provides, described multimedia scanning document index specifically comprises following implementation step:
When step 1, the execution of multimedia scan procedure, but whether the title of the file that detection scans meets the naming rule of multimedia scanning index, if, will directly this document be indexed in the multimedia database, finish; If not, execution in step two then.
But step 2, the file that file name is not met the naming rule of multimedia scanning index are called name, comprise the steps:
1, system obtains the raw filename of file;
2, systematic analysis raw filename, leave in respectively raw filename and file mime type in the variable, for example the title variable is used for depositing raw filename (i.e. ". file mime type " character before, for example, for the AAA.mpg file, raw filename is AAA), the file type variable is used for storing documents mime type (for example mpg);
3, judge file type by the file mime type, for example when the file mime type is mpg, judge that then this document type is video file, when the file mime type is MP3, judge that this document type is audio file, certainly, in specific implementation process, for the statement of file type except with the Chinese statement, also can be with English, for example video is explained with Movie, and audio frequency is explained with Audio;
4, call combination, file type, file mime type, system are worked as the day before yesterday (form is YYYYMMDD), current time in system (form is HHMMSS), flowing water character string, and the file mime type carries out the character string splicing, the character string of splicing is the file another name of this document, for example AudioMP320120704153000.mpg.
Step 3, after the name of the another name of execute file, the file another name of this named file is indexed in the multimedia database, and the absolute path information of related this document, when index, file another name with this document carries out index, when obtaining with display file, be achieved with the raw filename of this document.
As shown in Figure 2, the embodiment of the invention also provides a kind of multimedia scanning document indexing unit, comprising:
Scanning element 10 is used for starting the multimedia scan procedure, execute file scanning;
Judging unit 20, be used for obtaining the file that its scanning obtains from scanning element, and but whether the title of judging this document meets the naming rule of multimedia scanning index, if not, then trigger name unit 30 and this document is carried out the name of file another name in addition, if, then trigger processing unit with this document direct index to multimedia database 50;
Name unit 30 is used for resolving described file under the triggering of judging unit 20, but and according to the naming rule of multimedia scanning index this document is carried out the name of file another name in addition;
Processing unit 40 is used for according to the another name of the file after the name this document being indexed to multimedia database 50.
Particularly, processing unit 40 of living in also is used for the mapping relations between the absolute path of file another name and corresponding document are recorded to multimedia database 50.
Particularly, described file is resolved in name unit 30, but and according to the naming rule of multimedia scanning index the treatment step that this document carries out the name of file another name is in addition comprised:
1) resolves this document, obtain raw filename information and the file mime type information of this document;
2) according to the file type information of file mime type acquisition of information this document;
3) the file another name that the current time in system information that file type information, file mime type information and the system of the file that obtains is provided and flowing water character string information splice and combine into this document.
Particularly, name unit 30 deposits the raw filename information of this document of obtaining in the title variable after resolving this document, deposits the file mime type information of this document of obtaining in the file type variable.
Particularly, described multimedia scanning document indexing unit also comprises:
Acquiring unit 60 is used for obtaining corresponding file according to the absolute path of corresponding document, and the raw filename of this document being shown when calling at multimedia database 50 index according to the file after the name.
The above only is the preferred embodiments of the present invention; be not so limit claim of the present invention; every equivalent structure or equivalent flow process conversion that utilizes instructions of the present invention and accompanying drawing content to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.

Claims (10)

1. a multimedia scanning document indexing means is characterized in that, comprising:
When A, the execution of multimedia scan procedure, but judge that whether the title of the file that scans meets the naming rule of multimedia scanning index, if not, then carries out step B; If, with this document direct index to multimedia database;
But B, according to the naming rule of multimedia scanning index this document is carried out the name of file another name in addition;
File another name after C, the foundation name is indexed to multimedia database with this document.
2. multimedia scanning document indexing means as claimed in claim 1 is characterized in that, after execution of step C, described method also comprises:
D, the mapping relations between the absolute path of file another name and corresponding document are recorded to multimedia database.
3. multimedia scanning document indexing means as claimed in claim 1 is characterized in that, described step B comprises:
B1, resolve this document, obtain raw filename information and the file mime type information of this document;
B2, according to the file type information of file mime type acquisition of information this document;
The file another name that B3, the current time in system information that file type information, file mime type information and the system of the file that obtains provided and flowing water character string information splice and combine into this document.
4. multimedia scanning document indexing means as claimed in claim 3, it is characterized in that, in described step B1, deposit the raw filename information of this document of obtaining in the title variable, deposit the file mime type information of this document of obtaining in the file type variable.
5. such as the arbitrary described multimedia scanning document indexing means of claim 2-4, it is characterized in that, after execution in step D, also comprise:
E, during index, obtaining corresponding file according to the absolute path of corresponding document, and the raw filename of this document is being shown in multimedia database according to the file another name after the name.
6. a multimedia scanning document indexing unit is characterized in that, comprising:
Scanning element is used for starting the multimedia scan procedure, execute file scanning;
Judging unit is used for obtaining the file that its scanning obtains from scanning element, but and judge whether the title of this document meets the naming rule of multimedia scanning index, if not, then trigger the name unit and this document is carried out the file another name in addition name; If, then trigger processing unit with this document direct index to multimedia database;
The name unit is used under the triggering of judging unit, but according to the naming rule of multimedia scanning index this document is carried out the name of file another name in addition;
Processing unit is used for according to the another name of the file after the name this document being indexed to multimedia database.
7. multimedia scanning document indexing unit as claimed in claim 6 is characterized in that, described processing unit also is used for the mapping relations between the absolute path of file another name and corresponding document are recorded to multimedia database.
8. multimedia scanning document indexing unit as claimed in claim 6 is characterized in that, but the name unit scans the naming rule of index according to multimedia the treatment step that this document carries out the name of file another name is in addition comprised:
Resolve this document, obtain raw filename information and the file mime type information of this document;
File type information according to file mime type acquisition of information this document;
The file another name that the current time in system information that file type information, file mime type information and the system of the file that obtains provided and flowing water character string information splice and combine into this document.
9. multimedia scanning document indexing unit as claimed in claim 8, it is characterized in that, the name unit deposits the raw filename information of this document of obtaining in the title variable after resolving this document, deposit the file mime type information of this document of obtaining in the file type variable.
10. such as the arbitrary described multimedia scanning document indexing unit of claim 6-9, it is characterized in that, also comprise:
Acquiring unit is used for obtaining corresponding file according to the absolute path of corresponding document, and the raw filename of this document being shown when calling at the multimedia database index according to the file after the name.
CN201210396507.4A 2012-10-17 2012-10-17 Multimedia scanning file indexing means and device Expired - Fee Related CN102929982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210396507.4A CN102929982B (en) 2012-10-17 2012-10-17 Multimedia scanning file indexing means and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210396507.4A CN102929982B (en) 2012-10-17 2012-10-17 Multimedia scanning file indexing means and device

Publications (2)

Publication Number Publication Date
CN102929982A true CN102929982A (en) 2013-02-13
CN102929982B CN102929982B (en) 2017-07-28

Family

ID=47644780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210396507.4A Expired - Fee Related CN102929982B (en) 2012-10-17 2012-10-17 Multimedia scanning file indexing means and device

Country Status (1)

Country Link
CN (1) CN102929982B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544252A (en) * 2013-10-14 2014-01-29 北京暴风科技股份有限公司 Method and device for processing names of video sources
CN104951480A (en) * 2014-03-31 2015-09-30 杭州迪普科技有限公司 Resource storage indexing device and method in CDN system
WO2017032249A1 (en) * 2015-08-26 2017-03-02 腾讯科技(深圳)有限公司 Video file display method and system
CN107357929A (en) * 2017-07-27 2017-11-17 广东欧珀移动通信有限公司 File reading, mobile terminal and readable storage medium storing program for executing
CN107451475A (en) * 2017-06-15 2017-12-08 努比亚技术有限公司 Multimedia file scan method and equipment, computer-readable recording medium
CN108668145A (en) * 2017-03-30 2018-10-16 华为软件技术有限公司 A kind of content distribution method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060116985A1 (en) * 2004-11-30 2006-06-01 Microsoft Corporation Method and system for maintaining namespace consistency with a file system
CN101115074A (en) * 2007-07-19 2008-01-30 王智鹏 United service identification server and method for performing united denomination and access to service
CN101452487A (en) * 2008-12-31 2009-06-10 中国建设银行股份有限公司 Data loading method and system, and data loading unit
CN101552646A (en) * 2009-01-08 2009-10-07 北京创毅视讯科技有限公司 Data file receiving method and device in mobile multimedia broadcasting system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060116985A1 (en) * 2004-11-30 2006-06-01 Microsoft Corporation Method and system for maintaining namespace consistency with a file system
CN101115074A (en) * 2007-07-19 2008-01-30 王智鹏 United service identification server and method for performing united denomination and access to service
CN101452487A (en) * 2008-12-31 2009-06-10 中国建设银行股份有限公司 Data loading method and system, and data loading unit
CN101552646A (en) * 2009-01-08 2009-10-07 北京创毅视讯科技有限公司 Data file receiving method and device in mobile multimedia broadcasting system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张新林等: "一种提取标题内容作为文件名的方法", 《实验科学与技术》 *
张江印: "批量文件重命名VB程序设计", 《电脑编程技巧与维护》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544252A (en) * 2013-10-14 2014-01-29 北京暴风科技股份有限公司 Method and device for processing names of video sources
CN104951480A (en) * 2014-03-31 2015-09-30 杭州迪普科技有限公司 Resource storage indexing device and method in CDN system
CN104951480B (en) * 2014-03-31 2018-05-08 杭州迪普科技股份有限公司 The indexing unit and method that resource stores in a kind of CDN system
WO2017032249A1 (en) * 2015-08-26 2017-03-02 腾讯科技(深圳)有限公司 Video file display method and system
CN106488299A (en) * 2015-08-26 2017-03-08 深圳市腾讯计算机系统有限公司 Video file methods of exhibiting and system
CN106488299B (en) * 2015-08-26 2020-04-17 深圳市腾讯计算机系统有限公司 Video file display method and system
CN108668145A (en) * 2017-03-30 2018-10-16 华为软件技术有限公司 A kind of content distribution method and device
CN107451475A (en) * 2017-06-15 2017-12-08 努比亚技术有限公司 Multimedia file scan method and equipment, computer-readable recording medium
CN107357929A (en) * 2017-07-27 2017-11-17 广东欧珀移动通信有限公司 File reading, mobile terminal and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN102929982B (en) 2017-07-28

Similar Documents

Publication Publication Date Title
CN102929982A (en) Media scanned file indexing method and device
CN107918666B (en) Data synchronization method and system on block chain
CN107665306B (en) A kind of method, apparatus, client and the server of the injection of detection illegal file
US20120185454A1 (en) Method and device for accessing file resources
CN102279749A (en) Method and equipment for merging codes
EP3444725A1 (en) Man-machine interaction method and device therefor
CN104750472B (en) The resource package management method and device of a kind of terminal applies
CN103678600A (en) Webpage data processing method and equipment
CN102799592A (en) Parsing method and system of rich text document
CN106294886A (en) A kind of method and system of full dose extracted data from HBase
JP2005050347A (en) Method and apparatus for late-binding / dynamic path name resolution
CN103389905A (en) Plug-in loading method and plug-in loading system
CN102508884A (en) Method and device for acquiring hotpot events and real-time comments
CN103034734A (en) File storage and inquiry agency and information searching method and system
CN102710833B (en) Mobile phone test case and automatic generation method thereof
CN104808995B (en) A kind of method and apparatus for across application collection application content
US20120254132A1 (en) Enhanced Contact Information
CN1567829A (en) General purpose data file conversion method
CN104182479A (en) Method and device for processing information
CN101072252A (en) Method and device for identifying mobile phone number territoriality for mobile communication terminal
CN102799423A (en) Method and device for implementing dynamic method in JSF (java service face)
CN105701158A (en) File system read-write optimization method and framework
CN104202249A (en) Method and device of message forwarding
CN101556595A (en) Method for fast positioning relevant documents in document system
CN111563123B (en) Real-time synchronization method for hive warehouse metadata

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170728

Termination date: 20201017