Foreground Background Download Interface Switching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing file downloading technologies face challenges in seamlessly switching between foreground and background downloading interfaces, leading to interruptions and inefficiencies in completing file downloads.

Innovation Solution

A method and apparatus that switch between foreground and background downloading interfaces during a file download, fragment the file data into manageable pieces, index these fragments, store the index information in a database, and subsequently read and splice the fragments to reassemble the target file, ensuring continuous and efficient downloads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If foreground and background downloading interfaces are used separately without switching capability, then each interface can be simple and independent, but download continuity is interrupted and resources are wasted when switching between interfaces

Engineering Contradiction:
Improvedownload continuityVSAvoiddownloading system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent merges foreground and background downloading interfaces into a unified downloading system that shares common functional modules including network request processing, data reception, file fragment management, and database operations. This integration allows seamless switching between interfaces while maintaining download continuity, as the underlying infrastructure remains consistent across both foreground and background modes.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The downloading system is designed with universal components that can operate in both foreground and background contexts. The same downloading module, file management module, and database interface handle both foreground downloads (when application is active) and background downloads (when application is suspended), enabling the system to adapt to different operational states without requiring separate implementation paths.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Loss of time

If file downloads are interrupted and restarted from beginning, then downloading logic remains simple, but downloading time increases significantly and resources are wasted

Engineering Contradiction:
Improvedownload timeVSAvoiddownloading logic complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The system performs preliminary actions by continuously maintaining download state information in the database, including downloaded fragment indices and file metadata. When a download is interrupted and later resumed, this pre-stored information allows the system to immediately determine where to continue downloading without re-downloading existing content, significantly reducing recovery time and resource consumption.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The downloading system implements feedback mechanisms where each downloaded file fragment is recorded in the database with its index information. The system continuously monitors download progress and uses this feedback to manage switching between foreground and background interfaces, ensuring that when resuming, it picks up exactly where it left off based on the recorded state, thereby minimizing redundant downloads.

Inventive Principle:
Principle #23Feedback

3Productivity

If file fragments from different downloading interfaces are downloaded simultaneously, then downloading speed may improve, but file splicing becomes complex and error-prone

Engineering Contradiction:
Improvedownload speedVSAvoidfile splicing complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the target file into multiple file fragments with sequentially numbered indices. Each downloading interface downloads specific fragments based on the current download state stored in the database. This segmentation approach allows parallel downloading of different fragments by foreground and background interfaces simultaneously, while the sequential indexing system simplifies the splicing process by providing a clear ordering mechanism for reassembly.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The database serves as an intermediary that coordinates between foreground and background downloading interfaces. It stores the download state including which fragments have been downloaded, their indices, and their storage locations. This intermediary mechanism manages the complexity of coordinating multiple download sources by providing a centralized repository of fragment information, making the splicing process straightforward through systematic retrieval based on stored indices.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12341845B2File downloading method and apparatus, storage medium, and electronic device
Publication Date: 2025.06.24 DOUYIN VISION CO LTD
  • US12341845B2 patent drawing
  • US12341845B2 patent drawing
  • US12341845B2 patent drawing

AI summary

A file downloading method includes: switching, in response to an obtained downloading interface switching request in a downloading process of a target file, a first downloading interface for currently downloading the target file to a second downloading interface for continuously downloading the target file, the first downloading interface being one of a foreground downloading interface and a background downloading interface, the second downloading interface being the other one of the foreground downloading interface and the background downloading interface; taking file data downloaded by the first downloading interface this time as a file fragment, and determining index information of the file fragment; storing the index information in a database; and sequentially reading, based on a storage sequence of index information in the database subsequent to completing a task of downloading the target file, file fragments corresponding to the index information and splicing the file fragments to obtain the target file.