[go: up one dir, main page]

WO2018161596A1 - 控制广播发送者发送广播消息的方法、装置、终端设备及存储介质 - Google Patents

控制广播发送者发送广播消息的方法、装置、终端设备及存储介质 Download PDF

Info

Publication number
WO2018161596A1
WO2018161596A1 PCT/CN2017/107189 CN2017107189W WO2018161596A1 WO 2018161596 A1 WO2018161596 A1 WO 2018161596A1 CN 2017107189 W CN2017107189 W CN 2017107189W WO 2018161596 A1 WO2018161596 A1 WO 2018161596A1
Authority
WO
WIPO (PCT)
Prior art keywords
broadcast
broadcast message
sender
frequency
message
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.)
Ceased
Application number
PCT/CN2017/107189
Other languages
English (en)
French (fr)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of WO2018161596A1 publication Critical patent/WO2018161596A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic

Definitions

  • the embodiments of the present invention relate to computer technologies, and in particular, to a method, an apparatus, a terminal device, and a storage medium for controlling a broadcast sender to send a broadcast message.
  • Broadcast is a widely used mechanism for transmitting information between applications. Taking the Android operating system as an example, it uses broadcast to realize data transmission and sharing between applications. Typically, such as Android's own text messages, telephones and other broadcasts.
  • the broadcast sender sends a broadcast message by calling the sendBroadcast function
  • the broadcast receiver registers the broadcast receiver (BroadcastReceiver) in the management module by calling the registerReceiver function, and defines a broadcast message of interest to the broadcaster. To achieve the reception of the corresponding broadcast message.
  • the present application provides a method, device, terminal device and storage medium for controlling a broadcast sender to send a broadcast message, which improves broadcast processing efficiency, reduces system resource consumption, and increases system stability.
  • the embodiment of the present application provides a method for controlling a broadcast sender to send a broadcast message, including:
  • the transmission of the broadcast message of the broadcast sender is controlled according to the determined frequency of the broadcast sender transmitting the broadcast message.
  • the embodiment of the present application further provides an apparatus for controlling a broadcast sender to send a broadcast message, including:
  • a recording module configured to record a number of times the broadcast sender sends a broadcast message in the system
  • a frequency determining module configured to: after monitoring a broadcast message sending instruction, determine a frequency of a broadcast message sent by a broadcast sender corresponding to the broadcast message sending instruction, where the frequency of sending the broadcast message is sent by a preset time The number of times is determined;
  • a control module configured to control transmission of the broadcast message of the broadcast sender according to the determined frequency of the broadcast sender sending the broadcast message.
  • an embodiment of the present application further provides a terminal device, including: a processor, a memory, and a computer program stored on the memory and operable on the processor, where the processor implements the following step:
  • the transmission of the broadcast message of the broadcast sender is controlled according to the determined frequency of the broadcast sender transmitting the broadcast message.
  • the embodiment of the present application further provides a storage medium, where the storage medium stores a plurality of instructions, and the plurality of instructions are adapted to be executed on a computer, so that the computer performs the control broadcast transmission as described above.
  • the present application provides a method, device, terminal device and storage medium for controlling a broadcast sender to send a broadcast message, which improves broadcast processing efficiency, reduces system resource consumption, and increases system stability.
  • FIG. 1 is a flowchart of a method for controlling a broadcast sender to send a broadcast message according to an embodiment of the present application.
  • FIG. 2 is a flowchart of another method for controlling a broadcast sender to send a broadcast message according to an embodiment of the present application.
  • FIG. 3 is a flowchart of another method for controlling a broadcast sender to send a broadcast message according to an embodiment of the present application.
  • FIG. 4 is a structural block diagram of an apparatus for controlling a broadcast sender to send 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.
  • the present application discloses a method for controlling a broadcast sender to send a broadcast message, including:
  • the transmission of the broadcast message of the broadcast sender is controlled according to the determined frequency of the broadcast sender transmitting the broadcast message.
  • controlling, according to the determined frequency of the broadcast sender sending the broadcast message, the sending of the broadcast message of the broadcast sender includes:
  • the determined frequency of the broadcast sender sending the broadcast message is greater than a preset frequency, limiting the number of broadcast messages sent by the broadcast sender;
  • the broadcast sender is prohibited from transmitting the broadcast message within a preset time.
  • the method further includes:
  • the transmission control of the broadcast message is performed according to the determined frequency at which the broadcast sender in the broadcast queue transmits the broadcast message.
  • determining the frequency of transmitting the broadcast message by the number of times the broadcast message is sent within the preset time comprises:
  • the number of times the broadcast message is recorded in the preset time is counted every preset time, and the frequency of sending the broadcast message in the preset time is determined.
  • the method further includes:
  • the releasing the control of sending the broadcast message to the broadcast sender includes:
  • the preset release duration is determined by the real-time load of the current system and the current remaining power of the terminal device.
  • FIG. 1 is a flowchart of a method for controlling a broadcast sender to send a broadcast message according to an embodiment of the present disclosure.
  • This embodiment may be applicable to a case where a broadcast sender sends a broadcast message to perform control processing, and the method may be used in the embodiment of the present application.
  • the terminal device is provided to perform, and the device for controlling the broadcast sender to send the broadcast message of the terminal device can be implemented by using software and/or hardware. As shown in FIG. 1 , the specific solution provided by this embodiment is as follows:
  • the broadcast sender's service process sends a broadcast message to the management module (such as ActivityManagerService, activity management service) by calling a broadcast send function (such as the sendBroadcast function), and the management module puts the broadcast message and puts it into the broadcast process.
  • the management module transmits the broadcast message in the broadcast transmission queue to the broadcast receiver that meets the reception condition through a process communication mechanism (such as a Binder process communication mechanism).
  • a broadcast message refers to information transmitted by a system or an application during operation and used for transmission between a system and/or an application.
  • a broadcast message may be a system-initiated broadcast message or a short message broadcast.
  • the process in which the broadcast sender transmits the broadcast message and the process in which the broadcast receiver receives the broadcast message are asynchronous operation processes, and the broadcast sender and the broadcast receiver implement low-coupling relationship matching through the management module, that is, the broadcast sender does not transmit the broadcast message.
  • the broadcast receiver only accepts broadcast messages of interest to them, and does not care about the specific broadcast sender.
  • broadcast messages can always send broadcast messages frequently.
  • the broadcast message is sent, it is received and processed by the corresponding broadcast receiver.
  • the broadcast message consumes the system.
  • this broadcast message also pulls up multiple un-launched applications, resulting in a significant increase in system load.
  • the number of times the broadcast sender sends a broadcast message in the system is recorded.
  • it is a statistical record of the number of times a broadcast message is sent for each broadcast message.
  • it may also be a statistical record of the number of times the broadcast message is received by the recipient.
  • the instruction for sending the broadcast message can be expressed as:
  • Intent intent new Intent (BROADCAST_COUNTER_ACTION);
  • the recording of the number of times the broadcast message is sent may be performed after the broadcast message is sent.
  • the broadcast receiver wants to receive the broadcast and needs to register the broadcast receiver, it can be expressed as:
  • the broadcast message (BROADCAST_COUNTER_ACTION) sent by the broadcast sender is sent by the management module, since the broadcast receiver registers the corresponding broadcast receiver that receives the broadcast message, the broadcast message is received and received by the corresponding broadcast receiver.
  • the management module sequentially transmits the broadcast messages in the broadcast transmission queue.
  • the process in which the broadcast sender transmits the broadcast message and the process in which the broadcast receiver receives the broadcast message are asynchronous operation processes, and the broadcast sender and the broadcast receiver achieve low-coupling relationship matching through the management module.
  • the broadcast message can be divided into a normal broadcast message and an ordered broadcast message according to different broadcast transmission modes. After the normal broadcast message is sent by the management module, the broadcast receiver receives the broadcast message unordered, and after the broadcast message is sent by the management module, the broadcast receiver sequentially receives the order, that is, the first broadcast receiver. After receiving the broadcast message and processing it, the second broadcast receiver can start receiving and processing the broadcast message, and so on.
  • the management module may acquire the registration instruction of the broadcast receiver, and the registration instruction of the broadcast receiver is sent by the broadcast receiver.
  • the broadcast recipient registers (subscribes) the broadcast message that it wants to receive to the management module through the process communication mechanism.
  • the broadcast receiver's service process registers the broadcast receiver in the management module by calling the registerReceiver function, and defines the broadcast message of interest to itself.
  • the management module sends the broadcast message in the broadcast transmission queue, it depends on the registration status of the broadcast receiver.
  • the receiving method such as the onReceive method
  • the frequency of the broadcast message sent by the broadcast sender corresponding to the broadcast message sending instruction is determined.
  • the management module detects that the corresponding broadcast message in the broadcast sending instruction is BROADCAST_COUNTER_ACTION, and determines that the corresponding broadcast sender is the counter COUNTER, the number of times the broadcast sender recorded in S101 sends the broadcast message is searched.
  • the frequency at which the broadcast sender sends the broadcast message may be determined by the number of times the broadcast message is sent within a preset time (eg, 10 minutes or 1 hour).
  • the broadcast message sent by the broadcast sender may be controlled according to the frequency of the frequency at which the broadcast sender determines the broadcast message determined by S102.
  • the broadcast sender if the determined frequency of the broadcast sender sending the broadcast message is greater than a preset frequency (eg, greater than 20 times/hour), the broadcast sender is prohibited from transmitting the broadcast message;
  • the frequency at which the broadcast sender sends the broadcast message is greater than the preset frequency, and limits the number of broadcast messages sent by the broadcast sender; and may also be, if the frequency of the broadcast message sent by the broadcast sender is determined If it is greater than the preset frequency, the broadcast sender is prohibited from transmitting the broadcast message within the preset time.
  • the prohibiting the broadcast sender from transmitting the broadcast message may stop the broadcast sender from continuing to transmit the high-frequency broadcast message to the broadcast receiver in a timely manner. For example, when the management module processes the broadcast sending command, it determines that the broadcast is sent. If the condition that prohibits the transmission of the broadcast is met, the broadcast transmission instruction is masked. Limiting the number of broadcast messages sent by broadcasters (eg, only 5-10 broadcast messages can be sent per day), so that broadcasters can only send a certain number of broadcast messages, and also avoid a large number of broadcast messages being broadcasted by the sender. The situation caused by an increase in system load.
  • the management module processes the broadcast sending command, it determines that the broadcast is sent. If the condition that prohibits the transmission of the broadcast is met, the broadcast transmission instruction is masked. Limiting the number of broadcast messages sent by broadcasters (eg, only 5-10 broadcast messages can be sent per day), so that broadcasters can only send a certain number of broadcast messages, and also avoid a large number of broadcast messages being broadcasted by the
  • the preset time may be set according to the real-time load of the system (such as CPU usage, memory usage) and the current remaining capacity of the terminal device.
  • the power is adaptively adjusted. If the current load of the system is high, the broadcast sender is prohibited from sending broadcast messages within 30 minutes.
  • the broadcast receiver is prevented from receiving and processing a large number of broadcast messages, and some broadcast receivers that are originally in the background or not running are prevented from being pulled up, and the broadcast processing is optimized.
  • the solution is to control the transmission of the broadcast message by the broadcast sender, that is, the limitation of the reasonable broadcast message transmission is performed at the broadcast sender, and the registration of the broadcast receiver is not affected.
  • the technical solution provided in this embodiment records the number of times the broadcast sender sends a broadcast message in the system, and after detecting the broadcast message sending instruction, determines the frequency at which the broadcast sender corresponding to the broadcast message sending instruction sends the broadcast message.
  • the frequency of sending the broadcast message is determined by the number of times the broadcast message is sent within a preset time, and the transmission of the broadcast message of the broadcast sender is controlled according to the determined frequency of the broadcast sender sending the broadcast message, and the solution is resolved.
  • the existing broadcast sender has the defects in transmitting the broadcast message, improves the broadcast processing efficiency, reduces the system resource consumption, and increases the system stability.
  • the method includes: traversing a broadcast queue corresponding to the broadcast message sending instruction, determining a frequency at which the broadcast sender in the broadcast queue sends a broadcast message; performing, according to the determined frequency of the broadcast sender in the broadcast queue sending the broadcast message Send control of broadcast messages.
  • the broadcast messages in the broadcast transmission queue recorded by the management module are a, b, c, and d.
  • the broadcast transmission queue is traversed, and the broadcast messages b, c and the traversal are obtained.
  • the broadcast message transmission frequencies of the broadcast senders B, C, and D corresponding to the broadcast messages b, c, and d are respectively determined.
  • S203 Perform transmission control of the broadcast message according to the determined frequency of the broadcast sender in the broadcast queue transmitting the broadcast message.
  • the control of the corresponding broadcast message transmission is performed according to the broadcast message transmission frequency of the broadcast senders B, C, and D determined in S202.
  • the method for determining the transmission frequency of the broadcast message and the corresponding control for the transmission of the broadcast message are as described in S101-S103, and details are not described herein again.
  • the embodiment provides a method for controlling a broadcast sender to send a broadcast message. After monitoring a broadcast message sending instruction, traversing a broadcast queue corresponding to the broadcast message sending instruction, and determining that the broadcast sender in the broadcast queue sends a broadcast.
  • the frequency of the message is controlled according to the determined frequency of the broadcast message sent by the broadcast sender in the broadcast queue, so that the management module needs to query and calculate the corresponding broadcast transmission in real time every time the broadcast message command is processed.
  • the frequency at which the broadcast message is sent may be the frequency at which the broadcast sender sends the broadcast message according to the previous unified traversal as the frequency at which the broadcast sender corresponding to the current broadcast transmission command transmits the broadcast message, thereby improving the efficiency of the broadcast processing and reducing the system. Real-time calculations increase system stability.
  • FIG. 3 is a flowchart of another method for controlling a broadcast sender to send a broadcast message according to an embodiment of the present application.
  • the broadcast message to the broadcast sender is After the sending is controlled, the method further includes: releasing the control of transmitting the broadcast message to the broadcast sender.
  • the control for the broadcast sender to transmit the broadcast message is released.
  • the control for transmitting the broadcast message to the broadcast sender may be released according to the current system running condition; or after the preset release time, the control for transmitting the broadcast message to the broadcast sender may be released.
  • the current system operating conditions CPU occupancy, memory usage, remaining power
  • the current system operating conditions may be used as a determination condition for releasing the control of transmitting a broadcast message to the broadcast sender. It is also possible to perform statistics on the time when the broadcast sender controls the transmission of the broadcast message, and when the statistical time reaches the preset release duration (for example, one day), the restriction on the broadcast message transmitted by the broadcast sender is released.
  • the preset time can be adjusted according to the real-time load of the system (such as CPU usage and memory occupancy) and the current remaining capacity of the terminal device. If the current load of the system is high, the limit is prohibited within 30 minutes.
  • the broadcast sender sends a broadcast message.
  • the embodiment provides a method for controlling a broadcast sender to send a broadcast message, and records the number of times the broadcast sender sends a broadcast message in the system, and after monitoring the broadcast message sending instruction, determines a broadcast corresponding to the broadcast message sending instruction. a frequency at which the sender sends a broadcast message, the frequency of the broadcast message being determined by the number of times the broadcast message is sent within a preset time, according to the determined frequency of the broadcast sender sending the broadcast message, to the broadcast sender The transmission of the broadcast message is controlled, and the control of the broadcast message transmission by the broadcast sender is released accordingly.
  • the solution of the embodiment improves the flexibility of the broadcast sender to control the broadcast message, and further improves the broadcast processing mechanism.
  • the present application discloses an apparatus for controlling a broadcast sender to send a broadcast message, including:
  • a recording module configured to record a number of times the broadcast sender sends a broadcast message in the system
  • a frequency determining module configured to: after monitoring a broadcast message sending instruction, determine a frequency of a broadcast message sent by a broadcast sender corresponding to the broadcast message sending instruction, where the frequency of sending the broadcast message is sent by a preset time The number of times is determined;
  • a control module configured to control transmission of the broadcast message of the broadcast sender according to the determined frequency of the broadcast sender sending the broadcast message.
  • control module is specifically configured to:
  • the determined frequency of the broadcast sender sending the broadcast message is greater than a preset frequency, limiting the number of broadcast messages sent by the broadcast sender;
  • the broadcast sender is prohibited from transmitting the broadcast message within a preset time.
  • the apparatus further includes:
  • a traversing module configured to: after the monitoring the broadcast message sending instruction, traverse the broadcast queue corresponding to the broadcast message sending instruction, and determine a frequency of the broadcast sender in the broadcast queue to send the broadcast message;
  • the control module is further configured to perform transmission control of the broadcast message according to the determined frequency of the broadcast sender in the broadcast queue transmitting the broadcast message.
  • the frequency determining module is specifically configured to:
  • the number of times the broadcast message is recorded in the preset time is counted every preset time, and the frequency of sending the broadcast message in the preset time is determined.
  • control module is further configured to:
  • FIG. 4 is a structural block diagram of an apparatus for controlling a broadcast sender to send a broadcast message according to an embodiment of the present disclosure.
  • the apparatus is configured to perform a method for controlling a broadcast sender to send a broadcast message provided by the foregoing embodiment, and has a function corresponding to the execution method.
  • Modules and benefits As shown in FIG. 4, the device specifically includes: a recording module 401, a frequency determining module 402, and a control module 403.
  • the recording module 401 is configured to record the number of times the broadcast sender sends a broadcast message in the system
  • the frequency determining module 402 is configured to: after monitoring the broadcast message sending instruction, determine a frequency of the broadcast message sent by the broadcast sender corresponding to the broadcast message sending instruction, where the frequency of sending the broadcast message is sent by the preset time The number of times is determined;
  • the control module 403 is configured to control transmission of the broadcast message of the broadcast sender according to the determined frequency of the broadcast sender sending the broadcast message.
  • the technical solution provided in this embodiment records the number of times the broadcast sender sends a broadcast message in the system, and after detecting the broadcast message sending instruction, determines the frequency at which the broadcast sender corresponding to the broadcast message sending instruction sends the broadcast message.
  • the frequency of sending the broadcast message is determined by the number of times the broadcast message is sent within a preset time, and the transmission of the broadcast message of the broadcast sender is controlled according to the determined frequency of the broadcast sender sending the broadcast message, and the solution is resolved.
  • the existing broadcast sender has the defects in transmitting the broadcast message, improves the broadcast processing efficiency, reduces the system resource consumption, and increases the system stability.
  • control module 403 is specifically configured to: if the determined frequency of the broadcast sender sending the broadcast message is greater than the preset frequency, prohibiting the broadcast sender from transmitting the broadcast message; if the determined location is If the frequency at which the broadcast sender sends the broadcast message is greater than the preset frequency, the number of broadcast messages sent by the broadcast sender is limited; if the determined broadcast sender sends the broadcast message at a frequency greater than the preset frequency, then The broadcast sender is prohibited from transmitting the broadcast message within a preset time.
  • the method further includes: a traversing module 404, configured to: after the monitoring the broadcast message sending instruction, traverse the broadcast queue corresponding to the broadcast message sending instruction, and determine that the broadcast sender in the broadcast queue sends a broadcast The frequency of the message; the control module is further configured to perform transmission control of the broadcast message according to the determined frequency of the broadcast sender in the broadcast queue sending the broadcast message.
  • a traversing module 404 configured to: after the monitoring the broadcast message sending instruction, traverse the broadcast queue corresponding to the broadcast message sending instruction, and determine that the broadcast sender in the broadcast queue sends a broadcast The frequency of the message; the control module is further configured to perform transmission control of the broadcast message according to the determined frequency of the broadcast sender in the broadcast queue sending the broadcast message.
  • the frequency determining module 402 is configured to: perform statistics on the number of times the broadcast message is recorded in the preset time, and determine to send the broadcast message in the preset time, at a preset time. frequency.
  • control module 403 is further configured to: after the controlling the sending of the broadcast message of the broadcast sender, release the control of sending the broadcast message to the broadcast sender.
  • FIG. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • the terminal device may include: a memory 501 and a central processing unit (Central). Processing Unit, CPU) 502, peripheral interface 503, RF (Radio) Frequency, RF circuit 505, audio circuit 506, speaker 511, power management chip 508, input/output (I/O) subsystem 509, touch screen 512, other input/control devices 510, and external port 504, these components are passed through one or A plurality of communication buses or signal lines 507 are in communication.
  • the illustrated terminal device 500 is merely one example of a terminal device, and that the terminal device 500 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 terminal device for rights management of a multi-open application provided in this embodiment is described in detail below.
  • the terminal device takes a smart phone as an example.
  • the memory 501 can be accessed by the CPU 502, the peripheral interface 503, etc., and the memory 501 can include a high speed random access memory, and can also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices. Or other volatile solid-state storage devices.
  • a non-volatile memory such as one or more magnetic disk storage devices, flash memory devices. Or other volatile solid-state storage devices.
  • Peripheral interface 503 which can connect the input and output peripherals of the device to CPU 502 and memory 501.
  • the I/O subsystem 509 which can connect input and output peripherals on the device, such as touch screen 512 and other input/control devices 510, to peripheral interface 503.
  • the I/O subsystem 509 can include a display controller 5091 and one or more input controllers 5092 for controlling other input/control devices 510.
  • one or more input controllers 5092 receive electrical signals from other input/control devices 510 or transmit electrical signals to other input/control devices 510, and other input/control devices 510 may include physical buttons (press buttons, rocker buttons, etc.) ), dial, slide switch, joystick, click wheel.
  • the input controller 5092 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 512 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.
  • Display controller 5091 in I/O subsystem 509 receives electrical signals from touch screen 512 or transmits electrical signals to touch screen 512.
  • the touch screen 512 detects the contact on the touch screen, and the display controller 5091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 512, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 512 can be operated.
  • 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 505 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. Specifically, the RF circuit 505 receives and transmits an RF signal, which is also referred to as an electromagnetic signal, and the RF circuit 505 converts the electrical signal into an electromagnetic signal or converts the electromagnetic signal into an electrical signal, and through the electromagnetic signal and communication network and other devices Communicate.
  • an RF signal which is also referred to as an electromagnetic signal
  • RF circuitry 505 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC ( COder-DECoder, codec) chipset, user identification module (Subscriber Identity Module, SIM) and more.
  • CODEC COder-DECoder, codec
  • the audio circuit 506 is mainly used to receive audio data from the peripheral interface 503, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 511.
  • the speaker 511 is configured to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 505 to sound and play the sound to the user.
  • the power management chip 508 is used for power supply and power management of the hardware connected to the CPU 502, the I/O subsystem, and the peripheral interface.
  • the CPU 502 that is, the processor provided by the embodiment of the present application may perform the following operations:
  • the transmission of the broadcast message of the broadcast sender is controlled according to the determined frequency of the broadcast sender transmitting the broadcast message.
  • the controlling the sending of the broadcast message of the broadcast sender according to the determined frequency of the broadcast sender to send the broadcast message comprises: if determining the frequency of the broadcast sender sending the broadcast message If the frequency is greater than the preset frequency, the broadcast sender is prohibited from transmitting the broadcast message; if the determined frequency of the broadcast sender sending the broadcast message is greater than the preset frequency, the number of the broadcast message sent by the broadcast sender is performed. Limiting; if the determined frequency of the broadcast sender sending the broadcast message is greater than the preset frequency, the broadcast sender is prohibited from transmitting the broadcast message within a preset time.
  • the method further includes: traversing a broadcast queue corresponding to the broadcast message sending instruction, determining a frequency at which the broadcast sender in the broadcast queue sends the broadcast message; The frequency at which the broadcast sender in the broadcast queue transmits the broadcast message performs the transmission control of the broadcast message.
  • determining the frequency of sending the broadcast message by the number of times the broadcast message is sent within the preset time includes: counting, according to the preset time, the number of times of sending the broadcast message recorded in the preset time, determining The frequency at which the broadcast message is sent within the preset time.
  • the method further includes: releasing the control of sending the broadcast message to the broadcast sender.
  • control for sending the broadcast message to the broadcast sender including:
  • the preset release duration is determined by a real-time load of the current system and a current remaining power of the terminal device.
  • ROM read only memory
  • RAM Random Access Memory
  • a storage medium storing a plurality of instructions, the plurality of instructions being adapted to, when executed on a computer, causing the computer to perform a method of controlling a broadcast sender to transmit a broadcast message according to any one of the embodiments described above .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例公开了一种控制广播发送者发送广播消息的方法、装置、终端设备及存储介质,方法包括:对系统中广播发送者发送广播消息的次数进行记录;监测到广播消息发送指令后,确定广播发送者发送广播消息的频率;依据发送广播消息的频率,对广播消息的发送进行控制。本方案提高了广播处理效率,降低了系统资源消耗。

