CN107423064A - Message processing method, device, terminal device and storage medium - Google Patents
Message processing method, device, terminal device and storage medium Download PDFInfo
- Publication number
- CN107423064A CN107423064A CN201710620125.8A CN201710620125A CN107423064A CN 107423064 A CN107423064 A CN 107423064A CN 201710620125 A CN201710620125 A CN 201710620125A CN 107423064 A CN107423064 A CN 107423064A
- Authority
- CN
- China
- Prior art keywords
- broadcast message
- terminal device
- broadcast
- message
- starting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4406—Loading of operating system
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4411—Configuring for operating with peripheral devices; Loading of device drivers
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/543—Local
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Multimedia (AREA)
- Telephone Function (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域technical field
本发明实施例涉及计算机技术,尤其涉及一种消息处理方法、装置、终端设备及存储介质。The embodiments of the present invention relate to computer technology, and in particular, to a message processing method, device, terminal equipment, and storage medium.
背景技术Background technique
随着终端设备的普及,终端设备中安装的应用程序也越来越多。有些应用程序需要实现开机后自动启动。然而现有的终端设备在实现应用程序开机自启动时存在缺陷,需要改进。With the popularization of terminal devices, more and more application programs are installed in the terminal devices. Some applications need to be automatically started after booting. However, the existing terminal equipment has defects in realizing the self-starting of the application program, which needs to be improved.
发明内容Contents of the invention
本方案提供了一种消息处理方法、装置、终端设备及存储介质,提高了终端设备的运行效率,降低了终端设备的功耗,使得终端设备中安装的应用程序能够完成自启动。This solution provides a message processing method, device, terminal equipment and storage medium, which improves the operation efficiency of the terminal equipment, reduces the power consumption of the terminal equipment, and enables the application program installed in the terminal equipment to complete self-starting.
第一方面,本发明实施例提供了一种消息处理方法,包括:In a first aspect, an embodiment of the present invention provides a message processing method, including:
依据接收到的开机指令启动终端设备中安装的操作系统;Start the operating system installed in the terminal device according to the received boot command;
对所述操作系统发出的第一广播消息进行监听,所述第一广播消息用于指示所述操作系统是否启动完成动;Listening to a first broadcast message sent by the operating system, where the first broadcast message is used to indicate whether the operating system has been started and completed;
接收所述第一广播消息后,发出第二广播消息,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序。After receiving the first broadcast message, a second broadcast message is sent, and the second broadcast message is used to start the boot self-starting program installed in the terminal device.
第二方面,本发明实施例还提供了一种消息处理装置,包括:In a second aspect, an embodiment of the present invention further provides a message processing device, including:
系统启动模块,用于依据接收到的开机指令启动终端设备中安装的操作系统;A system startup module, configured to start the operating system installed in the terminal device according to the received startup command;
监听模块,用于对所述操作系统发出的第一广播消息进行监听,所述第一广播消息用于指示所述操作系统是否启动完成动;A monitoring module, configured to monitor a first broadcast message sent by the operating system, where the first broadcast message is used to indicate whether the operating system is started and completed;
应用启动模块,用于接收所述第一广播消息后,发出第二广播消息,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序。The application starting module is configured to send a second broadcast message after receiving the first broadcast message, and the second broadcast message is used to start the boot self-starting program installed in the terminal device.
第三方面,本发明实施例还提供了一种终端设备,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本发明实施例所述的消息处理方法。In the third aspect, the embodiment of the present invention also provides a terminal device, including: a processor, a memory, and a computer program stored on the memory and operable on the processor, and the processor implements the present invention when executing the computer program. The message processing method described in the embodiment of the invention.
第四方面,本发明实施例还提供了一种包含终端设备可执行指令的存储介质,所述终端设备可执行指令在由终端设备控制单元执行时用于执行本发明实施例所述的消息处理方法。In the fourth aspect, the embodiment of the present invention also provides a storage medium containing executable instructions of the terminal device, and the executable instruction of the terminal device is used to execute the message processing described in the embodiment of the present invention when executed by the terminal device control unit method.
本发明实施例提供的技术方案中,依据接收到的开机指令启动终端设备中安装的操作系统,对所述操作系统发出的第一广播消息进行监听,所述第一广播消息用于指示所述操作系统是否启动完成动,接收所述第一广播消息后,发出第二广播消息,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序,提高了终端设备的运行效率,降低了终端设备的功耗,使得终端设备中安装的应用程序能够完成自启动。In the technical solution provided by the embodiment of the present invention, the operating system installed in the terminal device is started according to the received boot command, and the first broadcast message sent by the operating system is monitored, and the first broadcast message is used to indicate the Whether the operating system has been started, after receiving the first broadcast message, a second broadcast message is sent, and the second broadcast message is used to start the self-starting program installed in the terminal device, which improves the operating efficiency of the terminal device , reducing the power consumption of the terminal device, so that the application program installed in the terminal device can complete self-starting.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图:In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention, and those skilled in the art can also obtain other accompanying drawings according to these drawings without creative work:
图1是本发明实施例提供的一种消息处理装置的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a message processing device provided by an embodiment of the present invention;
图2是本发明实施例提供的一种消息处理方法的流程图;FIG. 2 is a flowchart of a message processing method provided by an embodiment of the present invention;
图3是本发明实施例提供的另一种消息处理方法的流程图;Fig. 3 is a flowchart of another message processing method provided by an embodiment of the present invention;
图4是本发明实施例提供的另一种消息处理方法的流程图Fig. 4 is a flowchart of another message processing method provided by an embodiment of the present invention
图5是本发明实施例提供的另一种消息处理方法的流程图Fig. 5 is a flowchart of another message processing method provided by an embodiment of the present invention
图6是本发明实施例提供的消息处理装置的结构示意图;FIG. 6 is a schematic structural diagram of a message processing device provided by an embodiment of the present invention;
图7是本发明实施例提供的一种终端设备的结构示意图。Fig. 7 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention.
具体实施方式detailed description
请参照图式,其中相同的组件符号代表相同的组件,本发明的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本发明具体实施例,其不应被视为限制本发明未在此详述的其它具体实施例。Referring to the drawings, wherein like reference numerals represent like components, the principles of the present invention are exemplified when implemented in a suitable computing environment. The following description is based on illustrated specific embodiments of the invention, which should not be construed as limiting other specific embodiments of the invention not described in detail herein.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
本发明中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是某些实施例还包括没有列出的步骤或模块,或某些实施例还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。The terms "first", "second" and "third" in the present invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but some embodiments also include steps or modules that are not listed, or some embodiments Other steps or modules inherent to these processes, methods, products or devices are also included.
本发明实施例提供一种消息处理方法,该消息处理方法的执行主体可以是本发明实施例提供的一种消息处理装置,或者集成了所述消息处理装置的终端设备,其中所述消息处理装置可以采用硬件或者软件的方式实现,所述终端设备可以是智能手机、车载终端、平板电脑、台式电脑、笔记本、掌上电脑等设备。An embodiment of the present invention provides a message processing method. The execution subject of the message processing method may be a message processing device provided in an embodiment of the present invention, or a terminal device integrated with the message processing device, wherein the message processing device It can be implemented in the form of hardware or software, and the terminal device can be a smart phone, a vehicle terminal, a tablet computer, a desktop computer, a notebook, a palmtop computer, and the like.
请参阅图1,图1是本发明实施例提供的一种消息处理装置的应用场景示意图,该消息处理装置集成在了终端设备(如:智能手机)中,其依据接收到的开机指令启动终端设备中安装的操作系统,对所述操作系统发出的第一广播消息进行监听,所述第一广播消息用于指示所述操作系统是否启动完成动,接收所述第一广播消息后,发出第二广播消息,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序。Please refer to Figure 1. Figure 1 is a schematic diagram of an application scenario of a message processing device provided by an embodiment of the present invention. The message processing device is integrated in a terminal device (such as a smart phone), and it starts the terminal according to the received power-on command. The operating system installed in the device monitors the first broadcast message sent by the operating system, the first broadcast message is used to indicate whether the operating system has been started, and after receiving the first broadcast message, sends the first broadcast message Two broadcast messages, the second broadcast message is used to start the self-starting program installed in the terminal device.
图2是本发明实施例提供的一种消息处理方法的流程图,所述消息处理方法包括:Fig. 2 is a flowchart of a message processing method provided by an embodiment of the present invention, and the message processing method includes:
步骤S101、依据接收到的开机指令启动终端设备中安装的操作系统。Step S101, start the operating system installed in the terminal device according to the received boot command.
终端设备在接收到开机指令后,首先启动安装的操作系统。该开机指令可以由用户按触终端设备的电源键触发。其中,操作系统是管理和控制终端设备软件和硬件资源的计算机程序,终端设备中安装的其他应用程序需在操作系统的支持下运行。终端设备中安装的操作系统可以是Android操作系统、IOS操作系统等。After receiving the boot instruction, the terminal device first starts the installed operating system. The power-on instruction may be triggered by the user pressing a power button of the terminal device. Among them, the operating system is a computer program that manages and controls the software and hardware resources of the terminal device, and other application programs installed in the terminal device need to run with the support of the operating system. The operating system installed in the terminal device may be an Android operating system, an IOS operating system, and the like.
步骤S102、对所述操作系统发出的第一广播消息进行监听。Step S102, monitoring the first broadcast message sent by the operating system.
其中,所述第一广播消息用于指示所述操作系统是否启动完成动,即当所述第一广播消息发出后,意味安装的操作系统已经启动完成。在一个实施例中,以终端设备安装的Android操作系统为例,当Android操作系统启动完毕后,会发出一启动完成广播,广播指令格式为:Wherein, the first broadcast message is used to indicate whether the operating system has been started, that is, when the first broadcast message is sent, it means that the installed operating system has been started. In one embodiment, taking the Android operating system installed on the terminal device as an example, when the Android operating system is started, it will send a start-up broadcast. The format of the broadcast instruction is:
android.intent.action.BOOT_COMPLETED。android.intent.action.BOOT_COMPLETED.
其中,广播机制是一种被广泛运用的在应用程序之间进行消息传输的机制,在Android操作系统中,其通过广播(Broadcast)来实现应用程序间数据的传输和共享。典型的,如安卓自带的短信、电话等广播。具体的,广播发送者通过调用sendBroadcast函数进行广播消息的发送,广播接收者通过调用registerReceiver函数在管理模块中进行广播接收器(BroadcastReceiver)的注册,并定义自身感兴趣的广播消息,由此来实现对相应的广播消息的接收。广播机制中,广播消息指的是系统或者应用程序在运行过程中发送的,用于系统和/或应用程序之间传输的信息,示例性的,广播消息可以是系统启动广播消息、短信类广播消息、电话类广播消息或者三方应用类广播消息等。广播发送者发送广播消息的过程和广播接收者接收广播消息的过程是异步操作过程,广播发送者和广播接收者通过管理模块实现低耦合的关系匹配,即广播发送者在发送广播消息后并不关心具体的广播接收者是谁,广播接收者只接受自己感兴趣的广播消息,不关心具体的广播发送者。Among them, the broadcast mechanism is a widely used mechanism for message transmission between application programs. In the Android operating system, it implements data transmission and sharing between application programs through broadcast (Broadcast). Typical, such as Android's built-in text messages, phone calls and other broadcasts. Specifically, the broadcast sender sends the broadcast message by calling the sendBroadcast function, and the broadcast receiver registers the broadcast receiver (BroadcastReceiver) in the management module by calling the registerReceiver function, and defines the broadcast message it is interested in, thereby realizing Reception of the corresponding broadcast message. In the broadcast mechanism, the broadcast message refers to the information sent by the system or the application program during the running process, and is used for the transmission between the system and/or the application program. Exemplarily, the broadcast message can be a system startup broadcast message, a short message broadcast message, telephone broadcast message or three-party application broadcast message, etc. The process of the broadcast sender sending the broadcast message and the process of the broadcast receiver receiving the broadcast message are asynchronous operation processes. The broadcast sender and the broadcast receiver realize low-coupling relationship matching through the management module, that is, the broadcast sender does not need to send the broadcast message after sending the broadcast message. Concerned about who the specific broadcast receiver is, the broadcast receiver only accepts the broadcast messages that they are interested in, and does not care about the specific broadcast sender.
在一个实施例中,操作系统启动完毕后发送第一广播消息用于通知其他感兴趣的应用程序,告知操作系统已经启动完毕。示例性的,该感兴趣的其他应用程序也即注册了相应的广播接收器的应用程序可以是系统服务程序、系统应用程序、终端设备中安装的第三方应用程序等。由于该第一广播消息为操作系统启动完成后发出的通知,终端设备中的其他服务、应用程序均需响应该第一广播消息,为避免造成消息阻塞以及核心服务程序无法第一时间启动,故对广播接收者接收并处理广播消息的顺序进行了划分,依据不同广播接收者的类型定义不同的优先级,通常系统服务优先级较高,第三方应用程序优先级较低,而该第一广播消息为操作系统启动完成后发送的用于启动其他服务、应用程序的广播,由此使得大多数第三方应用程序由于长时间等待而最终不会响应该第一广播消息,由此许多设置为自启动的第三方应用程序无法在终端设备开机后实现自启动。In one embodiment, after the operating system is started, the first broadcast message is sent to notify other interested applications that the operating system has been started. Exemplarily, the other interested application programs, that is, the application programs registered with the corresponding broadcast receivers, may be system service programs, system application programs, third-party application programs installed in the terminal device, and the like. Since the first broadcast message is a notification sent after the operating system is started, other services and application programs in the terminal device need to respond to the first broadcast message. The order in which broadcast receivers receive and process broadcast messages is divided, and different priorities are defined according to the types of broadcast receivers. Usually, the priority of system services is higher, and the priority of third-party applications is lower. The first broadcast The message is a broadcast for starting other services and applications sent after the operating system is started, so that most third-party applications will not respond to the first broadcast message due to a long wait, so many settings are automatically The launched third-party applications cannot be self-started after the terminal device is turned on.
在一个实施例中,对第一广播消息进行监听包括:监听操作系统通过调用sendBroadcast函数发送广播消息android.intent.action.BOOT_COMPLETED。在另一实施例中,对第一广播消息进行监听包括:通过注册的广播接收器监听是否接收到第一广播消息。In one embodiment, monitoring the first broadcast message includes: monitoring the operating system to send the broadcast message android.intent.action.BOOT_COMPLETED by calling the sendBroadcast function. In another embodiment, monitoring the first broadcast message includes: monitoring whether the first broadcast message is received through a registered broadcast receiver.
步骤S103、接收所述第一广播消息后,发出第二广播消息。Step S103, after receiving the first broadcast message, send a second broadcast message.
其中,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序,开机自启动程序为随着终端设备开机,操作系统启动完毕后可自动启动的应用程序。可选的,该开机自启动程序可以是终端设备中安装的被设置为开机自启动的第三方应用程序。该第二广播消息的类型为全局广播,其中,全局广播为所有应用程序可以接收到的广播。在一个实施例中,接收所述第一广播消息后,发出第二广播消息,可以是当接收到第一广播消息后,立即发送第二广播消息,还可以是当接收到第一广播消息后,延迟预设时间(如5秒)后发送第二广播消息。其中,第二广播消息可为自定义的用于指示开启终端设备中安装的第三方应用的。由于第一广播消息为操作系统启动完毕后发送的用于通知终端设备中其他应用程序的消息,基于广播接收者的优先级别的不同,需要系统服务、系统级别的应用优先启动,使得第三方自启动应用程序无法完成自启动,故在第一广播消息发出之后发送一第二广播消息,该第二广播消息在启动终端设备中安装的应用程序时,可顺利启动终端设备中安装的类似于第三方应用程序的优先级别较低的应用程序,可选的,第二广播消息的广播接收者无优先级区别。Wherein, the second broadcast message is used to start the self-starting program installed in the terminal device, and the self-starting program is an application program that can be automatically started after the operating system is started as the terminal device is started. Optionally, the boot-up self-starting program may be a third-party application installed in the terminal device and set to start up automatically. The type of the second broadcast message is a global broadcast, wherein the global broadcast is a broadcast that all application programs can receive. In one embodiment, sending the second broadcast message after receiving the first broadcast message may be sending the second broadcast message immediately after receiving the first broadcast message, or sending the second broadcast message immediately after receiving the first broadcast message , sending the second broadcast message after a preset time delay (eg, 5 seconds). Wherein, the second broadcast message may be customized and used to instruct to start the third-party application installed in the terminal device. Since the first broadcast message is a message sent after the operating system is started to notify other applications in the terminal device, based on the different priority levels of broadcast receivers, system services and system-level applications need to be started first, so that third parties can automatically The startup application cannot complete self-starting, so a second broadcast message is sent after the first broadcast message is sent. The priority level of the third-party application program is lower than that of the application program. Optionally, there is no priority difference between the broadcast receivers of the second broadcast message.
由上述可知,本发明实施例提供的消息处理方法,在接收到操作系统启动完毕发送的第一广播消息后,发送一第二广播消息以启动终端设备中安装的开机自启动程序,避免了第一广播消息的广播接收者由于接收优先级低而长时间等待最终无法实现自启动的问题,提高了终端设备的运行效率,降低了终端设备的功耗。It can be seen from the above that the message processing method provided by the embodiment of the present invention, after receiving the first broadcast message sent after the operating system is started, sends a second broadcast message to start the boot self-starting program installed in the terminal device, avoiding the first broadcast message. A problem that broadcast receivers of a broadcast message wait for a long time due to low receiving priority and cannot finally realize self-starting, which improves the operating efficiency of the terminal equipment and reduces the power consumption of the terminal equipment.
图3是本发明实施例提供的另一种消息处理方法的流程图。可选的,所述接收所述第一广播消息后,发出第二广播消息包括:接收所述第一广播消息后,依据系统服务列表确定系统服务是否启动完成,当所述系统服务启动完成后发出第二广播消息。如图3所示,技术方案具体如下:Fig. 3 is a flowchart of another message processing method provided by an embodiment of the present invention. Optionally, after receiving the first broadcast message, sending the second broadcast message includes: after receiving the first broadcast message, determining whether the system service has been started according to the system service list, and when the system service is started A second broadcast message is sent. As shown in Figure 3, the technical solution is as follows:
步骤S201、依据接收到的开机指令启动终端设备中安装的操作系统。Step S201, start the operating system installed in the terminal device according to the received boot command.
步骤S202、对所述操作系统发出的第一广播消息进行监听,所述第一广播消息用于指示所述操作系统是否启动完成动。Step S202 , monitor a first broadcast message sent by the operating system, the first broadcast message is used to indicate whether the operating system has been started and completed.
步骤S203、接收所述第一广播消息后,依据系统服务列表确定系统服务是否启动完成,如果是,则执行步骤S204。Step S203. After receiving the first broadcast message, determine whether the system service has been started according to the system service list, and if yes, perform step S204.
步骤S204、发出第二广播消息,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序。Step S204, sending out a second broadcast message, where the second broadcast message is used to start the self-starting program installed in the terminal device.
在一个实施例中,系统服务优先被第一广播消息唤醒启动,待系统服务均启动完毕后,发出第二广播消息以使终端设备中安装的优先级别较低的应用程序实现自启动。由此实现了不影响系统服务启动的前提下,实现了终端设备其他应用程序的自启动。可选的,在确定系统服务是否启动完成时,可通过设置的或系统自带的系统服务列表确定列表中记录的系统自启动服务是否已均启动完毕。In one embodiment, the system service is first awakened and started by the first broadcast message, and after the system services are all started, the second broadcast message is sent to enable the application program installed in the terminal device with a lower priority to start automatically. In this way, the self-starting of other application programs of the terminal device is realized without affecting the starting of system services. Optionally, when determining whether the system service has been started, it may be determined whether the system self-starting services recorded in the list have been started through the set or system-built-in system service list.
在另一实施例中,所述第二广播消息的广播类型为有序广播,相应的,所述发出第二广播消息包括:依据所述终端设备中记录的开机自启动程序的启动顺序,依次发出第二广播消息。其中,根据广播发送方式的不同可将广播消息分为普通广播和有序广播。普通广播被管理模块发出后,广播接收者对该广播消息的接收是无序的,而有序广播被管理模块发出后,广播接收者按照顺序先后依次接收,即第一个广播接收者接收到广播消息并处理完毕后,第二个广播接收者才能开始接收并处理该广播消息,依次类推。本实施例中,可对终端设备安装的自启动应用程序的自启动顺序进行设置,以使开机自启动程序根据重要程度不同优先实现自启动。In another embodiment, the broadcast type of the second broadcast message is sequential broadcast, and correspondingly, the sending of the second broadcast message includes: according to the startup sequence of the self-starting program recorded in the terminal device, sequentially A second broadcast message is sent. Wherein, broadcast messages can be divided into ordinary broadcast and ordered broadcast according to different broadcast sending modes. After the ordinary broadcast is sent by the management module, the broadcast receivers receive the broadcast message out of order, but after the ordered broadcast is sent by the management module, the broadcast receivers receive it in sequence, that is, the first broadcast receiver receives After the broadcast message is processed and processed, the second broadcast receiver can start receiving and processing the broadcast message, and so on. In this embodiment, the self-starting sequence of the self-starting application programs installed on the terminal device may be set, so that the booting self-starting programs are prioritized for self-starting according to different degrees of importance.
图4是本发明实施例提供的另一种消息处理方法的流程图。可选的,在所述发出第二广播消息之前,还包括:检测开机自启动程序在本次开机前是否被强制关闭,如果是,则添加自启动标记,所述自启动标记用于被强制关闭的自启动程序在接收到广播消息时实现自启动。如图4所示:Fig. 4 is a flowchart of another message processing method provided by an embodiment of the present invention. Optionally, before the sending of the second broadcast message, it also includes: detecting whether the self-starting program is forcibly closed before the current boot, and if so, adding a self-starting mark, and the self-starting mark is used to be forced The closed self-starting program realizes self-starting when receiving a broadcast message. As shown in Figure 4:
步骤S301、依据接收到的开机指令启动终端设备中安装的操作系统。Step S301, start the operating system installed in the terminal device according to the received boot command.
步骤S302、对所述操作系统发出的第一广播消息进行监听,所述第一广播消息用于指示所述操作系统是否启动完成动。Step S302 , monitor a first broadcast message sent by the operating system, the first broadcast message is used to indicate whether the operating system has been started and completed.
步骤S303、接收所述第一广播消息后,检测开机自启动程序在本次开机前是否被强制关闭,如果是则执行步骤S304。Step S303 , after receiving the first broadcast message, detect whether the boot self-starting program is forcibly closed before the current boot, and if so, execute step S304 .
步骤S304、添加自启动标记,发出第二广播消息,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序。Step S304, adding a self-starting flag, and sending a second broadcast message, the second broadcast message is used to start the boot-up self-starting program installed in the terminal device.
在一个实施例中,当自启动程序被用户手动强制关闭后,会导致再次开机时无法实现自启动,本方案中通过添加自启动标记,所述自启动标记用于被强制关闭的自启动程序在接收到广播消息时实现自启动。示例性的,以Android操作系统为例,可定义两个新的Intent的Flag,如下:In one embodiment, when the self-starting program is forced to close manually by the user, the self-starting cannot be realized when the machine is turned on again. Implement self-starting when a broadcast message is received. Exemplarily, taking the Android operating system as an example, two new Intent Flags can be defined, as follows:
FLAG_INCLUDE_STOPPED_PACKAGES;FLAG_INCLUDE_STOPPED_PACKAGES;
FLAG_EXCLUDE_STOPPED_PACKAGES。FLAG_EXCLUDE_STOPPED_PACKAGES.
该第二广播消息中,可通过In the second broadcast message, the
setFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES)的方式,示例性的:The way of setFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES), exemplary:
Intent i=new Intent("com.citaq.startSever");Intent i = new Intent("com.citaq.startSever");
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);i.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
i.putExtra("msg",this.getPackageName());i. putExtra("msg", this. getPackageName());
sendBroadcast(i)。sendBroadcast(i).
在另一实施例中,步骤S303还可以是检测所述终端设备是否和无线网络连接,如果是,则发出第二广播消息。本实施例中,当终端设备联网成功后发送第二广播消息来开启自启动应用程序,避免了需要网络连接、消耗流量的自启动程序提前启动,进一步提高了系统运行效率,降低了流量消耗。In another embodiment, step S303 may also be to detect whether the terminal device is connected to a wireless network, and if yes, send a second broadcast message. In this embodiment, when the terminal device is successfully connected to the network, the second broadcast message is sent to start the self-starting application program, which avoids the early start of the self-starting program that requires network connection and consumes traffic, further improves system operation efficiency, and reduces traffic consumption.
图5是本发明实施例提供的另一种消息处理方法的流程图。可选的,在所述发出第二广播消息之前,还包括:检测所述终端设备中安装的安全数码卡是否挂载完成,如果是,则发出第二广播消息。如图5所示:Fig. 5 is a flowchart of another message processing method provided by an embodiment of the present invention. Optionally, before the sending of the second broadcast message, the method further includes: detecting whether the mounting of the secure digital card installed in the terminal device is completed, and if so, sending the second broadcast message. As shown in Figure 5:
步骤S401、依据接收到的开机指令启动终端设备中安装的操作系统。Step S401, start the operating system installed in the terminal device according to the received boot command.
步骤S402、对所述操作系统发出的第一广播消息进行监听,所述第一广播消息用于指示所述操作系统是否启动完成动。Step S402 , monitor the first broadcast message sent by the operating system, the first broadcast message is used to indicate whether the operating system is started and completed.
步骤S403、接收所述第一广播消息后,检测所述终端设备中安装的安全数码卡是否挂载完成,如果是则执行步骤S404。Step S403. After receiving the first broadcast message, check whether the mounting of the secure digital card installed in the terminal device is completed, and if so, execute step S404.
在一个实施例中,当接收到第一广播消息(BOOT_COMPLETED)后,检测安全数码卡(SD卡)是否挂在完毕,具体检测方式可以是:In one embodiment, after receiving the first broadcast message (BOOT_COMPLETED), it is detected whether the secure digital card (SD card) is hung up, and the specific detection method can be:
<receiver<receiver
android:name="com.javen.receiver.SystemEventReceiver"android:name="com.javen.receiver.SystemEventReceiver"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter><intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/><action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter></intent-filter>
<intent-filter><intent-filter>
<!--SD卡已经成功挂载--><! -- SD card has been mounted successfully -->
<action android:name="android.intent.action.MEDIA_MOUNTED"/><action android:name="android.intent.action.MEDIA_MOUNTED"/>
<!--sd卡存在,但还没有挂载--><! --sd card exists, but not mounted -->
<action android:name="android.intent.action.MEDIA_UNMOUNTED"/><action android:name="android.intent.action.MEDIA_UNMOUNTED"/>
<action android:name="android.intent.action.MEDIA_EJECT"/><action android:name="android.intent.action.MEDIA_EJECT"/>
<data android:scheme="file"/><data android:scheme="file"/>
</intent-filter></intent-filter>
</receiver></receiver>
步骤S404、发出第二广播消息,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序。Step S404, sending out a second broadcast message, where the second broadcast message is used to start the self-starting program installed in the terminal device.
由于某些需要自启动的应用程序安装在SD卡中,故当SD卡未加载完成时,其安装的应用程序无法接收到广播消息实现自启动,本实施例对SD卡是否挂载完成进行检测,当检测挂载完成后发送第二广播消息用于应用程序的自启动。Since some applications that need to be self-starting are installed in the SD card, when the SD card is not loaded, the installed applications cannot receive broadcast messages to achieve self-starting. This embodiment detects whether the SD card is mounted. , sending a second broadcast message for self-starting of the application after the detection of mounting is completed.
为便于更好地实施本发明实施例提供的消息处理方法,本发明实施例还提供一种消息处理装置。其中名词的含义与上述消息处理方法中相同,具体实现细节可以参考方法实施例中的说明。In order to better implement the message processing method provided by the embodiment of the present invention, the embodiment of the present invention further provides a message processing device. The meanings of the nouns are the same as those in the above message processing method, and for specific implementation details, please refer to the description in the method embodiments.
请参阅图6,图6是本发明实施例提供的消息处理装置的结构示意图。消息处理装置500可以包括:系统启动模块501,监听模块502,应用启动模块503。Please refer to FIG. 6. FIG. 6 is a schematic structural diagram of a message processing device provided by an embodiment of the present invention. The message processing apparatus 500 may include: a system startup module 501 , a monitoring module 502 , and an application startup module 503 .
系统启动模块501,用于依据接收到的开机指令启动终端设备中安装的操作系统。终端设备在接收到开机指令后,首先启动安装的操作系统。该开机指令可以由用户按触终端设备的电源键触发。其中,操作系统是管理和控制终端设备软件和硬件资源的计算机程序,终端设备中安装的其他应用程序需在操作系统的支持下运行。终端设备中安装的操作系统可以是Android操作系统、IOS操作系统等。The system startup module 501 is configured to start the operating system installed in the terminal device according to the received startup instruction. After receiving the boot instruction, the terminal device first starts the installed operating system. The power-on instruction may be triggered by the user pressing a power button of the terminal device. Among them, the operating system is a computer program that manages and controls the software and hardware resources of the terminal device, and other application programs installed in the terminal device need to run with the support of the operating system. The operating system installed in the terminal device may be an Android operating system, an IOS operating system, and the like.
监听模块502,用于对所述操作系统发出的第一广播消息进行监听,所述第一广播消息用于指示所述操作系统是否启动完成动。在一个实施例中,操作系统启动完毕后发送第一广播消息用于通知其他感兴趣的应用程序,告知操作系统已经启动完毕。示例性的,该感兴趣的其他应用程序也即注册了相应的广播接收器的应用程序可以是系统服务程序、系统应用程序、终端设备中安装的第三方应用程序等。由于该第一广播消息为操作系统启动完成后发出的通知,终端设备中的其他服务、应用程序均需响应该第一广播消息,为避免造成消息阻塞以及核心服务程序无法第一时间启动,故对广播接收者接收并处理广播消息的顺序进行了划分,依据不同广播接收者的类型定义不同的优先级,通常系统服务优先级较高,第三方应用程序优先级较低,而该第一广播消息为操作系统启动完成后发送的用于启动其他服务、应用程序的广播,由此使得大多数第三方应用程序由于长时间等待而最终不会响应该第一广播消息,由此许多设置为自启动的第三方应用程序无法在终端设备开机后实现自启动。在一个实施例中,对第一广播消息进行监听包括:监听操作系统通过调用sendBroadcast函数发送广播消息android.intent.action.BOOT_COMPLETED。在另一实施例中,对第一广播消息进行监听包括:通过注册的广播接收器监听是否接收到第一广播消息。The monitoring module 502 is configured to monitor a first broadcast message sent by the operating system, where the first broadcast message is used to indicate whether the operating system is started and completed. In one embodiment, after the operating system is started, the first broadcast message is sent to notify other interested applications that the operating system has been started. Exemplarily, the other interested application programs, that is, the application programs registered with the corresponding broadcast receivers, may be system service programs, system application programs, third-party application programs installed in the terminal device, and the like. Since the first broadcast message is a notification sent after the operating system is started, other services and application programs in the terminal device need to respond to the first broadcast message. The order in which broadcast receivers receive and process broadcast messages is divided, and different priorities are defined according to the types of broadcast receivers. Usually, the priority of system services is higher, and the priority of third-party applications is lower. The first broadcast The message is a broadcast for starting other services and applications sent after the operating system is started, so that most third-party applications will not respond to the first broadcast message due to a long wait, so many settings are automatically The launched third-party applications cannot be self-started after the terminal device is turned on. In one embodiment, monitoring the first broadcast message includes: monitoring the operating system to send the broadcast message android.intent.action.BOOT_COMPLETED by calling the sendBroadcast function. In another embodiment, monitoring the first broadcast message includes: monitoring whether the first broadcast message is received through a registered broadcast receiver.
应用启动模块503,用于接收所述第一广播消息后,发出第二广播消息,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序。其中,开机自启动程序为随着终端设备开机,操作系统启动完毕后可自动启动的应用程序。可选的,该开机自启动程序可以是终端设备中安装的被设置为开机自启动的第三方应用程序。该第二广播消息的类型为全局广播,其中,全局广播为所有应用程序可以接收到的广播。在一个实施例中,接收所述第一广播消息后,发出第二广播消息,可以是当接收到第一广播消息后,立即发送第二广播消息,还可以是当接收到第一广播消息后,延迟预设时间(如5秒)后发送第二广播消息。其中,第二广播消息可为自定义的用于指示开启终端设备中安装的第三方应用的。由于第一广播消息为操作系统启动完毕后发送的用于通知终端设备中其他应用程序的消息,基于广播接收者的优先级别的不同,需要系统服务、系统级别的应用优先启动,使得第三方自启动应用程序无法完成自启动,故在第一广播消息发出之后发送一第二广播消息,该第二广播消息在启动终端设备中安装的应用程序时,可顺利启动终端设备中安装的类似于第三方应用程序的优先级别较低的应用程序,可选的,第二广播消息的广播接收者无优先级区别。The application starting module 503 is configured to send a second broadcast message after receiving the first broadcast message, and the second broadcast message is used to start the self-starting program installed in the terminal device. Wherein, the boot self-starting program is an application program that can be automatically started after the operating system is started as the terminal device is turned on. Optionally, the boot-up self-starting program may be a third-party application installed in the terminal device and set to start up automatically. The type of the second broadcast message is a global broadcast, wherein the global broadcast is a broadcast that all application programs can receive. In one embodiment, sending the second broadcast message after receiving the first broadcast message may be sending the second broadcast message immediately after receiving the first broadcast message, or sending the second broadcast message immediately after receiving the first broadcast message , sending the second broadcast message after a preset time delay (eg, 5 seconds). Wherein, the second broadcast message may be customized and used to instruct to start the third-party application installed in the terminal device. Since the first broadcast message is a message sent after the operating system is started to notify other applications in the terminal device, based on the different priority levels of broadcast receivers, system services and system-level applications need to be started first, so that third parties can automatically The startup application cannot complete self-starting, so a second broadcast message is sent after the first broadcast message is sent. The priority level of the third-party application program is lower than that of the application program. Optionally, there is no priority difference between the broadcast receivers of the second broadcast message.
在一种可能的实施方式中,所述应用启动模块503具体用于:接收所述第一广播消息后,依据系统服务列表确定系统服务是否启动完成,当所述系统服务启动完成后发出第二广播消息。In a possible implementation manner, the application starting module 503 is specifically configured to: after receiving the first broadcast message, determine whether the system service is started according to the system service list, and send the second broadcast message after the system service is started broadcast message.
在一种可能的实施方式中,所述第二广播消息的广播类型为有序广播,相应的,所述应用启动模块503具体用于:依据所述终端设备中记录的开机自启动程序的启动顺序,依次发出第二广播消息。In a possible implementation manner, the broadcast type of the second broadcast message is an ordered broadcast, and correspondingly, the application starting module 503 is specifically configured to: start Sequentially, send out the second broadcast messages in sequence.
在一种可能的实施方式中,还包括:检测模块504,用于在所述发出第二广播消息之前,检测开机自启动程序在本次开机前是否被强制关闭,如果是,则添加自启动标记,所述自启动标记用于被强制关闭的自启动程序在接收到广播消息时实现自启动。In a possible implementation manner, it also includes: a detection module 504, configured to detect whether the boot self-starting program is forcibly closed before the current boot, before sending the second broadcast message, and if so, add a self-starting A flag, the self-starting flag is used for the self-starting program that is forcibly closed to realize self-starting when receiving a broadcast message.
在一种可能的实施方式中,所述检测模块504具体用于:检测所述终端设备中安装的安全数码卡是否挂载完成,如果是,则发出第二广播消息。In a possible implementation manner, the detection module 504 is specifically configured to: detect whether the secure digital card installed in the terminal device is mounted, and if so, send a second broadcast message.
在一种可能的实施方式中,所述检测模块504具体用于:检测所述终端设备是否和无线网络连接,如果是,则发出第二广播消息。In a possible implementation manner, the detection module 504 is specifically configured to: detect whether the terminal device is connected to a wireless network, and if yes, send a second broadcast message.
由上述可知,在接收到操作系统启动完毕发送的第一广播消息后,发送一第二广播消息以启动终端设备中安装的开机自启动程序,避免了第一广播消息的广播接收者由于接收优先级低而长时间等待最终无法实现自启动的问题,提高了终端设备的运行效率,降低了终端设备的功耗。As can be seen from the above, after receiving the first broadcast message sent after the operating system is started, a second broadcast message is sent to start the boot self-starting program installed in the terminal device, which avoids the broadcast receiver of the first broadcast message due to receiving priority. The low-level and long-term waiting will eventually fail to realize the self-starting problem, which improves the operating efficiency of the terminal equipment and reduces the power consumption of the terminal equipment.
本发明实施例提供了一种终端设备,该终端设备中可集成本发明实施例提供的消息处理装置。图7为本发明实施例提供的一种终端设备的结构示意图。如图7所示,该终端设备可以包括:壳体(图中未示出)、触摸屏(图中未示出)、触摸按键(图中未示出)、存储器601、中央处理器(Central Processing Unit,CPU)602(又称处理器,以下简称CPU)、电路板(图中未示出)和电源电路(图中未示出)。所述电路板安置在所述壳体围成的空间内部;所述CPU602和所述存储器601设置在所述电路板上;所述电源电路,用于为所述终端设备的各个电路或器件供电;所述存储器601,用于存储可执行程序代码;所述CPU602通过读取所述存储器601中存储的可执行程序代码来运行与所述可执行程序代码对应的计算机程序,以实现以下步骤:An embodiment of the present invention provides a terminal device, in which the message processing apparatus provided by the embodiment of the present invention can be integrated. FIG. 7 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention. As shown in FIG. 7, the terminal device may include: a housing (not shown in the figure), a touch screen (not shown in the figure), touch keys (not shown in the figure), a memory 601, a central processing unit (Central Processing Unit, CPU) 602 (also known as processor, hereinafter referred to as CPU), a circuit board (not shown in the figure) and a power circuit (not shown in the figure). The circuit board is placed inside the space surrounded by the housing; the CPU 602 and the memory 601 are arranged on the circuit board; the power supply circuit is used to supply power to each circuit or device of the terminal device The memory 601 is used to store executable program codes; the CPU 602 executes a computer program corresponding to the executable program codes by reading the executable program codes stored in the memory 601, to achieve the following steps:
依据接收到的开机指令启动终端设备中安装的操作系统;Start the operating system installed in the terminal device according to the received boot command;
对所述操作系统发出的第一广播消息进行监听,所述第一广播消息用于指示所述操作系统是否启动完成;Listening to a first broadcast message sent by the operating system, where the first broadcast message is used to indicate whether the operating system has been started;
接收所述第一广播消息后,发出第二广播消息,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序。After receiving the first broadcast message, a second broadcast message is sent, and the second broadcast message is used to start the boot self-starting program installed in the terminal device.
在一个可能的实施例中,所述接收所述第一广播消息后,发出第二广播消息包括:依据系统服务列表确定系统服务是否启动完成,当所述系统服务启动完成后发出第二广播消息。In a possible embodiment, after receiving the first broadcast message, sending the second broadcast message includes: determining whether the system service is started according to the system service list, and sending the second broadcast message after the system service is started .
在一个可能的实施例中,所述第二广播消息的广播类型为有序广播,相应的,所述发出第二广播消息包括:依据所述终端设备中记录的开机自启动程序的启动顺序,依次发出第二广播消息。In a possible embodiment, the broadcast type of the second broadcast message is sequential broadcast, and correspondingly, the sending of the second broadcast message includes: according to the startup sequence of the self-starting program recorded in the terminal device, Send out the second broadcast message in sequence.
在一个可能的实施例中,在所述发出第二广播消息之前,还包括:检测开机自启动程序在本次开机前是否被强制关闭,如果是,则添加自启动标记,所述自启动标记用于被强制关闭的自启动程序在接收到广播消息时实现自启动。In a possible embodiment, before the sending of the second broadcast message, it also includes: detecting whether the boot self-starting program is forcibly closed before this boot, and if so, adding a self-starting mark, the self-starting mark The self-starting program used for forced shutdown realizes self-starting when receiving a broadcast message.
在一个可能的实施例中,在所述发出第二广播消息之前,还包括:检测所述终端设备中安装的安全数码卡是否挂载完成,如果是,则发出第二广播消息。In a possible embodiment, before sending the second broadcast message, it further includes: detecting whether the secure digital card installed in the terminal device is mounted, and if so, sending the second broadcast message.
在一个可能的实施例中,在所述发出第二广播消息之前,还包括:检测所述终端设备是否和无线网络连接,如果是,则发出第二广播消息。In a possible embodiment, before sending the second broadcast message, it further includes: detecting whether the terminal device is connected to the wireless network, and if yes, sending the second broadcast message.
所述终端设备还包括:外设接口603、RF(Radio Frequency,射频)电路605、音频电路606、扬声器611、电源管理芯片608、输入/输出(I/O)子系统609、触摸屏612、其他输入/控制设备610以及外部端口604,这些部件通过一个或多个通信总线或信号线607来通信。The terminal device also includes: peripheral interface 603, RF (Radio Frequency, radio frequency) circuit 605, audio circuit 606, speaker 611, power management chip 608, input/output (I/O) subsystem 609, touch screen 612, other Input/control devices 610 and external ports 604 , these components communicate via one or more communication buses or signal lines 607 .
应该理解的是,图示终端设备600仅仅是终端设备的一个范例,并且终端设备600可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated terminal device 600 is only an example of a terminal device, and the terminal device 600 may have more or fewer components than those shown in the figure, and two or more components may be combined, Or can have a different component configuration. The various components shown in the figures may 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 used for message processing provided in this embodiment is described in detail below, and the terminal device uses a mobile phone as an example.
存储器601,所述存储器601可以被CPU602、外设接口603等访问,所述存储器601可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Memory 601, the memory 601 can be accessed by the CPU 602, the peripheral interface 603, etc., the memory 601 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more disk storage devices, flash memory devices , or other volatile solid-state storage devices.
外设接口603,所述外设接口603可以将设备的输入和输出外设连接到CPU602和存储器601。Peripheral interface 603 , which can connect the input and output peripherals of the device to CPU 602 and memory 601 .
I/O子系统609,所述I/O子系统609可以将设备上的输入输出外设,例如触摸屏612和其他输入/控制设备610,连接到外设接口603。I/O子系统609可以包括显示控制器6091和用于控制其他输入/控制设备610的一个或多个输入控制器6092。其中,一个或多个输入控制器6092从其他输入/控制设备610接收电信号或者向其他输入/控制设备610发送电信号,其他输入/控制设备610可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器6092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。The I/O subsystem 609 , the I/O subsystem 609 can connect input and output peripherals on the device, such as a touch screen 612 and other input/control devices 610 , to the peripheral interface 603 . I/O subsystem 609 may include a display controller 6091 and one or more input controllers 6092 for controlling other input/control devices 610 . Among them, one or more input controllers 6092 receive electrical signals from or send electrical signals to other input/control devices 610, which may include physical buttons (push buttons, rocker buttons, etc.) ), dials, slide switches, joysticks, click wheels. It is worth noting that the input controller 6092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
触摸屏612,所述触摸屏612是用户终端设备与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。A touch screen 612. The touch screen 612 is an input interface and an output interface between the user terminal device and the user, and displays visual output to the user. The visual output may include graphics, text, icons, videos, and the like.
I/O子系统609中的显示控制器6091从触摸屏612接收电信号或者向触摸屏612发送电信号。触摸屏612检测触摸屏上的接触,显示控制器6091将检测到的接触转换为与显示在触摸屏612上的用户界面对象的交互,即实现人机交互,显示在触摸屏612上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。The display controller 6091 in the I/O subsystem 609 receives electrical signals from the touch screen 612 or sends electrical signals to the touch screen 612 . The touch screen 612 detects the contact on the touch screen, and the display controller 6091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 612, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 612 can be a running Icons for games, icons for networking to appropriate networks, etc. It is worth noting that the device may also include an optical mouse, which is a touch-sensitive surface that does not display visual output, or that is an extension of a touch-sensitive surface formed by a touchscreen.
RF电路605,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路605接收并发送RF信号,RF信号也称为电磁信号,RF电路605将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路605可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 605 is mainly used to establish communication between the mobile phone and the wireless network (that is, the network side), and realize data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. Specifically, the RF circuit 605 receives and sends RF signals, which are also called electromagnetic signals, and the RF circuit 605 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with communication networks and other devices through the electromagnetic signals to communicate. RF circuitry 605 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, Subscriber Identity Module (Subscriber Identity Module, SIM) and so on.
音频电路606,主要用于从外设接口603接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器611。The audio circuit 606 is mainly used to receive audio data from the peripheral interface 603 , convert the audio data into electrical signals, and send the electrical signals to the speaker 611 .
扬声器611,用于将手机通过RF电路605从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 611 is used to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 605 into sound and play the sound to the user.
电源管理芯片608,用于为CPU602、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 608 is used for power supply and power management for the hardware connected to the CPU 602 , the I/O subsystem and the peripheral interface.
本发明实施例提供的终端设备,可以有效实现安装的应用的自启动。The terminal device provided by the embodiment of the present invention can effectively implement self-starting of installed applications.
本发明实施例还提供一种包含终端设备可执行指令的存储介质,所述终端设备可执行指令在由终端设备控制单元执行时用于执行一种消息处理方法,其特征在于,该方法包括:The embodiment of the present invention also provides a storage medium containing executable instructions of the terminal equipment, the executable instructions of the terminal equipment are used to execute a message processing method when executed by the control unit of the terminal equipment, and the method is characterized in that the method includes:
依据接收到的开机指令启动终端设备中安装的操作系统;Start the operating system installed in the terminal device according to the received boot command;
对所述操作系统发出的第一广播消息进行监听,所述第一广播消息用于指示所述操作系统是否启动完成动;Listening to a first broadcast message sent by the operating system, where the first broadcast message is used to indicate whether the operating system has been started and completed;
接收所述第一广播消息后,发出第二广播消息,所述第二广播消息用于启动所述终端设备中安装的开机自启动程序。After receiving the first broadcast message, a second broadcast message is sent, and the second broadcast message is used to start the boot self-starting program installed in the terminal device.
存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDR RAM、SRAM、EDO RAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过广播处理的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media such as CD-ROMs, floppy disks or tape drives; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc. ; non-volatile memory, such as flash memory, magnetic media (eg hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. Also, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network such as the Internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (eg, in different computer systems processed by broadcast). The storage medium may store program instructions (eg embodied as computer programs) executable by one or more processors.
当然,本发明实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的消息处理方法操作,还可以执行本发明任意实施例所提供的消息处理方法中的相关操作。Certainly, a storage medium containing computer-executable instructions provided by an embodiment of the present invention, the computer-executable instructions are not limited to the operation of the above-mentioned message processing method, and may also execute the message processing method provided by any embodiment of the present invention Related operations in .
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention, and the present invention The scope is determined by the scope of the appended claims.
Claims (10)
- A kind of 1. message treatment method, it is characterised in that including:Start the operating system installed in terminal device according to the start-up command received;The first broadcast message sent to the operating system is monitored, and described first broadcasts the message for indicating the operation System whether start completion;After receiving first broadcast message, the second broadcast message is sent, described second broadcasts the message for starting the terminal The start self-triggered program installed in equipment.
- 2. according to the method for claim 1, it is characterised in that after reception first broadcast message, send second Broadcast message includes:According to system service list determine system service whether start completion, send second after the system service start completion Broadcast message.
- 3. according to the method for claim 2, it is characterised in that the broadcast type of second broadcast message is wide in order Broadcast, accordingly, second broadcast message that sends includes:According to the boot sequence of the start self-triggered program recorded in the terminal device, the second broadcast message is sent successively.
- 4. according to the method any one of claim 1-3, it is characterised in that it is described send the second broadcast message it Before, in addition to:Whether detection start self-triggered program is forced closed before this start, if it is, addition self-starting mark, described Self-starting marks realizes self-starting for the self-triggered program being forced closed when receiving broadcast message.
- 5. according to the method any one of claim 1-3, it is characterised in that it is described send the second broadcast message it Before, in addition to:Detecting the safe digital card installed in the terminal device, whether carry is completed, if it is, sending the second broadcast message.
- 6. according to the method any one of claim 1-3, it is characterised in that it is described send the second broadcast message it Before, in addition to:Detect whether the terminal device connects with wireless network, if it is, sending the second broadcast message.
- A kind of 7. message processing apparatus, it is characterised in that including:System starting module, for starting the operating system installed in terminal device according to the start-up command received;Module is monitored, the first broadcast message for being sent to the operating system is monitored, and first broadcast message is used In the instruction operating system, whether start completion is moved;Application launch module, after receiving first broadcast message, send the second broadcast message, second broadcast message For starting the start self-triggered program installed in the terminal device.
- 8. device according to claim 6, it is characterised in that the application launch module is specifically used for:Receive it is described first broadcast message after, according to system service list determine system service whether start completion, when the system The second broadcast message is sent after system service start completion.
- 9. a kind of terminal device, including:Processor, memory and storage are on a memory and the meter that can run on a processor Calculation machine program, it is characterised in that realized described in the computing device during computer program such as any one of claim 1-6 institutes The message treatment method stated.
- A kind of 10. storage medium for including terminal device executable instruction, it is characterised in that the terminal device executable instruction As message treatment method during terminal device computing device for execution as any one of claim 1-6.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710620125.8A CN107423064B (en) | 2017-07-26 | 2017-07-26 | Message processing method, device, terminal device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710620125.8A CN107423064B (en) | 2017-07-26 | 2017-07-26 | Message processing method, device, terminal device and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107423064A true CN107423064A (en) | 2017-12-01 |
| CN107423064B CN107423064B (en) | 2020-12-08 |
Family
ID=60430456
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710620125.8A Active CN107423064B (en) | 2017-07-26 | 2017-07-26 | Message processing method, device, terminal device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107423064B (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108038010A (en) * | 2017-12-25 | 2018-05-15 | 青岛海信电器股份有限公司 | Android system startup stage broadcast transmission method, apparatus and terminal |
| CN109992309A (en) * | 2017-12-29 | 2019-07-09 | 广东欧珀移动通信有限公司 | Application processing method and apparatus, electronic device, and computer-readable storage medium |
| CN110825443A (en) * | 2018-08-13 | 2020-02-21 | 深圳市冠旭电子股份有限公司 | Information interaction method and terminal device of a smart speaker |
| CN112835758A (en) * | 2021-03-22 | 2021-05-25 | 四川酷比通信设备有限公司 | A method and terminal device for self-starting and running of test software |
| CN113823279A (en) * | 2020-06-16 | 2021-12-21 | 阿里巴巴集团控股有限公司 | Application program awakening method and device and electronic equipment |
| CN116244008A (en) * | 2023-05-10 | 2023-06-09 | 荣耀终端有限公司 | Application starting method, electronic device and storage medium |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103823699A (en) * | 2014-02-27 | 2014-05-28 | 广州视源电子科技股份有限公司 | Method and device for controlling self-starting of application program |
| US9066039B2 (en) * | 2009-12-11 | 2015-06-23 | Samsung Electronics Co., Ltd. | Selective booting method and broadcast receiving apparatus using the same |
| CN105159700A (en) * | 2015-07-30 | 2015-12-16 | 努比亚技术有限公司 | Application self-start control apparatus and method |
| CN106484473A (en) * | 2016-09-29 | 2017-03-08 | Tcl集团股份有限公司 | A kind of application starts method and apparatus |
| CN106528158A (en) * | 2016-11-18 | 2017-03-22 | 广东欧珀移动通信有限公司 | Method and device for mounting memory card and mobile terminal |
| CN106708637A (en) * | 2017-03-10 | 2017-05-24 | 广东欧珀移动通信有限公司 | Startup broadcast sending method and apparatus, and terminal |
-
2017
- 2017-07-26 CN CN201710620125.8A patent/CN107423064B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9066039B2 (en) * | 2009-12-11 | 2015-06-23 | Samsung Electronics Co., Ltd. | Selective booting method and broadcast receiving apparatus using the same |
| CN103823699A (en) * | 2014-02-27 | 2014-05-28 | 广州视源电子科技股份有限公司 | Method and device for controlling self-starting of application program |
| CN105159700A (en) * | 2015-07-30 | 2015-12-16 | 努比亚技术有限公司 | Application self-start control apparatus and method |
| CN106484473A (en) * | 2016-09-29 | 2017-03-08 | Tcl集团股份有限公司 | A kind of application starts method and apparatus |
| CN106528158A (en) * | 2016-11-18 | 2017-03-22 | 广东欧珀移动通信有限公司 | Method and device for mounting memory card and mobile terminal |
| CN106708637A (en) * | 2017-03-10 | 2017-05-24 | 广东欧珀移动通信有限公司 | Startup broadcast sending method and apparatus, and terminal |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108038010A (en) * | 2017-12-25 | 2018-05-15 | 青岛海信电器股份有限公司 | Android system startup stage broadcast transmission method, apparatus and terminal |
| CN109992309A (en) * | 2017-12-29 | 2019-07-09 | 广东欧珀移动通信有限公司 | Application processing method and apparatus, electronic device, and computer-readable storage medium |
| CN110825443A (en) * | 2018-08-13 | 2020-02-21 | 深圳市冠旭电子股份有限公司 | Information interaction method and terminal device of a smart speaker |
| CN113823279A (en) * | 2020-06-16 | 2021-12-21 | 阿里巴巴集团控股有限公司 | Application program awakening method and device and electronic equipment |
| CN112835758A (en) * | 2021-03-22 | 2021-05-25 | 四川酷比通信设备有限公司 | A method and terminal device for self-starting and running of test software |
| CN116244008A (en) * | 2023-05-10 | 2023-06-09 | 荣耀终端有限公司 | Application starting method, electronic device and storage medium |
| CN116244008B (en) * | 2023-05-10 | 2023-09-15 | 荣耀终端有限公司 | Application launch methods, electronic devices and storage media |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107423064B (en) | 2020-12-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107423064B (en) | Message processing method, device, terminal device and storage medium | |
| US10631361B2 (en) | Method and apparatus for providing user with information received by electronic device | |
| CN108710515B (en) | Application preloading method, device, storage medium and terminal | |
| CN109840418B (en) | Application jump control method, device, storage medium and terminal | |
| CN107885588B (en) | Application service control method and device, storage medium and mobile terminal | |
| CN106406940B (en) | System upgrading method, device and terminal | |
| CN107861773A (en) | Management and control method, device, storage medium and mobile terminal for association activation | |
| CN107844342B (en) | Application program keep alive management and control method, device and storage medium and mobile terminal | |
| CN106484547B (en) | A management method, device and terminal for multi-opening applications | |
| CN107943270B (en) | Application service control method and device, storage medium and mobile terminal | |
| CN108681474B (en) | Application preloading method and device, storage medium and terminal | |
| CN107026933B (en) | Multi-open application message management method and device and intelligent terminal | |
| CN107861759A (en) | Window control method and device, terminal equipment and storage medium | |
| CN107797841A (en) | Window control method, apparatus, terminal device and storage medium | |
| CN107844341B (en) | Process starting control method and device, storage medium and mobile terminal | |
| CN106502808B (en) | Method, device and terminal for copying files | |
| CN107957913A (en) | Management and control method and device for associated startup, storage medium and mobile terminal | |
| CN107070670B (en) | Method, device and terminal equipment for controlling broadcast sender to send broadcast message | |
| CN106953852B (en) | Registration method, device and terminal device for broadcast receiver | |
| CN106936826B (en) | Registration method and device of broadcast receiver and terminal equipment | |
| WO2014166307A1 (en) | Method for determining performance of process of application and computer system | |
| CN107861608A (en) | System notification service control method, device, terminal device and storage medium | |
| US10863521B1 (en) | Broadcast receiver control method and apparatus, and mobile terminal | |
| CN106851595B (en) | Ordered broadcast processing method and device and terminal equipment | |
| CN108089897A (en) | Application program starting management method and device, storage medium and mobile terminal |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant |