WO2016070534A1 - 一种本地媒体文件的扫描方法及系统 - Google Patents
一种本地媒体文件的扫描方法及系统 Download PDFInfo
- Publication number
- WO2016070534A1 WO2016070534A1 PCT/CN2015/073851 CN2015073851W WO2016070534A1 WO 2016070534 A1 WO2016070534 A1 WO 2016070534A1 CN 2015073851 W CN2015073851 W CN 2015073851W WO 2016070534 A1 WO2016070534 A1 WO 2016070534A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- media file
- path information
- file
- data table
- storage device
- Prior art date
Links
Images
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/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/113—Details of archiving
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
-
- 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
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Definitions
- the present invention relates to the field of electronic technologies, and in particular, to a method and system for scanning local media files.
- the following disadvantages are found:
- the directory hierarchy in the storage device is complex, the number of files is large, and the file format is large, the user searches for the media file by browsing through the directory.
- the operation process is time consuming, cumbersome, and inconvenient to use.
- the second scheme since the storage device is not solidified on the set top box terminal device, the user may need to perform the plugging and unplugging operation frequently.
- the second scheme uses this simple policy to scan the file. When a secondary user inserts or removes a storage device, it needs to perform a full scan of the files on the storage device. This will prevent users from browsing all media files at a faster speed during the scanning process.
- the file directory on the storage device is complex and the number of files is large, it takes a long time to complete scanning of all files through this simple scanning strategy, thereby reducing the scanning efficiency of local media files.
- Embodiments of the present invention provide a method and system for scanning a local media file, which are used to improve scanning efficiency of a local media file.
- a first aspect of the present invention provides a method for scanning a local media file, including:
- Receiving a scan instruction acquiring an identifier of the storage device according to the scan instruction, and creating a view table mapped to the data table according to the identifier of the storage device;
- the newly added media file is scanned according to the newly added media file path information in the data table, the file information of the newly added media file is obtained, and the obtained file information is updated into a database.
- a second aspect of the present invention provides a scanning system for a local media file, including:
- a receiving unit configured to receive a scan instruction
- An obtaining unit configured to acquire an identifier of the storage device according to the scan instruction received by the receiving unit
- a creating unit configured to create a view table mapped with the data table according to the identifier of the storage device acquired by the acquiring unit;
- a scanning unit configured to scan the storage device according to the scan instruction received by the receiving unit
- the acquiring unit is configured to scan the storage device by the scanning unit, and obtain file path information of a media file in the storage device;
- the obtaining unit is further configured to compare the file path information acquired by the acquiring unit to the media file with the path information of the media file in the data table, and acquire the media file that does not exist in the data table. Path information
- a storage unit configured to store path information of a media file that is not in the data table acquired by the acquiring unit, into the data table;
- the scanning unit is further configured to scan the newly added media file according to the newly added media file path information in the data table;
- the obtaining unit is further configured to scan, by the scanning unit, the media file in the data table Depicting, obtaining file information of the media file;
- an update unit configured to update file information of the media file acquired by the obtaining unit into a database.
- the identifier of the storage device is obtained according to the scan instruction by receiving the scan instruction, and a view table mapped with the data table is created according to the identifier of the storage device, and the storage is performed according to the scan instruction.
- the device performs scanning, obtains path information of the media file in the storage device, compares path information of the media file with path information of the media file in the data table, and obtains media that does not exist in the data table.
- the path information of the file, the path information of the media file that does not exist in the data table is stored in the data table, and the newly added media file is added according to the newly added media file path information in the data table. Scanning, obtaining file information of the newly added media file, and updating the obtained file information to the database.
- the media files in the storage device can be quickly aggregated, and the scanning efficiency of the local media files is improved.
- FIG. 1 is a flowchart of an embodiment of a method for scanning a local media file according to an embodiment of the present invention
- FIG. 2 is a flowchart of another embodiment of a method for scanning a local media file according to an embodiment of the present invention
- FIG. 3 is a schematic structural diagram of an embodiment of a local media file scanning system according to an embodiment of the present disclosure
- FIG. 4 is a schematic structural diagram of another embodiment of a scanning system for a local media file according to an embodiment of the present invention.
- the terminal mentioned in the embodiment of the present invention may include a smart TV with a USB socket, a set top box, a video or audio playback device, and the like.
- the storage device mentioned in the embodiments of the present invention may include a USB flash drive, a mobile hard disk, a TF card or an SD card, and the like.
- FIG. 1 is a flowchart of a method for scanning a local media file according to an embodiment of the present invention; the method may include the following steps:
- S101 Receive a scan instruction, obtain an identifier of the storage device according to the scan instruction, and create a view table mapped to the data table according to the identifier of the storage device.
- the foregoing scan instruction may be triggered by a user operation, triggered by an external storage device mount operation, or triggered by a device startup operation.
- the system receives the scan instruction, the system acquires and stores the currently inserted.
- a unique identifier Universally Unique Identifier
- the view table that is mapped to the data table according to the identifier of the storage device, where the view table includes: three views of video, audio, and images, and the foregoing three
- the view quickly filters out the media file information recorded by the current storage device into the media database during the last insertion of the set-top box terminal from the data table, and changes in real time with the change of the data in the data table.
- the above data table is the files table in the database.
- the above files table is used to store various media file information, wherein the _id field stores the serial number of the media file record, and its value is incremented from small to large.
- the _data field is used to store the absolute path information of the media file on the storage device.
- the media_type field stores types of various media files, such as mp3, rmvb, jpeg, and the like.
- the date_added field stores the time each record was added.
- the date_modified field stores the modification date of the media file.
- the width and height fields are used to store the resolution size of the image file.
- the device_id is used to store the unique identifier UUID of the storage device. It can distinguish which hard disk each record stored in the database belongs to.
- the device table is created, and the UUID of the storage device, the mounting path of the storage disk, and the plugging and unplugging state are created. Recorded in the device table, where the insertion status of the storage device is represented by the number 1, and the unplugged state of the storage device is represented by the number 0.
- the storage device is found and removed from the device table. Corresponding records change their status from 1 to 0.
- the current storage device is inserted and removed as the filtering condition, and the UUID stored in the device_id field in the files table matches the UUID corresponding to the storage device whose status is 1 in the device table.
- the data in the table changes.
- S102 Scan the storage device according to the scan instruction, and obtain path information of the media file in the storage device.
- the system when the system receives the scan command, the system performs a first-stage scan on the storage device according to the scan command, and the first-stage scan is used to obtain path information of the media file in the storage device.
- the system scans the storage device before scanning the detailed information of the media file.
- the obtained path information of the media file is compared with the path information of the media file in the data table corresponding to the storage device in the database, and the path information of the media file that does not exist in the data table is obtained.
- S104 Store path information of the media file that does not exist in the data table in the data table.
- the system compares and scans the obtained path information of the media file with the path information of the media file in the view table, and if the path information of the media file does not exist in the view table, And storing the media files that are not present in the foregoing view table into the cache, where the cache is used to temporarily store the obtained path information of the media files that are not present in the data table.
- the system determines whether the number of path information of the media file stored in the cache exceeds a preset threshold, for example, 500. If the system determines that the number of path information of the media file stored in the cache exceeds 500, or the system determines that the number of path information of the media file stored in the cache does not exceed 500, the system scans the storage device. The path information of the media files stored in the cache area is uniformly stored in the data table.
- S104 Scan the newly added media file according to the newly added media file path information in the data table, obtain file information of the newly added media file, and update the obtained file information into a database.
- the system scans the newly added media file in the data table according to the path information of the newly added media file in the data table, and obtains specific information of the newly added media file, and obtains the specific information of the newly added media file.
- the specific information of the media file is updated to the database.
- the scanning task is a second-stage scanning, and the specific information of the media file includes a thumbnail of the video file, a playing time, a file size, a file modification time, a thumbnail of the music file, a file size, a playing duration, a genre, and the like. , image file size, resolution, height, shooting time, rotation angle, and so on.
- the identifier of the storage device is obtained according to the scan instruction by receiving the scan instruction, and a view table mapped with the data table is created according to the identifier of the storage device, and the storage is performed according to the scan instruction.
- the device performs scanning, obtains path information of the media file in the storage device, compares path information of the media file with path information of the media file in the data table, and obtains media that does not exist in the data table.
- the path information of the file, the path information of the media file that does not exist in the data table is stored in the data table, and the newly added media file is added according to the newly added media file path information in the data table. Scanning, obtaining file information of the newly added media file, and updating the obtained file information to the database.
- the media files in the storage device can be quickly aggregated, and the scanning efficiency of the local media files is improved.
- FIG. 2 is a flowchart of another method for scanning a local media file according to an embodiment of the present invention; the method may include the following steps:
- S201 Receive a scan instruction, and acquire an identifier of the storage device according to the scan instruction.
- the foregoing scan instruction may be triggered by a user operation, triggered by an external storage device mount operation, or triggered by a device startup operation, when the system receives a scan instruction,
- the system obtains and stores the Universally Unique Identifier (UUID) of the currently inserted storage device.
- UUID Universally Unique Identifier
- the data table corresponding to the storage device is stored in the database according to the unique identifier UUID of the storage device.
- the above files table is used to store various media file information, wherein the _id field stores the serial number of the media file record, and its value is incremented from small to large.
- the _data field is used to store the absolute path information of the media file on the storage device.
- the media_type field stores types of various media files, such as mp3, rmvb, jpeg, and the like.
- the date_added field stores the time each record was added.
- the date_modified field stores the modification date of the media file.
- the width and height fields are used to store the resolution size of the image file.
- the device_id is used to store the unique identifier UUID of the storage device. It can distinguish which hard disk each record stored in the database belongs to.
- the device table is created, and the UUID of the storage device, the mounting path of the storage disk, and the plugged-in state are recorded in the device table, where the insertion state of the storage device is represented by the number 1, and the storage device is used.
- the unplugged state is represented by the number 0.
- the record corresponding to the extracted storage device is found from the device table, and its state is changed from 1 to 0.
- the current storage device is inserted and removed as the filtering condition, and the UUID stored in the device_id field in the files table matches the UUID corresponding to the storage device whose status is 1 in the device table.
- the data in the table changes.
- a data table file corresponding to the storage device identifier is created.
- the system creates a view table that is mapped to the data table according to the identifier of the storage device, where the view table includes: three views of video, audio, and images.
- the three views quickly filter out the media file information recorded by the current storage device into the media database during the last insertion of the set top box terminal from the data table, and change in real time with the change of the data in the data table.
- users need to browse or play videos, music, and pictures, they only need to access the view table video, audio, and images respectively to quickly get all the media file information in the storage device.
- the priority of the first phase scanning task needs to be adjusted, and the first phase is The priority of the scan task is adjusted to the first level, and the first level is a relatively high level, and only the path of the media file needs to be obtained as much as possible.
- S206 Scan the storage device according to the scan instruction, and obtain path information of the media file in the storage device.
- the first stage file scanning is started according to the scan instruction received by the system, and the first stage file scanning is to obtain the file path information of the media file in the storage device.
- the scan the first phase of the above goal is to quickly obtain file path information for all media files on the device.
- the above call interface call triggers the system to start a full disk scan of the storage device, and searches only the file path information of the media file according to the parameter convention of the calling interface.
- the first prompt information is sent to the terminal, and the first prompt information is used to prompt to find the media file, so that the media application knows in time that the scanning service has been found.
- the media files are stored in the database and can be used by users as needed.
- the prompt information of the discovery media file the user can immediately obtain the existing media file according to the broadcast notification when the user just inserts the storage device and starts the media application browsing file, thereby effectively avoiding the prior art. You need to wait for the entire search process to complete before you can see the media files, which improves the user experience.
- the query matches the media file information in the data table. If the current media file path information already exists in the data table, the description already exists in the database. Record, you do not need to insert the currently acquired media file into the database again. If the current file path information does not exist in the above data table, the current media file path information is stored in the cache.
- the data cache and the real-time comparison mechanism are used to determine whether the obtained file information is already in the database, which can effectively reduce the same file information being inserted into the database repeatedly when the same storage device is frequently inserted and removed. .
- a hard disk A stores three media files R1, R2, and R3.
- the media scanning service When the first time is inserted into the terminal, the media scanning service inserts the absolute paths of the three files R1, R2, and R3 in the hard disk A into the database. During the period of time, the user pulls out the hard disk A and copies three media source M1, M2, M3 on the personal computer. When the user inserts the hard disk A into the set top box terminal again, the database storage unit of the media scanning service, Through cache comparison, it is found that the record information of the media files R1, R2, and R3 in the hard disk already exist in the database. Therefore, only three newly added media files of M1, M2, and M3 need to be inserted into the database, so that The time taken to insert the records corresponding to the files R1, R2, and R3 into the database is reduced, and the scanning speed of the media file is improved.
- the system stores the path information of the media file that does not exist in the view table in the cache for accumulation, and the path information bar of the media file accumulated in the cache table.
- the media file in the above view table is inserted into the data table corresponding to the storage device unique identifier UUID in the database at one time. For example, when the number of media files to be scanned accumulated in the cache exceeds 500, or when the first stage scan has been completed, the accumulated file records are submitted to the files corresponding to the storage device. table.
- the storage speed of a large amount of data can be increased, thereby increasing the scanning speed of media files.
- the second prompt information is sent to the sending terminal, and the second prompt information is a broadcast notification that the first stage scanning ends, so that the media application knows the sweep in time.
- the service has completed the full scan of the storage device, and stores all the media file path information in the storage device into the database, and the application can be read and used according to requirements, for example, the progress bar prompt during the scanning process can be stopped.
- the priority of the task is re-adjusted, the task priority is adjusted to the second level, and the second level is a relatively lower level.
- the second stage scanning is to scan the newly added media file according to the newly added media file path information in the data table, and the second stage of scanning is to obtain the specific information of the newly added media file in the data table.
- Information and update it to the database including thumbnails of video files, playback duration, file size, file modification time, etc., thumbnails of music files, file size, playback duration, genre, etc., image files Size, resolution, height, shooting time, rotation angle, and more.
- This information can enrich the application's display effect on media files, but it is not necessary for the normal playback of media files, and to obtain this information, each media file needs to be parsed. This process takes some time and the CPU load is also It will increase greatly, so we schedule it to be completed slowly during the second round of scanning to ensure that system performance is not affected by this complex process.
- S210 Scan the newly added media file according to the newly added media file path information in the data table, obtain file information of the newly added media file, and update the obtained file information into a database.
- the second-stage file scanning is started, and the mounting path information of the storage device is obtained by calling the interface, and the parameter mode is adopted to make the second
- the stage scan scans the newly added media file according to the newly added media file path information in the data table, acquires file information of the newly added media file, and notifies the system that the current scan is the second stage scan, and Requesting the update operation of the file record (instead of the insert operation), the above interface call triggers the system to perform a full disk scan on the storage device again, and parses the detailed information of the media file to be scanned one by one according to the parameter convention of the calling interface, and queries the matching cache by querying
- the file record collection, the corresponding id number of the media file in the data table files, the database update operation is performed by the id number, and the detailed information of the obtained media file is updated to the database.
- the third prompt information is sent to the terminal immediately, and the third prompt information is a broadcast notification that the second stage scanning ends, so that the media application knows the scanning service in time.
- the process of parsing all the media file information of the storage device has been completed, and the detailed information of all the media files is stored in the database, and the application can be read and used according to requirements, such as refreshing the display page, displaying the specific information of the media file to the user, etc. .
- the identifier of the storage device is obtained according to the scan instruction by receiving the scan instruction, and a view table mapped with the data table is created according to the identifier of the storage device, and the storage is performed according to the scan instruction.
- the device performs scanning, obtains path information of the media file in the storage device, compares path information of the media file with path information of the media file in the data table, and obtains media that does not exist in the data table.
- the path information of the file, the path information of the media file that does not exist in the data table is stored in the data table, and the newly added media file is added according to the newly added media file path information in the data table. Scanning, obtaining file information of the newly added media file, and updating the obtained file information to the database.
- the media files in the storage device can be quickly aggregated, and the scanning efficiency of the local media files is improved.
- FIG. 3 is a schematic structural diagram of a scanning system of a local media file according to an embodiment of the present invention; the system may include the following steps:
- the receiving unit 101 is configured to receive a scan instruction.
- the obtaining unit 102 is configured to acquire an identifier of the storage device according to the scan instruction received by the receiving unit;
- a creating unit 103 configured to create a view table mapped with the data table according to the identifier of the storage device acquired by the acquiring unit;
- the scanning unit 104 is configured to scan the storage device according to the scan instruction received by the receiving unit;
- the obtaining unit 102 is configured to scan, by the scanning unit, the storage device to obtain file path information of a media file in the storage device.
- the obtaining unit 102 is further configured to compare the file path information acquired by the acquiring unit to the media file with the path information of the media file in the data table, and acquire the media file that does not exist in the data table. Path information
- a storage unit 105 configured to store path information of a media file that is not in the data table acquired by the acquiring unit, into the data table;
- the scanning unit 104 is further configured to scan the newly added media file according to the newly added media file path information in the data table;
- the obtaining unit 102 is further configured to: the scanning unit scans a media file in the data table, and acquires file information of the media file;
- the updating unit 106 is configured to update file information of the media file acquired by the acquiring unit into a database.
- the receiving unit 101 receives the scan instruction
- the obtaining unit 102 acquires the identifier of the storage device according to the scan instruction
- the creating unit 103 creates a view table mapped with the data table according to the identifier of the storage device.
- the scanning unit 104 scans the storage device according to the scanning instruction
- the acquiring unit 102 acquires path information of the media file in the storage device
- the acquiring unit 102 uses the path information of the media file and the data table.
- the path information of the media file in the data file is compared, the path information of the media file that does not exist in the data table is obtained, and the storage unit 105 stores the path information of the media file that does not exist in the data table into the data table.
- the scanning unit 104 scans the newly added media file according to the newly added media file path information in the data table, and the acquiring unit 102 acquires the file information of the newly added media file, and the updating unit 106 acquires the file information.
- the file information obtained is updated to the database.
- the media files in the storage device can be quickly aggregated, and the scanning efficiency of the local media files is improved.
- the implementation manner of the scanning system of the local media file refer to steps S101-S105 in the first embodiment of the method for scanning local media files provided by the embodiment of the present invention. Narration.
- FIG. 4 is a schematic structural diagram of another local media file scanning system according to an embodiment of the present invention.
- the system may include the following steps:
- the receiving unit 201 is configured to receive a scan instruction.
- the obtaining unit 202 is configured to acquire an identifier of the storage device by using a scan instruction received according to the receiving unit.
- the querying unit 203 is configured to query, according to the identifier of the device that is obtained by the acquiring unit, whether a data table corresponding to the identifier is stored in the database.
- the creating unit 204 is configured to: when the query unit queries that the data table corresponding to the identifier is not stored in the database, create a data table corresponding to the identifier.
- the creating unit 204 is further configured to create a view table mapped with the data table according to the identifier of the storage device acquired by the acquiring unit.
- the adjusting unit 205 is configured to adjust a priority of the task of acquiring the file path information of the media file in the upper storage device to a first level.
- the scanning unit 206 is configured to scan the storage device according to the scan instruction received by the receiving unit.
- the obtaining unit 202 is further configured to acquire file path information of the media file in the storage device when the upper scanning unit scans the upper storage device.
- the obtaining unit 202 is further configured to compare the path information of the media file with the path information of the media file in the data table corresponding to the storage device in the database when the acquiring unit acquires the file path of the media file, Obtain the path information of the media file that does not exist in the above data table.
- the obtaining unit 202 includes: a query subunit, configured to query whether the file path information that is the same as the file path information of the media file is stored in the data table.
- a first storage subunit configured to store the path information of the media file into the cache when the query subunit queries the file path information that is not the same as the file path information in the data table.
- the storage unit 207 includes a determining unit, configured to determine whether the number of file path information of the media file stored in the cache exceeds a preset threshold.
- a second storage subunit configured to: when the determining unit determines that the number of file path information of the media file stored in the cache exceeds a preset threshold, the file path of the media file stored in the cache Information is stored in the data table.
- the sending unit is configured to send the first prompt information to the terminal when the file path information of the media file is acquired for the first time in the process of acquiring the file path information of the media file in the storage device
- the first prompt information is used to prompt to discover a media file.
- the sending unit is further configured to: when the acquiring unit acquires the file path of the media file in the storage device, send the second prompt information to the terminal, where the second prompt information is used to prompt the location The task of obtaining the file path information of the media file in the storage device is completed.
- the adjusting unit 205 is further configured to adjust a priority of the task of scanning the newly added media file according to the newly added media file path information in the data table to a second level.
- the scanning unit 206 is further configured to scan the newly added media file according to the newly added media file path information in the data table.
- the obtaining unit 202 is further configured to: the scanning unit scans a media file in the data table, and acquires file information of the media file.
- the updating unit 208 is configured to update file information of the media file acquired by the acquiring unit into a database.
- the sending unit is further configured to: when the scanning unit scans each media file in the media file directory set, send the third prompt information to the terminal, where the third prompt information Used to prompt completion of scanning of each media file in the media file directory collection.
- the receiving unit 201 receives the scan instruction
- the obtaining unit 202 acquires the identifier of the storage device according to the scan instruction
- the creating unit 203 creates a view table mapped with the data table according to the identifier of the storage device.
- the scanning unit 206 scans the storage device according to the scanning instruction
- the acquiring unit 202 acquires the path information of the media file in the storage device
- the acquiring unit 202 uses the path information of the media file and the data table.
- the path information of the media file in the data file is compared, the path information of the media file that does not exist in the data table is obtained, and the storage unit 207 stores the path information of the media file that does not exist in the data table into the data table.
- the scanning unit 206 scans the newly added media file according to the newly added media file path information in the data table, and the acquiring unit 202 acquires the file information of the newly added media file, and the updating unit 208 obtains the file information.
- the file information obtained is updated to the database.
- the media files in the storage device can be quickly aggregated, and the scanning efficiency of the local media files is improved.
- the scanning system of the local media file refer to steps S201-S210 in the first embodiment of the method for scanning a local media file provided by the embodiment of the present invention. Narration.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Library & Information Science (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management Or Editing Of Information On Record Carriers (AREA)
Abstract
Description
Claims (18)
- 一种本地媒体文件的扫描方法,其特征在于,包括:接收扫描指令,根据所述扫描指令,获取存储设备的标识符,根据所述存储设备的标识符,创建与数据表映射的视图表;根据所述扫描指令,对存储设备进行扫描,获取所述存储设备中的媒体文件的路径信息;将所述媒体文件的路径信息与所述数据表中的媒体文件的路径信息进行对比,获取所述数据表中未存在的媒体文件的路径信息;将所述数据表中未存在的媒体文件的路径信息,存储至所述数据表中;根据所述数据表中新增的媒体文件路径信息,对所述新增的媒体文件进行扫描,获取所述新增媒体文件的文件信息,并将获取到的文件信息更新至数据库中。
- 根据权利要求1所述的方法,其特征在于,所述获取存储设备的标识符之后,所述方法还包括:根据所述存储设备的标示符,查询所述数据库中是否存储有与所述标识符对应的数据表;若所述数据库中未存储有与所述标识符对应的数据表,则创建与所述标识符对应的数据表。
- 根据权利要求1所述的方法,其特征在于,所述根据所述扫描指令,获取存储设备中的媒体文件的文件路径信息之前,所述方法还包括:调整获取所述存储设备中的媒体文件的文件路径信息任务的优先级为第一等级。
- 根据权利要求1所述的方法,其特征在于,所述将所述媒体文件的路径信息与所述数据表中的媒体文件的路径信息进行对比,获取所述数据表中未存在的媒体文件的路径信息,包括:查询所述数据表中是否存储有与所述媒体文件的文件路径信息相同的文件路径信息;若所述数据表中未存储有与所述文件路径信息相同的文件路径信息,则将所述媒体文件的路径信息存储至缓存中。
- 根据权利要求4所述的方法,其特征在于,所述将所述数据表中未存在的媒体文件的路径信息,存储至所述数据表中包括:判断所述缓存中存储的所述媒体文件的文件路径信息条数是否超过预设阈值;若所述缓存中存储的所述媒体文件的文件路径信息条数超过预设阈值,则将所述缓存中存储的所述媒体文件的文件路径信息存储至所述数据表中。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:在获取存储设备中的媒体文件的文件路径信息过程中,当第一次获取到媒体文件的文件路径信息时,向所述终端发送第一提示信息;其中,所述第一提示信息用于提示发现媒体文件。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:当获取存储设备中的媒体文件的文件路径完成时,向所述终端发送第二提示信息;其中,所述第二提示信息用于提示所述获取存储设备中的媒体文件的文件路径信息任务完成。
- 根据权利要求1所述的方法,其特征在于,所述根据所述数据表中新增的媒体文件路径信息,对所述新增的媒体文件进行扫描之前,所述方法还包括:调整根据所述第一数据表中的媒体文件路径信息,对所述媒体文件进行扫描的任务的优先级为第二等级。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:当根据所述数据表中新增的媒体文件路径信息,对所述新增的媒体文件进行扫描完成时,向所述终端发送第三提示信息;其中,所述第三提示信息用于提示完成对所述数据表中新增媒体文件的扫描。
- 一种本地媒体文件的扫描系统,其特征在于,包括:接收单元,用于接收扫描指令;获取单元,用于根据所述接收单元接收到的扫描指令,获取存储设备的标识符;创建单元,用于根据所述获取单元获取到的所述存储设备的标识符创建与数据表映射的视图表;扫描单元,用于根据所述接收单元接收到的扫描指令,对存储设备进行扫描;所述获取单元,用于所述扫描单元对所述存储设备进行扫描,获取存储设备中的媒体文件的文件路径信息;所述获取单元,还用于将所述获取单元获取到所述媒体文件的文件路径信息与所述数据表中的媒体文件的路径信息进行对比,获取所述数据表中未存在的媒体文件的路径信息;存储单元,用于将所述获取单元获取到的所述数据表中未存在的媒体文件的路径信息,存储至所述数据表中;所述扫描单元,还用于根据所述数据表中新增的媒体文件路径信息,对所述新增的媒体文件进行扫描;所述获取单元,还用于所述扫描单元对所述数据表中的媒体文件进行扫描,获取所述媒体文件的文件信息;更新单元,用于将所述获取单元获取到的媒体文件的文件信息更新至数据库中。
- 根据权利要求10所述的系统,其特征在于,所述系统还包括:查询单元,用于根据所述获取单元获取到的所述设备的标识符,查询所述数据库中是否存储有与所述标识符对应的数据表;所述创建单元,还用于在所述查询单元查询到到所述数据库中未存储有与所述标识符对应的数据表,则创建与所述标识符对应的数据表。
- 根据权利要求10所述的系统,其特征在于,所述系统还包括:调整单元,用于调整获取所述存储设备中的媒体文件的文件路径信息任务的优先级为第一等级。
- 根据权利要求10所述的系统,其特征在于,所述获取单元包括:查询子单元,用于查询所述数据表中是否存储有与所述媒体文件的文件路径信息相同的文件路径信息;第一存储子单元,用于在所述查询子单元查询到所述数据表中未存储有与所述文件路径信息相同的文件路径信息时,将所述媒体文件的路径信息存储至缓存中。
- 根据权利要求13所述的系统,其特征在于,所述存储单元包括:判断单元,用于判断所述缓存中存储的所述媒体文件的文件路径信息条数是否超过预设阈值;第二存储子单元,用于在所述判断单元判断所述缓存中存储的所述媒体文件的文件路径信息条数超过预设阈值时,将所述缓存中存储的所述媒体文件的文件路径信息存储至所述数据表中。
- 根据权利要求10所述的系统,其特征在于,所述系统还包括:发送单元,用于在所述获取单元获取存储设备中的媒体文件的文件路径信息过程中,当第一次获取到媒体文件的文件路径信息时,向所述终端发送第一提示信息;其中,所述第一提示信息用于提示发现媒体文件。
- 根据权利要求10所述的系统,其特征在于,所述系统还包括:所述发送单元,还用于在所述获取单元获取存储设备中的媒体文件的文件路径完成时,向所述终端发送第二提示信息;其中,所述第二提示信息用于提示所述获取存储设备中的媒体文件的文件路径信息任务完成。
- 根据权利要求10所述的系统,其特征在于,所述系统还包括:所述调整单元,还用于调整根据所述数据表中新增的媒体文件路径信息,对所述新增的媒体文件进行扫描的任务的优先级为第二等级。
- 根据权利要求10所述的系统,其特征在于,所述系统还包括:所述发送单元,还用于在所述扫描单元对所述媒体文件目录集合中的各媒体文件进行扫描完成时,向所述终端发送第三提示信息;其中,所述第三提示信息用于提示完成对所述媒体文件目录集合中的各媒体文件的扫描。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP15856523.4A EP3217295A4 (en) | 2014-11-04 | 2015-03-09 | Method and system for scanning local media file |
BR112017009449-5A BR112017009449B1 (pt) | 2014-11-04 | 2015-03-09 | Método para examinar um arquivo de mídia local, e sistema para examinar um arquivo de mídia local |
US15/490,400 US10452609B2 (en) | 2014-11-04 | 2017-04-18 | Method and system for scanning local media file |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410614511.2A CN104536961A (zh) | 2014-11-04 | 2014-11-04 | 一种本地媒体文件的扫描方法及系统 |
CN201410614511.2 | 2014-11-04 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/490,400 Continuation-In-Part US10452609B2 (en) | 2014-11-04 | 2017-04-18 | Method and system for scanning local media file |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016070534A1 true WO2016070534A1 (zh) | 2016-05-12 |
Family
ID=52852489
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/073851 WO2016070534A1 (zh) | 2014-11-04 | 2015-03-09 | 一种本地媒体文件的扫描方法及系统 |
Country Status (5)
Country | Link |
---|---|
US (1) | US10452609B2 (zh) |
EP (1) | EP3217295A4 (zh) |
CN (1) | CN104536961A (zh) |
BR (1) | BR112017009449B1 (zh) |
WO (1) | WO2016070534A1 (zh) |
Families Citing this family (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104182519B (zh) * | 2014-08-25 | 2018-03-02 | 百度在线网络技术(北京)有限公司 | 一种文件扫描方法及装置 |
CN105653674B (zh) * | 2015-12-28 | 2020-02-14 | Tcl海外电子(惠州)有限公司 | 智能终端的文件管理方法及系统 |
CN106484751A (zh) * | 2016-03-30 | 2017-03-08 | 深圳市美贝壳科技有限公司 | 快速识别usb设备存储的媒体文件的方法 |
CN106055611A (zh) * | 2016-05-25 | 2016-10-26 | 努比亚技术有限公司 | 扫描进度显示装置、移动终端及方法 |
CN107679080A (zh) * | 2017-08-29 | 2018-02-09 | 努比亚技术有限公司 | 一种多媒体数据记录方法、终端及计算机可读存储介质 |
CN110019859A (zh) * | 2017-08-29 | 2019-07-16 | 安波福电子(苏州)有限公司 | 一种多媒体文件管理方法及装置 |
CN109951731B (zh) * | 2017-12-21 | 2021-06-15 | 深圳Tcl数字技术有限公司 | 解决外部存储设备重复扫描的方法、系统及存储介质 |
CN109542848B (zh) * | 2018-11-07 | 2022-01-07 | 深圳市布谷鸟科技有限公司 | 一种车载媒体文件快速扫描方法和系统 |
CN110543575B (zh) * | 2019-08-28 | 2021-11-19 | 浙江鸿泉车联网有限公司 | 车载外置存储设备的媒体文件检索方法及装置 |
CN111881305B (zh) * | 2020-06-23 | 2024-03-01 | 博泰车联网科技(上海)股份有限公司 | 扫描方法及相关设备 |
CN111723054A (zh) * | 2020-06-29 | 2020-09-29 | 湖北亿咖通科技有限公司 | 一种访问外部存储设备的方法 |
CN112380226A (zh) * | 2020-11-10 | 2021-02-19 | 北京梧桐车联科技有限责任公司 | 数据加载方法、装置、电子设备及存储介质 |
CN114791961A (zh) * | 2021-01-25 | 2022-07-26 | 华为技术有限公司 | 媒体数据处理方法、装置及终端设备 |
CN113012693B (zh) * | 2021-02-18 | 2024-04-30 | 深圳创维-Rgb电子有限公司 | 基于语音的本地媒体筛选播放方法、装置、终端设备及介质 |
CN113268765B (zh) * | 2021-04-30 | 2022-06-17 | 杭州安恒信息技术股份有限公司 | 凭据检测方法、系统、电子装置和存储介质 |
CN113468119A (zh) * | 2021-05-31 | 2021-10-01 | 北京明朝万达科技股份有限公司 | 一种文件扫描方法和装置 |
CN113434711A (zh) * | 2021-06-24 | 2021-09-24 | 宇龙计算机通信科技(深圳)有限公司 | 一种多媒体数据展示方法、存储介质及设备 |
CN113961728A (zh) * | 2021-09-14 | 2022-01-21 | 惠州市德赛西威智能交通技术研究院有限公司 | 一种车载存储设备快速响应方法 |
CN113849135A (zh) * | 2021-09-30 | 2021-12-28 | 北京金山云网络技术有限公司 | 日志的访问方法、装置及服务器 |
CN114860656A (zh) * | 2022-04-12 | 2022-08-05 | 深圳市绿联科技股份有限公司 | 一种文件扫描方法、装置、电子设备以及存储介质 |
CN118113671B (zh) * | 2024-04-30 | 2024-06-25 | 南京达道电子科技有限公司 | 基于Android系统实现车载外部存储设备快速扫描方法及系统 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101609448A (zh) * | 2008-06-19 | 2009-12-23 | 鸿富锦精密工业(深圳)有限公司 | 数据库主动扫描系统及方法 |
US20100036872A1 (en) * | 2008-08-08 | 2010-02-11 | Hitachi, Ltd. | Data management method |
CN102480494A (zh) * | 2010-11-23 | 2012-05-30 | 金蝶软件(中国)有限公司 | 一种文件更新的方法、装置及系统 |
CN103856800A (zh) * | 2012-11-28 | 2014-06-11 | 北京数码视讯软件技术发展有限公司 | 机顶盒读取外接存储设备的方法和装置 |
Family Cites Families (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7181438B1 (en) * | 1999-07-21 | 2007-02-20 | Alberti Anemometer, Llc | Database access system |
US6741996B1 (en) * | 2001-04-18 | 2004-05-25 | Microsoft Corporation | Managing user clips |
AU2004208274B2 (en) * | 2003-01-28 | 2007-09-06 | Samsung Electronics Co., Ltd. | Method and system for managing media file database |
US7685175B2 (en) * | 2005-08-12 | 2010-03-23 | Michael Lee Carroll | Content manager |
US7401089B2 (en) * | 2005-08-17 | 2008-07-15 | Microsoft Corporation | Storage reports file system scanner |
US7562099B1 (en) * | 2005-09-09 | 2009-07-14 | Avid Technology, Inc. | Graphical user interface for a media management system for communicating quality, source and accessibility information for media data and media objects |
US20070156778A1 (en) * | 2006-01-04 | 2007-07-05 | Microsoft Corporation | File indexer |
US20070203927A1 (en) * | 2006-02-24 | 2007-08-30 | Intervoice Limited Partnership | System and method for defining and inserting metadata attributes in files |
US8631494B2 (en) * | 2006-07-06 | 2014-01-14 | Imation Corp. | Method and device for scanning data for signatures prior to storage in a storage device |
US20080250431A1 (en) * | 2007-04-04 | 2008-10-09 | Research In Motion Limited | System and method for displaying media files in a media application for a portable media device |
JP5071539B2 (ja) * | 2010-09-13 | 2012-11-14 | コニカミノルタビジネステクノロジーズ株式会社 | 画像検索装置、画像読取装置、画像検索システム、データベース生成方法およびデータベース生成プログラム |
US20130166543A1 (en) * | 2011-12-22 | 2013-06-27 | Microsoft Corporation | Client-based search over local and remote data sources for intent analysis, ranking, and relevance |
US9100245B1 (en) * | 2012-02-08 | 2015-08-04 | Amazon Technologies, Inc. | Identifying protected media files |
KR101517895B1 (ko) * | 2013-04-05 | 2015-05-08 | 주식회사 팬택 | 어플리케이션 관련 데이터를 제공하는 단말기 및 방법 |
EP2989499A1 (en) * | 2013-07-18 | 2016-03-02 | Ventana Medical Systems, Inc. | Auto-focus methods and systems for multi-spectral imaging |
CN103412773A (zh) * | 2013-08-08 | 2013-11-27 | 华为终端有限公司 | 一种获取文件的方法和设备 |
TW201526624A (zh) * | 2013-12-17 | 2015-07-01 | Primax Electronics Ltd | 顯示媒體檔案之方法及區域網路系統 |
US9680897B2 (en) * | 2014-01-31 | 2017-06-13 | Yahoo! Inc. | Throttled scanning for optimized compression of network communicated data |
EP2955714A1 (en) * | 2014-06-10 | 2015-12-16 | Thomson Licensing | Storage device management method and apparatus, corresponding computer program product and non-transitory computer-readable medium |
DE102015205694B3 (de) * | 2015-03-30 | 2016-10-06 | Siemens Healthcare Gmbh | MR-Sättigung unter Berücksichtigung der abzubildenden anatomischen Strukturen |
US20160328032A1 (en) * | 2015-05-08 | 2016-11-10 | Dexin Corporation | Mouse having reducing-pressure decoration plates |
JP6532341B2 (ja) * | 2015-07-28 | 2019-06-19 | キヤノン株式会社 | 通信装置、その制御方法、およびプログラム |
CN105912540A (zh) * | 2015-12-11 | 2016-08-31 | 乐视移动智能信息技术(北京)有限公司 | 文件系统同步的方法及装置 |
US10390082B2 (en) * | 2016-04-01 | 2019-08-20 | Oath Inc. | Computerized system and method for automatically detecting and rendering highlights from streaming videos |
-
2014
- 2014-11-04 CN CN201410614511.2A patent/CN104536961A/zh active Pending
-
2015
- 2015-03-09 EP EP15856523.4A patent/EP3217295A4/en not_active Ceased
- 2015-03-09 BR BR112017009449-5A patent/BR112017009449B1/pt active IP Right Grant
- 2015-03-09 WO PCT/CN2015/073851 patent/WO2016070534A1/zh active Application Filing
-
2017
- 2017-04-18 US US15/490,400 patent/US10452609B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101609448A (zh) * | 2008-06-19 | 2009-12-23 | 鸿富锦精密工业(深圳)有限公司 | 数据库主动扫描系统及方法 |
US20100036872A1 (en) * | 2008-08-08 | 2010-02-11 | Hitachi, Ltd. | Data management method |
CN102480494A (zh) * | 2010-11-23 | 2012-05-30 | 金蝶软件(中国)有限公司 | 一种文件更新的方法、装置及系统 |
CN103856800A (zh) * | 2012-11-28 | 2014-06-11 | 北京数码视讯软件技术发展有限公司 | 机顶盒读取外接存储设备的方法和装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3217295A4 * |
Also Published As
Publication number | Publication date |
---|---|
EP3217295A1 (en) | 2017-09-13 |
CN104536961A (zh) | 2015-04-22 |
BR112017009449B1 (pt) | 2023-04-04 |
EP3217295A4 (en) | 2018-04-11 |
US20170220588A1 (en) | 2017-08-03 |
BR112017009449A2 (pt) | 2017-12-19 |
BR112017009449A8 (pt) | 2023-01-31 |
US10452609B2 (en) | 2019-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016070534A1 (zh) | 一种本地媒体文件的扫描方法及系统 | |
US8370402B2 (en) | Dual representation of stored digital content | |
US8219619B2 (en) | Data management server, data management system, data management method, and program | |
EP1711895B1 (en) | Audio/video content synchronization through playlists | |
RU2628108C2 (ru) | Способ обеспечения выбора эпизода видеоматериала и устройство для этого | |
US8296272B2 (en) | Information processing apparatus, information processing method, and program | |
JP3802877B2 (ja) | デジタルカメラシステム | |
JP2006252478A (ja) | 情報処理装置、コンテンツ再生装置、コンテンツ管理装置およびデータ更新方法 | |
KR20060117934A (ko) | 가상 콘텐트 디렉토리 서비스 | |
US20120102076A1 (en) | Information processing apparatus, information processing method, and program | |
US11250888B1 (en) | Flash memory and method for storing and retrieving embedded audio video data | |
CN114116611A (zh) | 一种文件扫描方法及相关装置 | |
US20040263644A1 (en) | Electronic apparatus, directory generating method, directory reading method and computer program | |
JP2007272836A (ja) | ネットワーク検索装置、ネットワーク検索用プログラム及びネットワーク検索方法 | |
CN103412773A (zh) | 一种获取文件的方法和设备 | |
WO2017096850A1 (zh) | 文件系统同步的方法及装置 | |
JP5020499B2 (ja) | 映像データの記録方法及びその記録装置 | |
JP2008072312A (ja) | データ処理装置及びデータ処理方法、並びにコンピュータ・プログラム | |
JP2014154891A (ja) | 情報処理装置およびその制御方法、プログラム、並びに記憶媒体 | |
CN103905694A (zh) | 一种关键帧处理方法及系统 | |
CN103648021A (zh) | 从usb存储设备播放网络视频文件的方法 | |
KR100717059B1 (ko) | 홈 네트워크에서 하나의 컨텐츠를 복수의 디바이스에분할하여 저장하기 위한 방법 및 장치 | |
JP2004363825A (ja) | 記録再生装置、記録再生方法、その記録媒体およびプログラム | |
JP2001333352A (ja) | 画像ファイリング装置および画像ファイリング方法 | |
JP2008042351A (ja) | 画像蓄積システム及び画像蓄積方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15856523 Country of ref document: EP Kind code of ref document: A1 |
|
REEP | Request for entry into the european phase |
Ref document number: 2015856523 Country of ref document: EP |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
REG | Reference to national code |
Ref country code: BR Ref legal event code: B01A Ref document number: 112017009449 Country of ref document: BR |
|
ENP | Entry into the national phase |
Ref document number: 112017009449 Country of ref document: BR Kind code of ref document: A2 Effective date: 20170504 |