Description

控制广播发送者发送广播消息的方法、装置、终端设备及存储介质
本申请要求于2017年3月10日提交中国专利局、申请号为:201710141274.6 、申请名称为“控制广播发送者发送广播消息的方法、装置和终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术,尤其涉及一种控制广播发送者发送广播消息的方法、装置、终端设备及存储介质。
背景技术
广播是一种被广泛运用的在应用程序之间进行信息传输的机制,以安卓操作系统为例,其通过广播(Broadcast)来实现应用程序间数据的传输和共享。典型的,如安卓自带的短信、电话等广播。
在安卓系统中,广播发送者通过调用sendBroadcast函数进行广播消息的发送,广播接收者通过调用registerReceiver函数在管理模块中进行广播接收器(BroadcastReceiver)的注册,并定义自身感兴趣的广播消息,由此来实现对相应的广播消息的接收。
技术问题
本申请提供了一种控制广播发送者发送广播消息的方法、装置、终端设备及存储介质,提高了广播处理效率,降低了系统资源消耗,增加了系统的稳定性。
技术解决方案
第一方面,本申请实施例提供了一种控制广播发送者发送广播消息的方法,包括:
对系统中广播发送者发送广播消息的次数进行记录;
监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定;
依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
第二方面,本申请实施例还提供了一种控制广播发送者发送广播消息的装置,包括:
记录模块,用于对系统中广播发送者发送广播消息的次数进行记录;
频率确定模块,用于监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定;
控制模块,用于依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
第三方面,本申请实施例还提供了一种终端设备,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:
对系统中广播发送者发送广播消息的次数进行记录;
监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定;
依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
第四方面,本申请实施例还提供了一种存储介质,所述存储介质存储多条指令,所述多条指令适于在计算机上运行时,使得所述计算机执行如上所述的控制广播发送者发送广播消息的方法。
有益效果
本申请提供了一种控制广播发送者发送广播消息的方法、装置、终端设备及存储介质,提高了广播处理效率,降低了系统资源消耗,增加了系统的稳定性。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1是本申请实施例提供的一种控制广播发送者发送广播消息的方法的流程图。
图2是本申请实施例提供的另一种控制广播发送者发送广播消息的方法的流程图。
图3是本申请实施例提供的另一种控制广播发送者发送广播消息的方法的流程图。
图4是本申请实施例提供的一种控制广播发送者发送广播消息的装置的结构框图。
图5是本申请实施例提供的一种终端设备的结构示意图。
本发明的最佳实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。
第一方面,本申请公开了一种控制广播发送者发送广播消息的方法,包括:
对系统中广播发送者发送广播消息的次数进行记录;
监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定;
依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
在一个实施例中,所述依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制包括:
如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则禁止所述广播发送者进行广播消息的发送;
如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则对所述广播发送者发送广播消息的数量进行限制;
如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则在预设时间内,禁止所述广播发送者进行广播消息的发送。
在一个实施例中,在所述监测到广播消息发送指令后之后,还包括:
遍历和所述广播消息发送指令对应的广播队列,确定所述广播队列中的广播发送者发送广播消息的频率;
依据确定出的所述广播队列中的广播发送者发送广播消息的频率进行广播消息的发送控制。
在一个实施例中,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定包括:
每隔预设时间,对在所述预设时间内记录的发送广播消息的次数进行统计,确定在所述预设时间内发送广播消息的频率。
在一个实施例中,在所述对所述广播发送者的广播消息的发送进行控制之后,还包括:
解除对所述广播发送者进行广播消息发送的控制。
在一个实施例中,所述解除对所述广播发送者进行广播消息发送的控制,包括:
根据当前系统运行状况,解除对所述广播发送者进行广播消息发送的控制;或者
经预设解除时长后,解除对所述广播发送者进行广播消息发送的控制。
在一个实施例中,所述预设解除时长由所述当前系统的实时负载以及终端设备的当前剩余电量确定。
图1是本申请实施例提供的一种控制广播发送者发送广播消息的方法的流程图,本实施例可适用于对广播发送者发送广播消息进行控制处理的情况,该方法可以由本申请实施例提供的终端设备来执行,该终端设备的控制广播发送者发送广播消息的装置可采用软件和/或硬件的方式实现,如图1所示,本实施例提供的具体方案如下:
S101、对系统中广播发送者发送广播消息的次数进行记录。
在广播处理过程中,广播发送者的服务进程通过调用广播发送函数(如sendBroadcast函数)将广播消息发送至管理模块(如ActivityManagerService,活动管理服务),管理模块接收到该广播消息后将其放入广播发送队列,管理模块通过进程通信机制(如Binder进程通信机制)将广播发送队列中的广播消息发送至符合接收条件的广播接收者。
广播机制中,广播消息指的是系统或者应用程序在运行过程中发送的,用于系统和/或应用程序之间传输的信息,示例性的,广播消息可以是系统启动广播消息、短信类广播消息、电话类广播消息或者三方应用类广播消息等。广播发送者发送广播消息的过程和广播接收者接收广播消息的过程是异步操作过程,广播发送者和广播接收者通过管理模块实现低耦合的关系匹配,即广播发送者在发送广播消息后并不关心具体的广播接收者是谁,广播接收者只接受自己感兴趣的广播消息,也不关心具体的广播发送者。由此,一些第三方应用或者恶意软件的广播发送者可以一直频繁的发送广播消息,当该广播消息发出后,被相应的广播接收者进行接收、处理,广播消息在处理过程中除了会消耗系统资源外,该广播消息也会拉起多个未启动的应用程序,造成系统运行负载的显著提高。
本步骤中,对系统中广播发送者发送广播消息的次数进行记录。示例性的,是对广播发送者每发出一条广播消息进行次数的统计记录,在另一个实施例中,还可以是对广播消息被接收者接收的次数进行统计记录。
具体的,以计数器应用程序作为广播发送者为例,其发送广播消息的指令可表示为:
//创建一个广播消息
Intent intent = new Intent (BROADCAST_COUNTER_ACTION);
//传递计数器参数及对应的计数值
intent.putExtra(COUNTER_VALUE, counter);
//发送广播消息
sendBroadcast(intent)
其中,在该广播消息发送后可进行一次广播消息发送次数的记录。
对应的,广播接收者若想接收到该广播需要进行广播接收器的注册,可表示为:
//定义一个感兴趣的广播消息(订阅广播消息)
IntentFilter counterActionFilter =
new IntentFilter(CounterService.BROADCAST_COUNTER_ACTION);
//进行广播接收器的注册
registerReceiver(counterActionReceiver,counterActionFilter)
当该广播发送者发送的广播消息(BROADCAST_COUNTER_ACTION)由管理模块发出后,由于广播接收者注册了对应的接收该广播消息的广播接收器,该广播消息即会被对应的广播接收者接收调用。
S102、监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定。
在一个实施例中,管理模块对广播发送队列中的广播消息依次进行发送。广播发送者发送广播消息的过程和广播接收者接收广播消息的过程是异步操作过程,广播发送者和广播接收者通过管理模块实现低耦合的关系匹配。其中,根据广播发送方式的不同可将广播消息分为普通广播消息和有序广播消息。普通广播消息被管理模块发出后,广播接收者对该广播消息的接收是无序的,而有序广播消息被管理模块发出后,广播接收者按照顺序先后依次接收,即第一个广播接收者接收到广播消息并处理完毕后,第二个广播接收者才能开始接收并处理该广播消息,依次类推。具体的,广播接收者在接收广播消息时,管理模块可以对广播接收器的注册指令进行获取,该广播接收器的注册指令由广播接收者发出。通常,广播接收者通过进程通信机制向管理模块注册(订阅)想要接收的广播消息。广播接收者的服务进程通过调用registerReceiver函数在管理模块中进行广播接收器的注册,同时定义自身感兴趣的广播消息,管理模块在发送广播发送队列中的广播消息时,依据广播接收者的注册情况,将该广播消息发送至对其进行订阅了的广播接收者相应的消息循环队列中,广播接收者接收到该广播消息后回调注册的广播接收器中的接收方法(如onReceive方法)来执行相应的功能以对接收到的广播消息进行处理。
本步骤中,监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率。在一个实施例中,是当管理模块监测到广播发送指令中对应的广播消息为BROADCAST_COUNTER_ACTION时,确定出对应的广播发送者为计数器COUNTER,则查找S101中记录的该广播发送者发送广播消息的次数。示例性的,该广播发送者发送广播消息的频率可以由在预设时间(如10分钟或1小时)内发送广播消息的次数确定。
S103、依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
本步骤中,可依据S102确定出的广播发送者发送广播消息的频率的大小来对该广播发送者发送的广播消息进行控制处理。在一个实施例中,如果确定出的广播发送者发送广播消息的频率大于预设频率(如大于20次/小时),则禁止所述广播发送者进行广播消息的发送;还可以是,如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则对所述广播发送者发送广播消息的数量进行限制;还可以是,如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则在预设时间内,禁止所述广播发送者进行广播消息的发送。其中,禁止该广播发送者进行广播消息的发送可以及时制止广播发送者继续高频率的发送大量广播消息给广播接收者,示例性的,当管理模块在处理广播发送指令时,判断到该广播发送者符合禁止发送广播的条件,则屏蔽掉该广播发送指令。对广播发送者发送广播消息的数量进行限制的方式(如每天仅能发送5-10条广播消息),使得广播发送者仅能发送一定数量的广播消息,同样避免了大量广播消息被广播发送者发出造成的系统负载增大的情况。在预设时间内(如1小时)禁止该广播发送者发送广播消息的方式中,该预设时间的设定可依据系统的实时负载(如CPU占用率、内存占用率)以及终端设备当前剩余电量来适应性调整,如系统当前的负载较高,则限制在30分钟内禁止该广播发送者发送广播消息。
通过上述对广播发送者发送广播消息的控制,避免了广播接收者对大量的广播消息进行接收、处理,也避免了一些原本处于后台运行或者没有运行的广播接收者被拉起,优化了广播处理机制,提高广播处理效率,降低系统的资源消耗。
需要说明的是,在一个实施例中,方案为对广播发送者进行广播消息的发送进行控制,即在广播发送者处进行了合理的广播消息发送的限制,广播接收者的注册不受影响。
本实施例提供的技术方案,通过对系统中广播发送者发送广播消息的次数进行记录,监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定,依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制,解决了现有的广播发送者在发送广播消息时存在的缺陷,提高了广播处理效率,降低了系统资源消耗,使得系统稳定性增加。
图2是本申请实施例提供的另一种控制广播发送者发送广播消息的方法的流程图,在上述实施例的基础上,可选的,在所述监测到广播消息发送指令后之后,还包括:遍历和所述广播消息发送指令对应的广播队列,确定所述广播队列中的广播发送者发送广播消息的频率;依据确定出的所述广播队列中的广播发送者发送广播消息的频率进行广播消息的发送控制。
基于上述优化,如图2所示,本实施例提供的技术方案具体如下:
S201、对系统中广播发送者发送广播消息的次数进行记录。
S202、监测到广播消息发送指令后,遍历和所述广播消息发送指令对应的广播队列,确定所述广播队列中的广播发送者发送广播消息的频率。
示例性的,管理模块记录的广播发送队列中的广播消息为a、b、c、d,当监测到广播消息a的发送指令后,对广播发送队列进行遍历,遍历得到广播消息b、c和d,此时,分别对广播消息b、c和d对应的广播发送者B、C和D的广播消息发送频率进行确定。
S203、依据确定出的所述广播队列中的广播发送者发送广播消息的频率进行广播消息的发送控制。
示例性的,依据S202中确定出的广播发送者B、C和D的广播消息发送频率进行对应的广播消息发送的控制。广播消息发送频率的确定以及相应的对广播消息发送进行控制的方式如S101-S103所述,此处不再赘述。当广播队列中执行到对广播消息b进行处理时,即监测到广播消息b的发送指令后,依据确定出的对该广播发送者发送广播消息的限制方式对广播消息b的发送进行控制。
本实施例提供了一种控制广播发送者发送广播消息的方法,监测到广播消息发送指令后,遍历和所述广播消息发送指令对应的广播队列,确定所述广播队列中的广播发送者发送广播消息的频率,依据确定出的所述广播队列中的广播发送者发送广播消息的频率进行广播消息的发送控制,避免了管理模块在每次处理广播消息指令时都需要实时查询计算对应的广播发送者发送广播消息的频率,可依据之前统一遍历确定出的广播发送者发送广播消息的频率作为当前广播发送指令对应的广播发送者发送广播消息的频率,提高了广播处理效率的同时减少了系统的实时运算量,使得系统稳定性增加。
图3是本申请实施例提供的另一种控制广播发送者发送广播消息的方法的流程图,在上述实施例的基础上,可选的,在所述对所述广播发送者的广播消息的发送进行控制之后,还包括:解除对所述广播发送者进行广播消息发送的控制。
基于上述优化,如图3所示,本实施例提供的技术方案具体如下:
S301、对系统中广播发送者发送广播消息的次数进行记录。
S302、监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定。
S303、依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
S304、解除对所述广播发送者进行广播消息发送的控制。
本步骤中,对广播发送者发送广播消息的控制进行解除。具体可以是:根据当前系统运行状况,解除对所述广播发送者进行广播消息发送的控制;或者在经预设解除时间后,解除对所述广播发送者进行广播消息发送的控制。在一个实施例中,可通过当前系统运行状况(CPU占用率、内存占用率、剩余电量)作为解除对广播发送者发送广播消息进行控制的判定条件。还可以是,对广播发送者发送广播消息进行控制的时间进行统计,当统计时间达到预设解除时长(如1天)后,解除对广播发送者发送广播消息的限制。该预设时间的设定可依据系统的实时负载(如CPU占用率、内存占用率)以及终端设备当前剩余电量来适应性调整,如系统当前的负载较高,则限制在30分钟内禁止该广播发送者发送广播消息。
本实施例提供了一种控制广播发送者发送广播消息的方法,对系统中广播发送者发送广播消息的次数进行记录,监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定,依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制,并相应的解除对所述广播发送者进行广播消息发送的控制,本实施例方案提高了对广播发送者发送广播消息控制的灵活性,进一步完善了广播处理机制。
第二方面,本申请公开了一种控制广播发送者发送广播消息的装置,包括:
记录模块,用于对系统中广播发送者发送广播消息的次数进行记录;
频率确定模块,用于监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定;
控制模块,用于依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
在一个实施例中,所述控制模块具体用于:
如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则禁止所述广播发送者进行广播消息的发送;
如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则对所述广播发送者发送广播消息的数量进行限制;
如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则在预设时间内,禁止所述广播发送者进行广播消息的发送。
在一个实施例中,所述装置还包括:
遍历模块,用于在所述监测到广播消息发送指令后之后,遍历和所述广播消息发送指令对应的广播队列,确定所述广播队列中的广播发送者发送广播消息的频率;
所述控制模块还用于依据确定出的所述广播队列中的广播发送者发送广播消息的频率进行广播消息的发送控制。
在一个实施例中,所述频率确定模块具体用于:
每隔预设时间,对在所述预设时间内记录的发送广播消息的次数进行统计,确定在所述预设时间内发送广播消息的频率。
在一个实施例中,所述控制模块还用于:
在所述对所述广播发送者的广播消息的发送进行控制之后,解除对所述广播发送者进行广播消息发送的控制。
图4是本申请实施例提供的一种控制广播发送者发送广播消息的装置的结构框图,该装置用于执行上述实施例提供的控制广播发送者发送广播消息的方法,具备执行方法相应的功能模块和有益效果。如图4所示,该装置具体包括:记录模块401、频率确定模块402、控制模块403。
其中,记录模块401用于对系统中广播发送者发送广播消息的次数进行记录;
频率确定模块402用于监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定;
控制模块403用于依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
本实施例提供的技术方案,通过对系统中广播发送者发送广播消息的次数进行记录,监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定,依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制,解决了现有的广播发送者在发送广播消息时存在的缺陷,提高了广播处理效率,降低了系统资源消耗,使得系统稳定性增加。
可选的,所述控制模块403具体用于:如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则禁止所述广播发送者进行广播消息的发送;如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则对所述广播发送者发送广播消息的数量进行限制;如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则在预设时间内,禁止所述广播发送者进行广播消息的发送。
可选的,还包括:遍历模块404,用于在所述监测到广播消息发送指令后之后,遍历和所述广播消息发送指令对应的广播队列,确定所述广播队列中的广播发送者发送广播消息的频率;所述控制模块还用于依据确定出的所述广播队列中的广播发送者发送广播消息的频率进行广播消息的发送控制。
可选的,所述频率确定模块402具体用于:每隔预设时间,对在所述预设时间内记录的发送广播消息的次数进行统计,确定在所述预设时间内发送广播消息的频率。
可选的,所述控制模块403还用于:在所述对所述广播发送者的广播消息的发送进行控制之后,解除对所述广播发送者进行广播消息发送的控制。
第三方面,本申请实施例在上述各实施例的基础上提供了一种终端设备,该终端设备可以包括本申请提供的控制广播发送者发送广播消息的装置。图5是本申请实施例提供的一种终端设备的结构示意图,如图5所示,该终端设备可以包括:存储器501、中央处理器(Central Processing Unit,CPU)502、外设接口503、RF(Radio Frequency,射频)电路505、音频电路506、扬声器511、电源管理芯片508、输入/输出(I/O)子系统509、触摸屏512、其他输入/控制设备510以及外部端口504,这些部件通过一个或多个通信总线或信号线507来通信。
应该理解的是,图示终端设备500仅仅是终端设备的一个范例,并且终端设备500可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
下面就本实施例提供的用于多开应用的权限管理的终端设备进行详细的描述,该终端设备以智能手机为例。
存储器501,所述存储器501可以被CPU502、外设接口503等访问,所述存储器501可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
外设接口503,所述外设接口503可以将设备的输入和输出外设连接到CPU502和存储器501。
I/O子系统509,所述I/O子系统509可以将设备上的输入输出外设,例如触摸屏512和其他输入/控制设备510,连接到外设接口503。I/O子系统509可以包括显示控制器5091和用于控制其他输入/控制设备510的一个或多个输入控制器5092。其中,一个或多个输入控制器5092从其他输入/控制设备510接收电信号或者向其他输入/控制设备510发送电信号,其他输入/控制设备510可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器5092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。
触摸屏512,所述触摸屏512是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。
I/O子系统509中的显示控制器5091从触摸屏512接收电信号或者向触摸屏512发送电信号。触摸屏512检测触摸屏上的接触,显示控制器5091将检测到的接触转换为与显示在触摸屏512上的用户界面对象的交互,即实现人机交互,显示在触摸屏512上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。
RF电路505,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路505接收并发送RF信号,RF信号也称为电磁信号,RF电路505将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路505可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。
音频电路506,主要用于从外设接口503接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器511。
扬声器511,用于将手机通过RF电路505从无线网络接收的语音信号,还原为声音并向用户播放该声音。
电源管理芯片508,用于为CPU502、I/O子系统及外设接口所连接的硬件进行供电及电源管理。
本申请实施例提供的CPU502,即处理器可执行如下操作:
对系统中广播发送者发送广播消息的次数进行记录;
监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定;
依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
可选的,所述依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制包括:如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则禁止所述广播发送者进行广播消息的发送;如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则对所述广播发送者发送广播消息的数量进行限制;如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则在预设时间内,禁止所述广播发送者进行广播消息的发送。
可选的,在所述监测到广播消息发送指令后之后,还包括:遍历和所述广播消息发送指令对应的广播队列,确定所述广播队列中的广播发送者发送广播消息的频率;依据确定出的所述广播队列中的广播发送者发送广播消息的频率进行广播消息的发送控制。
可选的,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定包括:每隔预设时间,对在所述预设时间内记录的发送广播消息的次数进行统计,确定在所述预设时间内发送广播消息的频率。
可选的,在所述对所述广播发送者的广播消息的发送进行控制之后,还包括:解除对所述广播发送者进行广播消息发送的控制。
可选的,解除对所述广播发送者进行广播消息发送的控制,包括:
根据当前系统运行状况,解除对所述广播发送者进行广播消息发送的控制;或者
经预设解除时长后,解除对所述广播发送者进行广播消息发送的控制。
可选的,所述预设解除时长由所述当前系统的实时负载以及终端设备的当前剩余电量确定。
第四方面,需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读的介质中,该介质可以包括但不限于:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。例如:
一种存储介质,所述存储介质存储多条指令,所述多条指令适于在计算机上运行时,使得所述计算机执行如上所述的任意一个实施例的控制广播发送者发送广播消息的方法。
注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。

Claims (20)

  1. 一种控制广播发送者发送广播消息的方法,其特征在于,包括:
    对系统中广播发送者发送广播消息的次数进行记录;
    监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定;
    依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
  2. 根据权利要求1所述的方法,其特征在于,所述依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制包括:
    如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则禁止所述广播发送者进行广播消息的发送;
    如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则对所述广播发送者发送广播消息的数量进行限制;
    如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则在预设时间内,禁止所述广播发送者进行广播消息的发送。
  3. 根据权利要求1所述的方法,其特征在于,在所述监测到广播消息发送指令后之后,还包括:
    遍历和所述广播消息发送指令对应的广播队列,确定所述广播队列中的广播发送者发送广播消息的频率;
    依据确定出的所述广播队列中的广播发送者发送广播消息的频率进行广播消息的发送控制。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定包括:
    每隔预设时间,对在所述预设时间内记录的发送广播消息的次数进行统计,确定在所述预设时间内发送广播消息的频率。
  5. 根据权利要求4所述的方法,其特征在于,在所述对所述广播发送者的广播消息的发送进行控制之后,还包括:
    解除对所述广播发送者进行广播消息发送的控制。
  6. 根据权利要求5所述的方法,其特征在于,所述解除对所述广播发送者进行广播消息发送的控制,包括:
    根据当前系统运行状况,解除对所述广播发送者进行广播消息发送的控制;或者
    经预设解除时长后,解除对所述广播发送者进行广播消息发送的控制。
  7. 根据权利要求6所述的方法,其特征在于,所述预设解除时长由所述当前系统的实时负载以及终端设备的当前剩余电量确定。
  8. 一种控制广播发送者发送广播消息的装置,其特征在于,包括:
    记录模块,用于对系统中广播发送者发送广播消息的次数进行记录;
    频率确定模块,用于监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定;
    控制模块,用于依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
  9. 根据权利要求8所述的装置,其特征在于,所述控制模块具体用于:
    如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则禁止所述广播发送者进行广播消息的发送;
    如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则对所述广播发送者发送广播消息的数量进行限制;
    如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则在预设时间内,禁止所述广播发送者进行广播消息的发送。
  10. 根据权利要求8所述的装置,其特征在于,还包括:
    遍历模块,用于在所述监测到广播消息发送指令后之后,遍历和所述广播消息发送指令对应的广播队列,确定所述广播队列中的广播发送者发送广播消息的频率;
    所述控制模块还用于依据确定出的所述广播队列中的广播发送者发送广播消息的频率进行广播消息的发送控制。
  11. 根据权利要求8-10中任一项所述的装置,其特征在于,所述频率确定模块具体用于:
    每隔预设时间,对在所述预设时间内记录的发送广播消息的次数进行统计,确定在所述预设时间内发送广播消息的频率。
  12. 根据权利要求11所述的装置,其特征在于,所述控制模块还用于:
    在所述对所述广播发送者的广播消息的发送进行控制之后,解除对所述广播发送者进行广播消息发送的控制。
  13. 一种终端设备,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现以下步骤:
    对系统中广播发送者发送广播消息的次数进行记录;
    监测到广播消息发送指令后,确定和所述广播消息发送指令对应的广播发送者发送广播消息的频率,所述发送广播消息的频率由在预设时间内发送广播消息的次数确定;
    依据确定出的所述广播发送者发送广播消息的频率,对所述广播发送者的广播消息的发送进行控制。
  14. 根据权利要求13所述的终端设备,其特征在于,所述处理器执行所述计算机程序时还可以实现以下步骤:
    如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则禁止所述广播发送者进行广播消息的发送;
    如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则对所述广播发送者发送广播消息的数量进行限制;
    如果确定出的所述广播发送者发送广播消息的频率大于预设频率,则在预设时间内,禁止所述广播发送者进行广播消息的发送。
  15. 根据权利要求13所述的终端设备,其特征在于,所述处理器执行所述计算机程序时还可以实现以下步骤:
    遍历和所述广播消息发送指令对应的广播队列,确定所述广播队列中的广播发送者发送广播消息的频率;
    依据确定出的所述广播队列中的广播发送者发送广播消息的频率进行广播消息的发送控制。
  16. 根据权利要求13-15所述的终端设备,其特征在于,所述处理器执行所述计算机程序时还可以实现以下步骤:
    每隔预设时间,对在所述预设时间内记录的发送广播消息的次数进行统计,确定在所述预设时间内发送广播消息的频率。
  17. 根据权利要求16所述的终端设备,其特征在于,在所述对所述广播发送者的广播消息的发送进行控制之后,所述处理器执行所述计算机程序时还可以实现以下步骤:
    解除对所述广播发送者进行广播消息发送的控制。
  18. 根据权利要求17所述的终端设备,其特征在于,所述处理器执行所述计算机程序时还可以实现以下步骤:
    根据当前系统运行状况,解除对所述广播发送者进行广播消息发送的控制;或者
    经预设解除时长后,解除对所述广播发送者进行广播消息发送的控制。
  19. 根据权利要求18所述的终端设备,其特征在于,所述预设解除时长由所述当前系统的实时负载以及终端设备的当前剩余电量确定。
  20. 一种存储介质,其特征在于,所述存储介质存储多条指令,所述多条指令适于在计算机上运行时,使得所述计算机执行如权利要求1至7任意一项所述的控制广播发送者发送广播消息的方法。
PCT/CN2017/107189 2017-03-10 2017-10-21 控制广播发送者发送广播消息的方法、装置、终端设备及存储介质 Ceased WO2018161596A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710141274.6A CN106899943B (zh) 2017-03-10 2017-03-10 控制广播发送者发送广播消息的方法、装置和终端设备
CN201710141274.6 2017-03-10

Publications (1)

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

Family

ID=59192674

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/107189 Ceased WO2018161596A1 (zh) 2017-03-10 2017-10-21 控制广播发送者发送广播消息的方法、装置、终端设备及存储介质

Country Status (2)

Country Link
CN (1) CN106899943B (zh)
WO (1) WO2018161596A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106899943B (zh) * 2017-03-10 2019-12-06 Oppo广东移动通信有限公司 控制广播发送者发送广播消息的方法、装置和终端设备
CN111031105B (zh) * 2019-11-26 2022-06-28 北京百度网讯科技有限公司 自动驾驶中消息频率的统计方法、装置、设备及存储介质
CN116017707A (zh) * 2022-12-27 2023-04-25 广东省南方航天港科技有限公司 一种突发数据的发送方法、装置、设备及介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100262651A1 (en) * 2009-04-09 2010-10-14 Samsung Electronics Co., Ltd. Method to prevent server overload for broadcast protocols by adaptively applying prescribed response behavior profiles
CN105682053A (zh) * 2016-03-02 2016-06-15 北京小米移动软件有限公司 控制广播频率的方法、装置、蓝牙设备及终端
CN106412091A (zh) * 2016-10-25 2017-02-15 广东欧珀移动通信有限公司 数据传输的控制方法、装置及系统
CN106851014A (zh) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 调整广播消息队列的方法、装置及终端
CN106844069A (zh) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 调整广播消息队列的方法、装置及终端
CN106878957A (zh) * 2017-03-10 2017-06-20 广东欧珀移动通信有限公司 广播队列生成方法、装置和终端设备
CN106899943A (zh) * 2017-03-10 2017-06-27 广东欧珀移动通信有限公司 控制广播发送者发送广播消息的方法、装置和终端设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595547B (zh) * 2013-11-15 2016-07-13 北京奇虎科技有限公司 智能设备的广播拦截方法和装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100262651A1 (en) * 2009-04-09 2010-10-14 Samsung Electronics Co., Ltd. Method to prevent server overload for broadcast protocols by adaptively applying prescribed response behavior profiles
CN105682053A (zh) * 2016-03-02 2016-06-15 北京小米移动软件有限公司 控制广播频率的方法、装置、蓝牙设备及终端
CN106412091A (zh) * 2016-10-25 2017-02-15 广东欧珀移动通信有限公司 数据传输的控制方法、装置及系统
CN106851014A (zh) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 调整广播消息队列的方法、装置及终端
CN106844069A (zh) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 调整广播消息队列的方法、装置及终端
CN106878957A (zh) * 2017-03-10 2017-06-20 广东欧珀移动通信有限公司 广播队列生成方法、装置和终端设备
CN106899943A (zh) * 2017-03-10 2017-06-27 广东欧珀移动通信有限公司 控制广播发送者发送广播消息的方法、装置和终端设备

