WO2018161589A1 - 控制广播发送的方法、装置、存储介质及电子设备 - Google Patents

控制广播发送的方法、装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2018161589A1
WO2018161589A1 PCT/CN2017/106945 CN2017106945W WO2018161589A1 WO 2018161589 A1 WO2018161589 A1 WO 2018161589A1 CN 2017106945 W CN2017106945 W CN 2017106945W WO 2018161589 A1 WO2018161589 A1 WO 2018161589A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
recipient
receiver
queue
broadcast message
Prior art date
Application number
PCT/CN2017/106945
Other languages
English (en)
French (fr)
Inventor
张俊
裴润升
吴汝煜
付亮晶
林志泳
Original Assignee
广东欧珀移动通信有限公司
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 广东欧珀移动通信有限公司 filed Critical 广东欧珀移动通信有限公司
Priority to EP17900242.3A priority Critical patent/EP3591523A4/en
Priority to US16/492,469 priority patent/US11048568B2/en
Publication of WO2018161589A1 publication Critical patent/WO2018161589A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/543Local
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Definitions

  • the embodiments of the present invention relate to an application technology of an electronic device, and in particular, to a method, an apparatus, a storage medium, and an electronic device for controlling broadcast transmission.
  • broadcasting is a mechanism widely used to transfer information between applications. Since the broadcast mechanism is a message subscription/distribution mechanism, each application can subscribe to the broadcast message of interest before the broadcast message is sent. When the subscribed broadcast message is released by the system, the application that has subscribed to the broadcast will The broadcast message is received and a response is made based on the received broadcast message.
  • the embodiment of the present application provides a method, an apparatus, a storage medium, and an electronic device for controlling broadcast transmission, which can improve the response speed of an application to a broadcast message.
  • an embodiment of the present application provides a method for controlling broadcast transmission, including:
  • the application type is a preset application type and the startup state is a preset startup state, removing the first recipient from the receiver queue;
  • the broadcast message is sent according to a receiver queue after removing the first recipient.
  • the embodiment of the present application further provides an apparatus for controlling broadcast transmission, including:
  • a receiver queue obtaining module configured to acquire a receiver queue corresponding to the broadcast message
  • An application type and a startup state obtaining module configured to acquire an application type and a startup state of the first receiver, where the first receiver is any one of the receiver queues;
  • a receiver removal module configured to remove the first recipient from the receiver queue if the application type is a preset application type and the startup state is a preset startup state;
  • a broadcast message sending module configured to send the broadcast message according to a receiver queue after removing the first receiver.
  • the embodiment of the present application further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to perform the foregoing method for controlling broadcast transmission.
  • an embodiment of the present application further provides a mobile terminal, including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor implements the following steps when executing the computer program :
  • the application type is a preset application type and the startup state is a preset startup state, removing the first recipient from the receiver queue;
  • the broadcast message is sent according to a receiver queue after removing the first recipient.
  • FIG. 1 is a flowchart of a method for controlling broadcast transmission according to an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for controlling broadcast transmission according to an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of an apparatus for controlling broadcast transmission according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure.
  • An embodiment of the present application provides a method for controlling broadcast transmission, including the following steps:
  • the application type is a preset application type and the startup state is a preset startup state, removing the first recipient from the receiver queue;
  • the broadcast message is sent according to a receiver queue after removing the first recipient.
  • removing the first recipient from the receiver queue comprises:
  • the startup state is a preset startup state, determining whether the first recipient is an associated application of the target application,
  • the target application is a publisher of the broadcast message
  • the first recipient is the associated application, the first recipient is retained in the recipient queue.
  • the determining whether the first recipient is an associated application of the target application comprises:
  • the determining whether the first recipient is an associated application of the target application comprises:
  • the first recipient has a data interaction relationship with the target application, determining that the first recipient is an associated application of the target application, and the data interaction relationship includes using a service relationship or using a database relationship.
  • the preset application type is a third-party application
  • the preset startup state is an un-activated state
  • the transmitting the sender according to a receiver queue after removing the first recipient Broadcast messages including:
  • the broadcast message is sent according to the post-removal queue.
  • the obtaining a receiver queue corresponding to the broadcast message includes:
  • a corresponding receiver queue is generated according to the acquired application.
  • FIG. 1 is a flowchart of a method for controlling broadcast transmission according to an embodiment of the present disclosure. This embodiment may be applicable to a broadcast, where the method may be performed by a mobile terminal, and the mobile terminal may be a smart phone or a tablet computer. As shown in FIG. 1, a method for controlling broadcast transmission specifically includes the following steps:
  • Broadcast messages include system broadcast messages and third party broadcast messages.
  • the system broadcast message includes, for example, a time update broadcast message, a bright screen broadcast message, a screen blank broadcast message, a network switch broadcast message, and the like.
  • a third-party broadcast message is a broadcast message issued by a third-party application. If an application enters an interface, it will issue a broadcast message to the broadcast management module to implement the application and other applications under the interface. Information exchange or other functions.
  • the broadcast mechanism is a message subscription/release mechanism that subscribes to broadcasts of interest to you before the broadcast message is published by a system application or a third-party application. For example, for a network switching broadcast message, there may be 50 applications that subscribe to it.
  • the system may first publish the broadcast message to the broadcast management module, and the broadcast management module may obtain the subscription according to the broadcast message.
  • An application that broadcasts messages In this way, the broadcast message of the network switch issued by the system can be sent, the application that subscribes to the broadcast message is used as the receiver, and the receiver can receive the broadcast message in the form of a queue.
  • the way to obtain the receiver queue includes multiple.
  • the user selection interface may be used to receive a list according to a broadcast message selected by the user, where the list may include a recipient that is allowed to receive the broadcast message.
  • a system broadcast startup list may be set, where the list is The recipient in can be self-started after receiving the system broadcast. With this setting, it is possible to prevent the application that the user does not need to use to self-start after receiving any or the subscribed system broadcast, occupying memory resources and consuming energy.
  • the acquisition of the receiver queue and the above adjustment may be performed when the broadcast message is sent. Alternatively, it may be performed when the broadcast message is generated and when the broadcast message queue is queued.
  • the first recipient can be any one of the receiver queues.
  • the first recipient's application type may be divided according to its type of system application and third-party application, or may be divided according to its functions, such as games, education, tourism, music, social, and news. Classes, etc., can also be divided according to other types.
  • the startup state of the first receiver may include two categories: an activated state and an unactivated state, wherein the activated state may include a foreground running state, a background running state, and an auxiliary starting state, for example, an input method, which does not need to be separately activated, may be attached to Start in other applications and implement input functions.
  • the application type is a preset application type and the startup state is a preset startup state, the first receiver is removed from the receiver queue.
  • the preset application type may be one or more of the foregoing multiple classification manners, and the preset startup state may be one or more of the foregoing startup states.
  • the setting method may be set before the terminal is shipped from the factory, or may be customized according to the user's operating habits.
  • the first recipient is a third-party application when the system broadcasts the message, and the third-party application is not activated, it is removed from the recipient queue.
  • the first reception After obtaining the application type and the startup state of the first receiver, determining whether the application type and the startup state are consistent with the preset application type and the startup state, and if it matches the preset application type and the startup state, the first reception is performed. Removed from the receiver queue.
  • the receiver A is first obtained with the receiver A as the first receiver.
  • the application type is a third-party application
  • the startup state is started
  • the default application type is a third-party application
  • the preset startup state is not activated. It is determined that the application type of the receiver A is the same as the preset application type, and the startup state is The preset startup status is inconsistent, so the application type and startup status of the receiver A do not match the preset conditions.
  • the recipients B and E are at the receiver. Removed from the queue.
  • the receiver queues after receiving Receiver B and Receiver E are A, C, D, F, and G.
  • a broadcast message can be sent to the recipient queue.
  • the broadcast message may be advertised by the publisher to the broadcast management module, and then the broadcast management module sends the broadcast message according to the determined receiver queue.
  • the receiver's application type and the startup state are obtained in the broadcast message receiver queue, and the receiver is removed from the receiver queue if it is determined that the application type and the startup state of the receiver meet the preset condition.
  • the invention solves the problem that the broadcast receiver queue is occupied by the application of the excessive application, and the response to the broadcast message is delayed, which affects the response time of the application to the broadcast message, and the response of the application to the broadcast message can be improved. speed.
  • the preset application type is a third-party application
  • the preset startup state is an un-activated state
  • determining the startup state of the first recipient application may obtain a running task list from the action manager, and the running application and the service of the current system may be obtained from the running task list.
  • the way to determine if the application type of the application is a third-party application can be achieved by the following code:
  • the application type of the first receiver can be obtained, and it is determined whether the application type of the first recipient matches the preset application type.
  • the preset application type is a third-party application
  • the preset startup state is an un-activated state.
  • the advantage of this setting is that the un-started third-party application can be removed from the recipient queue, which can effectively prevent some third-party applications from subscribing to more broadcast messages and directly implementing the running burden of the self-starting system, thereby improving the application pair.
  • the response speed of broadcast messages, and can save power consumption can reduce system power consumption and improve resource utilization.
  • FIG. 2 is a flowchart of a method for controlling broadcast transmission according to an embodiment of the present disclosure. As shown in FIG. 2, the method for controlling broadcast transmission specifically includes the following steps:
  • the target application is the publisher of the broadcast message.
  • the publisher's associated app may be an application that interacts with the publisher of the broadcast message, for example, there is data interaction between the image processing tool and the gallery, and may be used as an associated application.
  • the associated application may also be an application with the same function or similar functions and similar functions, such as a network video playing application, which may be an associated application. In addition, it can be an application developed by the same company or as an associated application.
  • the related information of the first receiver may be obtained by correlating with the publisher of the broadcast message. Information, determining whether the first recipient is an associated application of the publisher of the broadcast message.
  • the technical solution adds the judgment of whether the first receiver is the publisher of the broadcast message based on the foregoing technical solution, and the setting has the advantage that the association application of the publisher of the broadcast message can be avoided from being deleted in the receiver queue. Cannot receive broadcast messages.
  • determining whether the first receiver is an associated application of the target application includes: if the application signature of the first receiver and the application signature of the target application are the same, determining that the first recipient is The associated app of the target app.
  • the way to view the application signature can be obtained by obtaining information about the application.
  • the application signature of the first recipient is the same as the application signature of the target application, the first recipient may be determined to be the associated application of the target application.
  • the advantage of the setting is that the identification method of the associated application is provided. According to the foregoing identification method, the first receiver can be quickly and accurately determined to be the associated application of the target application, and then the broadcast message issued by the target application is sent to the first application. .
  • determining whether the first receiver is an associated application of the target application includes: determining, if the first recipient has a data interaction relationship with the target application, determining that the first recipient is the target application Associated applications, data interaction relationships include the use of service relationships or the use of database relationships.
  • the service relationship may be that the first receiver uses the internal service (SerVices) together with the target application
  • the database relationship may be that the first recipient uses the same database as the target application, for example, a photo library.
  • An apparatus for controlling broadcast transmission is further provided in the embodiment of the present application, including:
  • a receiver queue obtaining module configured to acquire a receiver queue corresponding to the broadcast message
  • An application type and a startup state obtaining module configured to acquire an application type and a startup state of the first receiver, where the first receiver is any one of the receiver queues;
  • a receiver removal module configured to remove the first recipient from the receiver queue if the application type is a preset application type and the startup state is a preset startup state;
  • a broadcast message sending module configured to send the broadcast message according to a receiver queue after removing the first receiver.
  • the recipient removal module includes:
  • the associated application determining unit is configured to determine, if the application type of the target application and the first recipient application type are preset application types, and the startup state is a preset startup state, determining whether the first recipient is An associated application of the target application, where the target application is a publisher of the broadcast message;
  • a first recipient retention unit configured to retain the first recipient in the recipient queue if the first recipient is the associated application.
  • the associated application determining unit includes:
  • a first associated application determining subunit configured to determine that the first recipient is an associated application of the target application if the application signature of the first recipient and the application signature of the target application are the same.
  • the associated application determining unit includes:
  • a second associated application determining subunit configured to determine, if the first recipient has a data interaction relationship with the target application, determining that the first recipient is an associated application of the target application, where the data interaction relationship includes Use service relationships or use database relationships.
  • the preset application type is a third-party application
  • the preset startup state is an un-activated state
  • the broadcast messaging module is configured to:
  • the broadcast message is sent according to the post-removal queue.
  • the receiver queue acquisition module is configured to:
  • a corresponding receiver queue is generated according to the acquired application.
  • FIG. 3 is a schematic structural diagram of an apparatus for controlling broadcast transmission according to an embodiment of the present disclosure.
  • the apparatus may be configured in a mobile terminal.
  • the apparatus for controlling broadcast transmission includes:
  • a receiver queue obtaining module 310 configured to acquire a receiver queue corresponding to the broadcast message
  • An application type and a startup state obtaining module 320 configured to acquire an application type and a startup state of the first receiver, where the first receiver is any one of the receiver queues;
  • the receiver removal module 330 is configured to remove the first receiver from the receiver queue if the application type is the preset application type and the startup state is the preset startup state;
  • the broadcast message sending module 340 is configured to send the broadcast according to the receiver queue after removing the first receiver. Broadcast the message.
  • the preset application type is a third-party application
  • the preset startup state is an un-activated state.
  • the advantage of this setting is that the un-started third-party application can be removed from the recipient queue, which can effectively prevent some third-party applications from subscribing to more broadcast messages and directly implementing the running burden of the self-starting system, thereby improving the application pair.
  • the response speed of broadcast messages, and can save power consumption can reduce system power consumption and improve resource utilization.
  • the receiver removal module 330 includes:
  • the associated application determining unit is configured to determine, if the application type of the target application and the first recipient application type are preset application types, and the startup state is a preset startup state, determining whether the first recipient is an associated application of the target application, and the target The application is the publisher of the broadcast message;
  • the first recipient reservation unit is configured to reserve the first recipient in the receiver queue if the first recipient is an associated application.
  • the associated application determining unit includes: a first associated application determining sub-unit, configured to determine that the first recipient is the target application if the application signature of the first recipient and the application signature of the target application are the same Associate the app.
  • the associated application determining unit includes:
  • the second association application determining subunit is configured to determine, if the first recipient has a data interaction relationship with the target application, determine that the first recipient is an associated application of the target application, and the data interaction relationship includes using a service relationship or using a database relationship.
  • the preset application type is a third-party application
  • the preset startup state is an un-activated state
  • the above products can perform any method provided by the embodiments of the present application, and have the corresponding functional modules and beneficial effects of the execution method.
  • FIG. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure.
  • the mobile terminal 800 may include: a casing (not shown), a memory 801, and a central processing unit (Central Processing Unit). , CPU) 802 (also referred to as a processor, hereinafter referred to as CPU), a computer program stored on the memory 801 and operable on the processor 802, a circuit board (not shown), and a power supply circuit (not shown) ).
  • CPU Central Processing Unit
  • the circuit board is disposed inside the space enclosed by the casing; the CPU 802 and the memory 801 are disposed on the circuit board; and the power circuit is used for each circuit or device of the mobile terminal a power supply; a memory 801 for storing executable program code; and a CPU 802 executing a program corresponding to the executable program code by reading the executable program code stored in the memory 801 for execution:
  • the application type is a preset application type and the startup state is a preset startup state, the first recipient is removed from the receiver queue;
  • a broadcast message is sent according to the receiver queue after the first recipient is removed.
  • the mobile terminal 800 further includes a peripheral interface 803, an RF (Radio Frequency) circuit 805, an audio circuit 806, a speaker 811, a power management chip 808, an input/output (I/O) subsystem 809, a touch screen 812, and other inputs.
  • RF Radio Frequency
  • I/O input/output
  • Control device 810 and external port 804 these components communicate via one or more communication buses or signal lines 807.
  • the illustrated mobile terminal 800 is merely one example of a mobile terminal, and that the mobile terminal 800 may have more or fewer components than those shown in the figures, and two or more components may be combined. Or it can have different component configurations.
  • the various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the mobile terminal for implementing the control broadcast sending function provided in this embodiment is described in detail below.
  • the mobile terminal takes a mobile phone as an example.
  • the memory 801 can be accessed by the CPU 802, the peripheral interface 803, etc., and the memory 801 can include a high speed random access memory, and can also include a nonvolatile memory such as one or more magnetic disk storage devices, flash memory devices, or other Lossless solid state storage device.
  • a nonvolatile memory such as one or more magnetic disk storage devices, flash memory devices, or other Lossless solid state storage device.
  • Peripheral interface 803, peripheral interface 803 can connect the input and output peripherals of the device to CPU 802 and memory 801.
  • I/O subsystem 809 I/O subsystem 809 can connect input and output peripherals on the device, such as touch screen 812 and other input/control devices 810, to peripheral interface 803.
  • the I/O subsystem 809 can include a display controller 8091 and one or more input controllers 8092 for controlling other input/control devices 810.
  • one or more input controllers 8092 receive electrical signals from other input/control devices 810 or transmit electrical signals to other input/control devices 810, and other input/control devices 810 may include physical buttons (press buttons, rocker buttons, etc.) ), dial, slide switch, joystick, point Hit the wheel.
  • the input controller 8092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
  • the touch screen 812 can be a resistive type, a capacitive inductive type, an infrared type or a surface acoustic wave type.
  • the touch screen 812 can be: external, built-in or integrated.
  • the touch screen 812 can be: a vector pressure sensing technology touch screen, a resistive technology touch screen, a capacitive technology touch screen, an infrared technology touch screen or a surface acoustic wave technology touch screen.
  • the touch screen 812 is an input interface and an output interface between the user terminal and the user, and displays the visual output to the user.
  • the visual output may include graphics, text, icons, videos, and the like.
  • the touch screen 812 sends an electrical signal (such as an electrical signal of the contact surface) triggered by the user on the touch screen to the processor 802.
  • Display controller 8091 in I/O subsystem 809 receives an electrical signal from touch screen 812 or an electrical signal to touch screen 812.
  • the touch screen 812 detects the contact on the touch screen, and the display controller 8091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 812, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 812 may be running.
  • the icon of the game, the icon of the network to the corresponding network, and the like.
  • the device may also include a light mouse, which is a touch sensitive surface that does not display a visual output, or an extension of a touch sensitive surface formed by the touch screen.
  • the RF circuit 805 is mainly used for establishing communication between the mobile phone and the wireless network (ie, the network side), and realizing data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages, emails, and the like.
  • the audio circuit 806 is mainly used to receive audio data from the peripheral interface 803, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 811.
  • the speaker 811 is configured to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 805 to sound and play the sound to the user.
  • the power management chip 808 is used for power supply and power management of the hardware connected to the CPU 802, the I/O subsystem, and the peripheral interface.
  • the central processing unit 802 is configured to:
  • the application type is the preset application type and the startup state is the preset startup state, the first reception will be performed. Removed from the receiver queue;
  • a broadcast message is sent according to the receiver queue after the first recipient is removed.
  • the application type is a preset application type and the startup state is a preset startup state
  • the first recipient is removed from the receiver queue, and the processor 802 implements the computer program The following steps:
  • the application type of the target application and the first recipient application type are both preset application types and the startup state is the preset startup state, it is determined whether the first recipient is an associated application of the target application, and the target application is a publisher of the broadcast message. ;
  • the first recipient is retained in the recipient queue.
  • the processor 802 for determining whether the first recipient is an associated application of the target application, the processor 802 implements the computer program to implement the following steps:
  • the application signature of the first recipient and the application signature of the target application are the same, it is determined that the first recipient is an associated application of the target application.
  • the processor 802 for determining whether the first recipient is an associated application of the target application, the processor 802 implements the computer program to implement the following steps:
  • the first recipient has a data interaction relationship with the target application, determining that the first recipient is an associated application of the target application, and the data interaction relationship includes using a service relationship or using a database relationship.
  • the preset application type is a third-party application
  • the preset startup state is an un-activated state
  • the processor 802 for transmitting the broadcast message according to a receiver queue after removing the first recipient, the processor 802 implements the computer program to implement the following steps:
  • the broadcast message is sent according to the post-removal queue.
  • the processor 802 for obtaining a receiver queue corresponding to a broadcast message, the processor 802 implements the computer program to implement the following steps:
  • a corresponding receiver queue is generated according to the acquired application.
  • the mobile terminal 800 may further include a camera, a Bluetooth module, etc., and no longer Narration.
  • the embodiment of the present application further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to perform any of the above methods for controlling broadcast transmission.
  • the program may be stored in a computer readable storage medium, and the storage medium may include: Read Only Memory (ROM), Random Access Memory (RAM), disk or optical disk.
  • ROM Read Only Memory
  • RAM Random Access Memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种控制广播发送的方法,包括:获取广播消息对应的接收者队列;获取第一接收者的应用类型和启动状态,所述第一接收者为所述接收者队列中任意一个接收者;如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除;根据移除第一接收者后的接收者队列发送所述广播消息。

