[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113132121A - Broadcast message processing method and device and terminal equipment - Google Patents

Broadcast message processing method and device and terminal equipment Download PDF

Info

Publication number
CN113132121A
CN113132121A CN201911393866.2A CN201911393866A CN113132121A CN 113132121 A CN113132121 A CN 113132121A CN 201911393866 A CN201911393866 A CN 201911393866A CN 113132121 A CN113132121 A CN 113132121A
Authority
CN
China
Prior art keywords
processing
processing logic
broadcast message
broadcast
processed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911393866.2A
Other languages
Chinese (zh)
Other versions
CN113132121B (en
Inventor
王奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN201911393866.2A priority Critical patent/CN113132121B/en
Publication of CN113132121A publication Critical patent/CN113132121A/en
Application granted granted Critical
Publication of CN113132121B publication Critical patent/CN113132121B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1813Arrangements for providing special services to substations for broadcast or conference, e.g. multicast for computer conferences, e.g. chat rooms
    • H04L12/1822Conducting the conference, e.g. admission, detection, selection or grouping of participants, correlating users to one or more conference sessions, prioritising transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/185Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with management of multicast group membership

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The application provides a method, a device and a terminal device for processing a broadcast message, wherein the method for processing the broadcast message comprises the following steps: acquiring a broadcast message to be processed and a processing queue corresponding to the broadcast message to be processed; the processing queue comprises a plurality of processing logics aiming at the broadcast messages to be processed; and calling the plurality of processing logics according to the arrangement sequence of the plurality of processing logics in the processing queue to process the broadcast message to be processed. The broadcast receiver receives the broadcast and calls the processing logic according to the arrangement sequence of the processing logic in the processing queue, so that the ordered processing of the common broadcast is realized.

Description

Broadcast message processing method and device and terminal equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a broadcast message, and a terminal device.
Background
Broadcast (Broadcast) is an important component in the Android operating system for event notification from application to application, and from application to operating system. The broadcast is implemented based on a publisher-subscriber model, the subscriber and the publisher do not need to know the existence of the other party, and both parties only need to pay attention to the same topic change.
One implementation mechanism for broadcasting is normal broadcasting. In a common broadcast mechanism, a publisher sends a broadcast, and all the relevant registered broadcast receivers can receive the broadcast, and then call respective processing logic to process the broadcast. Generally, one broadcast receiver corresponds to one processing logic, and for the same broadcast, objects of different scopes need to be registered for processing by different receivers.
However, in some application scenarios, registered broadcast receivers need to be processed in order, and the existing common broadcast mechanism cannot be implemented.
Disclosure of Invention
The application provides a method, a device and a terminal device for processing broadcast messages, which realize the ordered processing of common broadcasts.
In a first aspect, the present application provides a method for processing a broadcast message, including:
acquiring a broadcast message to be processed and a processing queue corresponding to the broadcast message to be processed; wherein, the process to which the broadcast message to be processed belongs corresponds to a broadcast receiver, and the processing queue comprises a plurality of processing logics aiming at the broadcast message to be processed;
and calling the processing logics according to the arrangement sequence of the processing logics in the processing queue to process the broadcast message to be processed.
Optionally, in a possible implementation manner of the first aspect, the invoking the plurality of processing logics according to the arrangement order of the plurality of processing logics in the processing queue to process the broadcast message to be processed includes:
acquiring a first processing logic to be called currently according to the arrangement sequence of the processing logics in the processing queue;
calling the first processing logic to process the broadcast message to be processed to obtain a first return value; the value of the first return value is used for indicating whether to continue to call the next processing logic to be called after the first processing logic;
and if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is not to be called continuously, stopping calling the processing logic in the processing queue.
Optionally, in a possible implementation manner of the first aspect, the method further includes:
and if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is continuously called, determining the next to-be-called processing logic after the first processing logic as a new first processing logic, and executing the step of calling the first processing logic aiming at the new first processing logic.
Optionally, in a possible implementation manner of the first aspect, a value of the first return value is a boolean value.
Optionally, in a possible implementation manner of the first aspect, the method further includes:
and if the processing logic for the broadcast message to be processed is added, deleted or modified, updating the processing queue corresponding to the broadcast message to be processed.
In a second aspect, the present application provides an apparatus for processing a broadcast message, including:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the broadcast message to be processed and a processing queue corresponding to the broadcast message to be processed; wherein, the process to which the broadcast message to be processed belongs corresponds to a broadcast receiver, and the processing queue comprises a plurality of processing logics aiming at the broadcast message to be processed;
and the processing module is used for calling the processing logics according to the arrangement sequence of the processing logics in the processing queue and processing the broadcast message to be processed.
Optionally, in a possible implementation manner of the second aspect, the processing module is specifically configured to:
acquiring a first processing logic to be called currently according to the arrangement sequence of the processing logics in the processing queue;
calling the first processing logic to process the broadcast message to be processed to obtain a first return value; the value of the first return value is used for indicating whether to continue to call the next processing logic to be called after the first processing logic;
and if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is not to be called continuously, stopping calling the processing logic in the processing queue.
Optionally, in a possible implementation manner of the second aspect, the processing module is further configured to:
and if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is continuously called, determining the next to-be-called processing logic after the first processing logic as a new first processing logic, and executing the step of calling the first processing logic aiming at the new first processing logic.
Optionally, in a possible implementation manner of the second aspect, the value of the first return value is a boolean value.
Optionally, in a possible implementation manner of the second aspect, the apparatus further includes an updating module, where the updating module is configured to:
and if the processing logic for the broadcast message to be processed is added, deleted or modified, updating the processing queue corresponding to the broadcast message to be processed.
In a third aspect, an embodiment of the present application provides a terminal device, including: a memory and a processor;
the memory to store program instructions;
the processor is configured to call the program instructions stored in the memory to implement the method provided in any embodiment of the first aspect of the present application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including: a readable storage medium and a computer program for implementing the method provided in any embodiment of the first aspect of the present application.
In a fifth aspect, the present application provides a program product comprising a computer program (i.e., executing instructions), the computer program being stored in a readable storage medium. The processor may read the computer program from the readable storage medium, and execute the computer program to implement the method provided by any embodiment of the first aspect of the present application.
The application provides a method, a device and a terminal device for processing broadcast messages, wherein all broadcast receivers in the same process are simplified into one, the simplified broadcast receivers correspond to a plurality of processing logics, and the processing logics are orderly arranged in a processing queue, so that the broadcast can be received by one broadcast receiver, the processing logics are called according to the arrangement sequence of the processing logics in the processing queue, and the orderly processing of common broadcast is realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic diagram illustrating a conventional mechanism for processing a general broadcast message;
fig. 2 is a schematic diagram illustrating a mechanism for processing a general broadcast message according to an embodiment of the present application;
fig. 3 is a flowchart of a method for processing a broadcast message according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a device for processing a broadcast message according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 6 is a hardware structure diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
A plurality of Applications (APPs) can be installed on the terminal device, and configuration files in the APP installation package are registered with the system to declare information of various components and resources that the applications need to use in the running process. The application may also register with the system dynamically during operation. Accordingly, the system keeps track of the registration information of the application at installation or during operation. Taking a broadcast Receiver (Receiver) component used by an application as an example, when a qualified broadcast message arrives, the broadcast Receiver of the application will normally receive and perform corresponding processing.
Broadcast is an important component in the android system. The broadcast may include three categories of normal broadcast, ordered broadcast, and sticky broadcast. For a normal broadcast, a broadcast publisher sends a broadcast, and all the relevant registered broadcast receivers can receive the broadcast and call respective processing logic to process the broadcast. For ordered broadcasting, the processing order of the broadcast messages at the broadcast receiver is differentiated according to different priorities of the broadcast receivers, and the broadcast messages are intercepted preferentially by the broadcast receivers with high priorities and can be deleted. For sticky broadcasts, a broadcast message is always present in the message container of the system after being transmitted, waiting for the corresponding broadcast receiver to process, and if there is no broadcast receiver to process the broadcast message for a while, always waiting in the message container. The broadcast receiver of the sticky broadcast, if destroyed, will automatically receive the broadcast message the next time it is re-established.
Fig. 1 is a schematic diagram illustrating an existing mechanism for processing a general broadcast message. As shown in fig. 1, a broadcast corresponds to a plurality of broadcast receivers, and one broadcast receiver corresponds to one processing logic. For example, broadcast receiver 1 corresponds to processing logic 1, broadcast receiver 2 corresponds to processing logic 2, and so on, broadcast receiver n corresponds to processing logic n. The broadcast transmitted by the broadcast sender can be received by the registered broadcast receivers 1-n, and the registered broadcast receivers invoke respective processing logic to process the broadcast. Ordinary broadcasting cannot achieve ordered processing of broadcast messages.
For example, the broadcast process when the volume knob of the terminal device is pressed is taken as an example. For example, in the first scenario, the terminal device is in a state of displaying a desktop, and the desktop includes a volume knob. When a user presses a volume knob in a desktop, the terminal equipment is triggered to pop up a switching group dialog box. At this point, the volume knob is pressed to trigger a normal broadcast, which may be received by the desktop. For example, in the second scenario, the terminal device is in a state of displaying a switching group dialog box, and the switching group dialog box includes a volume knob. When a user presses a volume knob in the switching group dialog box, the terminal equipment is triggered to carry out group switching. At this time, the volume knob is pressed to trigger the ordinary broadcast, the broadcast message can be received by the desktop and the switching group dialog box, both the desktop and the switching group dialog box can process the broadcast message, and the ordered processing of the broadcast message cannot be realized. Also, if the desktop cannot selectively invoke its own processing logic from the display state of the switch group dialog, it may further cause exception handling that both the group is switched and the switch group dialog is reopened.
In view of the above technical problems of the general broadcast, embodiments of the present application provide a method for processing a broadcast message, which does not require modification of a broadcast sending mechanism, and simplifies all broadcast receivers in the same process into one, where the simplified broadcast receiver corresponds to multiple processing logics, and the multiple processing logics are sequentially arranged in a processing queue, so that a broadcast can be received by one broadcast receiver, and the processing logics are called according to an arrangement order of the processing logics in the processing queue, thereby implementing sequential processing of the general broadcast.
For example, fig. 2 is a schematic diagram illustrating a mechanism for processing a general broadcast message according to an embodiment of the present application. As shown in fig. 2, in the same process, the broadcast corresponds to one broadcast receiver, and the broadcast receiver corresponds to n processing logics, which are processing logics 1 to n, respectively. After the broadcast receiver receives the broadcast transmitted by the broadcast transmitter, the acquisition processing logic, for example, the acquisition processing logic 2, is first obtained. The processing of the broadcast message is done by calling processing logic 2. The broadcast receiver then continues with acquisition processing logic, e.g., acquisition processing logic n. The processing of the broadcast message is done by calling processing logic n. Alternatively, processing logic n may intercept the broadcast and the broadcast receiver need not acquire additional processing logic.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments.
In the present application, the broadcast sender and the broadcast distributor have the same meaning, and the broadcast Receiver, and the broadcast Receiver have the same meaning, and may be interchanged as appropriate.
Fig. 3 is a flowchart of a method for processing a broadcast message according to an embodiment of the present application. In the method for processing a broadcast message provided in this embodiment, the execution subject may be a processing apparatus or a terminal device of the broadcast message. As shown in fig. 3, the method for processing a broadcast message provided in this embodiment may include:
s301, acquiring the broadcast message to be processed and a processing queue corresponding to the broadcast message to be processed. The process to which the broadcast message to be processed belongs corresponds to one broadcast receiver, and the processing queue comprises a plurality of processing logics aiming at the broadcast message to be processed.
Specifically, the broadcast message to be processed is a broadcast message of a common broadcast. The broadcast message to be processed corresponds to a processing queue that includes a plurality of processing logic for the broadcast message. The broadcast messages are different, and the corresponding processing queues are also different, and the number and the arrangement order of the processing logic in the processing queues corresponding to the broadcast messages are not limited in this embodiment.
For example. In the first scenario, the processing logic corresponding to the normal broadcast triggered when the volume knob is pressed includes the processing logic of the desktop. In the second scenario, the processing logic corresponding to the general broadcast triggered when the volume knob is pressed includes the processing logic of the desktop and the processing logic corresponding to the switching group dialog, and the processing logic corresponding to the switching group dialog is located before the processing logic of the desktop in the processing queue.
S302, calling a plurality of processing logics according to the arrangement sequence of the processing logics in the processing queue, and processing the broadcast message to be processed.
Take the second scenario above as an example. In the processing queue, the processing logic corresponding to the switching group dialog box is positioned in front of the processing logic of the desktop, and the processing logic corresponding to the switching group dialog box is called firstly according to the arrangement sequence of the processing logic in the processing queue, so that the ordered processing of the common broadcast is realized.
It can be seen that, the broadcast message processing method provided in this embodiment does not need to modify a broadcast sending mechanism of the common broadcast, and simplifies all broadcast receivers in the same process into one, where the simplified broadcast receiver corresponds to multiple processing logics, and the multiple processing logics are sequentially arranged in a processing queue, so that the broadcast can be received by one broadcast receiver, and the processing logics are invoked according to the arrangement order of the processing logics in the processing queue, thereby implementing sequential processing of the common broadcast.
Optionally, in S302, invoking a plurality of processing logics according to the arrangement order of the plurality of processing logics in the processing queue, and processing the broadcast message to be processed may include:
and acquiring the current first processing logic to be called according to the arrangement sequence of the processing logics in the processing queue.
And calling a first processing logic to process the broadcast message to be processed to obtain a first return value. And the value of the first return value is used for indicating whether to continue to call the processing logic to be called next after the first processing logic.
And if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is not continuously called, stopping calling the processing logic in the processing queue.
And if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is continuously called, determining the next to-be-called processing logic after the first processing logic as a new first processing logic, and executing the step of calling the first processing logic aiming at the new first processing logic.
This is also exemplified in connection with the second scenario described above.
According to the arrangement sequence of the processing logics in the processing queue, the first processing logic to be called currently can be acquired as the processing logic corresponding to the switching group dialog box. After the broadcast message is processed by calling the processing logic corresponding to the switching group dialog box, a first return value can be obtained. The value of the first return value specifically indicates that the processing logic to be called next after the processing logic corresponding to the switching group dialog box is not continuously called, that is, the processing logic of the desktop is not continuously called, so that the calling of other processing logic in the processing queue is stopped, and the processing of the broadcast message is finished. Because the processing logic corresponding to the switching group dialog box is called first and the resistance value of the processing logic calling the desktop is reduced, the problem that the switching group dialog box is switched and opened again in the prior art is solved.
It can be seen that the processing logic is invoked according to the order of the processing logic in the processing queue, and whether to continue invoking the next processing logic in the processing queue is determined according to the return value of the processing logic. If the return value of the processing logic indicates that the subsequent processing logic is not continuously called, the processing of the broadcast message is stopped, the interception of the broadcast message is realized, and the ordered and effective processing of the broadcast message is ensured. If the return value of the processing logic indicates that the subsequent processing logic is to be continuously invoked, the broadcast message is continuously processed in order.
It should be noted that, in this embodiment, a value of the first return value is not limited, and a mapping relationship between the value of the first return value and whether to continue to invoke the next processing logic is not limited. A
For example, the first return value may be a discrete value, such as a value of 1 or 2. When the value of the first return value is 1, indicating to continue to call the next processing logic to be called after the first processing logic, and when the value of the first return value is 2, indicating not to continue to call the next processing logic to be called after the first processing logic; or when the value of the first return value is 2, the processing logic to be called next after the first processing logic is instructed to continue to be called, and when the value of the first return value is 1, the processing logic to be called next after the first processing logic is instructed not to continue to be called.
Optionally, the value of the first return value may be boolean. The boolean values are only two, false and true, respectively. Assume that the false sequence number is 0 and the true sequence number is 1. When the value of the first return value is 0, indicating to continue to call the next processing logic to be called after the first processing logic, and when the value of the first return value is 1, indicating not to continue to call the next processing logic to be called after the first processing logic; or when the value of the first return value is 1, the processing logic to be called next after the first processing logic is instructed to continue to be called, and when the value of the first return value is 0, the processing logic to be called next after the first processing logic is instructed not to continue to be called.
Optionally, the method for processing a broadcast message provided in this embodiment may further include:
and if the processing logic for the broadcast messages to be processed is added, deleted or modified, updating the processing queue corresponding to the broadcast messages to be processed.
Specifically, the functions implemented by the system application and the installed APP on the terminal device are not uniform, but can be updated as needed. If the processing logic of the broadcast message to be processed is added, deleted or modified, updating the processing queue corresponding to the broadcast message to be processed, so as to add, delete or modify the processing logic in the processing queue or change the arrangement order of the processing logic in the processing queue.
Fig. 4 is a schematic structural diagram of a device for processing a broadcast message according to an embodiment of the present application. The apparatus for processing a broadcast message according to this embodiment is configured to execute the method for processing a broadcast message according to the embodiment shown in fig. 3. As shown in fig. 4, the apparatus for processing a broadcast message provided in this embodiment may include:
an obtaining module 41, configured to obtain a broadcast message to be processed and a processing queue corresponding to the broadcast message to be processed; wherein, the process to which the broadcast message to be processed belongs corresponds to a broadcast receiver, and the processing queue comprises a plurality of processing logics aiming at the broadcast message to be processed;
and the processing module 42 is configured to invoke the multiple processing logics according to the arrangement order of the multiple processing logics in the processing queue, and process the broadcast message to be processed.
Optionally, the processing module 42 is specifically configured to:
acquiring a first processing logic to be called currently according to the arrangement sequence of the processing logics in the processing queue;
calling the first processing logic to process the broadcast message to be processed to obtain a first return value; the value of the first return value is used for indicating whether to continue to call the next processing logic to be called after the first processing logic;
and if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is not to be called continuously, stopping calling the processing logic in the processing queue.
Optionally, the processing module 42 is further configured to:
and if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is continuously called, determining the next to-be-called processing logic after the first processing logic as a new first processing logic, and executing the step of calling the first processing logic aiming at the new first processing logic.
Optionally, a value of the first return value is boolean.
Optionally, the system further includes an update module, where the update module is configured to:
and if the processing logic for the broadcast message to be processed is added, deleted or modified, updating the processing queue corresponding to the broadcast message to be processed.
The apparatus for processing a broadcast message according to this embodiment is configured to execute the method for processing a broadcast message according to the embodiment shown in fig. 3, and the technical principle and the technical effect are similar, which are not described herein again.
Fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 5, the terminal device may include a processor 51 and a memory 52. The memory 52 is configured to store instructions, and the processor 51 is configured to execute the instructions stored in the memory 52, so that the terminal device executes the method for processing a broadcast message provided in the embodiment shown in fig. 3, which has similar technical principles and technical effects, and is not described herein again.
It should be noted that the present application does not limit the device form and the specific structure of the terminal device. For example, fig. 6 is a hardware structure diagram of a terminal device provided in the embodiment of the present application.
As shown in fig. 6, terminal devices 3000 include, but are not limited to: radio frequency unit 301, network module 302, audio output unit 303, input unit 304, sensor 305, display unit 306, user input unit 307, interface unit 308, memory 309, processor 340, power supply 341, and the like. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 6 does not constitute a limitation of the terminal device, and that terminal device 3000 may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present application, the terminal device includes, but is not limited to, a mobile phone, a tablet computer, a palmtop computer, and the like.
A user input unit 307 for receiving an input of a user; a display unit 306 for displaying contents according to an input in response to the input received by the user input unit 307.
It should be understood that, in the embodiment of the present application, the rf unit 301 may be used for receiving and transmitting signals during a message transmission or a call. In general, radio frequency unit 301 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 301 can also communicate with a network and other devices through a wireless communication system.
The terminal device 3000 provides the user with wireless broadband internet access through the network module 302, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 303 may convert audio data received by the radio frequency unit 301 or the network module 302 or stored in the memory 309 into an audio signal and output as sound. Also, the audio output unit 303 may also provide audio output related to a specific function performed by the terminal device 3000 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 303 includes a speaker, a buzzer, a receiver, and the like.
The input unit 304 is used to receive audio or video signals. The input Unit 304 may include a Graphics Processing Unit (GPU) 3043 and a microphone 3042, the Graphics processor 3043 Processing image data of a picture or video captured by a camera or the like. The processed image frames may be displayed on the display unit 306. The image frames processed by the graphic processor 3043 may be stored in the memory 309 (or other storage medium) or transmitted via the radio frequency unit 301 or the network module 302. The microphone 3042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 301 in case of the phone call mode.
The terminal device 3000 also includes at least one sensor 305, such as a light sensor, a motion sensor, a GPS sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 3063 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 3063 and/or a backlight when the terminal device 3000 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the GPS sensor can position the current position of the terminal equipment by receiving satellite signals in space; the sensors 305 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 306 is used to display information input by the user or information provided to the user. The Display unit 306 may include a Display panel 3063, and the Display panel 3063 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 307 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 307 includes a touch panel 3073 and other input devices 3072. The touch panel 3073, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 3073 (e.g., operations by a user on or near the touch panel 3073 using any suitable object or attachment such as a finger, a stylus, etc.). The touch panel 3073 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 340, receives a command from the processor 340, and executes the command. In addition, the touch panel 3073 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The user input unit 307 may include other input devices 3072 in addition to the touch panel 3073. Specifically, the other input devices 3072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein.
Further, the touch panel 3073 can be overlaid on the display panel 3063, and when the touch panel 3073 detects a touch operation on or near the touch panel, the touch operation is transmitted to the processor 340 to determine the type of the touch event, and then the processor 340 provides a corresponding visual output on the display panel 3063 according to the type of the touch event. Although in fig. 6, the touch panel 3073 and the display panel 3063 are implemented as two separate components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 3073 and the display panel 3063 may be integrated to implement the input and output functions of the terminal device, and the implementation is not limited herein.
The interface unit 308 is an interface for connecting an external device to the terminal apparatus 3000. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 308 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 3000 or may be used to transmit data between the terminal apparatus 3000 and an external device.
The memory 309 may be used to store software programs as well as various data. The memory 309 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 309 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 340 is a control center of the terminal device, connects various parts of the whole terminal device by using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 309 and calling data stored in the memory 309, thereby performing overall monitoring of the terminal device. Processor 340 may include one or more processing units; optionally, the processor 340 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 340.
Referring to fig. 6, in the embodiment of the present application, a memory 309 stores a computer program, where the processor 340 runs the computer program, so that the terminal device performs the operations performed by the terminal device in the above method embodiments.
In the embodiments of the present application, the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
In the embodiment of the present application, the memory may be a nonvolatile memory, such as a Hard Disk Drive (HDD) or a solid-state drive (SSD), and may also be a volatile memory, for example, a random-access memory (RAM). The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.

Claims (10)

1. A method for processing broadcast messages, comprising:
acquiring a broadcast message to be processed and a processing queue corresponding to the broadcast message to be processed; wherein, the process to which the broadcast message to be processed belongs corresponds to a broadcast receiver, and the processing queue comprises a plurality of processing logics aiming at the broadcast message to be processed;
and calling the processing logics according to the arrangement sequence of the processing logics in the processing queue to process the broadcast message to be processed.
2. The method of claim 1, wherein the invoking the plurality of processing logics according to the order of the plurality of processing logics in the processing queue to process the pending broadcast message comprises:
acquiring a first processing logic to be called currently according to the arrangement sequence of the processing logics in the processing queue;
calling the first processing logic to process the broadcast message to be processed to obtain a first return value; the value of the first return value is used for indicating whether to continue to call the next processing logic to be called after the first processing logic;
and if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is not to be called continuously, stopping calling the processing logic in the processing queue.
3. The method of claim 2, further comprising:
and if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is continuously called, determining the next to-be-called processing logic after the first processing logic as a new first processing logic, and executing the step of calling the first processing logic aiming at the new first processing logic.
4. A method according to claim 2 or 3, characterized in that the value of the first return value is boolean.
5. The method according to any one of claims 1-3, further comprising:
and if the processing logic for the broadcast message to be processed is added, deleted or modified, updating the processing queue corresponding to the broadcast message to be processed.
6. An apparatus for processing broadcast messages, comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the broadcast message to be processed and a processing queue corresponding to the broadcast message to be processed; wherein, the process to which the broadcast message to be processed belongs corresponds to a broadcast receiver, and the processing queue comprises a plurality of processing logics aiming at the broadcast message to be processed;
and the processing module is used for calling the processing logics according to the arrangement sequence of the processing logics in the processing queue and processing the broadcast message to be processed.
7. The apparatus of claim 6, wherein the processing module is specifically configured to:
acquiring a first processing logic to be called currently according to the arrangement sequence of the processing logics in the processing queue;
calling the first processing logic to process the broadcast message to be processed to obtain a first return value; the value of the first return value is used for indicating whether to continue to call the next processing logic to be called after the first processing logic;
and if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is not to be called continuously, stopping calling the processing logic in the processing queue.
8. The apparatus of claim 7, wherein the processing module is further configured to:
and if the value of the first return value indicates that the next to-be-called processing logic after the first processing logic is continuously called, determining the next to-be-called processing logic after the first processing logic as a new first processing logic, and executing the step of calling the first processing logic aiming at the new first processing logic.
9. A terminal device, comprising: a memory and a processor;
the memory to store program instructions;
the processor to invoke the program instructions stored in the memory to implement the method of any of claims 1-5.
10. A computer-readable storage medium, comprising: readable storage medium and computer program for implementing the method according to any of claims 1-5.
CN201911393866.2A 2019-12-30 2019-12-30 Broadcast message processing method and device and terminal equipment Active CN113132121B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911393866.2A CN113132121B (en) 2019-12-30 2019-12-30 Broadcast message processing method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911393866.2A CN113132121B (en) 2019-12-30 2019-12-30 Broadcast message processing method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN113132121A true CN113132121A (en) 2021-07-16
CN113132121B CN113132121B (en) 2023-01-31

Family

ID=76767929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911393866.2A Active CN113132121B (en) 2019-12-30 2019-12-30 Broadcast message processing method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN113132121B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117707754A (en) * 2023-06-30 2024-03-15 荣耀终端有限公司 System broadcast transmitting method and electronic equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020091846A1 (en) * 2000-10-30 2002-07-11 The Regents Of The University Of California Tree-based ordered multicasting method
US20030182444A1 (en) * 2002-03-21 2003-09-25 Fernando Pedone Distributed system with an efficient atomic broadcast mechanism
CN101155370A (en) * 2006-12-08 2008-04-02 中兴通讯股份有限公司 Business serial processing method and system in multi-stream application of mobile communication system
CN102999386A (en) * 2012-11-08 2013-03-27 山东大学 Method for achieving multi-message queue mechanism to improve performance in single process
CN103491507A (en) * 2013-09-05 2014-01-01 深圳市欧珀通信软件有限公司 Method and device for relocation of orderly broadcast priority
CN105335243A (en) * 2015-11-30 2016-02-17 上海斐讯数据通信技术有限公司 Broadcast message operation method and system in Android system
CN106844070A (en) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 A kind of control method of broadcast, device and mobile terminal
CN107483635A (en) * 2017-09-22 2017-12-15 浪潮软件集团有限公司 Service request processing method, processing system and message middleware
CN108156192A (en) * 2016-12-02 2018-06-12 联芯科技有限公司 Android RIL message handling systems and method
CN109005468A (en) * 2018-06-29 2018-12-14 武汉斗鱼网络科技有限公司 Barrage message distributing method, device, equipment and storage medium
CN109413592A (en) * 2018-11-29 2019-03-01 维沃移动通信有限公司 A kind of broadcasting method and mobile terminal

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020091846A1 (en) * 2000-10-30 2002-07-11 The Regents Of The University Of California Tree-based ordered multicasting method
US20030182444A1 (en) * 2002-03-21 2003-09-25 Fernando Pedone Distributed system with an efficient atomic broadcast mechanism
CN101155370A (en) * 2006-12-08 2008-04-02 中兴通讯股份有限公司 Business serial processing method and system in multi-stream application of mobile communication system
CN102999386A (en) * 2012-11-08 2013-03-27 山东大学 Method for achieving multi-message queue mechanism to improve performance in single process
CN103491507A (en) * 2013-09-05 2014-01-01 深圳市欧珀通信软件有限公司 Method and device for relocation of orderly broadcast priority
CN105335243A (en) * 2015-11-30 2016-02-17 上海斐讯数据通信技术有限公司 Broadcast message operation method and system in Android system
CN108156192A (en) * 2016-12-02 2018-06-12 联芯科技有限公司 Android RIL message handling systems and method
CN106844070A (en) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 A kind of control method of broadcast, device and mobile terminal
CN107483635A (en) * 2017-09-22 2017-12-15 浪潮软件集团有限公司 Service request processing method, processing system and message middleware
CN109005468A (en) * 2018-06-29 2018-12-14 武汉斗鱼网络科技有限公司 Barrage message distributing method, device, equipment and storage medium
CN109413592A (en) * 2018-11-29 2019-03-01 维沃移动通信有限公司 A kind of broadcasting method and mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YOUNGJIN LEE;: "Field Trials for Terrestrial Digital Multimedia Broadcasting System", 《IEEE TRANSACTIONS ON BROADCASTING》 *
鲁晓天等: "Android中的BroadcastReceiver注册方式研究", 《电脑知识与技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117707754A (en) * 2023-06-30 2024-03-15 荣耀终端有限公司 System broadcast transmitting method and electronic equipment

Also Published As

Publication number Publication date
CN113132121B (en) 2023-01-31

Similar Documents

Publication Publication Date Title
CN110752980B (en) Message sending method and electronic equipment
CN109271121B (en) Application display method and mobile terminal
CN109889348B (en) Image sharing method and device
CN110062105B (en) Interface display method and terminal equipment
CN109995933B (en) Method for controlling alarm clock of terminal equipment and terminal equipment
CN109471690B (en) Message display method and terminal equipment
CN109976611B (en) Terminal device control method and terminal device
CN109358931B (en) Interface display method and terminal
CN109857495A (en) A kind of display control method and terminal device
CN110990172A (en) Application sharing method, first electronic device and computer-readable storage medium
CN111064654A (en) Message display method and electronic equipment
CN111131607A (en) Information sharing method, electronic equipment and computer readable storage medium
CN108804151B (en) Method and terminal for restarting application program
CN113055272B (en) Message reminding method and device based on dual systems and terminal equipment
CN107957914B (en) Information processing method and mobile terminal
CN111107223B (en) Message processing method and electronic equipment
CN109992192B (en) Interface display method and terminal equipment
CN108366167B (en) Message reminding method and mobile terminal
CN108093119B (en) Strange incoming call number marking method and mobile terminal
CN113132121B (en) Broadcast message processing method and device and terminal equipment
CN111309392B (en) Equipment control method and electronic equipment
CN110740265B (en) Image processing method and terminal equipment
CN109660657B (en) Application program control method and device
CN109068276B (en) Message conversion method and terminal
CN109217895B (en) Control method of radio frequency front-end device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant