WO2018161574A1 - 发送开机广播的方法、装置、存储介质及终端 - Google Patents

发送开机广播的方法、装置、存储介质及终端 Download PDF

Info

Publication number
WO2018161574A1
WO2018161574A1 PCT/CN2017/106606 CN2017106606W WO2018161574A1 WO 2018161574 A1 WO2018161574 A1 WO 2018161574A1 CN 2017106606 W CN2017106606 W CN 2017106606W WO 2018161574 A1 WO2018161574 A1 WO 2018161574A1
Authority
WO
WIPO (PCT)
Prior art keywords
broadcast
completion
boot
phase
broadcast message
Prior art date
Application number
PCT/CN2017/106606
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 广东欧珀移动通信有限公司
Publication of WO2018161574A1 publication Critical patent/WO2018161574A1/zh

Links

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

Definitions

  • the embodiments of the present invention relate to system broadcast technologies, and in particular, to a method, an apparatus, a storage medium, and a terminal for transmitting a boot broadcast.
  • Android (Android) system is a widely used operating system for mobile phones and other terminals. In the Android system, there are many different applications. In order to quickly transfer information in different applications, the Android system uses the broadcast mechanism to implement. When there are messages to notify different applications, the message is sent to the broadcaster. Different apps.
  • a broadcast message of the boot completion is sent, and an application or module that receives the broadcast completion broadcast message is registered, and after the broadcast is sent, the system automatically starts up to broadcast the broadcast. Process it. Since in the Android system, many modules and applications are registered to receive the broadcast message of the boot completion, when the boot message is issued after the boot is completed, the modules and applications that register to receive the broadcast message are simultaneously started, resulting in The system performance overhead is very large, causing the system to get stuck.
  • the embodiment of the present application provides a method, an apparatus, a storage medium, and a terminal for transmitting a boot broadcast, which can reduce system performance overhead and avoid system stall.
  • an embodiment of the present application provides a method for sending a boot broadcast, where the method includes:
  • the broadcast system completes the broadcast message issued by the monitoring system
  • the embodiment of the present application further provides an apparatus for sending a boot broadcast, where the apparatus includes:
  • the boot broadcast monitoring module is configured to monitor the system to complete the broadcast message after the boot initialization phase is completed;
  • the boot phase identification module is configured to identify a boot completion phase currently in operation when the broadcast completion broadcast message is monitored;
  • a broadcast receiver determining module configured to determine, according to the currently completed power-on completion phase, a corresponding broadcast receiver that receives the power-on completion broadcast message
  • a broadcast message sending module configured to send the power-on completion broadcast message to the broadcast receiver.
  • the embodiment of the present application further provides a storage medium, where the computer program stores a computer program, and when the computer program runs on a computer, the computer executes the method for sending the boot broadcast.
  • an embodiment of the present application further provides a terminal, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the following steps:
  • the broadcast system completes the broadcast message issued by the monitoring system
  • the embodiment of the present application provides a method, an apparatus, a storage medium, and a terminal for transmitting a boot broadcast, which can reduce system performance overhead and avoid system stall.
  • FIG. 1 is a flowchart of a method for sending a boot broadcast according to an embodiment of the present application
  • FIG. 2 is a flowchart of a method for sending a boot broadcast according to an embodiment of the present application
  • FIG. 3 is a flowchart of a method for sending a boot broadcast according to an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of an apparatus for transmitting a boot broadcast according to an embodiment of the present application
  • FIG. 5 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • An embodiment of the present application provides a method for sending a boot broadcast, where the method includes:
  • the broadcast system completes the broadcast message issued by the monitoring system
  • determining, according to the current power-on completion phase, the corresponding broadcast recipient that receives the power-on completion broadcast message includes:
  • the method further includes: after the step of monitoring the system to start the broadcast message after the boot initialization phase is completed, the method further includes:
  • determining, according to the current power-on completion phase, the corresponding broadcast recipient that receives the power-on completion broadcast message includes:
  • determining, according to the application attribute, a corresponding broadcast recipient that receives the power-on completion broadcast message includes:
  • the broadcast receiver having the application attribute among the currently registered broadcast recipients is a corresponding broadcast receiver that receives the power-on completion broadcast message.
  • the method further includes: after the step of monitoring the system to start the broadcast message after the boot initialization phase is completed, the method further includes:
  • the method further includes:
  • the broadcast recipient is activated.
  • the boot completion phase includes a system service initialization completion phase, a desktop and lock screen initialization completion phase, or an idle phase after initialization completion.
  • FIG. 1 is a flowchart of a method for transmitting a boot broadcast provided by an embodiment of the present application.
  • the present embodiment is applicable to a scenario in which a boot broadcast is sent in stages, and the method may be performed by a device that sends a boot broadcast, where the device may be The software and/or the hardware is implemented.
  • the device can be integrated into the terminal, and the terminal can be a smart phone, a tablet computer, etc., and the method includes the following steps:
  • Step 110 After the boot initialization phase is completed, the broadcast system completes the broadcast message sent by the monitoring system.
  • the broadcast mechanism is essentially a communication method between components in the operating system of the terminal, and is a mechanism widely used to transmit messages between applications.
  • a broadcast message is sent under the Android system of the terminal.
  • the broadcast message can be a variety of event message data generated in the operating system. For example, if a text message is sent or a phone call is made, the broadcast will be sent.
  • an application receives the broadcast, it can perform corresponding processing.
  • the broadcast sender can be system and application software.
  • the application software may be a third-party application software installed on a terminal such as a mobile phone or an application provided by the system.
  • the third-party application software installed on the terminal may include a WeChat client, a QQ client, a Taobao client, and an Alipay client.
  • the system's own applications can include calendars, clocks, weather, and notes.
  • the broadcast message may be a system broadcast and an application broadcast, wherein the system broadcast may include a bright screen broadcast, a video screen broadcast, an unlock broadcast, a network state change broadcast, a Bluetooth state change broadcast, a switching language broadcast, a switching theme broadcast, etc., and the application broadcast may be A broadcast made by the application software.
  • the power-on initialization phase is the stage of receiving the power-on command to supply power and prepare for the wake-up of the system.
  • the broadcast management module such as ActivityManagerService
  • the broadcast management module in the terminal can monitor the dynamics of the system to detect whether the system issues a boot-up completion broadcast message.
  • ActivityManagerService plays the role of broadcast center in the broadcast mechanism of Android system, and is responsible for all broadcast registration and release operations in the system.
  • the registration of broadcast refers to the process of registering the broadcast receiver to ActivityManagerService.
  • the broadcast release includes the broadcast sender sending the broadcast to the ActivityManagerService.
  • the ActivityManagerService checks which broadcast receivers subscribe to the broadcast in its own registration center, and then sends the broadcast to the broadcast receivers one by one.
  • the broadcast system completes the broadcast message sent by the monitoring system to monitor whether the system will send the broadcast message to the ActivityManagerService through the ActivityManagerService.
  • the system will send the broadcast message to the ActivityManagerService, and then determine the system to send the alarm.
  • the boot completes the broadcast message.
  • Step 120 When the broadcast completion broadcast message is monitored, the current startup completion phase is identified.
  • the booting phase is the stage in which the system application or the third-party application is started after the boot initialization phase is completed. It can be divided into multiple phases as needed, and the corresponding application is launched in the corresponding phase.
  • the boot completion phase includes a system service initialization completion phase, a desktop and lock screen initialization completion phase, or an idle phase after initialization completion.
  • the broadcast receiver ie, the system application to be started or the third-party application
  • receives the boot completion broadcast message corresponding to the boot completion phase may be preset.
  • the broadcast completion broadcast message is monitored, it is queried which applications in the registration center register to receive the power-on completion broadcast message, and identify the current startup completion phase. For example, each boot completion phase can preset a corresponding time, so that it can recognize the current boot completion phase from the time when the broadcast to the completion of the broadcast message is completed.
  • the broadcast completion message is monitored, the first boot completion phase is sent, and after the boot completion broadcast message that needs to be sent in the first boot completion phase is sent, the second boot completion phase is entered, and the second boot is completed after the send is completed.
  • the stage enters the third boot completion phase, and so on, until all the boot completion broadcast messages that need to be sent are sent.
  • Step 130 Determine, according to the currently completed power-on completion phase, a corresponding broadcast receiver that receives the power-on completion broadcast message.
  • the corresponding broadcast receiver that receives the boot completion broadcast message can be determined.
  • the system service initialization completion phase mainly starts the system service related application, and then the boot completion broadcast message is sent to these applications;
  • the desktop and lock screen initialization completion phase mainly starts the desktop and lock screen related applications, then The boot completion broadcast message is sent to these applications; after the initialization is completed, the idle phase mainly starts the third-party application, and then the boot completion broadcast message is sent to these applications.
  • the current startup completion phase is identified as the system service initialization completion phase, and the power-on completion broadcast message is sent to the application (such as the phone application module, which is started at this stage, The status bar module and the system setting module, etc.; the booting completion broadcast message of the system service initialization stage enters the desktop and lock screen initialization completion stage, and then the boot completion broadcast message is sent to the corresponding application started at this stage (such as contacts, calendars, etc.; desktop and lock screen initialization completion stage after the completion of the broadcast message is sent to the idle phase after initialization is completed, then the start completion broadcast message is sent to the corresponding application launched at this stage (such as WeChat , mail, etc.).
  • the application such as the phone application module, which is started at this stage, The status bar module and the system setting module, etc.
  • the booting completion broadcast message of the system service initialization stage enters the desktop and lock screen initialization completion stage, and then the boot completion broadcast message is sent to the corresponding application started at this stage (such as contacts, calendars, etc.;
  • Step 140 Send the power-on completion broadcast message to the broadcast receiver.
  • the power-on completion broadcast message is sent to the corresponding broadcast receiver.
  • the broadcast system completes the broadcast message sent by the monitoring system, and when the broadcast completion message is monitored, the current startup completion phase is identified, according to the current startup completion phase. Determining a corresponding broadcast receiver that receives the power-on completion broadcast message, and sending the power-on completion broadcast message to the broadcast receiver, and solving the problem that the broadcast receiver is sent to all broadcast receivers at the same time, causing the broadcast receiver to be in a short time. Simultaneous startup causes a problem of large system performance overhead. By sending the boot broadcast message to the corresponding broadcast receiver in stages, the system performance overhead is reduced, and the system stall is avoided.
  • the method further includes:
  • the broadcast recipient is activated.
  • the broadcast receiver After the broadcast completion message is sent to the broadcast receiver corresponding to the currently completed power-on completion phase, the broadcast receiver is activated, that is, different broadcast receivers can be started in stages, and all broadcast receivers are prevented from being simultaneously activated. Further reducing system performance overhead.
  • FIG. 2 is a flowchart of a method for sending a boot broadcast according to an embodiment of the present application.
  • the method in this implementation includes the following steps:
  • Step 210 After the boot initialization phase is completed, the broadcast system completes the broadcast message sent by the monitoring system.
  • Step 220 When the broadcast completion message is monitored, the current startup completion phase is identified.
  • Step 230 Acquire a correspondence between a pre-established boot completion phase and a module startup priority.
  • the module startup priority defines the priority of the application to be started during the boot completion phase.
  • the number of stages of the module startup priority is greater than or equal to the number of stages in the startup completion phase, so that the application corresponding to the module startup priority is started in the corresponding startup completion phase.
  • the priority of the application to be started can be divided into three different module startup priorities according to the importance degree of the boot-started application, thereby three different modules.
  • the startup priority corresponds to three different startup completion phases, that is, the module startup priority corresponds to the startup completion phase.
  • the correspondence between the boot completion phase and the module startup priority may be established in advance, and the module startup priority of the application to be started in the boot completion phase may be set.
  • Step 240 Determine, according to the current startup completion phase and the corresponding relationship, a module startup priority corresponding to the current startup completion phase.
  • the module startup priority corresponding to the current startup completion phase may be determined by combining the pre-established correspondence between the boot completion phase and the module startup priority.
  • Step 250 Determine, according to the module startup priority, a corresponding broadcast receiver that receives the boot completion broadcast message.
  • the query has the module startup
  • the priority broadcast receiver determines the broadcast receiver of the receiving start completion broadcast message corresponding to the module startup priority.
  • the corresponding relationship between the boot completion phase and the module startup priority is established in advance, and after determining the current startup completion phase, the corresponding corresponding relationship is determined to determine the module corresponding to the current startup completion phase.
  • the startup priority is determined, and the corresponding broadcast receiver that receives the broadcast completion broadcast message is determined according to the module startup priority, and the speed of the corresponding broadcast receiver is determined in the corresponding startup completion phase, thereby speeding up the processing speed of starting the broadcast message.
  • FIG. 3 is a flowchart of a method for sending a boot broadcast according to an embodiment of the present application.
  • the method in this implementation includes the following steps:
  • Step 310 After the boot initialization phase is completed, the broadcast system completes the broadcast message sent by the monitoring system.
  • Step 320 When the broadcast completion broadcast message is monitored, the current startup completion phase is identified.
  • Step 330 Acquire a correspondence between the pre-established power-on completion phase and the application attribute of the broadcast receiver that receives the power-on completion broadcast message.
  • the application attribute is an attribute of an application to be started in the startup completion stage, such as an important system application (such as a telephone application module, a status bar module, a system setting, etc.), a system basic application (such as a contact, a calendar, etc.), Three-party applications (such as WeChat, mail, etc.).
  • an important system application such as a telephone application module, a status bar module, a system setting, etc.
  • a system basic application such as a contact, a calendar, etc.
  • Three-party applications such as WeChat, mail, etc.
  • the correspondence between the boot completion phase and the application attribute of the broadcast receiver receiving the boot completion broadcast message may be established in advance, and the application attribute of the application to be started in the boot completion phase may be clarified.
  • Step 340 Determine, according to the current startup completion phase and the corresponding relationship, an application attribute corresponding to the current startup completion phase.
  • the application relationship corresponding to the pre-established boot completion phase and the application attribute may be determined to determine the application attribute corresponding to the current startup completion phase.
  • Step 350 Determine, according to the application attribute, a corresponding broadcast receiver that receives the boot completion broadcast message.
  • a broadcast receiver having the application attribute as a broadcast receiver that receives the power-on completion broadcast message corresponding to the current power-on completion phase, among all broadcast receivers that receive the broadcast message.
  • determining, according to the application attribute, a corresponding broadcast recipient that receives the power-on completion broadcast message includes:
  • the broadcast receiver having the application attribute among the currently registered broadcast recipients is a corresponding broadcast receiver that receives the power-on completion broadcast message.
  • the broadcast receivers that are currently registered to receive the power-on completion broadcast message may be counted when the current power-on completion phase is determined, and the broadcast receivers having the application attributes among the broadcast receivers are corresponding to the current startup completion phase.
  • the receiving receiver of the broadcast message completes the broadcast message.
  • the application attribute corresponding to the completion phase determines the corresponding broadcast receiver that receives the boot completion broadcast message according to the application attribute, and speeds up determining the speed of the corresponding broadcast receiver in the corresponding boot completion stage, thereby speeding up the processing speed of starting the broadcast message.
  • An embodiment of the present application provides an apparatus for sending a boot broadcast, where the apparatus includes:
  • the boot broadcast monitoring module is configured to monitor the system to complete the broadcast message after the boot initialization phase is completed;
  • the boot phase identification module is configured to identify a boot completion phase currently in operation when the broadcast completion broadcast message is monitored;
  • a broadcast receiver determining module configured to determine, according to the currently completed power-on completion phase, a corresponding broadcast receiver that receives the power-on completion broadcast message
  • a broadcast message sending module configured to send the power-on completion broadcast message to the broadcast receiver.
  • the broadcast recipient determining module comprises:
  • a first correspondence acquiring unit configured to acquire a correspondence between a pre-established boot completion phase and a module startup priority
  • a startup priority determining unit configured to determine, according to the current startup completion phase and the corresponding relationship, a module startup priority corresponding to a current startup completion phase
  • the first broadcast receiver determining unit is configured to determine, according to the module startup priority, a corresponding broadcast receiver that receives the power-on completion broadcast message.
  • the broadcast recipient determining module comprises:
  • a second correspondence relationship obtaining unit configured to acquire a correspondence between a pre-established power-on completion phase and an application attribute of a broadcast receiver that receives the power-on completion broadcast message
  • An application attribute determining unit configured to determine an application attribute corresponding to the current startup completion stage according to the current startup completion phase and the corresponding relationship
  • the second broadcast receiver determining unit is configured to determine, according to the application attribute, a corresponding broadcast recipient that receives the power-on completion broadcast message.
  • the second broadcast receiver determining unit is specifically configured to:
  • the broadcast receiver having the application attribute among the currently registered broadcast recipients is a corresponding broadcast receiver that receives the power-on completion broadcast message.
  • the apparatus further includes:
  • the broadcast recipient activation module is configured to activate the broadcast recipient after transmitting the boot completion broadcast message to the broadcast recipient.
  • the boot completion phase includes a system service initialization completion phase, a desktop and lock screen initialization completion phase, or an idle phase after initialization completion.
  • FIG. 4 is a schematic structural diagram of an apparatus for transmitting a boot broadcast according to an embodiment of the present disclosure.
  • the apparatus for transmitting a boot broadcast according to the present embodiment includes: a boot broadcast monitoring module 410, a boot phase identification module 420, The broadcast recipient determination module 430 and the broadcast message transmission module 440.
  • the boot broadcast monitoring module 410 is configured to: after the boot initialization phase is completed, the broadcast system completes the broadcast message sent by the monitoring system;
  • the booting phase identification module 420 is configured to identify a booting completion phase currently in operation when the booting completion broadcast message is monitored;
  • the broadcast receiver determining module 430 is configured to determine, according to the currently completed power-on completion phase, a corresponding broadcast receiver that receives the power-on completion broadcast message;
  • the broadcast message sending module 440 is configured to send the power-on completion broadcast message to the broadcast receiver.
  • the broadcast recipient determining module comprises:
  • a first correspondence acquiring unit configured to acquire a correspondence between a pre-established boot completion phase and a module startup priority
  • a startup priority determining unit configured to determine, according to the current startup completion phase and the corresponding relationship, a module startup priority corresponding to a current startup completion phase
  • the first broadcast receiver determining unit is configured to determine, according to the module startup priority, a corresponding broadcast receiver that receives the power-on completion broadcast message.
  • the broadcast recipient determining module comprises:
  • a second correspondence relationship obtaining unit configured to acquire a correspondence between a pre-established power-on completion phase and an application attribute of a broadcast receiver that receives the power-on completion broadcast message
  • An application attribute determining unit configured to determine an application attribute corresponding to the current startup completion stage according to the current startup completion phase and the corresponding relationship
  • the second broadcast receiver determining unit is configured to determine, according to the application attribute, a corresponding broadcast recipient that receives the power-on completion broadcast message.
  • the second broadcast receiver determining unit is specifically configured to:
  • the broadcast receiver having the application attribute among the currently registered broadcast recipients is a corresponding broadcast receiver that receives the power-on completion broadcast message.
  • the apparatus further includes:
  • the broadcast recipient activation module is configured to activate the broadcast recipient after transmitting the boot completion broadcast message to the broadcast recipient.
  • the boot completion phase includes a system service initialization completion phase, a desktop and lock screen initialization completion phase, or an idle phase after initialization completion.
  • the foregoing apparatus for transmitting a boot broadcast may perform the method for transmitting a boot broadcast provided by any embodiment of the present application, and has a function module and a beneficial effect corresponding to the execution method.
  • the foregoing apparatus for transmitting a boot broadcast may perform the method for transmitting a boot broadcast provided by any embodiment of the present application, and has a function module and a beneficial effect corresponding to the execution method.
  • FIG. 5 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • the terminal may include: a casing (not shown), a memory 501, and a central processing unit (Central). Processing Unit, CPU) 502 (also referred to as a processor, hereinafter referred to as CPU), a computer program, a circuit board (not shown), and a power supply circuit stored on the memory 501 and operable on the processor 502 (not shown) Out).
  • CPU Central processing Unit
  • the circuit board is disposed inside a space enclosed by the casing; the CPU 502 and the memory 501 are disposed on the circuit board; and the power circuit is configured to supply power to each circuit or device of the terminal;
  • the memory 501 is configured to store a computer program executable on a processor; the CPU 402 reads and executes a computer program stored in the memory 501.
  • the terminal further includes: a 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.
  • RF Radio
  • the illustrated terminal 500 is merely one example of a terminal, and that the terminal 500 may have more or fewer components than those shown in the figures, two or more components may be combined, or may 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 uses a mobile 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 (corresponding to the screen in the above embodiment) and other input/control devices 510, to peripherals 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 provided by the embodiment of the present application implements the following steps when executing the computer program stored in the memory 501:
  • the broadcast system completes the broadcast message issued by the monitoring system
  • the foregoing terminal may perform the method for sending a boot broadcast provided by any embodiment of the present application, and has a function module and a beneficial effect corresponding to the method for transmitting a boot broadcast provided by any embodiment.
  • the embodiment of the present application further provides a storage medium, where the computer program stores a computer program, and when the computer program runs on the computer, the computer executes the method for transmitting the boot broadcast described in any of the above embodiments.
  • Storage media may include, but is not limited to, read only memory (ROM, Read) Only Memory), Random Access Memory (RAM), disk or optical disk.

Landscapes

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

Abstract

一种发送开机广播的方法、装置及终端。该方法包括:在开机初始化阶段完成后,监听系统发出的开机完成广播消息(110);在监听到开机完成广播消息时,识别当前所处的开机完成阶段(120);根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者(130);将所述开机完成广播消息发送给所述广播接收者(140)。

Description

发送开机广播的方法、装置、存储介质及终端
本申请要求于2017年3月10日提交中国专利局、申请号为201710144285.X、发明名称为“发送开机广播的方法、装置及终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及系统广播技术,尤其涉及一种发送开机广播的方法、装置、存储介质及终端。
背景技术
安卓(Android)系统是目前应用较为广泛的一种手机等终端的操作系统。Android系统中,有很多不同的应用程序,为了在不同的应用程序中快速的进行信息传递,Android系统利用广播机制来实现,有消息要通知不同的应用程序时,就通过广播将这个消息发送给不同的应用程序。
Android系统开机初始化阶段完成后,会发送一个开机完成的广播消息,注册了对这个开机完成广播消息进行接收的应用程序或模块,在这个广播发送之后,会被系统自动的启动起来以便对这个广播进行处理。由于在Android系统中,有很多模块及应用程序都注册了接收这个开机完成的广播消息,当开机完成发出开机完成的广播消息后,这些注册接收该广播消息的模块及应用程序会同时启动,导致系统性能开销非常大,引起系统卡顿。
技术问题
本申请实施例提供一种发送开机广播的方法、装置、存储介质及终端,可以减少系统性能开销,避免系统卡顿。
技术解决方案
第一方面,本申请实施例提供了一种发送开机广播的方法,所述方法包括:
在开机初始化阶段完成后,监听系统发出的开机完成广播消息;
在监听到开机完成广播消息时,识别当前所处的开机完成阶段;
根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者;
将所述开机完成广播消息发送给所述广播接收者。
第二方面,本申请实施例还提供了一种发送开机广播的装置,所述装置包括:
开机广播监听模块,用于在开机初始化阶段完成后,监听系统发出的开机完成广播消息;
开机阶段识别模块,用于在监听到开机完成广播消息时,识别当前所处的开机完成阶段;
广播接收者确定模块,用于根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者;
广播消息发送模块,用于将所述开机完成广播消息发送给所述广播接收者。
第三方面,本申请实施例还提供了一种存储介质,所述存储介质中存储有计算机程序,当所述计算机程序在计算机上运行时,所述计算机执行上述发送开机广播的方法
第四方面,本申请实施例还提供了一种终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:
在开机初始化阶段完成后,监听系统发出的开机完成广播消息;
在监听到开机完成广播消息时,识别当前所处的开机完成阶段;
根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者;
将所述开机完成广播消息发送给所述广播接收者。
有益效果
本申请实施例提供一种发送开机广播的方法、装置、存储介质及终端,可以减少系统性能开销,避免系统卡顿。
附图说明
图1是本申请实施例提供的一种发送开机广播的方法的流程图;
图2是本申请一个实施例提供的一种发送开机广播的方法的流程图;
图3是本申请一个实施例提供的一种发送开机广播的方法的流程图;
图4是本申请实施例提供的一种发送开机广播的装置的结构示意图;
图5为本申请实施例提供的一种终端的结构示意图。
本发明的最佳实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部内容。
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
本申请实施例提供一种发送开机广播的方法,所述方法包括:
在开机初始化阶段完成后,监听系统发出的开机完成广播消息;
在监听到开机完成广播消息时,识别当前所处的开机完成阶段;
根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者;
将所述开机完成广播消息发送给所述广播接收者。
在一些实施例中,根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者,包括:
获取预先建立的开机完成阶段与模块启动优先级的对应关系;
根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的模块启动优先级;
根据所述模块启动优先级,确定对应的接收开机完成广播消息的广播接收者。
在一些实施例中,所述在开机初始化阶段完成后,监听系统发出的开机完成广播消息的步骤前,所述方法还包括:
预先建立开机完成阶段与模块启动优先级的对应关系。
在一些实施例中,根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者,包括:
获取预先建立的开机完成阶段与接收开机完成广播消息的广播接收者的应用属性的对应关系;
根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的应用属性;
根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者。
在一些实施例中,根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者,包括:
统计当前注册了接收开机完成广播消息的广播接收者;
确定当前注册的广播接收者中具有所述应用属性的广播接收者为对应的接收开机完成广播消息的广播接收者。
在一些实施例中,所述在开机初始化阶段完成后,监听系统发出的开机完成广播消息的步骤前,所述方法还包括:
预先建立开机完成阶段与接收开机完成广播消息的广播接收者的应用属性的对应关系。
在一些实施例中,在将所述开机完成广播消息发送给所述广播接收者之后,所述方法还包括:
启动所述广播接收者。
在一些实施例中,所述开机完成阶段包括系统服务初始化完成阶段、桌面和锁屏初始化完成阶段或初始化完成后空闲阶段。
图1是本申请实施例提供的一种发送开机广播的方法的流程图,本实施例可适用于分阶段发送开机广播的情况,该方法可以由发送开机广播的装置来执行,其中该装置可由软件和/或硬件实现,该装置可集成于终端中,该终端可以是智能手机、平板电脑等,该方法包括如下步骤:
步骤110,在开机初始化阶段完成后,监听系统发出的开机完成广播消息。
其中,广播机制本质上是在终端的操作系统中一种组件间的通讯方式,是一种广泛运用在应用程序之间传输消息的机制。例如在终端的安卓系统下,有一些操作完成以后,会发送广播消息。广播消息可以是操作系统中产生的各种各样的事件消息数据,比如说发出一条短信或打出一个电话,都会发送广播,当某个应用程序接收了这个广播时,就可以做出相应的处理。广播发送者可以是系统和应用程序软件。应用程序软件可以是安装于手机等终端的第三方应用软件或者系统自带的应用程序,例如:安装于终端的第三方应用软件可以包括微信客户端、QQ客户端、淘宝客户端和支付宝客户端等,系统自带的应用程序可以包括日历、时钟、天气和便签等。广播消息可以是系统广播和应用广播,其中,系统广播可以包括亮屏广播、息屏广播、解锁广播、网络状态变化广播、蓝牙状态变化广播、切换语言广播、切换主题广播等,应用广播可以是由应用程序软件发出的广播。
开机初始化阶段是接收到开机指令进行供电并做好准备工作唤醒系统的阶段。在开机初始化阶段完成后,可以通过终端中的广播管理模块(如ActivityManagerService)监听系统的动态,检测系统是否发出开机完成广播消息。其中,ActivityManagerService在Android系统的广播机制中扮演着广播中心的角色,负责系统中所有广播的注册和发布操作,其中,广播的注册是指应用程序把广播接收器注册到ActivityManagerService的过程。广播的发布包括广播发送者将广播发送到ActivityManagerService,ActivityManagerService接收到这个广播后在自己的注册中心查看有哪些广播接收器订阅了该广播,然后把这个广播逐一发送到这些广播接收器中。在Android系统中,监听系统发出的开机完成广播消息即通过ActivityManagerService来监听系统是否将开机完成广播消息发送到ActivityManagerService,当通过ActivityManagerService监听到系统将开机完成广播消息发送到ActivityManagerService时,确定监听到系统发出了开机完成广播消息。
步骤120,在监听到开机完成广播消息时,识别当前所处的开机完成阶段。
其中,开机完成阶段即开机初始化阶段完成后来启动系统应用或者第三方应用的阶段。可根据需要划分为多个阶段,在相应阶段启动相应的应用程序。在一些实施例中,所述开机完成阶段包括系统服务初始化完成阶段、桌面和锁屏初始化完成阶段或初始化完成后空闲阶段。
可以预先设置开机完成阶段对应的接收开机完成广播消息的广播接收者(即待启动的系统应用或者第三方应用)。在监听到开机完成广播消息时,查询注册中心有哪些应用程序注册接收该开机完成广播消息,并识别当前所处的开机完成阶段。例如,每个开机完成阶段可以预设相应的时间,从而可以从监听到开机完成广播消息的时间开始算起,识别到当前所处的开机完成阶段。还可以在监听到开机完成广播消息时,为第一开机完成阶段,发送完需要在该第一开机完成阶段发送的开机完成广播消息后进入第二开机完成阶段,发送完需要在第二开机完成阶段发送的开机完成广播消息后进入第三开机完成阶段,以此类推,直到发送完所有开机完成阶段需要发送的开机完成广播消息。
步骤130,根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者。
根据预先设置的开机完成阶段对应的接收开机完成广播消息的广播接收者,再结合当前所处的开机完成阶段,可以确定对应的接收开机完成广播消息的广播接收者。
其中,系统服务初始化完成阶段主要启动系统服务相关的应用程序,这时将开机完成广播消息发送给这些应用程序;桌面和锁屏初始化完成阶段主要启动桌面和锁屏相关的应用程序,这时将开机完成广播消息发送给这些应用程序;初始化完成后空闲阶段主要启动第三方应用程序,这时将开机完成广播消息发送给这些应用程序。
例如,在刚监听到开机完成广播消息时,识别当前所处的开机完成阶段为系统服务初始化完成阶段,这时将开机完成广播消息发送给对应在这个阶段启动的应用程序(如电话应用模块、状态栏模块和系统设置模块等);该系统服务初始化阶段的开机完成广播消息发送完毕后进入桌面和锁屏初始化完成阶段,这时将开机完成广播消息发送给对应在这个阶段启动的应用程序(如联系人、日历等);桌面和锁屏初始化完成阶段的开机完成广播消息发送完毕后进入初始化完成后空闲阶段,这时将开机完成广播消息发送给对应在这个阶段启动的应用程序(如微信、邮件等)。
步骤140,将所述开机完成广播消息发送给所述广播接收者。
在确定了当前所处的开机完成阶段对应的接收开机完成广播消息的广播接收者后,将所述开机完成广播消息发送给对应的广播接收者。
本实施例的技术方案,通过在开机初始化阶段完成后,监听系统发出的开机完成广播消息,在监听到开机完成广播消息时,识别当前所处的开机完成阶段,根据当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者,将所述开机完成广播消息发送给所述广播接收者,解决了同时向所有的广播接收者发送开机完成广播消息导致广播接收者短时间内同时启动导致系统性能开销大的问题,通过分阶段向对应的广播接收者发送开机完成广播消息,减少了系统性能开销,避免了系统卡顿。
在一些实施例中,在上述技术方案的基础上,在将所述开机完成广播消息发送给所述广播接收者之后,还包括:
启动所述广播接收者。
在将开机完成广播消息发送给当前所处的开机完成阶段对应的广播接收者后,启动所述广播接收者,即可以分阶段启动不同的广播接收者,避免了所有的广播接收者同时启动,进一步减少了系统性能开销。
图2是本申请一个实施例提供的一种发送开机广播的方法的流程图,本实施所述的方法包括如下步骤:
步骤210,在开机初始化阶段完成后,监听系统发出的开机完成广播消息。
步骤220,在监听到开机完成广播消息时,识别当前所处的开机完成阶段。
步骤230,获取预先建立的开机完成阶段与模块启动优先级的对应关系。
其中,模块启动优先级定义了在开机完成阶段待启动的应用程序的优先级。模块启动优先级的级数大于或者等于开机完成阶段的阶段数,从而在相应的开机完成阶段启动对应模块启动优先级的应用程序。示例性的,在开机完成阶段包括三个阶段时,可以按照开机启动的应用程序的重要程度将待启动的应用程序的优先级划分为三个不同的模块启动优先级,从而三个不同的模块启动优先级分别对应三个不同的开机完成阶段,即模块启动优先级与开机完成阶段一一对应。
可以预先建立开机完成阶段与模块启动优先级的对应关系,并设置开机完成阶段待启动的应用程序所具有的模块启动优先级。
步骤240,根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的模块启动优先级。
在确定了当前所处的开机完成阶段后,可以结合预先建立的开机完成阶段与模块启动优先级的对应关系,确定当前所处的开机完成阶段对应的模块启动优先级。
步骤250,根据所述模块启动优先级,确定对应的接收开机完成广播消息的广播接收者。
获取预先设置的开机完成阶段待启动的应用程序(开机完成广播消息的广播接收者)的模块启动优先级,根据确定的当前所处的开机完成阶段对应的模块启动优先级,查询具有该模块启动优先级的广播接收者,从而确定该模块启动优先级对应的接收开机完成广播消息的广播接收者。
本实施例的技术方案,通过预先建立开机完成阶段与模块启动优先级的对应关系,在确定了当前所处的开机完成阶段后,结合所述对应关系确定当前所处的开机完成阶段对应的模块启动优先级,根据模块启动优先级确定对应的接收开机完成广播消息的广播接收者,加快了在相应开机完成阶段确定对应广播接收者的速度,从而加快了开机完成广播消息的处理速度。
图3是本申请一个实施例提供的一种发送开机广播的方法的流程图,本实施所述的方法包括如下步骤:
步骤310,在开机初始化阶段完成后,监听系统发出的开机完成广播消息。
步骤320,在监听到开机完成广播消息时,识别当前所处的开机完成阶段。
步骤330,获取预先建立的开机完成阶段与接收开机完成广播消息的广播接收者的应用属性的对应关系。
其中,应用属性是在开机完成阶段待启动的应用程序具有的属性,如系统重要应用(如电话应用模块、状态栏模块、系统设置等)、系统基础应用(如联系人、日历等)、第三方应用(如微信、邮件等)等。
可以预先建立开机完成阶段与接收开机完成广播消息的广播接收者的应用属性的对应关系,并明确开机完成阶段待启动的应用程序所具有的应用属性。
步骤340,根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的应用属性。
在确定了当前所处的开机完成阶段后,可以结合预先建立的开机完成阶段与应用属性的对应关系,确定当前所处的开机完成阶段对应的应用属性。
步骤350,根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者。
根据所述应用属性,在接收开完广播消息的所有广播接收者中查询具有所述应用属性的广播接收者为当前所处的开机完成阶段对应的接收开机完成广播消息的广播接收者。
在一些实施例中,根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者,包括:
统计当前注册了接收开机完成广播消息的广播接收者;
确定当前注册的广播接收者中具有所述应用属性的广播接收者为对应的接收开机完成广播消息的广播接收者。
可以在确定了当前所处的开机完成阶段时,统计当前注册了接收开机完成广播消息的广播接收者,这些广播接收者中具有所述应用属性的广播接收者为当前所处的开机完成阶段对应的接收开机完成广播消息的广播接收者。
本实施例的技术方案,通过预先建立开机完成阶段与接收开机完成广播消息的广播接收者的对应关系,在确定了当前所处的开机完成阶段后,结合所述对应关系确定当前所处的开机完成阶段对应的应用属性,根据应用属性确定对应的接收开机完成广播消息的广播接收者,加快了在相应开机完成阶段确定对应广播接收者的速度,从而加快了开机完成广播消息的处理速度。
本申请实施例提供一种发送开机广播的装置,所述装置包括:
开机广播监听模块,用于在开机初始化阶段完成后,监听系统发出的开机完成广播消息;
开机阶段识别模块,用于在监听到开机完成广播消息时,识别当前所处的开机完成阶段;
广播接收者确定模块,用于根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者;
广播消息发送模块,用于将所述开机完成广播消息发送给所述广播接收者。
在一些实施例中,所述广播接收者确定模块包括:
第一对应关系获取单元,用于获取预先建立的开机完成阶段与模块启动优先级的对应关系;
启动优先级确定单元,用于根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的模块启动优先级;
第一广播接收者确定单元,用于根据所述模块启动优先级,确定对应的接收开机完成广播消息的广播接收者。
在一些实施例中,所述广播接收者确定模块包括:
第二对应关系获取单元,用于获取预先建立的开机完成阶段与接收开机完成广播消息的广播接收者的应用属性的对应关系;
应用属性确定单元,用于根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的应用属性;
第二广播接收者确定单元,用于根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者。
在一些实施例中,所述第二广播接收者确定单元具体用于:
统计当前注册了接收开机完成广播消息的广播接收者;
确定当前注册的广播接收者中具有所述应用属性的广播接收者为对应的接收开机完成广播消息的广播接收者。
在一些实施例中,所述装置还包括:
广播接收者启动模块,用于在将所述开机完成广播消息发送给所述广播接收者之后,启动所述广播接收者。
在一些实施例中,所述开机完成阶段包括系统服务初始化完成阶段、桌面和锁屏初始化完成阶段或初始化完成后空闲阶段。
图4是本申请实施例提供的一种发送开机广播的装置的结构示意图,如图4所示,本实施所述的发送开机广播的装置包括:开机广播监听模块410、开机阶段识别模块420、广播接收者确定模块430和广播消息发送模块440。
其中,开机广播监听模块410,用于在开机初始化阶段完成后,监听系统发出的开机完成广播消息;
开机阶段识别模块420,用于在监听到开机完成广播消息时,识别当前所处的开机完成阶段;
广播接收者确定模块430,用于根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者;
广播消息发送模块440,用于将所述开机完成广播消息发送给所述广播接收者。
在一些实施例中,所述广播接收者确定模块包括:
第一对应关系获取单元,用于获取预先建立的开机完成阶段与模块启动优先级的对应关系;
启动优先级确定单元,用于根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的模块启动优先级;
第一广播接收者确定单元,用于根据所述模块启动优先级,确定对应的接收开机完成广播消息的广播接收者。
在一些实施例中,所述广播接收者确定模块包括:
第二对应关系获取单元,用于获取预先建立的开机完成阶段与接收开机完成广播消息的广播接收者的应用属性的对应关系;
应用属性确定单元,用于根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的应用属性;
第二广播接收者确定单元,用于根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者。
在一些实施例中,所述第二广播接收者确定单元具体用于:
统计当前注册了接收开机完成广播消息的广播接收者;
确定当前注册的广播接收者中具有所述应用属性的广播接收者为对应的接收开机完成广播消息的广播接收者。
在一些实施例中,所述装置还包括:
广播接收者启动模块,用于在将所述开机完成广播消息发送给所述广播接收者之后,启动所述广播接收者。
在一些实施例中,所述开机完成阶段包括系统服务初始化完成阶段、桌面和锁屏初始化完成阶段或初始化完成后空闲阶段。
上述发送开机广播的装置可执行本申请任意实施例所提供的发送开机广播的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请任意实施例提供的发送开机广播的方法。
本申请实施例还提供了一种终端,该终端可以包括本申请任意实施例提供的发送开机广播的装置。图5为本申请实施例提供的一种终端的结构示意图,如图5所示,该终端可以包括:壳体(图中未示出)、存储器501、中央处理器(Central Processing Unit,CPU)502(又称处理器,以下简称CPU)、存储在存储器501上并可在处理器502上运行的计算机程序、电路板(图中未示出)和电源电路(图中未示出)。所述电路板安置在所述壳体围成的空间内部;所述CPU502和所述存储器501设置在所述电路板上;所述电源电路,用于为所述终端的各个电路或器件供电;所述存储器501,用于存储可在处理器上运行的计算机程序;所述CPU402通过读取并执行所述存储器501中存储的计算机程序。
该终端还包括:外设接口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在执行所述存储器501中存储的计算机程序时实现以下步骤:
在开机初始化阶段完成后,监听系统发出的开机完成广播消息;
在监听到开机完成广播消息时,识别当前所处的开机完成阶段;
根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者;
将所述开机完成广播消息发送给所述广播接收者。
上述终端可执行本申请任意实施例所提供的发送开机广播的方法,具备执行任意实施例所提供的发送开机广播的方法相应的功能模块和有益效果。
本申请实施例还提供一种存储介质,该存储介质中存储有计算机程序,当该计算机程序在计算机上运行时,该计算机执行上述任一实施例所述的发送开机广播的方法。
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,该存储介质可以包括但不限于:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。
注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。

Claims (20)

  1. 一种发送开机广播的方法,其中,所述方法包括:
    在开机初始化阶段完成后,监听系统发出的开机完成广播消息;
    在监听到开机完成广播消息时,识别当前所处的开机完成阶段;
    根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者;
    将所述开机完成广播消息发送给所述广播接收者。
  2. 根据权利要求1所述的方法,其中,根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者,包括:
    获取预先建立的开机完成阶段与模块启动优先级的对应关系;
    根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的模块启动优先级;
    根据所述模块启动优先级,确定对应的接收开机完成广播消息的广播接收者。
  3. 根据权利要求2所述的方法,其中,所述在开机初始化阶段完成后,监听系统发出的开机完成广播消息的步骤前,所述方法还包括:
    预先建立开机完成阶段与模块启动优先级的对应关系。
  4. 根据权利要求1所述的方法,其中,根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者,包括:
    获取预先建立的开机完成阶段与接收开机完成广播消息的广播接收者的应用属性的对应关系;
    根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的应用属性;
    根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者。
  5. 根据权利要求4所述的方法,其中,根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者,包括:
    统计当前注册了接收开机完成广播消息的广播接收者;
    确定当前注册的广播接收者中具有所述应用属性的广播接收者为对应的接收开机完成广播消息的广播接收者。
  6. 根据权利要求4所述的方法,其中,所述在开机初始化阶段完成后,监听系统发出的开机完成广播消息的步骤前,所述方法还包括:
    预先建立开机完成阶段与接收开机完成广播消息的广播接收者的应用属性的对应关系。
  7. 根据权利要求1所述的方法,其中,在将所述开机完成广播消息发送给所述广播接收者之后,所述方法还包括:
    启动所述广播接收者。
  8. 根据权利要求1-7任一所述的方法,其中,所述开机完成阶段包括系统服务初始化完成阶段、桌面和锁屏初始化完成阶段或初始化完成后空闲阶段。
  9. 一种发送开机广播的装置,其中,所述装置包括:
    开机广播监听模块,用于在开机初始化阶段完成后,监听系统发出的开机完成广播消息;
    开机阶段识别模块,用于在监听到开机完成广播消息时,识别当前所处的开机完成阶段;
    广播接收者确定模块,用于根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者;
    广播消息发送模块,用于将所述开机完成广播消息发送给所述广播接收者。
  10. 根据权利要求9所述的装置,其中,所述广播接收者确定模块包括:
    第一对应关系获取单元,用于获取预先建立的开机完成阶段与模块启动优先级的对应关系;
    启动优先级确定单元,用于根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的模块启动优先级;
    第一广播接收者确定单元,用于根据所述模块启动优先级,确定对应的接收开机完成广播消息的广播接收者。
  11. 根据权利要求9所述的装置,其中,所述广播接收者确定模块包括:
    第二对应关系获取单元,用于获取预先建立的开机完成阶段与接收开机完成广播消息的广播接收者的应用属性的对应关系;
    应用属性确定单元,用于根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的应用属性;
    第二广播接收者确定单元,用于根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者。
  12. 根据权利要求11所述的装置,其中,所述第二广播接收者确定单元具体用于:
    统计当前注册了接收开机完成广播消息的广播接收者;
    确定当前注册的广播接收者中具有所述应用属性的广播接收者为对应的接收开机完成广播消息的广播接收者。
  13. 根据权利要求9所述的装置,其中,所述装置还包括:
    广播接收者启动模块,用于在将所述开机完成广播消息发送给所述广播接收者之后,启动所述广播接收者。
  14. 根据权利要求9-13任一所述的装置,其中,所述开机完成阶段包括系统服务初始化完成阶段、桌面和锁屏初始化完成阶段或初始化完成后空闲阶段。
  15. 一种存储介质,其中,所述存储介质中存储有计算机程序,当所述计算机程序在计算机上运行时,所述计算机执行权利要求1-8任一所述的方法。
  16. 一种终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现以下步骤:
    在开机初始化阶段完成后,监听系统发出的开机完成广播消息;
    在监听到开机完成广播消息时,识别当前所处的开机完成阶段;
    根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者;
    将所述开机完成广播消息发送给所述广播接收者。
  17. 根据权利要求16所述的终端,其中,根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者时,所述处理器执行所述计算机程序时实现以下步骤:
    获取预先建立的开机完成阶段与模块启动优先级的对应关系;
    根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的模块启动优先级;
    根据所述模块启动优先级,确定对应的接收开机完成广播消息的广播接收者。
  18. 根据权利要求16所述的终端,其中,根据所述当前所处的开机完成阶段,确定对应的接收开机完成广播消息的广播接收者时,所述处理器执行所述计算机程序时实现以下步骤:
    获取预先建立的开机完成阶段与接收开机完成广播消息的广播接收者的应用属性的对应关系;
    根据所述当前所处的开机完成阶段和所述对应关系,确定当前所处的开机完成阶段对应的应用属性;
    根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者。
  19. 根据权利要求18所述的终端,其中,根据所述应用属性,确定对应的接收开机完成广播消息的广播接收者时,所述处理器执行所述计算机程序时实现以下步骤:
    统计当前注册了接收开机完成广播消息的广播接收者;
    确定当前注册的广播接收者中具有所述应用属性的广播接收者为对应的接收开机完成广播消息的广播接收者。
  20. 根据权利要求16所述的终端,其中,将所述开机完成广播消息发送给所述广播接收者之后,所述处理器执行所述计算机程序时还实现以下步骤:
    启动所述广播接收者。