Description

控制广播发送的方法、装置、存储介质及电子设备
本申请要求于2017年3月10日提交中国专利局、申请号为201710141463.3、发明名称为“一种控制广播发送的方法、装置及移动终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及电子设备应用技术,尤其涉及一种控制广播发送的方法、装置、存储介质及电子设备。
背景技术
在Android系统中,广播是一种广泛运用在应用程序之间传输信息的机制。由于广播机制是一种消息订阅/发布机制,即在广播消息发送之前,各个应用可以针对自己感兴趣的广播消息进行订阅,当订阅的广播消息经系统发布时,已经订阅该广播的应用就会接收到该广播消息,并根据接收到的广播消息,做出响应。
然而,随着技术的发展,各种功能的应用逐渐增多,对于同一广播消息订阅的接收者也越来越多。由于过多应用对广播的接收需要占用广播接收者队列,致使对广播消息的响应滞后,影响应用程序对广播消息的响应时间。
发明内容
本申请实施例提供一种控制广播发送的方法、装置、存储介质及电子设备,可以提高应用程序对于广播消息的响应速度。
第一方面,本申请实施例提供了一种控制广播发送的方法,包括:
获取广播消息对应的接收者队列;
获取第一接收者的应用类型和启动状态,所述第一接收者为所述接收者队列中任意一个接收者;
如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除;
根据移除所述第一接收者后的接收者队列发送所述广播消息。
第二方面,本申请实施例还提供了一种控制广播发送的装置,包括:
接收者队列获取模块,用于获取广播消息对应的接收者队列;
应用类型和启动状态获取模块,用于获取第一接收者的应用类型和启动状态,所述第一接收者为所述接收者队列中任意一个接收者;
接收者移除模块,用于如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除;
广播消息发送模块,用于根据移除所述第一接收者后的接收者队列发送所述广播消息。
第三方面,本申请实施例还提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行上述控制广播发送的方法。
第四方面,本申请实施例还提供了一种移动终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:
获取广播消息对应的接收者队列;
获取第一接收者的应用类型和启动状态,所述第一接收者为所述接收者队列中任意一个接收者;
如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除;
根据移除所述第一接收者后的接收者队列发送所述广播消息。
附图说明
图1为本申请实施例提供的一种控制广播发送的方法的流程图。
图2为本申请实施例提供的一种控制广播发送的方法的流程图。
图3为本申请实施例提供的一种控制广播发送的装置的结构示意图。
图4为本申请实施例提供的一种移动终端的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理, 但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
本申请实施例提供一种控制广播发送的方法,包括以下步骤:
获取广播消息对应的接收者队列;
获取第一接收者的应用类型和启动状态,所述第一接收者为所述接收者队列中任意一个接收者;
如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除;
根据移除所述第一接收者后的接收者队列发送所述广播消息。
在一些实施例中,所述如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除,包括:
如果目标应用的应用类型和所述第一接收者应用类型均为预设应用类型且所述启动状态为预设启动状态,则判断所述第一接收者是否为所述目标应用的关联应用,所述目标应用为所述广播消息的发布者;
如果所述第一接收者为所述关联应用,则在所述接收者队列中保留所述第一接收者。
在一些实施例中,所述判断所述第一接收者是否为所述目标应用的关联应用,包括:
如果所述第一接收者的应用签名和所述目标应用的应用签名相同,则确定所述第一接收者为所述目标应用的关联应用。
在一些实施例中,所述判断所述第一接收者是否为所述目标应用的关联应用,包括:
如果所述第一接收者与所述目标应用存在数据交互关系,则确定所述第一接收者为所述目标应用的关联应用,所述数据交互关系包括使用服务关系或使用数据库关系。
在一些实施例中,所述预设应用类型为第三方应用,所述预设启动状态为未启动状态。
在一些实施例中,所述根据移除所述第一接收者后的接收者队列发送所述 广播消息,包括:
获取广播消息黑名单;
从移除所述第一接收者后的接收者队列中,将存在于所述广播消息黑名单中的接收者移除,得到移除后队列;
根据所述移除后队列发送所述广播消息。
在一些实施例中,所述获取广播消息对应的接收者队列,包括:
获取订阅所述广播消息的应用程序;
根据获取的所述应用程序生成对应的接收者队列。
图1为本申请实施例提供的一种控制广播发送的方法的流程图,本实施例可适用于广播发送的情况,该方法可以由移动终端执行,移动终端可以为智能手机、平板电脑等,如图1所示,一种控制广播发送的方法具体包括如下步骤:
S110、获取广播消息对应的接收者队列。
广播消息包括系统广播消息和第三方广播消息。其中,系统广播消息包括例如时间更新广播消息、亮屏广播消息、灭屏广播消息、网络切换广播消息等等。第三方广播消息是由第三方应用程序发布的广播消息,如某一应用程序进入到某一界面时会向广播管理模块发布一条广播消息,以实现该应用程序在该界面下与其他应用程序实现信息交换或者其他功能。
广播机制是一种消息订阅/发布机制,在广播消息由系统应用程序或者第三方应用程序发布之前,所有应用程序会针对自己感兴趣的广播进行订阅。例如,针对网络切换广播消息,可能有50个应用程序对其进行订阅,则系统发布网络切换广播消息时,可以先将广播消息发布至广播管理模块,广播管理模块可以根据该广播消息得到订阅该广播消息的应用程序。这样就可以将系统发布的网络切换的广播消息进行发送,将订阅该广播消息的应用程序作为接收者,并可以将接收者以队列的形式来接收广播消息。
其中,接收者队列的获取方式包含多种。可选的,根据在广播管理模块中对广播消息订阅的应用程序。可选的,还可以是通过提供用户选择界面,根据用户选择的广播消息接收列表,该列表中可以包含允许接收广播消息的接收者,示例性的,可以设定系统广播启动列表,在此列表中的接收者可以在接收到系统广播后自启动。这样设置,就可以避免用户不需要使用的应用程序在接收到任意或者其订阅的系统广播后进行自启动,占用内存资源并耗费能源。可选的, 还可以设置广播消息黑名单,在接收者队列中,对存在于广播消息黑名单中的接收者移除。
对于接收者队列的获取以及上述调整可以是在广播消息发送时进行,可选的,还可以是在广播消息生成时以及广播消息队列排队时进行。
S120、获取第一接收者的应用类型和启动状态,第一接收者为接收者队列中任意一个接收者。
第一接收者可以是接收者队列中任意一个接收者。第一接收者的应用类型可以是按照其属于系统应用和第三方应用两种类型来划分,也可以是按照其功能来划分,如游戏类、教育类、旅游类、音乐类、社交类以及新闻类等,也可以按照其他类型进行划分。第一接收者的启动状态可以包括已启动状态和未启动状态两类,其中,已启动状态可以包括前台运行状态、后台运行状态以及附属启动状态,例如某输入法,无需单独启动,可以附属在其他应用程序内进行启动并实现输入功能。
S130、如果应用类型为预设应用类型且启动状态为预设启动状态,则将第一接收者从接收者队列中移除。
预设应用类型可以是上述多种分类方式中的一种或者多种类型,预设启动状态可以是上述启动状态中的一种或者多种。其设定方式可以是在终端出厂之前设定,也可以根据用户的操作习惯进行自定义设置。
示例性的,如果发送系统广播消息时,第一接收者为第三方应用,且该第三方应用未启动,则将其移除接收者队列。
获取到第一接收者的应用类型和启动状态后,判断其应用类型和启动状态是否与预设应用类型和启动状态相符合,如果与预设应用类型和启动状态相符合,则将第一接收者从接收者队列中移除。
示例性的,当获取到广播消息a和订阅接收广播消息a的接收者队列A、B、C、D、E、F和G,首先以接收者A为第一接收者,获取接收者A的应用类型为第三方应用,启动状态为已启动,预设应用类型为第三方应用,预设启动状态为未启动状态,经判断发现接收者A的应用类型和预设应用类型一致,启动状态与预设启动状态不一致,所以接收者A的应用类型和启动状态与预设条件不符合。继续判断接收者队列中其他接收者,如果经判断后发现接收者B和E的应用类型和启动状态与预设条件符合,则将接收者B和E在接收者 队列中移除。移除接收者B和接收者E后的接收者队列为A、C、D、F和G。
S140、根据移除第一接收者后的接收者队列发送广播消息。
在确定接收者队列之后,可以向接收者队列发送广播消息。其中,广播消息可以由发布者发布至广播管理模块,再由广播管理模块根据确定的接收者队列发送广播消息。
本实施例通过获取广播消息接收者队列中,接收者的应用类型和启动状态,并在判断接收者的应用类型和启动状态符合预设条件的情况下,将该接收者移除接收者队列,解决了现有技术中由于过多应用对广播的接收需要占用广播接收者队列,致使对广播消息的响应滞后,影响应用程序对广播消息的响应时间的问题,可以提高应用程序对于广播消息的响应速度。
在上述技术方案的基础上,可选的,预设应用类型为第三方应用,预设启动状态为未启动状态。
其中,判断第一接收者应用程序的启动状态可以从动作管理器中获取运行任务列表,从运行任务列表中可以得到当前系统正在运行的应用程序以及服务。判断应用程序的应用类型是否为第三方应用的方式可以通过以下代码实现:
获取全部应用:
Figure PCTCN2017106945-appb-000001
Figure PCTCN2017106945-appb-000002
根据上述代码的返回结果,就可以获取第一接收者的应用类型,并判断第一接收者的应用类型与预设应用类型是否符合。
本技术方案中预设应用类型为第三方应用,预设启动状态为未启动状态。这样设置的好处在于可以将未启动的第三方应用从接受者队列中移除,可以有效避免一些第三方应用订阅较多广播消息直接实行自启动给系统带来的运行负担,可以提高应用程序对广播消息的响应速度,并可以节约功耗可以降低系统耗电,提高资源利用率。
图2为本申请实施例提供的一种控制广播发送的方法的流程图,如图2所示,控制广播发送的方法具体包括如下步骤:
S210、获取广播消息对应的接收者队列。
S220、获取第一接收者的应用类型和启动状态,第一接收者为接收者队列中任意一个接收者。
S230、如果目标应用的应用类型和第一接收者应用类型均为预设应用类型且启动状态为预设启动状态,则判断第一接收者是否为目标应用的关联应用。如果不是,则执行S240,如果是,则执行S250。
其中,目标应用为广播消息的发布者。
判断广播消息的发布者与第一接收者的应用类型是否为预设应用类型,并且判断第一接收者的状态是否为预设启动状态,如果都符合,则判断第一接收者是否为广播消息的发布者的关联应用。其中,关联应用可以是与广播消息的发布者存在数据交互的应用,例如图片处理工具和图库之间存在数据交互,可以作为关联应用。关联应用还可以是功能相同或者相近,有类似功能的应用,例如网络视频播放应用程序之间,可以是一种关联应用。除此之外,还可以是由同一公司开发的应用程序,也可以作为一种关联应用。
当广播消息的发布者的应用类型和第一接收者应用类型均为预设应用类型且启动状态为预设启动状态时,可以通过获取第一接收者的相关信息与广播消息的发布者的相关信息,判断第一接收者是否为广播消息的发布者的关联应用。
S240、将第一接收者从接收者队列中移除。
S250、在接收者队列中保留第一接收者。
S260、根据移除第一接收者后的接收者队列发送广播消息。
本技术方案在上述技术方案的基础上,增加了对第一接收者是否为广播消息的发布者的判断,这样设置的好处在于可以避免将广播消息的发布者的关联应用在接收者队列中删除,而不能接收到广播消息。
在上述技术方案的基础上,可选的,判断第一接收者是否为目标应用的关联应用,包括:如果第一接收者的应用签名和目标应用的应用签名相同,则确定第一接收者为目标应用的关联应用。
其中,应用签名的查看方式可以通过获取应用程序的相关信息等方式来获得。当第一接收者的应用签名与目标应用的应用签名相同,则可以确定第一接收者为目标应用的关联应用。这样设置的好处在于提供了一种关联应用的识别方法,根据上述识别方法,可以快速、准确的判断第一接收者为目标应用的关联应用,进而将目标应用发布的广播消息发送到第一应用。
在上述技术方案的基础上,可选的,判断第一接收者是否为目标应用的关联应用,包括:如果第一接收者与目标应用存在数据交互关系,则确定第一接收者为目标应用的关联应用,数据交互关系包括使用服务关系或使用数据库关系。其中,使用服务关系可以是第一接收者与目标应用共同使用系统内部的服务(SerVices),使用数据库关系可以是第一接收者与目标应用共同使用同一数据库,例如图片库。通过判断第一接收者与目标应用存在数据交互关系,可以确定二者是关联应用,并对第一接收者发送广播消息。这样设置的好处在于可以快速、准确的通过数据交互层面对第一接收者与目标应用是否为关联关系应用做出判断。
本申请实施例中还提供一种控制广播发送的装置,包括:
接收者队列获取模块,用于获取广播消息对应的接收者队列;
应用类型和启动状态获取模块,用于获取第一接收者的应用类型和启动状态,所述第一接收者为所述接收者队列中任意一个接收者;
接收者移除模块,用于如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除;
广播消息发送模块,用于根据移除所述第一接收者后的接收者队列发送所述广播消息。
在一些实施例中,所述接收者移除模块包括:
关联应用判断单元,用于如果目标应用的应用类型和所述第一接收者应用类型均为预设应用类型且所述启动状态为预设启动状态,则判断所述第一接收者是否为所述目标应用的关联应用,所述目标应用为所述广播消息的发布者;
第一接收者保留单元,用于如果所述第一接收者为所述关联应用,则在所述接收者队列中保留所述第一接收者。
在一些实施例中,所述关联应用判断单元包括:
第一关联应用判断子单元,用于如果所述第一接收者的应用签名和所述目标应用的应用签名相同,则确定所述第一接收者为所述目标应用的关联应用。
在一些实施例中,所述关联应用判断单元包括:
第二关联应用判断子单元,用于如果所述第一接收者与所述目标应用存在数据交互关系,则确定所述第一接收者为所述目标应用的关联应用,所述数据交互关系包括使用服务关系或使用数据库关系。
在一些实施例中,所述预设应用类型为第三方应用,所述预设启动状态为未启动状态。
在一些实施例中,所述广播消息发送模块用于:
获取广播消息黑名单;
从移除所述第一接收者后的接收者队列中,将存在于所述广播消息黑名单中的接收者移除,得到移除后队列;
根据所述移除后队列发送所述广播消息。
在一些实施例中,所述接收者队列获取模块用于:
获取订阅所述广播消息的应用程序;
根据获取的所述应用程序生成对应的接收者队列。
图3为本申请实施例提供的一种控制广播发送的装置的结构示意图,该装置可配置于移动终端中,如图3所示,该控制广播发送的装置包括:
接收者队列获取模块310,用于获取广播消息对应的接收者队列;
应用类型和启动状态获取模块320,用于获取第一接收者的应用类型和启动状态,第一接收者为接收者队列中任意一个接收者;
接收者移除模块330,用于如果应用类型为预设应用类型且启动状态为预设启动状态,则将第一接收者从接收者队列中移除;
广播消息发送模块340,用于根据移除第一接收者后的接收者队列发送广 播消息。
本技术方案中预设应用类型为第三方应用,预设启动状态为未启动状态。这样设置的好处在于可以将未启动的第三方应用从接受者队列中移除,可以有效避免一些第三方应用订阅较多广播消息直接实行自启动给系统带来的运行负担,可以提高应用程序对广播消息的响应速度,并可以节约功耗可以降低系统耗电,提高资源利用率。
在上述技术方案的基础上,接收者移除模块330包括:
关联应用判断单元,用于如果目标应用的应用类型和第一接收者应用类型均为预设应用类型且启动状态为预设启动状态,则判断第一接收者是否为目标应用的关联应用,目标应用为广播消息的发布者;
第一接收者保留单元,用于如果第一接收者为关联应用,则在接收者队列中保留第一接收者。
在上述技术方案的基础上,关联应用判断单元包括:第一关联应用判断子单元,用于如果第一接收者的应用签名和目标应用的应用签名相同,则确定第一接收者为目标应用的关联应用。
在上述技术方案的基础上,关联应用判断单元包括:
第二关联应用判断子单元,用于如果第一接收者与目标应用存在数据交互关系,则确定第一接收者为目标应用的关联应用,数据交互关系包括使用服务关系或使用数据库关系。
在上述技术方案的基础上,预设应用类型为第三方应用,预设启动状态为未启动状态。
上述产品可执行本申请实施例所提供的任意方法,具备执行方法相应的功能模块和有益效果。
本申请实施例还提供了一种电子设备,该电子设备可以为智能手机、平板电脑等移动终端。图4为本申请实施例提供的一种移动终端的结构示意图,如图4所示,该移动终端800可以包括:壳体(图中未示出)、存储器801、中央处理器(Central Processing Unit,CPU)802(又称处理器,以下简称CPU)、存储在存储器801上并可在处理器802上运行的计算机程序、电路板(图中未示出)和电源电路(图中未示出)。电路板安置在壳体围成的空间内部;CPU802和存储器801设置在电路板上;电源电路,用于为移动终端的各个电路或器件 供电;存储器801,用于存储可执行程序代码;CPU802通过读取存储器801中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行:
获取广播消息对应的接收者队列;
获取第一接收者的应用类型和启动状态,第一接收者为接收者队列中任意一个接收者;
如果应用类型为预设应用类型且启动状态为预设启动状态,则将第一接收者从接收者队列中移除;
根据移除第一接收者后的接收者队列发送广播消息。
移动终端800还包括:外设接口803、RF(Radio Frequency,射频)电路805、音频电路806、扬声器811、电源管理芯片808、输入/输出(I/O)子系统809、触摸屏812、其他输入/控制设备810以及外部端口804,这些部件通过一个或多个通信总线或信号线807来通信。
应该理解的是,图示移动终端800仅仅是移动终端的一个范例,并且移动终端800可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
下面就本实施例提供的用于实现控制广播发送功能的移动终端进行详细的描述,该移动终端以手机为例。
存储器801,存储器801可以被CPU802、外设接口803等访问,存储器801可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
外设接口803,外设接口803可以将设备的输入和输出外设连接到CPU802和存储器801。
I/O子系统809,I/O子系统809可以将设备上的输入输出外设,例如触摸屏812和其他输入/控制设备810,连接到外设接口803。I/O子系统809可以包括显示控制器8091和用于控制其他输入/控制设备810的一个或多个输入控制器8092。其中,一个或多个输入控制器8092从其他输入/控制设备810接收电信号或者向其他输入/控制设备810发送电信号,其他输入/控制设备810可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点 击滚轮。值得说明的是,输入控制器8092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。
其中,按照触摸屏的工作原理和传输信息的介质分类,触摸屏812可以为电阻式、电容感应式、红外线式或表面声波式。按照安装方式分类,触摸屏812可以为:外挂式、内置式或整体式。按照技术原理分类,触摸屏812可以为:矢量压力传感技术触摸屏、电阻技术触摸屏、电容技术触摸屏、红外线技术触摸屏或表面声波技术触摸屏。
触摸屏812,触摸屏812是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。可选的,触摸屏812将用户在触屏幕上触发的电信号(如接触面的电信号),发送给处理器802。
I/O子系统809中的显示控制器8091从触摸屏812接收电信号或者向触摸屏812发送电信号。触摸屏812检测触摸屏上的接触,显示控制器8091将检测到的接触转换为与显示在触摸屏812上的用户界面对象的交互,即实现人机交互,显示在触摸屏812上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。
RF电路805,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。
音频电路806,主要用于从外设接口803接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器811。
扬声器811,用于将手机通过RF电路805从无线网络接收的语音信号,还原为声音并向用户播放该声音。
电源管理芯片808,用于为CPU802、I/O子系统及外设接口所连接的硬件进行供电及电源管理。
在本实施例中,中央处理器802用于:
获取广播消息对应的接收者队列;
获取第一接收者的应用类型和启动状态,第一接收者为接收者队列中任意一个接收者;
如果应用类型为预设应用类型且启动状态为预设启动状态,则将第一接收 者从接收者队列中移除;
根据移除第一接收者后的接收者队列发送广播消息。
在一些实施例中,对于如果应用类型为预设应用类型且启动状态为预设启动状态,则将第一接收者从接收者队列中移除,所述处理器802执行所述计算机程序时实现以下步骤:
如果目标应用的应用类型和第一接收者应用类型均为预设应用类型且启动状态为预设启动状态,则判断第一接收者是否为目标应用的关联应用,目标应用为广播消息的发布者;
如果第一接收者为关联应用,则在接收者队列中保留第一接收者。
在一些实施例中,对于判断第一接收者是否为目标应用的关联应用,所述处理器802执行所述计算机程序时实现以下步骤:
如果第一接收者的应用签名和目标应用的应用签名相同,则确定第一接收者为目标应用的关联应用。
在一些实施例中,对于判断第一接收者是否为目标应用的关联应用,所述处理器802执行所述计算机程序时实现以下步骤:
如果第一接收者与目标应用存在数据交互关系,则确定第一接收者为目标应用的关联应用,数据交互关系包括使用服务关系或使用数据库关系。
在一些实施例中,预设应用类型为第三方应用,预设启动状态为未启动状态。
在一些实施例中,对于根据移除所述第一接收者后的接收者队列发送所述广播消息,所述处理器802执行所述计算机程序时实现以下步骤:
获取广播消息黑名单;
从移除所述第一接收者后的接收者队列中,将存在于所述广播消息黑名单中的接收者移除,得到移除后队列;
根据所述移除后队列发送所述广播消息。
在一些实施例中,对于获取广播消息对应的接收者队列,所述处理器802执行所述计算机程序时实现以下步骤:
获取订阅所述广播消息的应用程序;
根据获取的所述应用程序生成对应的接收者队列。
需要说明的是,移动终端800还可以包括摄像头、蓝牙模块等,在此不再 赘述。
本申请实施例还提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行上述任一控制广播发送的方法。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。

