CN105049936B - Method and device for switching on and off - Google Patents
Method and device for switching on and off Download PDFInfo
- Publication number
- CN105049936B CN105049936B CN201510497949.1A CN201510497949A CN105049936B CN 105049936 B CN105049936 B CN 105049936B CN 201510497949 A CN201510497949 A CN 201510497949A CN 105049936 B CN105049936 B CN 105049936B
- Authority
- CN
- China
- Prior art keywords
- module
- external device
- message
- application program
- reload
- 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.)
- Expired - Fee Related
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
- H04N21/4436—Power management, e.g. shutting down unused components of the receiver
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及智能终端领域,尤其涉及一种开关机的方法及装置。The invention relates to the field of intelligent terminals, in particular to a method and device for turning on and off a machine.
背景技术Background technique
随着智能电视产业的快速发展,开关机速度也越来越引起用户关注。一般智能电视的开关机模式有两种,一种是通过智能电视主体上的电源触发的关机,此时智能电视中的所有模块都断电;另一种是按遥控器中的电源按钮触发的关机,此时智能电视中除内存和主芯片之外的其他模块断电,内存与主芯片处于低电工作模式。With the rapid development of the smart TV industry, the speed of switching on and off has attracted more and more attention from users. Generally, there are two switch modes for smart TVs. One is the shutdown triggered by the power on the main body of the smart TV, and all modules in the smart TV are powered off at this time; the other is triggered by pressing the power button on the remote control. Shut down, at this time, other modules in the smart TV except the memory and the main chip are powered off, and the memory and the main chip are in a low-power working mode.
在通过遥控器中的电源按钮触发的开关机的过程大致包括以下几个步骤:当用户按下遥控器上的电源按钮进行关机时,内核接收到遥控器发出的信号后,通知所有应用程序外接设备断电,应用程序根据外接设备断电状态进行各自的相关处理,等待所有应用程序各自处理完成之后,内核将内存中的数据进行保存;当用户在此按遥控器上的电源按钮进行开机时,内核接收到遥控器发出的信号后,检测接入的外接设备,恢复内存数据,并将外接设备的状态信息发送至应用程序,各应用程序根据外接设备上电状态更新执行对应处理。The process of switching on and off triggered by the power button in the remote controller generally includes the following steps: When the user presses the power button on the remote controller to shut down, the kernel notifies all external applications after receiving the signal from the remote controller. When the device is powered off, the application program performs its own related processing according to the power-off status of the external device. After the processing of all the application programs is completed, the kernel saves the data in the memory; when the user presses the power button on the remote control to start the After the kernel receives the signal from the remote control, it detects the connected external device, restores the memory data, and sends the status information of the external device to the application program, and each application program performs corresponding processing according to the power-on status update of the external device.
在实现上述通过遥控器中的电源按钮触发开关机的过程中,发明人发现现有技术中至少存在如下问题:无论关机还是开机,都需要将外接设备的状态同步至应用程序。尤其是在关机过程中,由于应用程序会根据外接设备状态的变化修改内存中的数据,为了保证关机时存储的内存数据的正确性,所以必须等待各个应用程序完全同步外接设备的变化之后,才能保存内存中的数据,完成关机。这样会使得关机耗时随着与外接设备相关的应用程序的增加而延长。In the process of triggering the power on and off through the power button in the remote controller, the inventor found at least the following problem in the prior art: no matter whether it is turned off or turned on, it is necessary to synchronize the status of the external device to the application program. Especially during the shutdown process, since the application program will modify the data in the memory according to the status change of the external device, in order to ensure the correctness of the memory data stored at the time of shutdown, it is necessary to wait for each application program to fully synchronize the changes in the external device before Save the data in the memory and complete the shutdown. This will cause the shutdown time to be prolonged as the number of applications related to external devices increases.
发明内容Contents of the invention
本发明的实施例提供一种开关机的方法及装置,通过减少关机过程中内核与应用程序同步外接设备状态的步骤,缩短关机耗时。Embodiments of the present invention provide a method and device for turning on and off the machine, which shortens the time spent on turning off the machine by reducing the steps of synchronizing the state of the external device between the kernel and the application program in the process of turning off the machine.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
第一方面,本发明实施例提供了一种开关机方法,包括:In a first aspect, an embodiment of the present invention provides a method for switching on and off, including:
在接收到关机指令的情况下,内核断开与外接设备的连接,并中断与应用程序的交互;In the case of receiving the shutdown command, the kernel disconnects the connection with the external device and interrupts the interaction with the application program;
在接收到开机指令的情况下,内核启动并检测外接设备,内核向应用程序发送重加载消息,应用程序根据重加载消息更新已存储的外接设备信息;重加载消息中包括外接设备的挂载路径。In the case of receiving the power-on command, the kernel starts and detects the external device, the kernel sends a reload message to the application program, and the application program updates the stored external device information according to the reload message; the reload message includes the mounting path of the external device .
第二方面,本发明实施例提供了一种智能设备,包括:In a second aspect, an embodiment of the present invention provides a smart device, including:
指令接收模块,用于接收关机指令和开机指令;An instruction receiving module is used to receive a shutdown instruction and a startup instruction;
内核,用于在指令接收模块接收到关机指令的情况下,断开与外接设备的连接,并中断与应用程序模块的交互;The kernel is used for disconnecting the connection with the external device and interrupting the interaction with the application module when the instruction receiving module receives the shutdown instruction;
内核,还用于在指令接收模块接收到开机指令的情况下,启动并检测外接设备,向应用程序模块发送重加载消息;The kernel is also used to start and detect the external device and send a reload message to the application module when the instruction receiving module receives the boot instruction;
应用程序模块,用于根据重加载消息更新已存储的外接设备信息;重加载消息中包括外接设备的挂载路径。The application program module is used to update the stored external device information according to the reloading message; the reloading message includes the mounting path of the external device.
本发明实施例提供的一种开关机方法及装置,该方法包括:在接收到关机指令的情况下,内核断开与外接设备的连接,并中断与应用程序的交互;在接收到开机指令的情况下,内核启动并检测硬件设备,内核向应用程序发送重加载消息,应用程序根据重加载消息更新已存储的外接设备信息;重加载消息中包括外接设备的挂载路径。这样,通过在快速开机时,更新触发应用程序更新外接设备的相关信息,打破了关机过程中内核与应用程序之间必须同步外接设备状态的过程,最终在不增加开机步骤的情况下,精简了关机过程中的步骤,加快了关机时的关机耗时。The embodiment of the present invention provides a method and device for switching on and off, the method comprising: when a shutdown command is received, the kernel disconnects the connection with the external device, and interrupts the interaction with the application program; In this case, the kernel starts and detects the hardware device, the kernel sends a reload message to the application program, and the application program updates the stored external device information according to the reload message; the reload message includes the mounting path of the external device. In this way, by updating the triggering application to update the relevant information of the external device during the fast boot, the process of synchronizing the state of the external device between the kernel and the application during the shutdown process is broken, and finally, without increasing the boot steps, the process is simplified. The steps in the shutdown process speed up the time-consuming shutdown during shutdown.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or prior art. Obviously, the accompanying drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为本发明实施例提供的一种开关机方法的流程示意图;Fig. 1 is a schematic flow chart of a power-on/off method provided by an embodiment of the present invention;
图2为本发明实施例提供的另一种开关机方法的流程示意图;FIG. 2 is a schematic flow chart of another switching method provided by an embodiment of the present invention;
图3为本发明实施例提供的一种智能设备的功能示意图;FIG. 3 is a functional schematic diagram of a smart device provided by an embodiment of the present invention;
图4为本发明实施例提供的另一种智能设备的功能示意图。Fig. 4 is a functional schematic diagram of another smart device provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
需要说明的是,实施例一和实施例二中方法的执行主体可以是任意一种能够连接外接设备并且存在快速开关机模式的智能终端,可以是智能电视,也可以是电脑,还可以是智能音箱。本发明对此不做限制。It should be noted that the execution subject of the method in Embodiment 1 and Embodiment 2 can be any smart terminal that can connect to external devices and has a fast power on/off mode, it can be a smart TV, a computer, or a smart terminal. speakers. The present invention is not limited thereto.
实施例一Embodiment one
本发明实施例提供了一种开关机方法。如图1所示,包括:An embodiment of the present invention provides a method for turning on and off a machine. As shown in Figure 1, including:
101、在接收到关机指令的情况下,内核断开与外接设备的连接,并中断与应用程序的交互。101. In the case of receiving the shutdown instruction, the kernel disconnects the connection with the external device, and interrupts the interaction with the application program.
需要说明的是,关机指令是指示内核控制除内存和主芯片之外的其他部分断电的指令。It should be noted that the shutdown instruction is an instruction that instructs the kernel to control the power-off of other parts except the memory and the main chip.
具体的,在智能电视处于正常运行的情况下,用户按下遥控器上的电源按钮,遥控器发出信号,智能电视接收遥控器发出的信号,并根据智能电视的当前运行状态产生关机指令,将关机指令发送至内核。内核控制除内存和主芯片之外的所有模块断电。外接设备断电之前向内核发送外接设备移除消息,内核接收到外接设备移除消息后,通知驱动模块删除外接设备所对应的驱动信息,并中断与应用程序的交互,不向应用程序同步外接设备移除状态,以避免应用程序根据外接设备移除状态进行相关处理。Specifically, when the smart TV is in normal operation, the user presses the power button on the remote control, the remote control sends out a signal, the smart TV receives the signal from the remote control, and generates a shutdown command according to the current operating state of the smart TV, and the A shutdown command is sent to the kernel. The kernel controls power down of all modules except the memory and the main chip. Before the external device is powered off, send an external device removal message to the kernel. After receiving the external device removal message, the kernel notifies the driver module to delete the driver information corresponding to the external device, and interrupts the interaction with the application program, and does not synchronize the external device to the application program. Device removal status, so as to prevent the application from performing related processing according to the removal status of the external device.
需要说明的是,在快速关机的情况下,内核不用同步应用程序中保存的外接设备状态与内核感知的外接设备的实际状态,也就是说,虽然内核接收了外接设备移除消息,但是不把外接设备移除的信息通知应用程序,在快速关机后应用程序保存的外接设备的相关数据仍按照插入外接设备的状态存储。It should be noted that in the case of fast shutdown, the kernel does not need to synchronize the external device state saved in the application program with the actual state of the external device perceived by the kernel. That is to say, although the kernel receives the external device removal message, it does not The information about the removal of the external device notifies the application program, and the relevant data of the external device saved by the application program after the quick shutdown is still stored according to the state of the external device inserted.
102、在接收到开机指令的情况下,内核启动并检测硬件设备,内核向应用程序发送重加载消息,应用程序根据重加载消息更新已存储的外接设备信息。102. In the case of receiving the power-on instruction, the kernel starts and detects the hardware device, the kernel sends a reload message to the application program, and the application program updates the stored external device information according to the reload message.
其中,重加载消息中包括外接设备的挂载路径。Wherein, the reloading message includes the mounting path of the external device.
需要说明的是,应用程序已存储的外接设备信息是指在关机之前,外接设备插入之后,应用程序获取的外接设备的相关信息,该信息可以包括:外接设备标识、外接设备驱动加载路径等。It should be noted that the external device information stored by the application refers to the relevant information of the external device obtained by the application program before shutdown and after the external device is plugged in. The information may include: external device identification, external device driver loading path, etc.
需要说明的是,在快速关机之后,智能电视内存和主芯片工作低电状态,此时智能电视依旧能够接收遥控器发送的触发开机的信号。It should be noted that after the quick shutdown, the smart TV memory and the main chip work in a low-power state, and at this time the smart TV can still receive the signal sent by the remote control to trigger the start-up.
需要说明的是,在智能电视快速关机时,卸载外接设备的驱动,在智能电视快速开机时,重新加载外接设备的驱动。由于重新加载外接设备的驱动时,加载路径与关机前驱动的加载路径不同,并且快速关机时应用程序没有修改外接设备的相关信息,所以在快速开机后,应用程序需要更新自身保存的外接设备的相关信息。It should be noted that, when the smart TV is quickly shut down, the driver of the external device is uninstalled, and when the smart TV is quickly turned on, the driver of the external device is reloaded. When reloading the driver of the external device, the loading path is different from the loading path of the driver before shutdown, and the application program does not modify the relevant information of the external device during the fast shutdown, so after the fast boot, the application needs to update the external device saved by itself. Related Information.
具体的,在智能电视处于快速关机后的待机状态下,用户按下遥控器上的电源按钮,遥控器发出信号,智能电视接收遥控器发出的信号,并根据智能电视的当前运行状态产生开机指令,将开机指令发送至内核。内核控制所有模块上电。外接设备上电之后向内核发送外接设备连接消息,内核接收到外接设备连接消息后,内核通知驱动模块加载外接设备所对应的驱动信息,驱动模块加载外接设备对应的驱动程序,然后内核通知应用程序更新应用程序存储的外接设备的相关信息。Specifically, when the smart TV is in the standby state after being quickly shut down, the user presses the power button on the remote controller, the remote controller sends a signal, and the smart TV receives the signal sent by the remote controller, and generates a power-on command according to the current operating state of the smart TV , to send the power-on command to the kernel. The core controls the power-up of all modules. After the external device is powered on, it sends an external device connection message to the kernel. After the kernel receives the external device connection message, the kernel notifies the driver module to load the driver information corresponding to the external device. The driver module loads the driver program corresponding to the external device, and then the kernel notifies the application Update the information about the external device stored by the application.
进一步的,内核向应用程序发送重加载消息可以具体为:Further, the reload message sent by the kernel to the application can be specifically:
内核向VOLD(英语全称:Volume Daemon,中文全称:卷守护进程)模块发送硬件重加载事件;VOLD模块根据硬件重加载事件,向MountService(中文全称:挂载服务)模块发送硬件重连接消息;MountService模块根据硬件重连接消息向应用程序发送重加载消息。The kernel sends a hardware reload event to the VOLD (full name in English: Volume Daemon, full name in Chinese: Volume Daemon) module; the VOLD module sends a hardware reconnection message to the MountService (full name in Chinese: Mount Service) module according to the hardware reload event; MountService The module sends a reload message to the application based on the hardware reconnect message.
需要说明的是,VOLD模块是安卓系统中存储类的守护进程,主要负责系统对大容量存储设备的挂载/卸载任务。MountService模块是一个服务类,相当于一个中间桥梁,负责接收Vold模块的消息并传递给上层的应用程序。It should be noted that the VOLD module is a daemon process of the storage class in the Android system, and is mainly responsible for the system's mounting/unmounting tasks for mass storage devices. The MountService module is a service class, which is equivalent to an intermediate bridge, responsible for receiving the messages of the Vold module and passing them to the upper application.
需要说明的是,内核通过VOLD模块和MountService模块向应用程序传递重加载消息只是一种内核向应用程序传递消息的方法,内核向应用程序下传递重加载消息的方法还可以现有技术中任意一种内核能够向应用程序传递消息的方法。It should be noted that the kernel transmits the reload message to the application program through the VOLD module and the MountService module is only a method for the kernel to transmit the message to the application program, and the method for the kernel to transmit the reload message to the application program can also be any one of the prior art A method by which the kernel can pass messages to applications.
需要说明的是,步骤102与步骤103之间的间隔时间可以为几分钟,也可以为几个小时,还可以为几天,本发明对此不作限制。It should be noted that the interval between step 102 and step 103 may be several minutes, several hours, or several days, which is not limited in the present invention.
本发明实施例提供的一种开关机方法,包括:在接收到关机指令的情况下,内核断开与外接设备的连接,并中断与应用程序的交互;在接收到开机指令的情况下,内核启动并检测硬件设备,内核向应用程序发送重加载消息,应用程序根据重加载消息更新已存储的外接设备信息;重加载消息中包括外接设备的挂载路径。这样,通过在快速开机时,更新触发应用程序更新外接设备的相关信息,打破了关机过程中内核与应用程序之间必须同步外接设备状态的过程,最终在不增加开机步骤的情况下,精简了快速关机过程中的步骤,加快了快速关机时的关机耗时。A method for switching on and off provided by an embodiment of the present invention includes: when receiving a shutdown command, the kernel disconnects the connection with the external device, and interrupts the interaction with the application program; when receiving the startup command, the kernel Start and detect the hardware device, the kernel sends a reload message to the application program, and the application program updates the stored external device information according to the reload message; the reload message includes the mounting path of the external device. In this way, by updating the triggering application to update the relevant information of the external device during the fast boot, the process of synchronizing the state of the external device between the kernel and the application during the shutdown process is broken, and finally, without increasing the boot steps, the process is simplified. The steps in the fast shutdown process speed up the shutdown time during fast shutdown.
实施例二Embodiment two
本发明实施例提供了一种开关机方法。如图2所示,图2中的a部分(包含步骤201-203)表示快速关机时智能电视中各模块之间的交互图,图2中的b部分(包含步骤204-212)表示快速开机时智能电视中各模块之间的交互图,参考图所示,该方法包括:An embodiment of the present invention provides a method for turning on and off a machine. As shown in Figure 2, part a (including steps 201-203) in Figure 2 represents the interaction diagram between each module in the smart TV when it is turned off quickly, and part b (including steps 204-212) in Fig. 2 represents a quick start The interaction diagram between the modules in the smart TV, as shown in the reference figure, the method includes:
201、内核获取关机指令,控制除内存和主芯片之外的所有模块断电。201. The kernel obtains a shutdown command, and controls all modules except the memory and the main chip to be powered off.
202、外接设备断电向内核发送外接设备移除消息,内核接收到外接设备移除消息。202. The external device is powered off and sends an external device removal message to the kernel, and the kernel receives the external device removal message.
203、内核通知驱动模块删除外接设备所对应的驱动信息,驱动模块卸载外接设备对应的驱动程序。203. The kernel notifies the driver module to delete the driver information corresponding to the external device, and the driver module uninstalls the driver program corresponding to the external device.
204、内核获取开机指令,内核控制所有模块上电并检测硬件设备。204. The kernel obtains a boot command, and the kernel controls all modules to be powered on and detects hardware devices.
205、外接设备上电之后向内核发送外接设备连接消息,内核接收到外接设备连接消息。205. After the external device is powered on, it sends an external device connection message to the kernel, and the kernel receives the external device connection message.
206、内核通知驱动模块加载外接设备所对应的驱动信息,驱动模块加载外接设备对应的驱动程序。206. The kernel notifies the driver module to load the driver information corresponding to the external device, and the driver module loads the driver program corresponding to the external device.
207、内核向VOLD模块发送硬件重加载事件。207. The kernel sends a hardware reload event to the VOLD module.
208、VOLD模块根据硬件重加载事件,向MountService模块发送硬件重连接消息。208. The VOLD module sends a hardware reconnect message to the MountService module according to the hardware reload event.
209、MountService模块根据硬件重连接消息,向在MountService模块注册的关联外接设备的所有应用程序发送重加载消息。209. The MountService module sends a reload message to all application programs associated with the external device registered in the MountService module according to the hardware reconnection message.
需要说明的是,在智能电视快速关机之前,应用程序会向MountService模块注册本应用程序关联的外接设备。所以在步骤209中MountService模块能够判断出哪些应用程序关联过的该外接设备。It should be noted that before the smart TV is quickly shut down, the application will register the external device associated with the application with the MountService module. Therefore, in step 209, the MountService module can determine which application programs have been associated with the external device.
210、应用程序确定是否存储有外接设备信息。210. The application program determines whether the external device information is stored.
211、在应用程序存储有外接设备信息的情况下,应用程序根据重加载消息更新已存储的外接设备信息。211. In the case that the application program stores the external device information, the application program updates the stored external device information according to the reload message.
212、在应用程序没有存储外接设备信息的情况下,应用程序存储重加载消息。212. In the case that the application program does not store the information of the external device, the application program stores the reloading message.
需要说明的是,若在快速关机之后且快速开机之前,有新的外接设备与智能电视连接,则在快速开机之后,相应的应用程序会向MountService模块注册其关联的新的外接设备,但是此时应用程序中还没有存储关于该外接设备的相关信息,所以此时应用程序在接收到重加载消息后,直接将重加载消息中携带的相关消息进行保存,并更具应用程序执行相关逻辑。It should be noted that if there is a new external device connected to the smart TV after the quick shutdown and before the quick startup, then after the quick startup, the corresponding application will register its associated new external device with the MountService module, but this At that time, the application program has not stored relevant information about the external device, so at this time, after receiving the reload message, the application program directly saves the relevant information carried in the reload message, and executes related logic with the application program.
本发明实施例提供的一种开关机方法,在快速关机过程中,内核断开与外接设备的连接,不向应用程序同步外接设备断开状态;在快速开机过程中,内核启动并检测硬件设备,内核向应用程序发送重加载消息,应用程序根据重加载消息更新已存储的外接设备信息;重加载消息中包括外接设备的挂载路径。这样,通过在快速开机时,更新触发应用程序更新外接设备的相关信息,打破了关机过程中内核与应用程序之间必须同步外接设备状态的过程,最终在不增加开机步骤的情况下,精简了快速关机过程中的步骤,加快了快速关机时的关机耗时。In the method of switching on and off provided by the embodiment of the present invention, during the fast shutdown process, the kernel disconnects the connection with the external device, and does not synchronize the disconnected state of the external device to the application program; during the fast boot process, the kernel starts and detects the hardware device , the kernel sends a reload message to the application program, and the application program updates the stored external device information according to the reload message; the reload message includes the mounting path of the external device. In this way, by updating the triggering application to update the relevant information of the external device during the fast boot, the process of synchronizing the state of the external device between the kernel and the application during the shutdown process is broken, and finally, without increasing the boot steps, the process is simplified. The steps in the fast shutdown process speed up the shutdown time during fast shutdown.
实施例三Embodiment three
图3为本发明实施例提供的一种智能设备的功能示意图。参考图3所示,该智能设备包括:指令接收模块301、内核302和应用程序模块303。Fig. 3 is a functional schematic diagram of a smart device provided by an embodiment of the present invention. Referring to FIG. 3 , the smart device includes: an instruction receiving module 301 , a kernel 302 and an application program module 303 .
指令接收模块301,用于接收关机指令和开机指令;An instruction receiving module 301, configured to receive a shutdown instruction and a startup instruction;
内核302,用于在指令接收模块301接收到关机指令的情况下,断开与外接设备的连接,并中断与应用程序模块303的交互;The kernel 302 is configured to disconnect the connection with the external device and interrupt the interaction with the application module 303 when the instruction receiving module 301 receives the shutdown instruction;
内核302,还用于在指令接收模块301接收到开机指令的情况下,启动并检测外接设备,向应用程序模块303发送重加载消息;The kernel 302 is also used to start and detect the external device when the instruction receiving module 301 receives the boot instruction, and send a reload message to the application module 303;
应用程序模块303,用于根据重加载消息更新已存储的外接设备信息;重加载消息中包括外接设备的挂载路径。The application program module 303 is configured to update the stored external device information according to the reload message; the reload message includes the mounting path of the external device.
进一步的,为了实现内核302向应用程序模块303发送重加载消息,如图4所示,该智能设备还包括:VOLD模块304和MountService模块305;Further, in order to realize that the kernel 302 sends a reload message to the application module 303, as shown in Figure 4, the smart device also includes: a VOLD module 304 and a MountService module 305;
相应的,内核302,具体用于向VOLD模块304发送硬件重加载事件;Correspondingly, the kernel 302 is specifically configured to send a hardware reload event to the VOLD module 304;
VOLD模块304,用于根据硬件重加载事件,向MountService模块305发送硬件重连接消息;The VOLD module 304 is configured to send a hardware reconnect message to the MountService module 305 according to the hardware reload event;
MountService模块305,用于根据硬件重连接消息向应用程序模块303发送重加载消息。The MountService module 305 is configured to send a reload message to the application program module 303 according to the hardware reconnection message.
进一步的,应用程序模块303,还用于向MountService模块305注册应用程序模块303关联的外接设备;Further, the application module 303 is also used to register the external device associated with the application module 303 with the MountService module 305;
MountService模块305,具体用于根据硬件重连接消息,向在MountService模块305注册的关联外接设备的所有应用程序模块303发送重加载消息。The MountService module 305 is specifically configured to send a reload message to all application modules 303 of the associated external devices registered in the MountService module 305 according to the hardware reconnection message.
进一步的,应用程序模块303,还用于确定是否存储有外接设备信息;Further, the application module 303 is also used to determine whether there is external device information stored;
应用程序模块303,具体用于在应用程序模块303存储有外接设备信息的情况下,根据重加载消息更新已存储的外接设备信息。The application program module 303 is specifically configured to update the stored external device information according to the reload message when the application program module 303 stores the external device information.
或者,应用程序模块303,还用于在应用程序模块303没有存储外接设备信息的情况下,应用程序模块303存储重加载消息。Or, the application program module 303 is further configured to store the reload message in the case that the application program module 303 does not store the information of the external device.
本发明实施例提供的一种智能设备,内核在指令接收模块接收到关机指令的情况下,断开与外接设备的连接,并中断与应用程序模块的交互,在指令接收模块接收到开机指令的情况下,启动并检测外接设备,向应用程序模块发送重加载消息;应用程序模块根据重加载消息更新已存储的外接设备信息;重加载消息中包括外接设备的挂载路径。这样,通过在快速开机时,更新触发应用程序更新外接设备的相关信息,打破了关机过程中内核与应用程序之间必须同步外接设备状态的过程,最终在不增加开机步骤的情况下,精简了关机过程中的步骤,加快了关机时的关机耗时。In the smart device provided by the embodiment of the present invention, when the instruction receiving module receives the shutdown instruction, the kernel disconnects the connection with the external device, and interrupts the interaction with the application module, and when the instruction receiving module receives the startup instruction In this case, the external device is started and detected, and a reloading message is sent to the application module; the application module updates the stored information of the external device according to the reloading message; the reloading message includes the mounting path of the external device. In this way, by updating the triggering application to update the relevant information of the external device during the fast boot, the process of synchronizing the state of the external device between the kernel and the application during the shutdown process is broken, and finally, without increasing the boot steps, the process is simplified. The steps in the shutdown process speed up the time-consuming shutdown during shutdown.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium, and include several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM for short), magnetic disk or optical disk, etc., which can store program codes. medium.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810654542.9A CN108833981B (en) | 2015-08-13 | 2015-08-13 | Startup and shutdown method |
| CN201510497949.1A CN105049936B (en) | 2015-08-13 | 2015-08-13 | Method and device for switching on and off |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510497949.1A CN105049936B (en) | 2015-08-13 | 2015-08-13 | Method and device for switching on and off |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810654542.9A Division CN108833981B (en) | 2015-08-13 | 2015-08-13 | Startup and shutdown method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN105049936A CN105049936A (en) | 2015-11-11 |
| CN105049936B true CN105049936B (en) | 2018-09-18 |
Family
ID=54456056
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510497949.1A Expired - Fee Related CN105049936B (en) | 2015-08-13 | 2015-08-13 | Method and device for switching on and off |
| CN201810654542.9A Expired - Fee Related CN108833981B (en) | 2015-08-13 | 2015-08-13 | Startup and shutdown method |
Family Applications After (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810654542.9A Expired - Fee Related CN108833981B (en) | 2015-08-13 | 2015-08-13 | Startup and shutdown method |
Country Status (1)
| Country | Link |
|---|---|
| CN (2) | CN105049936B (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108833669A (en) * | 2018-04-27 | 2018-11-16 | Oppo广东移动通信有限公司 | shutdown method and related product |
| CN108833668B (en) * | 2018-04-27 | 2020-12-15 | Oppo广东移动通信有限公司 | Shutdown method and related product |
| CN108958811A (en) * | 2018-05-23 | 2018-12-07 | 郑州云海信息技术有限公司 | A kind of closedown method, device, equipment and computer readable storage medium |
| CN110365839B (en) * | 2019-07-04 | 2020-08-28 | Oppo广东移动通信有限公司 | Shutdown method, shutdown device, shutdown medium and electronic equipment |
| CN114968378B (en) * | 2021-02-23 | 2024-12-06 | 广州视源电子科技股份有限公司 | A control method, device, equipment and storage medium |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1092878A (en) * | 1993-03-20 | 1994-09-28 | 宏碁电脑股份有限公司 | Power saving computer system with control power supply to peripheral devices |
| CN101515194A (en) * | 2008-02-21 | 2009-08-26 | 鸿富锦精密工业(深圳)有限公司 | Computer operating state converting method |
| US7669044B2 (en) * | 2006-09-29 | 2010-02-23 | Microsoft Corporation | Accelerated system boot |
| CN101782802A (en) * | 2009-01-20 | 2010-07-21 | 台达电子工业股份有限公司 | Standby power-saving system and computer power supply starting and disconnecting method thereof |
| CN103096167A (en) * | 2012-12-24 | 2013-05-08 | 康佳集团股份有限公司 | Starting method and starting system of intelligent television |
| CN103428561A (en) * | 2013-08-13 | 2013-12-04 | 刘惠斌 | Device and method for quickly starting or awakening intelligentized television |
| CN103796066A (en) * | 2014-01-21 | 2014-05-14 | 上海晨思电子科技有限公司 | Smart television system and method for turning on and turning off smart television system |
| CN104391657A (en) * | 2014-11-24 | 2015-03-04 | 上海盈方微电子有限公司 | Method for mounting multi-partition storage device in Android system |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH11305882A (en) * | 1998-04-24 | 1999-11-05 | Toshiba Corp | Computer system and application program startup control method |
| JP4918350B2 (en) * | 2006-03-29 | 2012-04-18 | 富士通株式会社 | Information processing apparatus, power supply control method, and program |
| CN102055937A (en) * | 2009-11-06 | 2011-05-11 | 鸿富锦精密工业(深圳)有限公司 | Television and method for turning off television |
-
2015
- 2015-08-13 CN CN201510497949.1A patent/CN105049936B/en not_active Expired - Fee Related
- 2015-08-13 CN CN201810654542.9A patent/CN108833981B/en not_active Expired - Fee Related
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1092878A (en) * | 1993-03-20 | 1994-09-28 | 宏碁电脑股份有限公司 | Power saving computer system with control power supply to peripheral devices |
| US7669044B2 (en) * | 2006-09-29 | 2010-02-23 | Microsoft Corporation | Accelerated system boot |
| CN101515194A (en) * | 2008-02-21 | 2009-08-26 | 鸿富锦精密工业(深圳)有限公司 | Computer operating state converting method |
| CN101782802A (en) * | 2009-01-20 | 2010-07-21 | 台达电子工业股份有限公司 | Standby power-saving system and computer power supply starting and disconnecting method thereof |
| CN103096167A (en) * | 2012-12-24 | 2013-05-08 | 康佳集团股份有限公司 | Starting method and starting system of intelligent television |
| CN103428561A (en) * | 2013-08-13 | 2013-12-04 | 刘惠斌 | Device and method for quickly starting or awakening intelligentized television |
| CN103796066A (en) * | 2014-01-21 | 2014-05-14 | 上海晨思电子科技有限公司 | Smart television system and method for turning on and turning off smart television system |
| CN104391657A (en) * | 2014-11-24 | 2015-03-04 | 上海盈方微电子有限公司 | Method for mounting multi-partition storage device in Android system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108833981B (en) | 2020-09-01 |
| CN105049936A (en) | 2015-11-11 |
| CN108833981A (en) | 2018-11-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103425506B (en) | Closedown method and starting-up method and communication terminal | |
| US8650332B2 (en) | Method for switching working mode, USB device, and host device | |
| CN105049936B (en) | Method and device for switching on and off | |
| CN108228374B (en) | A fault processing method, device and system for equipment | |
| CN109067416B (en) | Method for realizing hot plug and start of SIM card and intelligent hardware | |
| CN102419719A (en) | Computer system and method for starting same | |
| CN103748569A (en) | System and methods for driverless operation of USB device | |
| EP2821882B1 (en) | Computer device and method for converting working mode of universal serial bus connector of the computer device | |
| CN109683968B (en) | Switch quick start method, switch and storage medium | |
| US8578182B2 (en) | Power lock-up setting method performed by baseboard management controller and electronic apparatus using the same | |
| US10042800B2 (en) | Active USB device and switching method for operating mode thereof | |
| CN215769715U (en) | Recovery device for abnormal starting | |
| CN109976886B (en) | Kernel remote switching method and device | |
| CN109905770B (en) | Terminal starting method and device and terminal | |
| CN105045599A (en) | Television and computer integrated machine and method for realizing remote startup and shutdown control of same | |
| CN107918567A (en) | Method and system for restoring factory settings, readable storage medium and electronic device | |
| CN117235004B (en) | Server control method, device, terminal equipment and readable storage medium | |
| CN102567178B (en) | A kind of electronic equipment and dump energy Notification Method thereof and starting method | |
| CN111246199B (en) | Control method, device, terminal equipment and storage medium for camera test | |
| CN105263181A (en) | WIFI-based file downloading method and WIFI-based file downloading system of mobile terminal | |
| CN104166599B (en) | A kind of ARM equipment, which is restarted, recovers the method for configuration of dispatching from the factory | |
| CN105554275A (en) | Method and device for starting mobile terminal | |
| CN118965462A (en) | Server bus port control system and method, storage medium and electronic device | |
| CN103648029B (en) | The energising guard method of intelligent television and system | |
| CN207424873U (en) | network physical isolation computer and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180918 |