The present disclosure relates to the technical field of terminals, for example, relates to a broadcast transmission method, a terminal, and a storage medium.
In a wireless communication system, there are many different modules. In order to perform information transmission quickly in different modules, a wireless communication system provides a communication manner, which is similar to the broadcasting mode in the real life. When there is a message which is to notify different modules, the message is transmitted to different broadcast receivers by the broadcasting manner.
Wherein, when distributing broadcast messages, various types of broadcast messages are all queued in a broadcast queue to be processed. When the transmitted broadcast messages are many, the broadcast queue will be a long queue; if the broadcast distribution speed is less than the speed of broadcast entering the queue, a serious blocking problem will be caused, thereby resulting in unsmooth information transmission and causing abnormal terminal operation.
In a first aspect, an embodiment of the present disclosure provides a broadcast transmission method, comprising: creating broadcast transmission queues corresponding to types of broadcast messages; detecting a type of a received broadcast message; and transferring the received broadcast message into a broadcast transmission queue corresponding to the type of the broadcast message, and transmitting the broadcast message in the broadcast transmission queue in parallel to a broadcast receiver.
In a second aspect, an embodiment of the present disclosure provides a terminal, which comprises a storage, a processor, and a computer program which is stored in the storage and can be executed in the processor; when executing the computer program, the processor implements the following steps: creating broadcast transmission queues corresponding to types of broadcast messages; detecting a type of a received broadcast message; and transferring the received broadcast message into a broadcast transmission queue corresponding to a type of the broadcast message, and transmitting the broadcast message in the broadcast transmission queue in parallel to a broadcast receiver.
In a third aspect, an embodiment of the present disclosure provides a computer readable storage medium, the computer readable storage medium stores one or more program, the one or more program can be executed by one or more processor to implement the broadcast transmission method of the first aspect.
The drawings explained here are used to provide further appreciation for the present disclosure, and form a part of the present disclosure. The exemplary embodiments and their explanation of the present disclosure are intended to illustrate the present disclosure and do not form improper restriction of the present disclosure.
The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described here are merely intended to illustrate the present disclosure but not to limit the present disclosure. FIG. la is a flow chart of a broadcast transmission method provided by one embodiment of the present disclosure. The method is implemented by a broadcast transmission device, the device is implemented by software and/or hardware, and the device is configured in a terminal such as a mobile phone. As shown in
In S110, broadcast transmission queues corresponding to types of broadcast messages are created.
In one embodiment of the present disclosure, during a broadcast processing process, a service process of a broadcast transmitter transmits a broadcast message to a broadcast management module (for example, Activity Manager Service) by calling a broadcast transmission function (for example, a send Broadcast function); after receiving the broadcast message, the broadcast management module adds it into a broadcast transmission queue, and the broadcast management module transmits the broadcast message in the broadcast transmission queue to a broadcast receiver meeting receiving conditions through a process communication mechanism (for example, Binder process communication mechanism).
In a broadcast mechanism, broadcast messages refer to information transmitted during an operation process by a system or an application and used for transmission between the system and/or the application. Broadcast messages includes system associated broadcast messages and third party application broadcast messages, wherein, the system associated broadcast messages include system broadcast messages and system built-in application broadcast messages. The system broadcast messages may be system start broadcast messages, screen extinguishing broadcast messages, screen lighting broadcast message, or the like. The system built-in application broadcast messages may be short message broadcast messages or the like.
Before creating the broadcast transmission queues, the types of broadcast messages in a terminal can be divided; according to the divided types of broadcast messages, broadcast transmission queues corresponding to the types of the broadcast messages are created. When the broadcast messages include the system associated broadcast messages and the third party application broadcast messages, and the system associated broadcast messages include the system broadcast messages and system built-in application broadcast messages, alternatively, creating broadcast transmission queues corresponding to types of broadcast messages includes: creating a first broadcast transmission queue corresponding to the system associated broadcast messages, and creating a second broadcast transmission queue corresponding to the third party application broadcast messages. Wherein, broadcast messages in the first broadcast transmission queue and in the second broadcast transmission queue can be transmitted in parallel and at the same time.
In S120, types of received broadcast messages are detected.
In one embodiment of the present disclosure, types of a broadcast message received by the broadcast management module are detected, wherein the broadcast messages received by the broadcast management module are broadcast messages transmitted by broadcast transmitters, wherein, the broadcast transmitters can include systems, system built-in applications, or third party applications. Wherein, the received broadcast messages include the system associated broadcast messages and the third party application broadcast messages; wherein, the system associated broadcast messages include the system broadcast messages and system built-in application broadcast messages.
In S130, the received broadcast messages are transferred into broadcast transmission queues corresponding to types of the broadcast messages, and thus the broadcast messages in the broadcast transmission queue are transmitted in parallel to the broadcast receiver.
In one embodiment of the present disclosure, each type of the broadcast messages corresponds to one broadcast transmission queue. When creating the first broadcast transmission queue corresponding to the system associated broadcast messages, and creating the second broadcast transmission queue corresponding to the third party application broadcast messages, alternatively, transferring the received broadcast messages into broadcast transmission queues corresponding to types of the broadcast messages, and thereby transmitting the broadcast messages in parallel to the broadcast receiver include: transferring received system associated broadcast messages into the first broadcast transmission queue, and transferring the received third party application broadcast messages into the second broadcast transmission queue, and thereby transmitting the system associated broadcast messages and the third party application broadcast messages in parallel to the broadcast receiver.
In the related art, a broadcast management module receives broadcast messages transmitted by broadcast transmitters, and adds the received broadcast messages into a broadcast transmission queue for distribution; broadcast messages entering the queue early can be distributed early, and broadcast messages entering the queue lately are distributed lately. When the broadcast messages transmitted by the broadcast transmitters are many, the broadcast transmission queue will be long; if the speed of distributing the broadcast messages is less than the speed of adding the broadcast messages into the broadcast transmission queue, serious blocking will be caused, and the transmission of the broadcast messages will be unsmooth. In one embodiment of the present disclosure, the broadcast transmission queues corresponding to the types of the broadcast messages are created, the broadcast messages received by the broadcast management module are transferred into corresponding broadcast transmission queues, and thus the broadcast messages are transmitted in parallel to the broadcast receivers; compared with the related art, the broadcast transmission queues are added, the speed of distributing broadcast messages is improved, and the blocking problem is solved. Since the speed of distributing broadcast messages is improved, the speed of processing broadcast messages is also improved.
Moreover, in the related art, system broadcast messages, system built-in application broadcast messages, and third party application broadcast messages are in the same broadcast transmission queue for distribution.
In one embodiment of the present disclosure, by transferring the received system broadcast messages and system built-in application broadcast messages into the created first broadcast transmission queue, and transferring the third party application broadcast messages into the second broadcast transmission queue, transmission in parallel is implemented. For example, as shown in
On the basis of the above embodiments, when the broadcast messages include the system associated broadcast messages and the third party application broadcast messages, and the system associated broadcast messages include the system broadcast messages and the system built-in application broadcast messages, creating the broadcast transmission queues corresponding to the types of the broadcast messages can further includes: creating a first broadcast transmission queue corresponding to the system broadcast messages, creating a second broadcast transmission queue corresponding to the system built-in application broadcast messages, and creating a third broadcast transmission queue corresponding to the third party application broadcast messages. Correspondingly, transferring the received broadcast messages into broadcast transmission queues corresponding to types of the broadcast messages, and thereby transmitting the broadcast messages in parallel to the broadcast receiver can further includes: transferring received system broadcast messages into the first broadcast transmission queue, transferring received system built-in application broadcast messages into the second broadcast transmission queue, and transferring received third party application broadcast messages into the third broadcast transmission queue, thereby transmitting the system broadcast messages, the system built-in application broadcast messages, and the third party application broadcast messages in parallel to the broadcast receiver.
It should be noted that, the method for creating the broadcast transmission queues corresponding to the types of the broadcast messages is not limited to the foregoing method, and the types of the broadcast messages may be refined to create four or other numbers of broadcast transmission queues. The number of the created broadcast transmission queues can also be not limited, and the creation can be performed as needed. With respect to any two or more broadcast messages which are to be transmitted, as long as these broadcast messages are transferred into different broadcast transmission queues respectively, these broadcast messages can be transmitted in parallel to the broadcast receiver so as to improve the efficiency of transmitting broadcast messages. In the embodiments of the present disclosure, as long as a plurality of (i.e., at least two) broadcast transmission queues corresponding to different types of broadcast messages respectively have been created, and there are a plurality of (i.e., at least two) to be transmitted broadcast messages of different types, these to be transmitted broadcast messages can be respectively transferred into different broadcast transmission queues (i.e., broadcast transmission queues corresponding to the types of these broadcast messages respectively) and transmitted in parallel to the broadcast receiver Alternatively, the method of dividing the broadcast message types may be different, for example, the broadcast messages can include application broadcast messages and system broadcast messages, the created broadcast transmission queues correspond to the types of the broadcast messages, and the received broadcast messages are transferred into broadcast transmission queues corresponding to the types of the broadcast messages. Wherein, the method for dividing the types of the broadcast messages can also be other methods; correspondingly, the created broadcast transmission queues correspond to the types of the broadcast messages.
It should be noted that, one embodiment of the present disclosure exemplarily executes S110 before S120, but one embodiment of the present disclosure is merely an example; in other embodiments of the present disclosure, S110 can also be executed after S120, and does not generate effect on broadcast transmission.
In one embodiment of the present disclosure, by transferring the received broadcast messages into the broadcast transmission queue corresponding to the types of the broadcast messages and thereby transmitting the broadcast messages in parallel to the broadcast receiver, the speed of distributing the broadcast messages can be improved, and the blocking problem caused by broadcast can be solved.
In S210, broadcast transmission queues corresponding to types of broadcast messages are created.
In S220, types of received broadcast messages are detected.
In S230, the received broadcast messages are transferred into broadcast transmission queues corresponding to types of the broadcast messages, and thus the broadcast messages in the broadcast transmission queue are transmitted in parallel to the broadcast receiver.
In S240, identification information of the broadcast messages is detected.
In one embodiment of the present disclosure, the identification information of the system built-in application broadcast messages and of the third party application broadcast messages can be package names of applications, or can also be other identification information. The identification information of the system broadcast messages can be identification information corresponding to functions of the broadcast messages, and can also be identification information in other forms. Wherein, each broadcast message has identification information.
In S250, transmitters of the broadcast messages are determined according to the identification information.
In one embodiment of the present disclosure, according to the identification information of a broadcast message, the transmitter of the broadcast message can be determined. For example, if the identification information of a broadcast message is a package name of Wechat, the transmitter of the broadcast message is Wechat application. Wherein, the transmitters of the broadcast messages can be systems, system built-in applications, or third party applications; a transmitter of a broadcast message is the broadcast transmitter corresponding to the broadcast message.
In S260, according to grades of the transmitters of the broadcast messages, the sequences of the broadcast messages in the broadcast transmission queues are adjusted.
Wherein, the grades of the transmitters of the broadcast messages can be set. For example, system settings can be set as higher grades, and system built-in applications can be set as lower grades; in a broadcast transmission queue where both the system broadcast messages and the system built-in application broadcast messages are located, the system broadcast messages are adjusted to be before the system built-on application broadcast messages. Since there are many kinds of system built-in applications and third party application, grades of various system built-in applications and of various three party applications can also be set, such that various system built-in application broadcast messages are adjusted, and system built-in application broadcast messages of which the transmitters are in higher grades are adjusted to be before system built-in application broadcast messages of which the transmitters are in lower grades. In another broadcast transmission queue, third party application broadcast messages of which the transmitters are in higher grades are adjusted to be before third party application broadcast messages of which the transmitters are in lower grades.
Alternatively, it is also possible to adjust only respective sequences of the system built-in application broadcast messages and of the third party application broadcast messages in the broadcast transmission queues, and the adjusting method is according to the grades of the transmitters of the broadcast messages. The grades of the transmitters of the broadcast messages can be set through functional options in terminal interfaces, these functional options are configured to select the grades of the transmitters of the broadcast messages. Wherein, the functional options can be a plurality of options set in drop down menus of each application respectively, and can also be one option set in a terminal interface singly.
Therefore, when adjusting the respective sequences of the system built-in application broadcast messages and of the third party application broadcast messages in the broadcast transmission queues, before adjusting the sequences of the broadcast messages in the broadcast transmission queues according to grades of the transmitters of the broadcast messages, setting a functional option for selecting the grades of the transmitters of the broadcast messages is further included. Wherein, correspondingly, the transmitters of the broadcast messages include system built-in applications and third party applications.
Accordingly, by the grades of the transmitters of the broadcast messages, the sequences of the broadcast messages in the broadcast transmission queues are adjusted. The sequences of distributing the broadcast messages can be controlled, and the management efficiency of distributing the broadcast messages can be improved.
It should be noted that, one embodiment of the present disclosure exemplarily executes S240-S250 after S230; however, in other embodiments of the present disclosure, S2240-S250 can also be executed before S230, and the sequences of other steps can also be adjusted.
Wherein, the creating module 310 is configured to create broadcast transmission queues corresponding to types of broadcast messages; the first detecting module 320 is configured to detect a type of a received broadcast message; the transferring module 330 is configured to transfer the received broadcast message into a broadcast transmission queue corresponding to the type of the broadcast message, and transmit the broadcast message in the broadcast transmission queue in parallel to a broadcast receiver.
In one embodiment of the present disclosure, the broadcast messages include system associated broadcast messages and third party application broadcast messages, wherein, the system associated broadcast messages includes system broadcast messages and system built-in application broadcast messages; the creating module 310 is configured to create a first broadcast transmission queue corresponding to the system associated broadcast messages, and create a second broadcast transmission queue corresponding to the third party application broadcast messages; the transferring module 330 is configured to transfer received system associated broadcast messages into the first broadcast transmission queue, and transfer received third party application broadcast messages into the second broadcast transmission queue, and transmit the system associated broadcast messages and the third party application broadcast messages in parallel to the broadcast receiver.
In one embodiment of the present disclosure, the device further comprises: a second detecting module 340 configured to detect identification information of the broadcast messages; a determining module 350 configured to determine transmitters of the broadcast messages according to the identification information; and an adjusting module 360 configured to adjust the sequences of the broadcast messages in the broadcast transmission queues according to grades of the transmitters of the broadcast messages.
In one embodiment of the present disclosure, the device further comprises: a setting module 370 configured to set functional options for selecting the grades of the transmitters of the broadcast messages, wherein, the transmitters of the broadcast messages include system built-in applications and third party applications.
It should be noted that the connection relations of the functional modules in the embodiments of the present disclosure are not limited to the connection relation in
The broadcast transmission device provided by one embodiment of the present disclosure transfers the received broadcast messages into the broadcast transmission queues corresponding to the types of the broadcast messages, and thus transmits the broadcast messages in parallel to the broadcast receiver. The speed of distributing the broadcast messages can be improved, and the blocking problem caused by broadcast can be solved.
An embodiment of the present disclosure provides a terminal, the broadcast transmission device provided by an embodiment of the present disclosure can be integrated in the terminal.
The terminal 400 further comprises: a peripheral interface 403, an RF (radio frequency) circuit 405, an audio circuit 406, a speaker 411, a power management chip 408, an input/output (I/O) sub system 409, other input/control equipment 410, and an external port 404, these parts communicate through one or more communication bus(es) or signal line(s) 407.
It should be noted that, the terminal 400 shown in the drawings is merely one example of the terminal, and the terminal 400 can have more or less parts than the parts shown in the drawings, can combine two or more parts, or can have different part configurations. The various parts shown in the drawings can be implemented in combinations of hardware, software, or both hardware and software including one or more signal processing and/or special integrated circuit therein.
A terminal with a broadcast transmission device integrated therein provided by one embodiment of the present disclosure is described in detail below. The terminal takes a mobile phone as an example.
The storage 401. The storage 401 can be accessed by the CPU 402, the peripheral interface 403, etc. The storage 401 can include high-speed random access memory, and can also include non-volatile memory, such as one or more disk memory devices, flash memory devices, or other non-volatile solid-state memory devices.
The peripheral interface 403. The peripheral interface 403 can connect input and output peripheral equipments of a device to the CPU 402 and the storage 401.
The I/O sub system 409. The I/O sub system 409 can connect input and output peripheral equipments of a device, such as the touch screen 412 and the other input/control equipment 410, to the peripheral interface 403. The I/O sub system 409 can include a display controller 4091 and one or more input controller 4092 configured to control the other input/control equipment 410. Wherein, the one or more input controller 4092 receives electric signals from the other input/control equipment 410 or sends electric signal to the other input/control equipment 410. The other input/control equipment 410 can include physical buttons (press buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels, etc. It should be noted that the input controller 4092 can be connected with any one of the following: a keypad, an infrared port, a USB interface, and an indication device such as a mouse.
The touch screen 412. The touch screen 412 is the input interface and the output interface between a user terminal and users, which displays visible output to users. The visible output can include graphics, texts, icons, videos, etc.
The display controller 4091 in the I/O sub system 409 receives electric signals from the touch screen 412 or sends electric signals to the touch screen 412. The touch screen 412 detects touches on the touch screen, the display controller 4091 converts the detected touches into interaction with user interface objects displayed on the touch screen 412, that is, implements human-computer interaction. The user interface objects displayed on the touch screen 412 can be icons for running games, icons for networking to corresponding networks, etc. It should be noted that the device can further include an optical mouse, the optical mouse is a touch-sensitive surface that does not display visible output, or is an extension of a touch-sensitive surface formed by the touch screen.
The RF circuit 405 is mainly configured to establish communication between a mobile phone and a wireless network (i.e., the network side), and implement data reception and transmission between the mobile phone and the wireless network, such as receiving and sending short messages, E-mails, etc. In particular, the RF circuit 405 receives and transmits RF signals, the RF signals are also called electromagnetic signals, the RF circuit 405 converts electric signals into electromagnetic signals or converts electromagnetic signals into electric signals, and communicates with a communication network and other devices through the electromagnetic signals. The RF circuit 405 can include known circuits configured to execute these functions, which include but are not limited to an antenna system, an RF transceiver, one or more amplifier, a tuner, one or more oscillator, a digital signal processor, a CODEC (Coder-DECoder) chip group, a subscriber identity module (SIM), and so on.
The audio circuit 406 is mainly configured to receive audio data from the peripheral interface 403, convert the audio data into electric signals, and transmit the electric signals to the speaker 411.
The speaker 411 is configured to restore the voice signals received from the wireless network through the RF circuit 405 by the mobile phone into sounds and play the sounds to users.
The power management chip 408 is configured to implement power supply and power management for the CPU 402, the I/O sub system, and hardware connected with the peripheral interface.
The terminal provided by one embodiment of the present disclosure is configured to execute the broadcast transmission methods described in the above embodiments, the technical principles and generated technical effect are similar, and are not repeated here.
One embodiment of the present disclosure provides a computer readable storage medium, the computer readable storage medium stores one or more program, the one or more program can be executed by one or more processor to implement any kind of broadcast transmission method of the aforementioned embodiments, and therefore can also implement corresponding technical effects. The forgoing has already described in detail and do not repeat here.
It should be noted that the terms “comprise”, “contain”, or any other variants thereof in the present disclosure are intended to encompass any non-exclusive inclusion, such that processes, methods, articles, or devices comprising a series of elements include not only those elements but also other elements that are not explicitly listed, or further include elements that are inherent to these processes, methods, articles, or devices. In case that there is not more restriction, an element that is defined by the phrase “comprising a . . . ” does not exclude the presence of additional equivalent elements in a process, method, article, or device that comprises the element.
Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software and a necessary general hardware platform, and of course, can also be implemented by hardware. Based on such understanding, the technical solutions of the present disclosure, in essence or in terms of contributing to related technologies, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), and includes a number of instructions for enabling a terminal device (which may be a cell phone, computer, server, air conditioner, or network device, etc.) to perform the methods described in each embodiment of the present disclosure.
After reading and understanding the drawings and the detailed description, other aspects can be understood.
Embodiments of the present disclosure add broadcast transmission queues, which can improve the distribution speed and the processing speed of the broadcast messages, and solve the blocking problem that may occur when broadcast is distributed.
Number | Date | Country | Kind |
---|---|---|---|
201710142289.4 | Mar 2017 | CN | national |
The present application is a continuation of International (PCT) Patent Application No. PCT/CN2018/078622 filed on Mar. 9, 2018, which claims foreign priority of Chinese Patent Application No. 201710142289.4, filed on Mar. 10, 2017, the entire contents of both of which are hereby incorporated by reference.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2018/078622 | Mar 2018 | US |
Child | 16565427 | US |