Claims (20)

  1. 一种控制广播发送的方法,其中,包括:
    获取广播消息对应的接收者队列;
    获取第一接收者的应用类型和启动状态,所述第一接收者为所述接收者队列中任意一个接收者;
    如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除;
    根据移除所述第一接收者后的接收者队列发送所述广播消息。
  2. 根据权利要求1所述的控制广播发送的方法,其中,所述如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除,包括:
    如果目标应用的应用类型和所述第一接收者应用类型均为预设应用类型且所述启动状态为预设启动状态,则判断所述第一接收者是否为所述目标应用的关联应用,所述目标应用为所述广播消息的发布者;
    如果所述第一接收者为所述关联应用,则在所述接收者队列中保留所述第一接收者。
  3. 根据权利要求2所述的控制广播发送的方法,其中,所述判断所述第一接收者是否为所述目标应用的关联应用,包括:
    如果所述第一接收者的应用签名和所述目标应用的应用签名相同,则确定所述第一接收者为所述目标应用的关联应用。
  4. 根据权利要求2所述的控制广播发送的方法,其中,所述判断所述第一接收者是否为所述目标应用的关联应用,包括:
    如果所述第一接收者与所述目标应用存在数据交互关系,则确定所述第一接收者为所述目标应用的关联应用,所述数据交互关系包括使用服务关系或使用数据库关系。
  5. 根据权利要求1所述的控制广播发送的方法,其中,所述预设应用类型为第三方应用,所述预设启动状态为未启动状态。
  6. 根据权利要求1所述的控制广播发送的方法,其中,所述根据移除所述第一接收者后的接收者队列发送所述广播消息,包括:
    获取广播消息黑名单;
    从移除所述第一接收者后的接收者队列中,将存在于所述广播消息黑名单中的接收者移除,得到移除后队列;
    根据所述移除后队列发送所述广播消息。
  7. 根据权利要求1所述的控制广播发送的方法,其中,所述获取广播消息对应的接收者队列,包括:
    获取订阅所述广播消息的应用程序;
    根据获取的所述应用程序生成对应的接收者队列。
  8. 一种控制广播发送的装置,其中,包括:
    接收者队列获取模块,用于获取广播消息对应的接收者队列;
    应用类型和启动状态获取模块,用于获取第一接收者的应用类型和启动状态,所述第一接收者为所述接收者队列中任意一个接收者;
    接收者移除模块,用于如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除;
    广播消息发送模块,用于根据移除所述第一接收者后的接收者队列发送所述广播消息。
  9. 根据权利要求8所述的控制广播发送的装置,其中,所述接收者移除模块包括:
    关联应用判断单元,用于如果目标应用的应用类型和所述第一接收者应用类型均为预设应用类型且所述启动状态为预设启动状态,则判断所述第一接收者是否为所述目标应用的关联应用,所述目标应用为所述广播消息的发布者;
    第一接收者保留单元,用于如果所述第一接收者为所述关联应用,则在所述接收者队列中保留所述第一接收者。
  10. 根据权利要求9所述的控制广播发送的装置,其中,所述关联应用判断单元包括:
    第一关联应用判断子单元,用于如果所述第一接收者的应用签名和所述目标应用的应用签名相同,则确定所述第一接收者为所述目标应用的关联应用。
  11. 根据权利要求9所述的控制广播发送的装置,其中,所述关联应用判断单元包括:
    第二关联应用判断子单元,用于如果所述第一接收者与所述目标应用存在数据交互关系,则确定所述第一接收者为所述目标应用的关联应用,所述数据 交互关系包括使用服务关系或使用数据库关系。
  12. 根据权利要求8所述的控制广播发送的装置,其中:
    所述预设应用类型为第三方应用,所述预设启动状态为未启动状态。
  13. 根据权利要求8所述的控制广播发送的装置,其中,所述广播消息发送模块用于:
    获取广播消息黑名单;
    从移除所述第一接收者后的接收者队列中,将存在于所述广播消息黑名单中的接收者移除,得到移除后队列;
    根据所述移除后队列发送所述广播消息。
  14. 一种存储介质,其中,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行如权利要求1-7任一项所述的控制广播发送的方法。
  15. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现以下步骤:
    获取广播消息对应的接收者队列;
    获取第一接收者的应用类型和启动状态,所述第一接收者为所述接收者队列中任意一个接收者;
    如果所述应用类型为预设应用类型且所述启动状态为预设启动状态,则将所述第一接收者从所述接收者队列中移除;
    根据移除所述第一接收者后的接收者队列发送所述广播消息。
  16. 根据权利要求15所述的电子设备,其中,所述处理器执行所述计算机程序时实现以下步骤:
    如果目标应用的应用类型和所述第一接收者应用类型均为预设应用类型且所述启动状态为预设启动状态,则判断所述第一接收者是否为所述目标应用的关联应用,所述目标应用为所述广播消息的发布者;
    如果所述第一接收者为所述关联应用,则在所述接收者队列中保留所述第一接收者。
  17. 根据权利要求16所述的电子设备,其中,所述处理器执行所述计算机程序时实现以下步骤:
    如果所述第一接收者的应用签名和所述目标应用的应用签名相同,则确定所述第一接收者为所述目标应用的关联应用。
  18. 根据权利要求16所述的电子设备,其中,所述处理器执行所述计算机程序时实现以下步骤:
    如果所述第一接收者与所述目标应用存在数据交互关系,则确定所述第一接收者为所述目标应用的关联应用,所述数据交互关系包括使用服务关系或使用数据库关系。
  19. 根据权利要求15所述的电子设备,其中,所述预设应用类型为第三方应用,所述预设启动状态为未启动状态。
  20. 根据权利要求15所述的电子设备,其中,所述处理器执行所述计算机程序时实现以下步骤:
    获取广播消息黑名单;
    从移除所述第一接收者后的接收者队列中,将存在于所述广播消息黑名单中的接收者移除,得到移除后队列;
    根据所述移除后队列发送所述广播消息。
