Media File Scanning via Staged Directory Indexing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for scanning local media files on storage devices are inefficient, particularly when directories are complex and files are numerous, leading to time-consuming browsing and scanning processes, and require frequent plugging and unplugging of storage devices, which reduces user experience.
Innovation Solution
A method and system that utilize a terminal device, such as a smart TV or STB, to receive scanning instructions, acquire storage device identifiers, create view tables, and perform staged scans to quickly aggregate media file information, including path and file details, using a data table and cache mechanism to avoid redundant data entry and improve scanning efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If a simple scanning strategy is used to scan files in a storage device, then the scanning process can be initiated quickly, but it takes a long time to scan all files when directories are complex and files are numerous
Solution Approach 1:
The patent segments the scanning process into multiple stages: first scanning only directory structures to build a path index, then scanning media files based on the pre-built index. This segmentation allows the system to quickly navigate complex directory structures without repeatedly traversing all paths, significantly reducing total scanning time while maintaining completeness.
Solution Approach 2:
The patent performs preliminary actions by first scanning and indexing directory structures before scanning actual media files. The path index is built in advance, allowing subsequent file scans to follow pre-determined efficient paths. This preliminary indexing action eliminates redundant traversal operations during the main scanning phase.
2Loss of information
If all files are scanned according to a simple strategy, then complete media file information can be obtained, but the scanning efficiency is reduced due to complex directory structures and large number of files
Solution Approach 1:
The scanning process is divided into distinct phases: directory structure scanning to build path indexes, followed by media file scanning using those indexes. This segmentation ensures complete information collection while avoiding redundant operations, maintaining productivity despite comprehensive scanning requirements.
Solution Approach 2:
The patent creates a virtual copy of the directory structure in the form of a path index stored in memory or database. This index copy allows the system to navigate the logical structure without physically traversing the entire file system hierarchy repeatedly, significantly improving scanning efficiency while preserving complete file information access.
3Quantity of substance
If directories have complicated levels and files have large numbers, then comprehensive media library can be built, but the browsing operation becomes time-consuming and complicated
Solution Approach 1:
The patent creates a virtual directory structure copy in memory or database that mirrors the physical file system hierarchy. This virtual copy allows the terminal device to browse and display media files without requiring users to navigate through complex physical directory levels, significantly improving browsing convenience while supporting large media libraries.
Solution Approach 2:
The path index serves as an intermediary layer between the complex physical file system and the user interface. It translates complex multi-level directory structures into a simplified navigation model, allowing users to browse media files efficiently without directly interacting with the complicated underlying directory hierarchy.
4Volume of stationary object
If the storage device is not resident in the STB terminal device, then storage capacity is improved, but the user has to frequently plug or unplug the storage device
Solution Approach 1:
The patent performs preliminary scanning and indexing of the storage device contents when first connected. This preliminary action creates a local cache or database on the STB terminal device that stores directory structures and media file information. When the storage device is reconnected after being unplugged, the system can quickly restore access using the cached information, reducing the impact of frequent plugging and unplugging operations.
Data Source
AI summary
A method for scanning a local media file is provided. The method includes: receiving a scanning instruction, acquiring an identifier of a storage device, and creating a view table mapped to by a data table; scanning the storage device, so as to acquire path information about a media file in the storage device; comparing the path information about the media file with path information about a media file in the data table, so as to acquire path information about a media file that does not exist in the data table, and storing the same in the data table; and scanning a newly added media file according to path information about the newly added media file in the data table, so as to acquire file information about the media file, and updating a database by adding the acquired file information about the media file.