PCT/CN2017/106606 2017-03-10 2017-10-17 发送开机广播的方法、装置、存储介质及终端 WO2018161574A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710144285.X 2017-03-10
CN201710144285.XA CN106708637B (zh) 2017-03-10 2017-03-10 发送开机广播的方法、装置及终端

Publications (1)

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

Family

ID=58918146

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/106606 WO2018161574A1 (zh) 2017-03-10 2017-10-17 发送开机广播的方法、装置、存储介质及终端

Country Status (2)

Country Link
CN (1) CN106708637B (zh)
WO (1) WO2018161574A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708637B (zh) * 2017-03-10 2020-06-26 Oppo广东移动通信有限公司 发送开机广播的方法、装置及终端
CN107423064B (zh) * 2017-07-26 2020-12-08 Oppo广东移动通信有限公司 消息处理方法、装置、终端设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102830996A (zh) * 2012-08-08 2012-12-19 广东欧珀移动通信有限公司 一种手持设备的快速开机方法
CN102855148A (zh) * 2012-08-02 2013-01-02 广东欧珀移动通信有限公司 一种基于Android的开机管理方法
US20130312059A1 (en) * 2011-01-31 2013-11-21 Nippon Hoso Kyokai Receiving device, transmitting device, broadcasting system, receiving method, and non-transitory computer-readable recording medium
CN106126216A (zh) * 2016-06-17 2016-11-16 广州恒业软件科技有限公司 一种基于安卓系统的加速开机方法及其系统
CN106484473A (zh) * 2016-09-29 2017-03-08 Tcl集团股份有限公司 一种应用启动方法和装置
CN106708637A (zh) * 2017-03-10 2017-05-24 广东欧珀移动通信有限公司 发送开机广播的方法、装置及终端

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6697607B1 (en) * 2000-11-03 2004-02-24 International Business Machines Corporation Automatic receiver control upon initialization
US8892783B2 (en) * 2009-06-22 2014-11-18 Citrix Systems, Inc. Systems and methods for initialization and link management of NICS in a multi-core environment
CN103345408A (zh) * 2013-06-26 2013-10-09 深圳市金立通信设备有限公司 一种终端开机加速的方法及终端
CN103488495A (zh) * 2013-08-13 2014-01-01 广东欧珀移动通信有限公司 一种通过动态调整开机预加载资源加速开机的方法
CN106406944A (zh) * 2016-09-05 2017-02-15 Tcl集团股份有限公司 一种禁止应用自启动的控制方法及系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130312059A1 (en) * 2011-01-31 2013-11-21 Nippon Hoso Kyokai Receiving device, transmitting device, broadcasting system, receiving method, and non-transitory computer-readable recording medium
CN102855148A (zh) * 2012-08-02 2013-01-02 广东欧珀移动通信有限公司 一种基于Android的开机管理方法
CN102830996A (zh) * 2012-08-08 2012-12-19 广东欧珀移动通信有限公司 一种手持设备的快速开机方法
CN106126216A (zh) * 2016-06-17 2016-11-16 广州恒业软件科技有限公司 一种基于安卓系统的加速开机方法及其系统
CN106484473A (zh) * 2016-09-29 2017-03-08 Tcl集团股份有限公司 一种应用启动方法和装置
CN106708637A (zh) * 2017-03-10 2017-05-24 广东欧珀移动通信有限公司 发送开机广播的方法、装置及终端