PCT/CN2017/106945 2017-03-10 2017-10-19 控制广播发送的方法、装置、存储介质及电子设备 WO2018161589A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP17900242.3A EP3591523A4 (en) 2017-03-10 2017-10-19 CONTROL METHOD, DEVICE, STORAGE MEDIUM AND ELECTRONIC DEVICE FOR BROADCASTING
US16/492,469 US11048568B2 (en) 2017-03-10 2017-10-19 Broadcast sending control method and apparatus, storage medium, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710141463.3 2017-03-10
CN201710141463.3A CN106919460A (zh) 2017-03-10 2017-03-10 一种控制广播发送的方法、装置及移动终端

Publications (1)

Publication Number Publication Date
WO2018161589A1 true WO2018161589A1 (zh) 2018-09-13

Family

ID=59461753

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/106945 WO2018161589A1 (zh) 2017-03-10 2017-10-19 控制广播发送的方法、装置、存储介质及电子设备

Country Status (4)

Country Link
US (1) US11048568B2 (zh)
EP (1) EP3591523A4 (zh)
CN (1) CN106919460A (zh)
WO (1) WO2018161589A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701008A (zh) * 2022-09-23 2023-09-05 荣耀终端有限公司 广播方法和设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106919460A (zh) * 2017-03-10 2017-07-04 广东欧珀移动通信有限公司 一种控制广播发送的方法、装置及移动终端
CN113220472A (zh) * 2021-04-16 2021-08-06 阿波罗智联(北京)科技有限公司 应用程序通信方法、设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581966A (zh) * 2013-10-08 2014-02-12 北京工商大学 一种智能手机实时监测优化配置方法
US20170070302A1 (en) * 2015-09-04 2017-03-09 Alively, Inc. System and method for sharing mobile video and audio content
CN106919460A (zh) * 2017-03-10 2017-07-04 广东欧珀移动通信有限公司 一种控制广播发送的方法、装置及移动终端

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030046395A1 (en) * 2000-12-12 2003-03-06 Robert Fleming System and method for bounding the life of an event subscription to the availability of an object
US7406537B2 (en) * 2002-11-26 2008-07-29 Progress Software Corporation Dynamic subscription and message routing on a topic between publishing nodes and subscribing nodes
US7499995B2 (en) * 2005-06-28 2009-03-03 International Business Machines Corporation Managing permission for accessing third party applications on a telecommunications network
US8935330B2 (en) * 2011-05-11 2015-01-13 International Business Machines Corporation Redirecting messages in a publish/subscribe messaging system
CN102855148A (zh) * 2012-08-02 2013-01-02 广东欧珀移动通信有限公司 一种基于Android的开机管理方法
CN103595547B (zh) * 2013-11-15 2016-07-13 北京奇虎科技有限公司 智能设备的广播拦截方法和装置
CN104123162B (zh) * 2014-07-29 2017-06-16 北京奇虎科技有限公司 控制应用程序自启的方法及装置
CN104156261A (zh) 2014-08-11 2014-11-19 浪潮(北京)电子信息产业有限公司 多控制器之间任务处理的方法和装置
CN104391743B (zh) * 2014-11-26 2018-01-12 北京奇虎科技有限公司 优化移动终端的运行速度的方法和装置
US10475069B2 (en) * 2015-05-04 2019-11-12 Onepin, Inc. Automatic aftercall directory and phonebook entry advertising
CN105094278B (zh) * 2015-06-30 2018-10-12 努比亚技术有限公司 一种信息处理方法及装置
CN105516487B (zh) * 2015-12-04 2019-07-16 上海斐讯数据通信技术有限公司 广播接收方法、系统及设备
CN105528254B (zh) 2015-12-07 2019-02-22 贵阳朗玛信息技术股份有限公司 一种业务处理方法及装置
CN105867983A (zh) * 2016-04-19 2016-08-17 乐视网信息技术(北京)股份有限公司 一种智能终端在图库应用中提供印制服务的方法和装置
CN105975306A (zh) * 2016-04-29 2016-09-28 北京天宇朗通通信设备股份有限公司 电子设备的应用程序启动管理方法和装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581966A (zh) * 2013-10-08 2014-02-12 北京工商大学 一种智能手机实时监测优化配置方法
US20170070302A1 (en) * 2015-09-04 2017-03-09 Alively, Inc. System and method for sharing mobile video and audio content
CN106919460A (zh) * 2017-03-10 2017-07-04 广东欧珀移动通信有限公司 一种控制广播发送的方法、装置及移动终端

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3591523A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701008A (zh) * 2022-09-23 2023-09-05 荣耀终端有限公司 广播方法和设备

