Android Ordered Broadcast Processing via Receiver Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing broadcast processing mechanism in Android operating systems is inefficient, leading to high system resource consumption and instability due to unordered broadcast message processing, where receivers often have to wait for previous receivers to finish processing before responding.
Innovation Solution
A method for processing ordered broadcasts, which involves obtaining broadcast messages from a queue, determining the type of broadcast receivers, and sending the messages only to predefined types via specific interfaces, ensuring that receivers process messages in sequence and reducing resource consumption.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If broadcast messages are processed in order by all receivers, then message processing completeness is improved, but system resource consumption increases and processing time extends
Solution Approach 1:
The patent segments broadcast receivers into predefined types (e.g., system receivers, application receivers) and processes different types through different paths. System receivers process messages immediately through a first path, while application receivers process through a second path, enabling parallel processing and improving overall efficiency without compromising completeness.
Solution Approach 2:
The patent applies different processing qualities to different receiver types. Critical system receivers get immediate processing with guaranteed resources, while application receivers get processed asynchronously. This local differentiation ensures important messages are handled reliably while optimizing overall system productivity.
2Adaptability or versatility
If all broadcast receivers are allowed to process messages, then broadcast coverage is improved, but system stability deteriorates due to resource exhaustion
Solution Approach 1:
The patent extracts and isolates application receivers from the critical system message processing path. By separating application receivers into a distinct processing path with asynchronous handling, the system protects itself from resource exhaustion by application receivers while maintaining their broadcast coverage capability.
Solution Approach 2:
The patent implements preliminary classification of receivers into predefined types before message processing. This preliminary action determines the processing path in advance, preventing uncontrolled resource consumption by application receivers from affecting system stability, while still allowing comprehensive broadcast coverage.
3Stability of the object's composition
If broadcast receivers wait for previous receivers to finish processing, then processing order is maintained, but time consumption increases
Solution Approach 1:
The patent introduces dynamic processing paths based on receiver type. System receivers follow a synchronous path maintaining strict order for critical messages, while application receivers follow an asynchronous path that allows parallel processing. This dynamic approach maintains necessary processing order for system stability while reducing overall time consumption through parallel execution.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A method for processing ordered broadcast and an electronic device (100) are provided. The method includes operations as follows. At first, a broadcast message currently sent in a broadcast queue is obtained. Then, a type of at least one broadcast receiver is determined according to the broadcast message. Finally, at least one interface for sending the broadcast message is invoked to send the broadcast message to the at least one broadcast receiver of a predefined type, when the type of at least one broadcast receiver is the predefined type.