P2P Resource Downloading Memory Buffer Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In P2P networks, nodes with poor storage capacity, such as mobile and OTT terminals, face high magnetic disk consumption and low utilization due to frequent writing and time-consuming processes like analyzing free space and creating files, leading to reduced disk life and extended first-frame time for video playback.
Innovation Solution
A method where data is initially stored in memory instead of the magnetic disk, with writing to the disk delayed until the memory is full, reducing the number of disk writes and optimizing storage by filtering out incomplete resources, thus extending disk life and improving utilization and first-frame time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If data is written directly to magnetic disk during P2P resource downloading, then data storage is achieved, but magnetic disk consumption increases and disk life is reduced
Solution Approach 1:
The patent applies preliminary action by pre-allocating a buffer area in memory before downloading begins. Downloaded data is first stored in this pre-prepared memory buffer rather than directly on the magnetic disk. Only when the buffer is full does the system write to the disk, reducing write frequency and extending disk life while maintaining reliable data storage.
2Quantity of substance
If data is written to magnetic disk during downloading, then data is stored, but disk space utilization is low due to repeated writes and incomplete resources
Solution Approach 1:
The system performs preliminary actions by pre-allocating a buffer area in memory and filtering logic before downloading starts. This allows the system to accumulate data in memory first, filter out incomplete or invalid resources before they occupy disk space, and only write complete, valid resources to the disk. This reduces wasted disk space and improves utilization efficiency.
Solution Approach 2:
The patent introduces memory buffer as an intermediary between the downloading process and magnetic disk storage. This intermediary layer allows for data filtering, validation, and batching before disk writing occurs. Incomplete or invalid data can be identified and discarded in memory without consuming valuable magnetic disk space, thereby improving overall disk space utilization.
3Ease of operation
If free space analysis and file creation are performed during downloading, then data storage is prepared, but first-frame time for video playback is extended
Solution Approach 1:
The patent applies preliminary action by pre-allocating a buffer area in memory before downloading begins. This eliminates the need for real-time disk space analysis and file creation operations during the downloading process. The buffer is already prepared and ready to receive data, significantly reducing the first-frame time while still ensuring proper data storage preparation.
4Quantity of substance
If scattered and fragmented data is written directly to magnetic disk, then data storage is achieved, but read and write efficiency is reduced
Solution Approach 1:
The patent applies merging by combining multiple scattered and fragmented data pieces in the memory buffer into a complete, organized data structure before writing to the magnetic disk. This consolidation process occurs in memory where it is efficient, and the resulting unified data block is written to the disk in fewer, larger operations, significantly improving both read and write efficiency while maintaining full data storage capacity.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present application provides a method and a device for downloading resources, applied to a peer to peer (P2P) network. The method includes: initiating a downloading task according to a downloading request from a resource requester; acquiring data of the downloading task and writing the data of the downloading task to a memory; and reading the data from the memory and providing the data to the resource requester. The present application can reduce the amount of magnetic disk consumption due to resource downloading.