Also Published As

Publication number Publication date
CN106919460A (zh) 2017-07-04
US20210141677A1 (en) 2021-05-13
EP3591523A1 (en) 2020-01-08
US11048568B2 (en) 2021-06-29
EP3591523A4 (en) 2020-01-08

Similar Documents

Publication Publication Date Title
CN108363593B (zh) 应用程序预加载方法、装置、存储介质及终端
US10956280B2 (en) Data backup method, electronic device, and storage medium
CN107844342B (zh) 应用程序保活的管控方法、装置及存储介质和移动终端
CN108710515B (zh) 应用预加载方法、装置、存储介质及终端
US10474507B2 (en) Terminal application process management method and apparatus
CN108521607B (zh) 视频中广告的处理方法、装置、存储介质及智能终端
US11086697B2 (en) Broadcast-controlling method in operating system and mobile terminal
EP3592004A1 (en) Broadcast processing method, device, storage medium and terminal device
WO2017206902A1 (zh) 应用控制方法及相关设备
CN107423064B (zh) 消息处理方法、装置、终端设备及存储介质
WO2017193496A1 (zh) 应用数据的处理方法、装置和终端设备
WO2018161589A1 (zh) 控制广播发送的方法、装置、存储介质及电子设备
WO2018161968A1 (zh) 广播消息排队的方法、装置及终端
WO2018161607A1 (zh) 广播控制方法、装置及移动终端、存储介质
CN106027631B (zh) 一种数据传输方法及装置
WO2018161966A1 (zh) 广播发送方法、装置、终端及存储介质
US20200201518A1 (en) Method for starting application and electronic device for implementing same
WO2019071600A1 (zh) 一种图像处理方法及装置
US11740681B2 (en) Electronic device and application managing method thereof
WO2018161955A1 (zh) 一种广播接收者的控制方法、装置及移动终端
WO2018161609A1 (zh) 一种广播接收者的控制方法、装置及移动终端、存储介质
CN106844070B (zh) 一种广播的控制方法、装置及移动终端
EP3716659A1 (en) Method for processing ordered broadcast and electronic device
US20200125369A1 (en) Method, device, and terminal for accelerating startup of application
US10992489B2 (en) Electronic device for providing notification message and method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17900242

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2017900242

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2017900242

Country of ref document: EP

Effective date: 20191010