TS File Parsing via Memory Streams to Reduce Memory Occupation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for parsing TS data packets in transport streams require caching all packets in memory, leading to inefficient data processing due to memory occupation and delayed processing.

Innovation Solution

A video data processing method that reads and converts TS file data into memory streams in sequence based on a set byte length, allowing for simultaneous reading and processing of TS data packets, with optional deletion of memory streams after use to manage memory capacity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all TS data packets are cached in memory, then data processing can be performed, but memory occupation increases and data processing efficiency decreases

Engineering Contradiction:
Improvedata processing capabilityVSAvoiddata processing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the TS data processing into two distinct phases: a parsing phase where packet headers are extracted and stored in memory, and a processing phase where the actual data is processed. This segmentation allows the system to handle large volumes of TS data without requiring all data to be simultaneously present in memory, thus resolving the contradiction between data processing capability and processing efficiency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary parsing of TS data packets to extract and store packet headers and basic information in memory before the actual processing occurs. This preliminary action separates the data preparation work from the data processing work, allowing the processing phase to operate on pre-prepared data structures without requiring the entire TS data set to be cached in memory simultaneously.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If all TS data packets are cached in memory, then complete data is available for processing, but memory occupation increases

Engineering Contradiction:
Improvedata completenessVSAvoidmemory occupation
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts only the essential header information and metadata from TS data packets during the parsing phase, storing only this extracted information in memory rather than caching the complete TS data packets. This extraction approach ensures that all necessary data information is available for processing while significantly reducing the memory occupation required to store the data.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If all TS data packets are cached before processing, then processing can be performed, but processing time is delayed

Engineering Contradiction:
Improveprocessing completionVSAvoidprocessing delay
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements a dynamic processing model where TS data packets are parsed and prepared in advance, but the actual processing occurs immediately when needed rather than waiting for complete data caching. This dynamic approach allows the system to transition from a static batch-processing model to a more flexible on-demand processing model, reducing processing delays while maintaining data completeness.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS12069332B2Video data processing method, electronic device and computer-readable medium
Publication Date: 2024.08.20 DOUYIN VISION CO LTD
  • US12069332B2 patent drawing
  • US12069332B2 patent drawing

AI summary

Disclosed are a video data processing method and apparatus, an electronic device and a computer-readable storage medium. The method includes acquiring a to-be-processed TS file; by means of a created stream, reading data in the to-be-processed TS file in sequence according to a set byte length, and converting data of each read in the to-be-processed TS file into a memory stream; and when the first memory stream is obtained through conversion, parsing memory streams in sequence according to a read order, and obtaining a video parameter corresponding to the memory streams.