Smart Device Task Processing via Dynamic Thread Pool Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Smart devices face inefficiencies in processing tasks due to the lack of effective methods for managing and executing tasks received from servers, particularly in handling concurrent and serial task queues, and uploading events to servers.

Innovation Solution

A method and apparatus for processing tasks in smart devices that involve receiving service information, analyzing it to determine tasks, and arranging them into task queues for concurrent or serial processing, utilizing thread pools to manage task execution and event uploading, thereby optimizing task processing and event transmission efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If tasks are processed sequentially one by one, then system resource pressure is reduced, but task processing efficiency deteriorates

Engineering Contradiction:
Improvesystem resource stabilityVSAvoidtask processing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system dynamically adjusts the processing mode between serial and concurrent based on real-time conditions. The task queue automatically selects serial processing when resource pressure is high and concurrent processing when resources are available, making the system adaptable to varying load conditions.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the processing parameter from strictly serial to configurable concurrent mode by adjusting the degree of parallelism. Thread pools are used to control the number of concurrent tasks, allowing the system to optimize between resource consumption and processing speed by changing this key parameter.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If concurrent task processing is implemented, then task processing efficiency is improved, but system resource pressure increases

Engineering Contradiction:
Improvetask processing efficiencyVSAvoidsystem resource pressure
Core Design Contradiction:
ProductivityVSStress or pressure

Solution Approach 1:

The system implements partial concurrent action by using thread pools with controlled size. Instead of maximizing concurrency, it uses a moderate number of threads that balances processing efficiency with resource consumption, avoiding excessive resource pressure while still gaining concurrency benefits.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The task queue ensures continuous processing by maintaining a pool of ready tasks that can be picked up by available threads. This continuity keeps resources productively engaged without creating pressure spikes, as tasks are smoothly handed off between threads rather than causing resource contention.

Inventive Principle:
Principle #20Continuity of useful action

3Reliability

If event uploading is performed synchronously, then data consistency is ensured, but event processing speed deteriorates

Engineering Contradiction:
Improvedata consistencyVSAvoidevent processing speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The system performs preliminary local recording of events before uploading to the server. Events are first stored in a local queue or database, ensuring data is captured immediately, then uploaded asynchronously in the background. This preliminary action ensures data consistency is maintained locally while enabling fast event processing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

An intermediary mechanism (local event queue or buffer) is introduced between event generation and server upload. This intermediary decouples the synchronous relationship, allowing events to be recorded quickly locally and then uploaded asynchronously, maintaining data consistency through the intermediary while improving processing speed.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11188380B2Method and apparatus for processing task in smart device
Publication Date: 2021.11.30 BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
  • US11188380B2 patent drawing
  • US11188380B2 patent drawing
  • US11188380B2 patent drawing

AI summary

A method and apparatus for processing a task in a smart device are provided. A specific embodiment of the method includes: receiving service information sent by a server, the service information comprising task description information in a predetermined data format; analyzing the service information based on the predetermined data format to determine a to-be-processed task; arranging the to-be-processed task into a to-be-processed task queue; and processing a plurality of the to-be-processed tasks in the to-be-processed task queue. The embodiment improves the processing efficiency of to-be-processed tasks.