Also Published As

Publication number Publication date
CN106899943A (zh) 2017-06-27
CN106899943B (zh) 2019-12-06

Similar Documents

Publication Publication Date Title
WO2018161593A1 (zh) 广播处理方法、装置、存储介质和终端设备
WO2018076861A1 (zh) 数据传输的控制方法、装置、存储介质、服务器及系统
WO2018076867A1 (zh) 数据备份的删除方法、装置、系统、存储介质和服务器
WO2018161575A1 (zh) 调整广播消息队列的方法、装置、存储介质及终端
WO2017213358A1 (en) Electronic device and method for activating applications therefor
WO2018076841A1 (zh) 数据分享方法、装置、存储介质及服务器
WO2018161580A1 (zh) 广播的控制方法、装置、存储介质及电子设备
WO2018021678A1 (en) Electronic device and method for operating the same
WO2018161585A1 (zh) 电子设备帧率的控制方法、装置、存储介质及电子设备
WO2018010507A1 (zh) 终端系统的唤醒监控方法、存储介质、终端及电子设备
WO2018076889A1 (zh) 数据备份的方法、装置、系统、存储介质及服务器
WO2017206878A1 (zh) 一种基于唤醒锁的处理方法、装置、存储介质及电子设备
WO2017206862A1 (zh) 一种基于亮屏锁的处理方法、装置、存储介质及电子设备
WO2018076819A1 (zh) 数据的上传方法、装置、存储介质、电子设备及系统
WO2018161601A1 (zh) 屏幕背光调节方法、装置、存储介质及电子设备
WO2018233352A1 (zh) 数据传输方法、装置、终端以及计算机可读存储介质
WO2018171534A1 (zh) 基于移动终端的双摄像头供电控制方法、系统及移动终端
WO2018161576A1 (zh) 一种广播的控制方法、装置、存储介质及移动终端
WO2018161581A1 (zh) 控制广播发送的方法、装置、存储介质及电子设备
WO2018161588A1 (zh) 广播接收者队列调整方法、装置、存储介质及电子设备
WO2018076890A1 (zh) 数据备份的方法、装置、存储介质、服务器及系统
WO2018161591A1 (zh) 切换背景灰阶进行省电的方法、装置、存储介质及电子设备
WO2018161595A1 (zh) 广播接收器的注册方法、装置、终端设备及存储介质
WO2018161596A1 (zh) 控制广播发送者发送广播消息的方法、装置、终端设备及存储介质
WO2016192589A1 (zh) 一种信息传输方法、装置及系统

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: 17900091

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17900091

Country of ref document: EP

Kind code of ref document: A1