CN106557555A - media playing method and device - Google Patents
media playing method and device Download PDFInfo
- Publication number
- CN106557555A CN106557555A CN201610979163.8A CN201610979163A CN106557555A CN 106557555 A CN106557555 A CN 106557555A CN 201610979163 A CN201610979163 A CN 201610979163A CN 106557555 A CN106557555 A CN 106557555A
- Authority
- CN
- China
- Prior art keywords
- media
- file
- folder
- media file
- database
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/40—Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
- G06F16/48—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/40—Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/40—Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
- G06F16/43—Querying
- G06F16/438—Presentation of query results
- G06F16/4387—Presentation of query results by the use of playlists
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B27/00—Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
- G11B27/02—Editing, e.g. varying the order of information signals recorded on, or reproduced from, record carriers
- G11B27/031—Electronic editing of digitised analogue information signals, e.g. audio or video signals
- G11B27/034—Electronic editing of digitised analogue information signals, e.g. audio or video signals on discs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of media playing apparatus and method, its method includes:When the triggering of the media file condition of scanning is detected, the media database of media file and media application in scanning medium file obtains the second media file information in the first media file information and the media database in media folder;First media file information is compared with the second media file information, in judging the media folder, whether has media file to change;If there is media file to change in media folder, the media database and media play list for updating media application is corresponded to then, the present invention can be with real-time synchronization media play list and media database, already present image is shown only, ensure the integrity of media information, and in media play list image effectiveness, improve Consumer's Experience.
Description
Technical field
The present invention relates to technical field of media play, more particularly to a kind of media playing method and device.
Background technology
In the mobile Internet epoch, with popularizing for intelligent terminal, people constantly pursue the sound of high-quality and regard body
Test, high code check, high-resolution, multichannel, it is lossless be increasingly becoming standard configuration depending on source of sound, user will to the image quality of multimedia media
Seek more and more higher.
At present the media player of main flow places one's entire reliance upon the multimedia database of system, when media file should by third party
With renaming, have modified, or SD card is removed/moved into by user, and the media database of system does not upgrade in time, causes nothing
Media file under effective record in media player media database, playlist and media folder is carried out reality by method
When synchronization.And after updating media database, the information such as the playing duration of media file, remarks, label TAG can be caused to be deleted
Remove, when user plays the media next time again, it is impossible to the time that record has been played, cause Consumer's Experience poor.
The content of the invention
Present invention is primarily targeted at proposing a kind of media playing method and device, it is intended to realize that media file is changed
Afterwards, the real-time update of the media database and playlist of media player, and further avoid updating matchmaker after media database
The problem that the information such as the playing duration of body file, remarks, label TAG can be deleted.
For achieving the above object, a kind of media playing method that the present invention is provided, is applied to terminal, installs in the terminal
The system configuration for having media application, the terminal has based on the media folder of the media application, media database and media
Playlist, methods described include:
When the triggering of the media file condition of scanning is detected, the media file and media in the media folder is scanned
Using media database, obtain in the first media file information and the media database in the media folder
Second media file information;
First media file information is compared with second media file information, the media are judged
Whether there is media file to change in file, wherein, change at least the increasing newly, deleting including media file of media file
Or modification;
If having media file to change in the media folder, the media data for updating the media application is corresponded to
Storehouse and media play list, wherein:There is no media file by the store path inquiry of record in the media database
When, do not perform the operation for deleting corresponding record.
Alternatively, if having media file to change in the media folder, corresponding to the renewal media should
The step of media database, includes:
If having the newly-increased of media file in the media folder, by the store path of the newly-increased media file, text
The relative recording of part duration is inserted in the media database;
And/or,
If there is the deletion of media file in the media folder, corresponding record in the media database is updated, and
This record is set to into unactivated state, wherein, the record of renewal at least includes the playing duration, standby for being deleted media file
Note, label TAG information;
And/or,
If there is the modification of media file in the media folder, corresponding record in the media database is updated, and
The last modification time of file during this is recorded is updated to the modification time of the media file of the modification.
Alternatively, if having media file to change in the media folder, corresponding to the renewal media should
Also include in the step of media database:
If the media file increased newly in the media folder is to move into the media file for reappearing because of SD card, update
The corresponding record of the media database, and this record is set to into state of activation;
And/or,
If the media file deleted in the media folder is lost because SD card is removed, the media data is updated
Corresponding record in storehouse, and this record is set to into unactivated state;
And/or,
If the media file changed in the media folder is the media file of renaming, and the storage of the media file
Path changing, then update corresponding record in the media database, and the store path of matching record is changed to current media text
The store path of part;Or, if the media file changed in the media folder is document retaining name but replaces original
Media file, then be inserted into the relevant information of this media file as new record in the media database.
Alternatively, the media file condition of scanning is:
When the media application is activated;
Or,
After media application is started, during into media play list interface;
Or,
Detect SD card insert/remove terminal when;
Or,
When the broadcast of media folder content changing is listened to.
Alternatively, first media file information and the second media information include:The filename of media file, storage road
Footpath, file duration, whether the last modification time of playing duration, file size, file and/or file have activated;
It is described that first media file information is compared with second media file information, judge described
The step of whether having media file to change in media folder includes:
If will be right in the filename of the media file in media folder, store path, file duration and media database
The record answered is matched, and the record of matching is can not find in media database, then have media in judging the media folder
File it is newly-increased;
If will be right in the filename of the media file in media folder, store path, file duration and media database
The record answered is matched, and is recorded present in media database, and there is no corresponding media text in media folder
Part information, the then deletion for having media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time with
In media database, corresponding record is matched, when filename, store path and file duration do not change and finally change
Between change, then have the modification of media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time with
In media database, corresponding record is matched, and file duration does not change and filename and store path change, then
There is the renaming of media file in judging the media folder.
Alternatively, also wrap in the step of correspondence updates the media database and media play list of the media application
Include:
According to the media database after renewal, the media play list of media application is updated, hide non-existent media text
Part, wherein:When there is no media file by the store path inquiry of record in media database, the media file is recorded
Playing duration, when playing the media file for next time, has continued to play at play position from before.
Alternatively, after the step of correspondence updates the media database and media play list of the media application also
Including:
Interval Preset Time, removes the label information of the media file of the media data banked cache with preset rules.
The embodiment of the present invention also proposes a kind of media playing apparatus, is applied to terminal, and media are provided with the terminal should
With, the system configuration of the terminal has based on the media folder of the media application, media database and media play list,
Described device includes:
File scan module, for when the triggering of the media file condition of scanning is detected, scanning in the media folder
Media file and media application media database, obtain the first media file information in the media folder and
The second media file information in the media database;
Analysis module is compared, for comparing with second media file information to first media file information
Whether analysis, have media file to change in judging the media folder, wherein, the change of media file at least includes matchmaker
Body file is increased newly, is deleted or modified;
Update module, if for having media file to change in the media folder, corresponding to and updating the media
Using media database and media play list, wherein:By the store path inquiry of record in the media database
When there is no media file, the operation for deleting corresponding record is not performed.
Alternatively, the update module, if there is the newly-increased of media file in being additionally operable to the media folder, will be described
The store path of newly-increased media file, the relative recording of file duration are inserted in the media database;
And/or,
If there is the deletion of media file in the media folder, corresponding record in the media database is updated, and
This record is set to into unactivated state, wherein, the record of renewal at least includes the playing duration, standby for being deleted media file
Note, label TAG information;
And/or,
If there is the modification of media file in the media folder, corresponding record in the media database is updated, and
The last modification time of file during this is recorded is updated to the modification time of the media file of the modification.
Alternatively, the update module, if the media file increased newly in being additionally operable to the media folder is moved because of SD card
Enter the media file for reappearing, then update the corresponding record of the media database, and this record is set to into state of activation;
And/or,
If the media file deleted in the media folder is lost because SD card is removed, the media data is updated
Corresponding record in storehouse, and this record is set to into unactivated state;
And/or,
If the media file changed in the media folder is the media file of renaming, and the storage of the media file
Path changing, then update corresponding record in the media database, and the store path of matching record is changed to current media text
The store path of part;Or, if the media file changed in the media folder is document retaining name but replaces original
Media file, then be inserted into the relevant information of this media file as new record in the media database.
Alternatively, the media file condition of scanning is:
When the media application is activated;
Or,
After media application is started, during into media play list interface;
Or,
Detect SD card insert/remove terminal when;
Or,
When the broadcast of media folder content changing is listened to.
Alternatively, first media file information and the second media information include:The filename of media file, storage road
Footpath, file duration, whether the last modification time of playing duration, file size, file and/or file have activated;
The comparison analysis module, if being additionally operable to the filename of the media file in media folder, store path, text
Part duration record corresponding with media database is matched, and can not find the record of matching, then judge in media database
There is the newly-increased of media file in the media folder;
If will be right in the filename of the media file in media folder, store path, file duration and media database
The record answered is matched, and is recorded present in media database, and there is no corresponding media text in media folder
Part information, the then deletion for having media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time with
In media database, corresponding record is matched, when filename, store path and file duration do not change and finally change
Between change, then have the modification of media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time with
In media database, corresponding record is matched, and file duration does not change and filename and store path change, then
There is the renaming of media file in judging the media folder.
Alternatively, the update module, the media database after being additionally operable to according to renewal, the media for updating media application are broadcast
Table is emplaced, non-existent media file is hidden, wherein:There is no matchmaker by the store path inquiry of record in media database
During body file, the playing duration of the media file is recorded, when playing the media file for next time, from play position before
Continue to play in place.
Alternatively, the update module, is additionally operable to be spaced Preset Time, removes the media database with preset rules and delays
The label information of the media file deposited.
A kind of media playing method proposed by the present invention and device, when the triggering of the media file condition of scanning is detected, sweep
The media database of the media file and media application in media folder is retouched, the first matchmaker in the media folder is obtained
The second media file information in body fileinfo and the media database;To first media file information with it is described
Whether the second media file information compares, have media file to change in judging the media folder, wherein,
The change of media file at least increasing newly, being deleted or modified including media file;If having media file in the media folder
Change, then correspond to the media database and media play list for updating the media application, wherein:In the media data
When there is no media file by the store path inquiry of record in storehouse, the operation for deleting corresponding record is not performed, such as can be with
This record is set to into unactivated state, and while updates playlist, hiding non-existent media file, real-time synchronization are broadcast
Put duration, remarks, label TAG information to media database, record media playing duration is played from during to play again
Continue to play in position.
Thus, by the program, when the media file under media folder is changed, such as third-party application renaming,
Delete, have modified media file, and SD card is moved out of, real-time synchronization media play list and media database only show
Already present image, so as to ensure the integrity of media information, it is ensured that the effectiveness of image in media play list, improves and uses
Experience at family.
Description of the drawings
Fig. 1 is the hardware architecture diagram of an optional mobile terminal for realizing each embodiment of the invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the module diagram of media playing apparatus first embodiment of the present invention;
Fig. 4 is media file scanning process schematic diagram in the embodiment of the present invention;
Fig. 5 is the overall flow schematic diagram of media data process in the embodiment of the present invention;
Fig. 6 is media data banked cache removing journey schematic diagram in the embodiment of the present invention;
Fig. 7 is the schematic flow sheet of media playing method first embodiment of the present invention;
Fig. 8 is the schematic flow sheet of media playing method second embodiment of the present invention.
The realization of the object of the invention, functional characteristics and advantage will be described further in conjunction with the embodiments referring to the drawings.
Specific embodiment
It should be appreciated that specific embodiment described herein is not intended to limit the present invention only to explain the present invention.
Embodiment of the present invention scheme is related to the media play in terminal media application, and the terminal being directed to can be PC etc.
Fixed terminal, it is also possible to refer to mobile terminal, the embodiment of the present invention is illustrated with mobile terminal, but the not limit of structure paired terminal
System.
The mobile terminal of each embodiment of the invention is realized referring now to Description of Drawings.In follow-up description, use
For representing the suffix of such as " module ", " part " or " unit " of element only for being conducive to the explanation of the present invention, itself
Not specific meaning.Therefore, " module " mixedly can be used with " part ".
Mobile terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as moving
Phone, smart phone, notebook computer, digit broadcasting receiver, PDA (personal digital assistant), PAD (panel computer), PMP
The mobile terminal of (portable media player), guider etc. and such as numeral TV, desk computer etc. are consolidated
Determine terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that, except being used in particular for movement
Outside the element of purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Fig. 1 is the hardware architecture diagram of an optional mobile terminal for realizing each embodiment of the invention.
Mobile terminal 1 00 can include wireless communication unit 110, user input unit 130, output unit 150, memorizer
160th, interface unit 170, controller 180 and power subsystem 190 etc..Fig. 1 shows the mobile terminal with various assemblies, but
It is to should be understood that, it is not required that implement all components for illustrating.More or less of component can alternatively be implemented.Will be under
Face describes the element of mobile terminal in detail.
Wireless communication unit 110 generally includes one or more assemblies, and which allows mobile terminal 1 00 and wireless communication system
Or the radio communication between network.For example, wireless communication unit can include broadcasting reception module 111, wireless Internet mould
At least one of block 113.
Broadcasting reception module 111 receives broadcast singal and/or broadcast from external broadcast management server via broadcast channel
Relevant information.Broadcast channel can include satellite channel and/or terrestrial channel.Broadcast management server can be generated and sent
The broadcast singal generated before the server or reception of broadcast singal and/or broadcast related information and/or broadcast related information
And send it to the server of terminal.Broadcast singal can include TV broadcast singals, radio signals, data broadcasting
Signal etc..And, broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast phase
Pass information can also be provided via mobile communications network, and in this case, broadcast related information can be by mobile communication mould
Block 112 is receiving.Broadcast singal can be present in a variety of manners, and for example, which can be with the electronics of DMB (DMB)
The form of program guide (EPG), the electronic service guidebooks (ESG) of digital video broadcast-handheld (DVB-H) etc. and exist.Broadcast
Receiver module 111 can receive signal broadcast by using various types of broadcast systems.Especially, broadcasting reception module 111
Can be wide by using such as multimedia broadcasting-ground (DMB-T), DMB-satellite (DMB-S), digital video
Broadcast-hand-held (DVB-H), forward link media (MediaFLO@) Radio Data System, received terrestrial digital broadcasting integrated service
Etc. (ISDB-T) digit broadcasting system receives digital broadcasting.Broadcasting reception module 111 may be constructed such that and be adapted to provide for extensively
Broadcast the various broadcast systems and above-mentioned digit broadcasting system of signal.Via broadcasting reception module 111 receive broadcast singal and/
Or broadcast related information can be stored in memorizer 160 (or other types of storage medium).
Wireless Internet module 113 supports the Wi-Fi (Wireless Internet Access) of mobile terminal.The module can be internally or externally
It is couple to terminal.Wi-Fi (Wireless Internet Access) technology involved by the module can including WLAN (WLAN) (Wi-Fi), Wibro
(WiMAX), Wimax (worldwide interoperability for microwave accesses), HSDPA (high-speed downlink packet access) etc..
User input unit 130 can generate key input data to control each of mobile terminal according to the order of user input
Plant operation.User input unit 130 allows the various types of information of user input, and can include keyboard, metal dome, touch
Plate (for example, detection is due to the sensitive component of the change of touched and caused resistance, pressure, electric capacity etc.), roller, rocking bar etc.
Deng.Especially, when touch pad is superimposed upon on display unit 151 in the form of layer, touch screen can be formed.
Interface unit 170 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 1 00.For example,
External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing
Line FPDP, memory card port, the port for device of the connection with identification module, audio input/output (I/O) end
Mouth, video i/o port, ear port etc..Identification module can be that storage uses each of mobile terminal 1 00 for verifying user
Kind of information and subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) can be included
Etc..In addition, the device with identification module (hereinafter referred to as " identifying device ") can take the form of smart card, therefore, know
Other device can be connected with mobile terminal 1 00 via port or other attachment means.Interface unit 170 can be used for receive from
The input (for example, data message, electric power etc.) of external device (ED) and the input for receiving is transferred in mobile terminal 1 00
One or more elements can be used for the transmission data between mobile terminal and external device (ED).
In addition, when mobile terminal 1 00 is connected with external base, interface unit 170 can serve as allowing to pass through which by electricity
Power provides the path of mobile terminal 1 00 from base or can serve as allowing from base the various command signals being input into pass through which
It is transferred to the path of mobile terminal.Can serve as recognizing that mobile terminal is from the various command signals or electric power of base input
The no signal being accurately fitted within base.
Output unit 150 is configured to provide output signal (for example, audio frequency letter with vision, audio frequency and/or tactile manner
Number, video signal, alarm signal, vibration signal etc.).Output unit 150 can include display unit 151, audio output mould
Block 152 etc..
The information that display unit 151 is processed in may be displayed on mobile terminal 1 00.For example, when mobile terminal 1 00 is in electricity
During words call mode, display unit 151 can show and converse or other communicate (for example, text messaging, multimedia files
Download etc.) related user interface (UI) or graphic user interface (GUI).When mobile terminal 1 00 is in video calling pattern
Or during image capture mode, display unit 151 can show the image of capture and/or the image of reception, illustrate video or figure
UI or GUI of picture and correlation function etc..
Meanwhile, when the display unit 151 and touch pad touch screen with formation superposed on one another in the form of layer, display unit
151 can serve as input equipment and output device.Display unit 151 can include liquid crystal display (LCD), thin film transistor (TFT)
In LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc. at least
It is a kind of.Some in these display may be constructed such that transparence to allow user from outside viewing, and this is properly termed as transparent
Display, typical transparent display can be, for example, TOLED (transparent organic light emitting diode) display etc..According to specific
The embodiment wanted, mobile terminal 1 00 can include two or more display units (or other display devices), for example, move
Dynamic terminal can include outernal display unit (not shown) and inner display unit (not shown).Touch screen can be used for detection and touch
Input pressure and touch input position and touch input area.
Dio Output Modules 152 can mobile terminal in call signal reception pattern, call mode, logging mode,
It is when under the isotypes such as speech recognition mode, broadcast reception mode, that wireless communication unit 110 is received or in memorizer 160
The voice data transducing audio signal of middle storage and it is output as sound.And, dio Output Modules 152 can be provided and movement
The audio output (for example, call signal receives sound, message sink sound etc.) of the specific function correlation that terminal 100 is performed.
Dio Output Modules 152 can include speaker, buzzer etc..
Memorizer 160 can store software program for the process and control operation performed by controller 180 etc., Huo Zheke
With the data (for example, telephone directory, message, still image, video etc.) for temporarily storing own Jing outputs or will export.And
And, memorizer 160 can be storing the vibration of various modes with regard to exporting when touching and being applied to touch screen and audio signal
Data.
Memorizer 160 can include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, many
Media card, card-type memorizer (for example, SD or DX memorizeies etc.), random access storage device (RAM), static random-access storage
Device (SRAM), read only memory (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory
(PROM), magnetic storage, disk, CD etc..And, mobile terminal 1 00 can perform memorizer with by network connection
The network storage device cooperation of 160 store function.
The overall operation of the generally control mobile terminal of controller 180.For example, controller 180 is performed and voice call, data
The related control of communication, video calling etc. and process.In addition, controller 180 can be included for reproducing (or playback) many matchmakers
The multi-media module 1810 of volume data, multi-media module 1810 can be constructed in controller 180, or it is so structured that and control
Device processed 180 is separated.Controller 180 can be with execution pattern identifying processing, by the handwriting input for performing on the touchscreen or figure
Piece is drawn input and is identified as character or image.
Specifically, controller 180 can also include:
File scan module 201, for when the triggering of the media file condition of scanning is detected, scanning the media folder
In media file and media application media database, obtain the first media file information in the media folder with
And the second media file information in the media database;
Analysis module 202 is compared, for carrying out with second media file information to first media file information
Analysis is compared, in judging the media folder, whether has media file to change, wherein, the change of media file is at least wrapped
Include increasing newly, being deleted or modified for media file;
Update module 203, if for having media file to change in the media folder, corresponding to and updating the matchmaker
The media database and media play list of body application, wherein:Store path by recording in the media database is looked into
When inquiry does not have media file, the operation for deleting corresponding record is not performed.
Power subsystem 190 receives external power or internal power under the control of controller 180 and provides operation each unit
Appropriate electric power needed for part and component.
Various embodiments described herein can be with use such as computer software, hardware or its any combination of calculating
Machine computer-readable recording medium is implementing.For hardware is implemented, embodiment described herein can be by using application-specific IC
(ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene can
Programming gate array (FPGA), processor, controller, microcontroller, microprocessor, it is designed to perform function described herein
At least one in electronic unit implementing, in some cases, can be implemented in controller 180 by such embodiment.
For software is implemented, the embodiment of such as process or function can with allow to perform the single of at least one function or operation
Software module is implementing.Software code can be come by the software application (or program) write with any appropriate programming language
Implement, perform during software code can be stored in memorizer 160 and by controller 180.
As shown in Figure 1 mobile terminal 1 00 may be constructed such that using via frame or packet transmission data it is all if any
Line and wireless communication system and satellite-based communication system are operating.
The communication system that mobile terminal wherein of the invention is operable to is described referring now to Fig. 2.
Such communication system can use different air interfaces and/or physical layer.For example, used by communication system
Air interface includes such as frequency division multiple access (FDMA), time division multiple acess (TDMA), CDMA (CDMA) and universal mobile communications system
System (UMTS) (especially, Long Term Evolution (LTE)), global system for mobile communications (GSM) etc..As non-limiting example, under
The description in face is related to cdma communication system, but such teaching is equally applicable to other types of system.
With reference to Fig. 2, cdma wireless communication system can include multiple mobile terminal 1s 00, multiple base stations (BS) 270, base station
Controller (BSC) 275 and mobile switching centre (MSC) 280.MSC 280 is configured to and Public Switched Telephony Network (PSTN)
290 form interface.MSC 280 is also structured to form interface with the BSC 275 that can be couple to base station via back haul link.Return
If journey circuit can be constructed according to any one in the interface that Ganji knows, the interface includes such as E1/T1, ATM, IP,
PPP, frame relay, HDSL, ADSL or xDSL.It will be appreciated that system can include multiple BSC 275 as shown in Figure 2.
Each BS 270 can service one or more subregions (or region), by multidirectional antenna or the day of sensing specific direction
Each subregion that line is covered is radially away from BS 270.Or, each subregion can be by for two of diversity reception or more
Multiple antennas are covered.Each BS 270 may be constructed such that the multiple frequency distribution of support, and each frequency distribution with specific frequency
Spectrum (for example, 1.25MHz, 5MHz etc.).
What subregion and frequency were distributed intersect can be referred to as CDMA Channel.BS 270 can also be referred to as base station transceiver
System (BTS) or other equivalent terms.In this case, term " base station " can be used for broadly representing single BSC
275 and at least one BS 270.Base station can also be referred to as " cellular station ".Or, each subregion of specific BS 270 can be claimed
For multiple cellular stations.
As shown in Figure 2, broadcast singal is sent to broadcsting transmitter (BT) 295 mobile terminal operated in system
100.Broadcasting reception module 111 is arranged at mobile terminal 1 00 to receive the broadcast sent by BT 295 as shown in Figure 1
Signal.In fig. 2 it is shown that several global positioning system (GPS) satellites 300.Satellite 300 helps position multiple mobile terminals
At least one of 100.
In fig. 2, multiple satellites 300 are depicted, it is understood that be, it is possible to use any number of satellite obtains useful
Location information.Used as a typical operation of wireless communication system, BS 270 is received from the reverse of various mobile terminal 1s 00
Link signal.Mobile terminal 1 00 generally participates in call, information receiving and transmitting and other types of communication.Each of certain base station reception
Reverse link signal is processed in specific BS 270.The data of acquisition are forwarded to the BSC 275 of correlation.BSC is provided
Call resource allocation and the mobile management function of the coordination including the soft switching process between BS 270.BSC 275 will also be received
To data be routed to MSC 280, its provide for PSTN 290 formed interface extra route service.Similarly,
PSTN 290 and MSC 280 forms interface, and MSC and BSC 275 forms interface, and BSC 275 correspondingly control BS 270 with
Forward link signals are sent to into mobile terminal 1 00.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of the invention is proposed.
As, in prior art, the media application such as media player depends on the multimedia database of system, when media text
After the lower media file of part folder is changed by third-party application, it is impossible to by the record in media database, media play list and be
The file united under each media folder carries out real-time synchronization, and after updating media database, can cause broadcasting for media file
Put the information such as duration, remarks, label TAG to be deleted, when user plays the media next time again, it is impossible to the time that record has been played,
Cause Consumer's Experience poor.
For this purpose, the present invention proposes a solution, the data base of media application is depended on, the matchmaker under media folder
(remove as third-party application carries out renaming, deletion, modification operation, and SD card to media file when body file changes
Deng), for non-existent file in media database, deletion action is not performed, but this record in data base is updated to
Unactivated state, while updating playlist, hides non-existent media file, real-time update playing duration, remarks, label
TAG information to media database, so as to ensure the integrity of media information, it is ensured that the effectiveness of image in media play list,
Improve Consumer's Experience.
Specifically, as shown in figure 3, first embodiment of the invention proposes a kind of media playing apparatus, including:File scan mould
Block 201, comparison analysis module 202 and update module 203, wherein:
File scan module 201, for file scan module, for when detecting the media file condition of scanning and triggering,
The media database of the media file and media application in the media folder is scanned, is obtained in the media folder
The second media file information in first media file information and the media database;
Analysis module 202 is compared, for carrying out with second media file information to first media file information
Analysis is compared, in judging the media folder, whether has media file to change, wherein, the change of media file is at least wrapped
Include increasing newly, being deleted or modified for media file;
Update module 203, if for having media file to change in the media folder, corresponding to and updating the matchmaker
The media database and media play list of body application, wherein:Store path by recording in the media database is looked into
When inquiry does not have media file, the operation for deleting corresponding record is not performed.
Further, the matching update module 202, if there is the new of media file in being additionally operable to the media folder
Increase, then the relative recording of the store path of the newly-increased media file, file duration is inserted in the media database;
And/or,
If there is the deletion of media file in the media folder, corresponding record in the media database is updated, and
This record is set to into unactivated state, wherein, the record of renewal at least includes the playing duration, standby for being deleted media file
Note, label TAG information;
And/or,
If there is the modification of media file in the media folder, corresponding record in the media database is updated, and
The last modification time of file during this is recorded is updated to the modification time of the media file of the modification.
Further, the matching update module 202, if if the media file increased newly in being additionally operable to the media folder
Be the media file for reappearing to be moved into because of SD card, then update the corresponding record of the media database, and this record is arranged
For state of activation;
And/or, if the media file deleted in the media folder is lost because SD card is removed, update the matchmaker
Corresponding record in volume data storehouse, and this record is set to into unactivated state;
And/or, if the media file changed in the media folder is the media file of renaming, and the media file
Store path change, then update corresponding record in the media database, by matching record store path be changed to currently
The store path of media file;Or, if the media file changed in the media folder is document retaining name but replaces former
The media file of file, then be inserted into the relevant information of this media file as new record in the media database.
Specifically, the present embodiment media playing apparatus can apply to mobile phone, panel computer, palm PC PDA or notes
The mobile terminals such as this computer, can also be applied to the fixed terminals such as digital TV, desk computer, and the present embodiment is not limited to this
System.The present embodiment is illustrated with mobile phone.
The present embodiment is provided with media play application software, such as media player in the terminals such as mobile phone, and which is played
Media file can be audio file, video file or audio-video document.
Media player often relies on the multimedia database (hereinafter referred to as media database) in terminal system.
Wherein, correspondence media database, is generally provided with media folder, in terminal system for storing corresponding matchmaker
Body file, in multimedia database, essential record has the store path of each media file in media folder, file name, file
Size, file duration, file type etc., additionally, when multimedia database is also played for media file additional maintenance media
The parameter informations such as length, remarks, label (TAG).
When user starts media application software playing audio-video document, media application software can call media data first
The media file information recorded in storehouse, then, goes to call media file by the media file information recorded in media database
Corresponding media file in folder, so as to show corresponding image, realizes media play.
As existing media application software depends on the media database of system, the media file under media folder
By the third-party application modification outside media application, (such as third party application has carried out renaming, modification to media file
Remove/move into and operate Deng operation, or SD card (Secure Digital Memory Card, safe digital card)) after, it is impossible to will
Record, media play list in media database and the file under system each media folder carry out real-time synchronization.Now,
When playing, there is some of media database record, corresponding media file cannot be found by its store path, caused
Poor user experience.Further, since media player is media file additional maintenance media playing duration, remarks, label TAG
Etc. information, user is not intended to these information and is deleted.
In order to avoid above-mentioned situation, the present embodiment is set with corresponding trigger condition, to be scanned to media file, leads to
Overscanning obtains media file information and the media file information in media database in terminal system media folder, with
Just the file under the record in media database, media play list and system each media folder is carried out into real-time synchronization,
Ensure concordance, the integrity of media file information, lift Consumer's Experience.Wherein, when being scanned, for media database
In there is no the record of media file, do not perform deletion action, but update the data storehouse, this record is set to into un-activation shape
State, and playlist is updated, hide non-existent media file.
In the present embodiment, the media file information can include:When the filename of media file, store path, file
Whether the last modification time of length, file size, file and/or file activate, and file playing duration, remarks, label TAG
Deng.
Specifically, the present embodiment sets following media file scanning trigger mechanism:
1st, when into media application, or after media application is started, when being back to media play list main interface, need
Scanning medium file, updates the media database of media play list and media application;
2nd, when generation SD card is inserted/removed, scanning medium file is needed, media play list is updated with media application
Media database;
3rd, monitoring file presss from both sides the broadcast of content changing, and when such broadcast is received, startup file scanning, is that active request is swept
The function of retouching provides extension.
Detect the media file condition of scanning trigger when, end of scan system medium file folder in media file and
The media database of media application, obtains the media file information and media database in the terminal system media folder
In media file information.
Wherein, as a kind of media file scan mode, following media file strobe utility can be adopted:
As shown in figure 4, by taking video file as an example, idiographic flow is as follows:
S11, scanning file;
S12, judgement are files, then into S13;Otherwise, return S11;
S13, determines whether video format file;If it is not, then entering S14;
S14, resolution file header;
S15, judges whether mimetype therein includes " video " field etc.;If so, then judge it is video file, it is no
Then, judge it is not video file.
Specifically, after startup file scanning, the media folder on terminal inside/outside portion memorizer is traveled through one by one and is swept
Retouch, filtering media files form, such as, whether file suffixes is the audio frequency and video form such as .mp4/.wmv.If not these forms,
Then resolution file header, judges whether its mimetype includes " video/ " field etc..In scanning to after media file, by text
Part parsing, decoding, preview show, it is possible thereby to improve the scan efficiency of media file.
For the scanning of the media database of media application, the media file recorded in main scanning multimedia database
Key message, such as:Store path, file name, file size, file duration, label TAG, remarks, playing duration letter
The information such as breath, file type, file state of activation.
After the media file information in media file information and media database in media folder is got, by two
The media file information of person is compared, and judges whether the media file information in media folder changes, if sending out
It is raw to change, then the media file information recorded in updating media database is corresponded to, while updating media play list.
Wherein, judge whether the media file information in media folder changes, in mainly judging media folder
Whether media file newly-increased, deletion, modification operation etc. are had.
(as third-party application file manager enters to media file when media file in containing media folder changes
Row renaming, deletion, content modification operation, and SD card removal etc.), trigger the multi-medium data update mechanism of media application.
The present embodiment is considered:When third-party application has carried out the operation such as renaming, modification, or SD card to media file
Operation is removed/moved into, and the media database of picture library is not upgraded in time, now be there are problems that this:In data base
Some record, it is impossible to corresponding media file is found by its store path, then judge this document do not exist.Further, since
Picture library is the parameter informations such as media file additional maintenance classification TAG, collection, secret, and user is not intended to deletion these information.
Therefore, when being scanned, for non-existent record, deletion action is not performed, but updates the data storehouse, will
This record is set to unactivated state, and updates media play list, does not show non-existent media file.
When starting scanning, start scanning thread, inquire about and cache the information of all records in picture library multimedia database:Deposit
Whether storage path, file duration, the last modification time of file, file activate, for media folder under each media
Fileinfo is contrasted.
Specifically, the media file in media file information and the media database in the media folder that will be obtained
Information is compared, and (the present embodiment will weight whether the newly-increased of media file, deletion, modification in judging the media folder
Name as the one kind in modification) operation.
Wherein, whether there are the newly-increased of media file, deletion in judging the media folder, modification operation can be using such as
Under type:
If will be right in the filename of the media file in media folder, store path, file duration and media database
The record answered is matched, and the record of matching is can not find in media database, then have media in judging the media folder
File it is newly-increased;
If will be right in the filename of the media file in media folder, store path, file duration and media database
The record answered is matched, and is recorded present in media database, and there is no corresponding media text in media folder
Part information, the then deletion for having media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time with
In media database, corresponding record is matched, when filename, store path and file duration do not change and finally change
Between change, then have the modification of media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time with
In media database, corresponding record is matched, and file duration does not change and filename and store path change, then
There is the renaming of media file in judging the media folder.
Below to the modification outside the newly-increased of media file, deletion, renaming, the media number under the application scenarios of renaming
It is described in detail according to synchronized update:
1st, for the application scenarios of newly-increased media file:
Two kinds of situations are moved into including newly-increased media file and SD card, wherein:
For newly-increased media file:One media file, this kind of feelings are increased newly under media folder by third-party application
Under shape, the media file information in media file information in media folder and the media database is obtained by scanning
Afterwards, by the filename of the media file in media folder, store path, file duration record corresponding with media database
Matched, if the record of matching is can not find in media database, in judging the media folder, had media file
It is newly-increased, then the relative recording of the store path of newly-increased media file, file duration is inserted in the media database.
For SD card is moved into:Due to not deleting to the respective record in data base, still can look for during scanning
To the record of matching, therefore, the media that reappear are moved into because of SD card by comparing to detect to exist in media folder
File, now then updates the corresponding record of the media database, and this record is set to state of activation.
2nd, for the application scenarios for deleting media file:
Two kinds of situations are removed including deletion media file and SD card, wherein:
For deletion media file:After third-party application (such as file manager) deletes certain media file, due to
File is not present, when traveling through the All Files under media folder, does not have this record, in this case, then updates
Corresponding record in the media database, and this record is set to into unactivated state;Wherein, the record of renewal at least include by
The playing duration of deletion media file, remarks, label TAG information, it is to avoid after updating media database, cause media file
The information such as playing duration, remarks, label TAG is deleted, and user next time is when playing the media again, it is impossible to record played when
Between, cause Consumer's Experience poor.
For SD card is removed:To in media folder, there is media file to lose, class because SD card is removed by Determination
It is similar to delete, as file is not present, then updates corresponding record in the media database, and this record is set to into un-activation
State.
3rd, for the application scenarios of modification media file:
Third-party application changes certain media file, such as enters edlin to file, makes the modification time of file change,
But store path (path) is not changed with file duration:This kind of situation, if being deposited in media folder by Determination
In the media file of modification, then corresponding record in the media database is updated, and when this file in recording finally is changed
Between be updated to the modification media file modification time, other information remains unchanged.
4th, for the application scenarios of renaming media file:
Including following two situations:
A. media file RNTO alternative document name:
Media file is still suffered from, but stores path changes, it is impossible to matched with having recorded in data base.By file when
Length is matched with the carrying out of all records in data base, can be found an equal record of duration, now be updated media database,
The path information of matching record is changed to into the routing information of existing file, other information keeps constant.(for extreme case,
If finding the record of a plurality of duration matching, as original cannot be determined whether, now will be using this fileinfo as new note
Record is inserted in data base).
B., after deleting certain file under media folder, a new file is copied into, and is named as original media file
Name:Now the path information of file is matched with former record, further compares duration information, generally, new file
The duration recorded in duration and media database is unequal, using this file-related information as new record, is inserted in data base.
If there is the record of identical path information in data base, first this record deletion.(for extreme case, new copied files
When path records original with data base with duration information are matched, the modification time for directly being updated the data storehouse respective record is
The modification time of current file).
If that is, there is the media file of renaming by Determination in media folder, and media text
The store path of part changes, then update corresponding record in the media database, and the store path of matching record is changed to work as
The store path of front media file;Or, if there is document retaining name in detecting media folder but replace the matchmaker of original
Body file, then be inserted into the relevant information of this media file as new record in the media database.
Media file in file by third-party application change, such as media file be renamed, delete, changing, with
And SD card remove etc. when, real-time update media database, after the renewal for completing media database, real-time update media application
Media play list, does not show non-existent media file, and to ensure the effectiveness of media play list, and real-time synchronization is
Playing duration, remarks, label TAG information to media database, record media playing duration play position when playing again from
Put continuation to play.
Thus, by the program, when the media file under media folder is changed, such as third-party application renaming,
Delete, have modified media file, and SD card is moved out of, real-time synchronization media play list and media database only show
Already present image, so as to ensure the integrity of media information, it is ensured that the effectiveness of image in media play list, improves and uses
Experience at family.The overall flow block diagram of the present embodiment is referred to (by taking video file as an example) described in Fig. 5.
Further, the update module 203, is additionally operable to be spaced Preset Time, removes the media number with preset rules
According to the label information of the media file of banked cache.
Specifically, as shown in fig. 6, can at regular intervals (such as 6 months), according to how long not being used by a user,
The frequency that used, whether include:Playing duration, remarks, label TAG information, as rule, remove media database and delay
The label information of the media file deposited.
Wherein, the frequency for being used is:It is total that the number of times that the media file is previously used/all recording files are previously used
Number of times (using played media file, modification, mobile etc. is referred to).
The present embodiment passes through such scheme, according to the use habit of user, the media of periodic cleaning media data banked cache
The label information of file, not only can improve the availability of media database memory space, and the cleaning by data, be use
Family uses file provider just.
Above the media playing apparatus in the embodiment of the present invention are described, below to the matchmaker in the embodiment of the present invention
Body player method is described.
As shown in fig. 7, first embodiment of the invention proposes a kind of media playing method, terminal is applied to, in the terminal
Media application is installed, the system configuration of the terminal have based on the media folder of the media application, media database and
Media play list, methods described include:
Step S101, when the triggering of the media file condition of scanning is detected, scans the media text in the media folder
The media database of part and media application, obtains the first media file information and the media in the media folder
The second media file information in data base;
In the specific implementation, the executive agent of the present embodiment method can for mobile phone, panel computer, palm PC PDA or
The mobile terminals such as notebook computer, can also not limited to this for the fixed terminals such as numeral TV, desk computer, the present embodiment
System.The present embodiment is illustrated with mobile phone.
The present embodiment is provided with media play application software, such as media player in the terminals such as mobile phone, and which is played
Media file can be audio file, video file or audio-video document.
Media player often relies on the multimedia database (hereinafter referred to as media database) in terminal system.
Wherein, correspondence media database, is generally provided with media folder, in terminal system for storing corresponding matchmaker
Body file, in multimedia database, essential record has the store path of each media file in media folder, file name, file
Size, file duration, file type etc., additionally, when multimedia database is also played for media file additional maintenance media
The parameter informations such as length, remarks, label (TAG).
When user starts media application software playing audio-video document, media application software can call media data first
The media file information recorded in storehouse, then, goes to call media file by the media file information recorded in media database
Corresponding media file in folder, so as to show corresponding image, realizes media play.
As existing media application software depends on the media database of system, the media file under media folder
By the third-party application modification outside media application, (such as third party application has carried out renaming, modification to media file
Remove/move into and operate Deng operation, or SD card (Secure Digital Memory Card, safe digital card)) after, it is impossible to will
Record, media play list in media database and the file under system each media folder carry out real-time synchronization.Now,
When playing, there is some of media database record, corresponding media file cannot be found by its store path, caused
Poor user experience.Further, since media player is media file additional maintenance media playing duration, remarks, label
(TAG) information such as, user are not intended to these information and are deleted.
In order to avoid above-mentioned situation, the present embodiment is set with corresponding trigger condition, to be scanned to media file, leads to
Overscanning obtains media file information and the media file information in media database in terminal system media folder, with
Just the file under the record in media database, media play list and system each media folder is carried out into real-time synchronization,
Ensure concordance, the integrity of media file information, lift Consumer's Experience.Wherein, when being scanned, for media database
In there is no the record of media file, do not perform deletion action, but update the data storehouse, this record is set to into un-activation shape
State, and playlist is updated, hide non-existent media file.
In the present embodiment, the media file information can include:When the filename of media file, store path, file
Whether the last modification time of length, file size, file and/or file activate, and file playing duration, remarks, label TAG
Deng.
Specifically, the present embodiment sets following media file scanning trigger mechanism:
1st, when into media application, or after media application is started, when being back to media play list main interface, need
Scanning medium file, updates the media database of media play list and media application;
2nd, when generation SD card is inserted/removed, scanning medium file is needed, media play list is updated with media application
Media database;
3rd, monitoring file presss from both sides the broadcast of content changing, and when such broadcast is received, startup file scanning, is that active request is swept
The function of retouching provides extension.
Detect the media file condition of scanning trigger when, end of scan system medium file folder in media file and
The media database of media application, obtains the media file information and media database in the terminal system media folder
In media file information.
Wherein, as a kind of media file scan mode, following media file strobe utility can be adopted:
As shown in figure 4, by taking video file as an example, idiographic flow is as follows:
S11, scanning file;
S12, judgement are files, then into S13;Otherwise, return S11;
S13, determines whether video format file;If it is not, then entering S14;
S14, resolution file header;
S15, judges whether mimetype therein includes " video " field etc.;If so, then judge it is video file, it is no
Then, judge it is not video file.
Specifically, after media file scanning is started, the media folder on terminal inside/outside portion memorizer is traveled through one by one
Scanning, filtering media files form, such as, whether file suffixes is the audio frequency and video form such as .mp4/.wmv.If not these lattice
Formula, then resolution file header, judges whether its mimetype includes " video/ " field etc..In scanning to after media file,
Document analysis, decoding, preview are shown, it is possible thereby to improve the scan efficiency of media file.
For the scanning of the media database of media application, the media file recorded in main scanning multimedia database
Key message, such as:Store path, file name, file size, file duration, label TAG, remarks, playing duration letter
The information such as breath, file type, file state of activation.
Step S102, is compared with second media file information to first media file information, is sentenced
Whether there is media file to change in the disconnected media folder, wherein, the change of media file at least includes media file
Increase newly, be deleted or modified;
Step S103, if having media file to change in the media folder, corresponds to and updates the media application
Media database and media play list, wherein:Do not deposited by the store path inquiry of record in the media database
In media file, the operation for deleting corresponding record is not performed.
After the media file information in media file information and media database in media folder is got, by two
The media file information of person is compared, and judges whether the media file information in media folder changes, if sending out
It is raw to change, then the media file information recorded in updating media database is corresponded to, while updating media play list.
Wherein, judge whether the media file information in media folder changes, in mainly judging media folder
Whether media file newly-increased, deletion, modification operation etc. are had.
(as third-party application file manager enters to media file when media file in containing media folder changes
Row renaming, deletion, content modification operation, and SD card removal etc.), trigger the multi-medium data update mechanism of media application.
The present embodiment is considered:When third-party application has carried out the operation such as renaming, content modification to media file, or
SD card removes/moves into operation, and the media database of picture library is not upgraded in time, now be there are problems that this:Data
Some of storehouse records, it is impossible to find corresponding media file by its store path, then judge that this document is not present.Additionally,
As picture library is the parameter informations such as media file additional maintenance classification TAG, collection, secret, user be not intended to deletion these
Information.
Therefore, when being scanned, for non-existent record, deletion action is not performed, but updates the data storehouse, will
This record is set to unactivated state, and updates media play list, does not show non-existent media file.
When starting scanning, start scanning thread, inquire about and cache the information of all records in picture library multimedia database:Deposit
Whether storage path, file duration, the last modification time of file, file activate, for media folder under each media
Fileinfo is contrasted.
Specifically, the media file in media file information and the media database in the media folder that will be obtained
Information is compared, and (the present embodiment will weight whether the newly-increased of media file, deletion, modification in judging the media folder
Name as the one kind in modification) operation.
Wherein, whether there are the newly-increased of media file, deletion in judging the media folder, modification operation can be using such as
Under type:
If will be right in the filename of the media file in media folder, store path, file duration and media database
The record answered is matched, and the record of matching is can not find in media database, then have media in judging the media folder
File it is newly-increased;
If will be right in the filename of the media file in media folder, store path, file duration and media database
The record answered is matched, and is recorded present in media database, and there is no corresponding media text in media folder
Part information, the then deletion for having media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time with
In media database, corresponding record is matched, when filename, store path and file duration do not change and finally change
Between change, then have the modification of media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time with
In media database, corresponding record is matched, and file duration does not change and filename and store path change, then
There is the renaming of media file in judging the media folder.
Below to the modification outside the newly-increased of media file, deletion, renaming, the media number under the application scenarios of renaming
It is described in detail according to synchronized update:
1st, for the application scenarios of newly-increased media file:
Two kinds of situations are moved into including newly-increased media file and SD card, wherein:
For newly-increased media file:One media file, this kind of feelings are increased newly under media folder by third-party application
Under shape, the media file information in media file information in media folder and the media database is obtained by scanning
Afterwards, by the filename of the media file in media folder, store path, file duration record corresponding with media database
Matched, if the record of matching is can not find in media database, in judging the media folder, had media file
It is newly-increased, then the relative recording of the store path of newly-increased media file, file duration is inserted in the media database.
For SD card is moved into:Due to not deleting to the respective record in data base, still can look for during scanning
To the record of matching, therefore, the media that reappear are moved into because of SD card by comparing to detect to exist in media folder
File, now then updates the corresponding record of the media database, and this record is set to state of activation.
2nd, for the application scenarios for deleting media file:
Two kinds of situations are removed including deletion media file and SD card, wherein:
For deletion media file:After third-party application (such as file manager) deletes certain media file, due to
File is not present, when traveling through the All Files under media folder, does not have this record, in this case, then updates
Corresponding record in the media database, and this record is set to into unactivated state;Wherein, the record of renewal at least include by
The playing duration of deletion media file, remarks, label TAG information, it is to avoid after updating media database, cause media file
The information such as playing duration, remarks, label TAG is deleted, and user next time is when playing the media again, it is impossible to record played when
Between, cause Consumer's Experience poor.
For SD card is removed:To in media folder, there is media file to lose, class because SD card is removed by Determination
It is similar to delete, as file is not present, then updates corresponding record in the media database, and this record is set to into un-activation
State.
3rd, for the application scenarios of modification media file:
Third-party application changes certain media file, such as enters edlin to file, makes the modification time of file change,
But store path (path) is not changed with file duration:This kind of situation, if being deposited in media folder by Determination
In the media file of modification, then corresponding record in the media database is updated, and when this file in recording finally is changed
Between be updated to the modification media file modification time, other information remains unchanged.
4th, for the application scenarios of renaming media file:
Including following two situations:
A. media file RNTO alternative document name:
Media file is still suffered from, but stores path changes, it is impossible to matched with having recorded in data base.By file when
Length is matched with the carrying out of all records in data base, can be found an equal record of duration, now be updated media database,
The path information of matching record is changed to into the routing information of existing file, other information keeps constant.(for extreme case,
If finding the record of a plurality of duration matching, as original cannot be determined whether, now will be using this fileinfo as new note
Record is inserted in data base).
B., after deleting certain file under media folder, a new file is copied into, and is named as original media file
Name:Now the path information of file is matched with former record, further compares duration information, generally, new file
The duration recorded in duration and media database is unequal, using this file-related information as new record, is inserted in data base.
If there is the record of identical path information in data base, first this record deletion.(for extreme case, new copied files
When path records original with data base with duration information are matched, the modification time for directly being updated the data storehouse respective record is
The modification time of current file).
If that is, there is the media file of renaming by Determination in media folder, and media text
The store path of part changes, then update corresponding record in the media database, and the store path of matching record is changed to work as
The store path of front media file;Or, if there is document retaining name in detecting media folder but replace the matchmaker of original
Body file, then be inserted into the relevant information of this media file as new record in the media database.
Media file in file by third-party application change, such as media file be renamed, delete, changing, with
And SD card remove etc. when, real-time update media database, after the renewal for completing media database, real-time update media application
Media play list, does not show non-existent media file, and to ensure the effectiveness of media play list, and real-time synchronization is
Playing duration, remarks, label TAG information to media database, record media playing duration play position when playing again from
Put continuation to play.
Thus, by the program, when the media file under media folder is changed, such as third-party application renaming,
Delete, have modified media file, and SD card is moved out of, real-time synchronization media play list and media database only show
Already present image, so as to ensure the integrity of media information, it is ensured that the effectiveness of image in media play list, improves and uses
Experience at family.The overall flow block diagram of the present embodiment is referred to (by taking video file as an example) described in Fig. 5.
As shown in figure 8, second embodiment of the invention proposes a kind of media playing method, based on the enforcement shown in above-mentioned Fig. 7
Example, its difference are that the present embodiment also includes the labelling letter of the media file for being accustomed to removing media data banked cache according to user
The scheme of breath.
In the present embodiment, the method also includes:
Step S104, is spaced Preset Time, and the mark of the media file of the media data banked cache is removed with preset rules
Note information.
Specifically, as shown in fig. 6, can at regular intervals (such as 6 months), according to how long not being used by a user,
The frequency that used, whether include:Playing duration, remarks, label TAG information, as rule, remove media database and delay
The label information of the media file deposited.
Wherein, the frequency for being used is:It is total that the number of times that the media file is previously used/all recording files are previously used
Number of times (using played media file, modification, mobile etc. is referred to).
The present embodiment passes through such scheme, according to the use habit of user, the media of periodic cleaning media data banked cache
The label information of file, not only can improve the availability of media database memory space, and the cleaning by data, be use
Family uses file provider just.
It should be noted that herein, term " including ", "comprising" or its any other variant are intended to non-row
His property is included, so that a series of process, method, article or device including key elements not only include those key elements, and
And also include other key elements being not expressly set out, or also include for this process, method, article or device institute inherently
Key element.In the absence of more restrictions, the key element for being limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
Also there is other identical element in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words
The part for going out contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium
In (such as ROM/RAM, magnetic disc, CD), use so that a station terminal equipment including some instructions (can be mobile phone, computer, clothes
Business device, air-conditioner, or network equipment etc.) perform method described in each embodiment of the invention.
The preferred embodiments of the present invention are these are only, the scope of the claims of the present invention is not thereby limited, it is every using this
Equivalent structure or equivalent flow conversion that bright description and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.
Claims (14)
1. a kind of media playing method, it is characterised in that be applied to terminal, media application, the end are provided with the terminal
The system configuration at end has based on the media folder of the media application, media database and media play list, methods described
Including:
When the triggering of the media file condition of scanning is detected, the media file and media application in the media folder is scanned
Media database, obtain second in the first media file information and the media database in the media folder
Media file information;
First media file information is compared with second media file information, the media file is judged
Whether there is media file to change in folder, wherein, change at least the increasing newly, delete or repairing including media file of media file
Change;
If having media file to change in the media folder, correspond to the media database that updates the media application and
Media play list, wherein:When there is no media file by the store path inquiry of record in the media database, no
Perform the operation for deleting corresponding record.
2. method according to claim 1, it is characterised in that if having media file in the media folder
Change, then corresponding to the step of updating the media database of the media application includes:
If having the newly-increased of media file in the media folder, during by the store path of the newly-increased media file, file
Long relative recording is inserted in the media database;
And/or,
If there is the deletion of media file in the media folder, update corresponding record in the media database, and by this
Record is set to unactivated state, wherein, the record of renewal at least include being deleted the playing duration of media file, remarks,
Label TAG information;
And/or,
If there is the modification of media file in the media folder, update corresponding record in the media database, and by this
The last modification time of file in record is updated to the modification time of the media file of the modification.
3. method according to claim 2, it is characterised in that if having media file in the media folder
Change, then also include in corresponding to the step of updating the media database of the media application:
If the media file increased newly in the media folder is the media file for reappearing to be moved into because of SD card, update described
The corresponding record of media database, and this record is set to into state of activation;
And/or,
If the media file deleted in the media folder is lost because SD card is removed, update in the media database
Corresponding record, and this record is set to into unactivated state;
And/or,
If the media file changed in the media folder is the media file of renaming, and the store path of the media file
Change, then update corresponding record in the media database, the store path of matching record is changed to into current media file
Store path;Or, if the media file changed in the media folder is document retaining name but replaces the media of original
File, then be inserted into the relevant information of this media file as new record in the media database.
4. the method according to claim 1,2 or 3, it is characterised in that the media file condition of scanning is:
When the media application is activated;
Or,
After media application is started, during into media play list interface;
Or,
Detect SD card insert/remove terminal when;
Or,
When the broadcast of media folder content changing is listened to.
5. the method according to claim 1,2 or 3, it is characterised in that first media file information and the second media
Information includes:The filename of media file, store path, file duration, playing duration, file size, file have finally been changed
Whether time and/or file activate;
It is described that first media file information is compared with second media file information, judge the media
The step of whether having media file to change in file includes:
If will be the filename of the media file in media folder, store path, file duration corresponding with media database
Record is matched, and can not find the record of matching, then have media file in judging the media folder in media database
It is newly-increased;
If will be the filename of the media file in media folder, store path, file duration corresponding with media database
Record is matched, and is recorded present in media database, and there is no corresponding media file letter in media folder
Breath, then have the deletion of media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time and media
In data base, corresponding record is matched, and filename, store path and file duration do not change and last modification time is sent out
It is raw to change, then there is the modification of media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time and media
In data base, corresponding record is matched, and file duration does not change and filename and store path change, then judge
There is the renaming of media file in the media folder.
6. the method according to claim 1,2 or 3, it is characterised in that the correspondence updates the media of the media application
Also include in the step of data base and media play list:
According to the media database after renewal, the media play list of media application is updated, hide non-existent media file, its
In:When there is no media file by the store path inquiry of record in media database, broadcasting for the media file is recorded
Duration is put, when the media file is played for next time, from continuing at play position before to play.
7. the method according to claim 1,2 or 3, it is characterised in that the correspondence updates the media of the media application
Also include after the step of data base and media play list:
Interval Preset Time, removes the label information of the media file of the media data banked cache with preset rules.
8. a kind of media playing apparatus, it is characterised in that be applied to terminal, media application, the end are provided with the terminal
The system configuration at end has based on the media folder of the media application, media database and media play list, described device
Including:
File scan module, for when the triggering of the media file condition of scanning is detected, scanning the matchmaker in the media folder
The media database of body file and media application, obtains the first media file information in the media folder and described
The second media file information in media database;
Analysis module is compared, for comparing to first media file information and second media file information point
Whether analysis, have media file to change in judging the media folder, wherein, the change of media file at least includes media
File is increased newly, is deleted or modified;
Update module, if for having media file to change in the media folder, corresponding to and updating the media application
Media database and media play list, wherein:Do not deposited by the store path inquiry of record in the media database
In media file, the operation for deleting corresponding record is not performed.
9. device according to claim 8, it is characterised in that
The update module, if there is the newly-increased of media file in being additionally operable to the media folder, by the newly-increased media text
The store path of part, the relative recording of file duration are inserted in the media database;
And/or,
If there is the deletion of media file in the media folder, update corresponding record in the media database, and by this
Record is set to unactivated state, wherein, the record of renewal at least include being deleted the playing duration of media file, remarks,
Label TAG information;
And/or,
If there is the modification of media file in the media folder, update corresponding record in the media database, and by this
The last modification time of file in record is updated to the modification time of the media file of the modification.
10. device according to claim 9, it is characterised in that
The update module, if the media file increased newly in being additionally operable to the media folder is reappeared because SD card is moved into
Media file, then update the corresponding record of the media database, and this record be set to state of activation;
And/or,
If the media file deleted in the media folder is lost because SD card is removed, update in the media database
Corresponding record, and this record is set to into unactivated state;
And/or,
If the media file changed in the media folder is the media file of renaming, and the store path of the media file
Change, then update corresponding record in the media database, the store path of matching record is changed to into current media file
Store path;Or, if the media file changed in the media folder is document retaining name but replaces the media of original
File, then be inserted into the relevant information of this media file as new record in the media database.
11. devices according to claim 8,9 or 10, it is characterised in that the media file condition of scanning is:
When the media application is activated;
Or,
After media application is started, during into media play list interface;
Or,
Detect SD card insert/remove terminal when;
Or,
When the broadcast of media folder content changing is listened to.
12. devices according to claim 8,9 or 10, it is characterised in that first media file information and the second matchmaker
Body information includes:The filename of media file, store path, file duration, playing duration, file size, file have finally been repaiied
Change the time and/or whether file activates;
The comparison analysis module, if be additionally operable to the filename of the media file in media folder, store path, file
Length record corresponding with media database is matched, and the record of matching is can not find in media database, then judge described
There is the newly-increased of media file in media folder;
If will be the filename of the media file in media folder, store path, file duration corresponding with media database
Record is matched, and is recorded present in media database, and there is no corresponding media file letter in media folder
Breath, then have the deletion of media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time and media
In data base, corresponding record is matched, and filename, store path and file duration do not change and last modification time is sent out
It is raw to change, then there is the modification of media file in judging the media folder;
If by the filename of the media file in media folder, store path, file duration and last modification time and media
In data base, corresponding record is matched, and file duration does not change and filename and store path change, then judge
There is the renaming of media file in the media folder.
13. devices according to claim 8,9 or 10, it is characterised in that
The update module, the media database after being additionally operable to according to renewal update the media play list of media application, hide
Non-existent media file, wherein:When there is no media file by the store path inquiry of record in media database, note
The playing duration of the media file is recorded, when the media file is played for next time, from continuing at play position before to play.
14. devices according to claim 8,9 or 10, it is characterised in that
The update module, is additionally operable to be spaced Preset Time, removes the media text of the media data banked cache with preset rules
The label information of part.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610979163.8A CN106557555A (en) | 2016-10-31 | 2016-10-31 | media playing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610979163.8A CN106557555A (en) | 2016-10-31 | 2016-10-31 | media playing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106557555A true CN106557555A (en) | 2017-04-05 |
Family
ID=58444189
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610979163.8A Pending CN106557555A (en) | 2016-10-31 | 2016-10-31 | media playing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106557555A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111914105A (en) * | 2019-05-08 | 2020-11-10 | 青岛海信移动通信技术股份有限公司 | File query method and device and electronic equipment |
CN113469438A (en) * | 2021-06-30 | 2021-10-01 | 北京达佳互联信息技术有限公司 | Data processing method, device, equipment and storage medium |
CN115002537A (en) * | 2021-12-23 | 2022-09-02 | 荣耀终端有限公司 | Video sharing method, electronic device, storage medium, and program product |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102104623A (en) * | 2010-12-20 | 2011-06-22 | 广州市动景计算机科技有限公司 | Method and system for performing break-point continuous playing of media file through mobile terminal |
CN103092988A (en) * | 2013-02-07 | 2013-05-08 | 广州市久邦数码科技有限公司 | Realizing method of directly managing mobile phone media resources on desktop |
CN105426386A (en) * | 2015-10-23 | 2016-03-23 | 小米科技有限责任公司 | File synchronization method and apparatus, and terminal device |
US20160292049A1 (en) * | 2015-03-31 | 2016-10-06 | Oracle International Corporation | Data recovery for a relational database management system instance in a heterogeneous database system |
CN106055611A (en) * | 2016-05-25 | 2016-10-26 | 努比亚技术有限公司 | Display device for scanning processes, mobile terminal and method |
-
2016
- 2016-10-31 CN CN201610979163.8A patent/CN106557555A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102104623A (en) * | 2010-12-20 | 2011-06-22 | 广州市动景计算机科技有限公司 | Method and system for performing break-point continuous playing of media file through mobile terminal |
CN103092988A (en) * | 2013-02-07 | 2013-05-08 | 广州市久邦数码科技有限公司 | Realizing method of directly managing mobile phone media resources on desktop |
US20160292049A1 (en) * | 2015-03-31 | 2016-10-06 | Oracle International Corporation | Data recovery for a relational database management system instance in a heterogeneous database system |
CN105426386A (en) * | 2015-10-23 | 2016-03-23 | 小米科技有限责任公司 | File synchronization method and apparatus, and terminal device |
CN106055611A (en) * | 2016-05-25 | 2016-10-26 | 努比亚技术有限公司 | Display device for scanning processes, mobile terminal and method |
Non-Patent Citations (1)
Title |
---|
WSM6960228 等: "台电MP4的电子书为什么删除之后再下还是会提示上次阅读的位置", 《百度知道HTTP://1T.CLICK/RNB》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111914105A (en) * | 2019-05-08 | 2020-11-10 | 青岛海信移动通信技术股份有限公司 | File query method and device and electronic equipment |
CN113469438A (en) * | 2021-06-30 | 2021-10-01 | 北京达佳互联信息技术有限公司 | Data processing method, device, equipment and storage medium |
CN113469438B (en) * | 2021-06-30 | 2024-01-05 | 北京达佳互联信息技术有限公司 | Data processing method, device, equipment and storage medium |
CN115002537A (en) * | 2021-12-23 | 2022-09-02 | 荣耀终端有限公司 | Video sharing method, electronic device, storage medium, and program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106559563A (en) | Image processing method and device | |
CN105915623A (en) | Device and method of processing application installation package | |
CN106648725A (en) | Terminal, server and configuration file upgrading method | |
CN105939416A (en) | Mobile terminal and application prestart method thereof | |
CN106610770A (en) | Picture viewing method and device | |
CN106412334A (en) | Notification message shielding device and method | |
CN105718166A (en) | Display interface skip device and method | |
CN106095464B (en) | A kind of method and device of the seamless operation of application program | |
CN108363817A (en) | Document handling method, device, mobile terminal and computer readable storage medium | |
CN106657611A (en) | Device and method for changing application theme | |
CN106598538A (en) | Method and system for updating instruction set | |
CN110109528A (en) | Management-control method, mobile terminal and the computer readable storage medium of application program | |
CN105049582B (en) | A kind of save set of calling record, method and display methods | |
CN106557555A (en) | media playing method and device | |
CN106506364A (en) | A kind of cut-in method, client and routing server | |
CN105681547A (en) | Middleware instance management device and method | |
CN105681604A (en) | Short message display method and method | |
CN105787030B (en) | A kind of mobile terminal and its method for handling data | |
CN107194243A (en) | A kind of mobile terminal and the method for installing application program | |
CN106506865A (en) | A kind of method and terminal for updating music list | |
CN106559577A (en) | Mobile terminal and its control method | |
CN106250212A (en) | Resource access method and device | |
CN106777251A (en) | A kind of file management method and device | |
CN106776845A (en) | A kind of information flow adaptive management method and terminal | |
CN106502744A (en) | Application program sharing method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170405 |