Message Queue Priority Segmentation for Execution Lag
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current electronic devices experience message lag due to inefficiencies in the message execution and processing mechanism, particularly when handling user-perceptible messages with high execution urgency.
Innovation Solution
A message execution and processing method that involves acquiring messages from a message queue, detecting messages based on a preset type flag, identifying target messages, and updating their execution position information to enhance priority and reduce lag.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If the priority of the message in the main thread is increased, then the message execution speed is improved, but the system resource allocation becomes unbalanced and message lag is not fundamentally solved
Solution Approach 1:
The patent segments the message queue into multiple priority levels (first priority queue and second priority queue) based on message types. User-perceptible messages are routed to the first priority queue while non-user-perceptible messages go to the second priority queue. This segmentation allows differential resource allocation without increasing overall system complexity, as each queue operates independently with its own execution thread.
Solution Approach 2:
The patent performs preliminary classification of messages into different priority queues before execution. By detecting whether a message is user-perceptible and routing it to the appropriate queue in advance, the system prepares the execution order beforehand, eliminating the need for dynamic priority adjustments during execution and reducing resource allocation complexity.
2Productivity
If more resources are allocated to the main thread, then the message processing efficiency is improved, but other system functions may be affected
Solution Approach 1:
The patent creates separate execution threads for different priority queues. The first execution thread is dedicated to processing user-perceptible messages in the first priority queue, while the second execution thread handles non-user-perceptible messages in the second priority queue. This thread segmentation ensures that resource allocation for message processing does not interfere with other system functions, as each thread operates independently with guaranteed resource allocation.
Solution Approach 2:
The patent introduces priority queues as intermediary structures between message generation and message execution. These queues act as buffers that decouple the message production process from the execution process, allowing the system to maintain stable resource allocation while improving message processing efficiency through priority-based scheduling.
3Ease of operation
If the message queue processes all messages in order, then the system maintains simplicity, but user-perceptible messages experience delay
Solution Approach 1:
The patent divides the single message queue into two separate priority queues: a first priority queue for user-perceptible messages and a second priority queue for non-user-perceptible messages. This segmentation allows the system to maintain operational simplicity within each queue while eliminating delays for user-perceptible messages through dedicated processing in the first priority queue.
Solution Approach 2:
The patent applies different processing qualities to different message types by routing user-perceptible messages to a dedicated first priority queue with higher processing priority, while non-user-perceptible messages are processed in the second priority queue. This local quality differentiation ensures that critical user-perceptible messages are processed without delay while maintaining overall system simplicity.
Data Source
AI summary
A message execution and processing method, a device, an electronic device, and a storage medium are provided. A message to be executed in a message queue is acquired. The message to be executed is detected based on a preset type flag to obtain a detection result. A target message to be executed with the preset type flag in the message to be executed is identified based on the detection result. Execution position information of the target message to be executed in the message queue is updated to obtain an updated message to be executed, which improves an efficiency of message execution.