Also Published As

Publication number Publication date
CN106708637A (zh) 2017-05-24
CN106708637B (zh) 2020-06-26

Similar Documents

Publication Publication Date Title
WO2018161593A1 (zh) 广播处理方法、装置、存储介质和终端设备
WO2018076861A1 (zh) 数据传输的控制方法、装置、存储介质、服务器及系统
WO2018076841A1 (zh) 数据分享方法、装置、存储介质及服务器
WO2018233352A1 (zh) 数据传输方法、装置、终端以及计算机可读存储介质
WO2018161585A1 (zh) 电子设备帧率的控制方法、装置、存储介质及电子设备
WO2018076867A1 (zh) 数据备份的删除方法、装置、系统、存储介质和服务器
WO2018161601A1 (zh) 屏幕背光调节方法、装置、存储介质及电子设备
WO2021096282A1 (en) Electronic device for managing coexistence of multiple communication schemes and operating method thereof
WO2018010507A1 (zh) 终端系统的唤醒监控方法、存储介质、终端及电子设备
WO2018076865A1 (zh) 数据分享方法、装置、存储介质及电子设备
WO2018161580A1 (zh) 广播的控制方法、装置、存储介质及电子设备
WO2017164585A1 (en) Electronic device and control method thereof
WO2016080747A1 (en) User terminal and method for controlling display apparatus
WO2019108001A1 (ko) 무선 통신 시스템에서 데이터를 송수신하는 전자 장치 및 이를 위한 방법
WO2018161584A1 (zh) 应用程序的控制方法、装置、介质及电子设备
WO2018161576A1 (zh) 一种广播的控制方法、装置、存储介质及移动终端
WO2018161575A1 (zh) 调整广播消息队列的方法、装置、存储介质及终端
WO2019045265A1 (en) METHOD FOR PROVIDING INTELLIGENT KEY SERVICE AND ASSOCIATED ELECTRONIC DEVICE
WO2018076881A1 (zh) 数据同步方法、装置、存储介质及服务器
WO2018076890A1 (zh) 数据备份的方法、装置、存储介质、服务器及系统
WO2018161588A1 (zh) 广播接收者队列调整方法、装置、存储介质及电子设备
WO2017206880A1 (zh) 终端数据处理方法、装置、存储介质及电子设备
WO2018076880A1 (zh) 数据备份方法、装置、存储介质及终端
EP4085604A1 (en) Method for communication based on state of external electronic device and electronic device thereof
WO2018161581A1 (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: 17899474

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

Country of ref document: EP

Kind code of ref document: A1