Audio Task Scheduling for Low-Overhead Priority Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional digital signal processing (DSP) voice chips using FreeRTOS incur increased system overhead due to frequent task context switching, which affects timely processing of high-priority tasks.

Innovation Solution

A method that separately calls high-priority and low-priority tasks, processing cached audio data without task context switching, utilizing pre-allocated memory and loop caching, and employing round robin scheduling with timeout thresholds to manage CPU usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If FreeRTOS mechanism is used for multi-task scheduling, then task switching can be realized, but system overhead increases due to frequent task context switching

Engineering Contradiction:
Improvemulti-task scheduling capabilityVSAvoidsystem overhead
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments tasks into high-priority and low-priority categories, allowing the high-priority task to run independently without being preempted by low-priority tasks. This segmentation eliminates the need for frequent context switching while maintaining multi-task scheduling capability, thereby reducing system overhead.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts the high-priority task from the FreeRTOS scheduling mechanism, allowing it to run directly without going through the standard task switching process. This extraction removes the overhead associated with context switching for high-priority operations while preserving the ability to schedule multiple tasks.

Inventive Principle:
Principle #2Taking out (Extraction)

2Adaptability or versatility

If task context switching is performed frequently, then multi-task processing is enabled, but processing timeliness of high-priority tasks deteriorates

Engineering Contradiction:
Improvemulti-task processing capabilityVSAvoidprocessing timeliness
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

By segmenting tasks into priority levels and allowing high-priority tasks to execute without preemption, the patent ensures that high-priority processing completes in a single continuous execution cycle, eliminating time loss from context switching while still supporting multiple tasks.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary classification of tasks into high and low priority before execution begins. This preliminary action ensures that high-priority tasks are identified and can execute immediately without waiting for context switching opportunities, thus improving processing timeliness.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If dump protection is performed on task context during task switching, then task safety is improved, but system overhead increases

Engineering Contradiction:
Improvetask switching safetyVSAvoidsystem overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts high-priority tasks from the standard task switching mechanism that requires dump protection. By allowing high-priority tasks to run without entering the normal task switching cycle, the system eliminates the need for context dumping and protection operations for these critical tasks, reducing overhead while maintaining safety for other tasks.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentEP4187382B1Task processing method and apparatus, electronic device and storage medium
Publication Date: 2026.04.15 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • EP4187382B1 patent drawingFigure 1~2
  • EP4187382B1 patent drawingFigure 3~4
  • EP4187382B1 patent drawingFigure 5~6

AI summary

The present disclosure provides a task processing method and apparatus, an electronic device and a storage medium, and relates to the field of artificial intelligence, such as intelligent voices, artificial intelligence chips, or the like. The method may include: for to-be-executed tasks, in at least one round of processing, performing the following operations: in response to determining that one or more high-priority tasks exist in the to-be-executed tasks, calling the one or more high-priority tasks to process audio data cached in a memory; and after execution of the one or more high-priority tasks is completed, and in response to determining that one or more low-priority task exist in the to-be-executed tasks, calling the one or more low-priority tasks to process the audio data. The application of the solution of the present disclosure may reduce system overhead, or the like.