Detailed description of the invention
Below in conjunction with accompanying drawing, embodiments of the invention are described in detail.
As shown in Figure 1, closing control method flow schematic diagram for a kind of terminal for having power supply interface described according to embodiments of the present invention, first, when detecting user and performing the operation closed a terminal, it is judged that currently whether there is the terminal interface (step 101) powered for peripheral hardware; Then, if there is the terminal interface powered for peripheral hardware, then control described terminal so that the terminal " shut " mode" corresponding shutoff operation (step 102) of execution that this interface is powered can be maintained for peripheral hardware.
Wherein, the described interface that maintains is the " shut " mode" that peripheral hardware is powered, relevant with the version of operating system and hardware configuration etc., for the terminal unit that configuration is higher, dormancy " shut " mode" generally can supporting interface supplying power for outside preferably, therefore, it can acquiescence and perform park mode; And if not can confirm that present terminal configuration height time, then can pass through collect described terminal current system configuration information; Then determine that the maintained interface that described terminal is currently supported is the terminal " shut " mode" that peripheral hardware is powered according to described current system configuration information.
And for collecting the opportunity of described terminal current system configuration information, can be according to preset strategy periodic collection, can also be having peripheral hardware to insert terminal, detecting when there is currently the terminal interface powered for peripheral hardware, collect described terminal current system configuration information.
According to embodiments of the invention, after determining that can maintain this interface is the " shut " mode" that peripheral hardware is powered, can be directly perform this " shut " mode", can also be first point out for user that described can to maintain this interface be the terminal " shut " mode" that peripheral hardware is powered, select to perform corresponding shutoff operation further according to user, to strengthen the interactivity with user.
Common working power is being provided for peripheral hardware owing to interface supplying power for outside is probably on function type, it is also likely to be to charge for peripheral hardware, and after terminal is closed, peripheral hardware is likely to also be not fully complete charging, many times user be likely to can continue to charge more concerned about, therefore, in a step 101, described powered types can also be determined whether, if described powered types is charging, then control described terminal so that the terminal " shut " mode" corresponding shutoff operation of execution that this interface is powered for peripheral hardware can be maintained.
In addition, whether user can continue to the concern that interface is powered to after terminal is closed, also relation is had with peripheral hardware type, such as USB storage device, it is usually after terminal is closed and will not pay close attention to whether its interface can continue power supply, and for the fan of USB interface or the hands machine that charging, it is possible to wish that remaining to maintain interface after closing a terminal powers, therefore, in above-mentioned steps 101, described peripheral hardware type can be determined whether, and the terminal " shut " mode" that terminal according to described peripheral hardware Type Control is powered can maintain this interface for peripheral hardware performs corresponding shutoff operation. and specifically the peripheral hardware of which type needs to continue to power supply after terminal is closed, then can judge according to preset strategy according to a preset type list.
Determination to terminal " shut " mode" in above-mentioned steps 102, it is possible to use a preset configuration file table, this interface that maintains that record different system configuration information is supported is the terminal " shut " mode" that peripheral hardware is powered; Again the described current system configuration information collected is mated with described preset configuration file table, and determine, according to matching result, the terminal " shut " mode" that the maintained interface that described terminal is currently supported is powered.
And without finding the " shut " mode" matched, then according to current system configuration information and configuration file table generation one more new configuration file, and determine the terminal " shut " mode" that this maintained interface that more new configuration file is supported is powered; When performing described shutoff operation, more new configuration file described in first carrying out, then perform the " shut " mode" of correspondence.
Terminal current system configuration information described in the embodiment of the present invention, it is possible to include hardware and/or the software configuration information of terminal the machine.
" shut " mode" for the maintained interface supplying power for outside that terminal is currently supported, outside the Pass being configured with system, in some cases also can be relevant with the configuration of peripheral hardware, the notebook computer of such as same producer and the mutual of mobile phone are supported will be better than between the product of different manufacturers, therefore, for in above-mentioned steps 102, it is also possible to farther include: collect the configuration information of described peripheral hardware; And a preset configuration file table, the maintained interface that record different system configuration information is supported for different peripheral configuration is the terminal " shut " mode" that peripheral hardware is powered; Then, the described current system configuration information collected and peripheral configuration information are mated with described preset configuration file table, and determines, according to matching result, the terminal " shut " mode" that the maintained interface that described terminal is currently supported is powered.
As Fig. 2 shows, closing control method flow schematic diagram for a kind of terminal for having power supply interface according to another example of the present invention, first, when detect there is currently the terminal interface powered for peripheral hardware time, collect described terminal Current hardware configuration information (step 201); Then, terminal " shut " mode" (step 202) of maintained power supply that described terminal currently supports is determined according to described Current hardware configuration information; And when user closes described terminal, the terminal " shut " mode" that the maintained interface currently supported according to described terminal is powered, perform corresponding " shut " mode" (step 203).
It is charged as example, when there being USB device to insert, it is possible to detect the type of this USB device, and whether be utilize the information such as USB interface charging with USB interface. Such as, identified by USB_ID pin. USB cable line has two kinds, and one is generic USB line, and USB_ID is NC (empty foot), and one is USB-CHARGE line, USB_ID wire internal connect GND (). After USB device mounts, it is possible to detection USB_ID pin status, if high level, then may determine that as USB communication mode, if low level, then may determine that as charge mode.
Further, it is also possible to after USB device mounts, attempt and USBHOST (main equipment) communication, if communication success, may determine that as usb communication pattern, if time-out does not receive HOST and replys, then may determine that as charge mode.
When determining USB interface and being charge mode, then illustrate powering for peripheral hardware, at this moment, according to embodiments of the present invention, it is possible to collect described terminal Current hardware configuration information. Those hardware configuration informations, it is possible to the configuration file stored after being in advance or regularly gathering in described terminal, it is also possible to be instantaneous acquiring Hardware match information again after determining USB charge mode.
These hardware informations can be type or the type information of this terminal, or the type being mainly for electric control unit therein or type information. Such as, for computer, it is possible to obtain the type information of motherboard, different motherboard power supply plans under different " shut " mode"s are different. Or, for notebook computer or panel computer, the probability that motherboard is changed is not as high, at this moment the model of acquisition terminal itself can serve as reference.
Terminal " shut " mode" difference due to the maintained power supply that different hardware configuration is supported, therefore, after determining the hardware configuration of present terminal, it is obtained with the " shut " mode" of its maintained power supply supported, as it is shown on figure 3, be the flow chart of determination " shut " mode" described according to embodiments of the present invention, first, a preset configuration file table, terminal " shut " mode" (step 301) that the maintained interface that record different hardware configurations information is supported is powered; Then the described Current hardware configuration information collected is mated with described preset configuration file table, and determine, according to matching result, terminal " shut " mode" (step 302) that the maintained interface that described terminal is currently supported is powered.
Wherein, preset configuration file table can be pre-installed in this terminal, it is also possible to is first stored in server, obtains this document table from server after then passing through terminal Connection Service device.
And without when finding the " shut " mode" matched, then according to Current hardware configuration information and configuration file table generation one more new configuration file, and the terminal " shut " mode" that this maintained interface that more new configuration file is supported is powered being determined; Then when user closes described terminal, more new configuration file described in execution, and perform the " shut " mode" of correspondence.
Such as, although some motherboard supports that USB interface is still powered in the hibernation mode, but need an option in the power management module in the machine is set to " ON ". If the machine hardware configuration information collected after inserting USB device shows that although motherboard can be supported, but the corresponding config option of power management module is " OFF ", at this moment, by the contrast with configuration file table, as long as changing the corresponding option of power management module into " ON ", at this moment can produce a more new configuration file, described terminal can be controlled and perform the amendment action of this correspondence option. When user closes a terminal, first carry out this more new configuration file, the corresponding option of power management module is changed into " ON ", then performs the " shut " mode" of sleep mode.
Described terminal Current hardware configuration information, except can being to include the hardware configuration information of terminal the machine, it is also possible to includes the peripheral hardware information being currently powered.
Owing to current ip intelligent peripherals gets more and more, different peripheral also has different from the matching degree of different terminals, such as, between computer and the mobile phone of same producer and between computer and the mobile phone of different manufacturers, even if identical terminal, it is all different to the " shut " mode" of the maintained power supply that different peripheral is supported, therefore, there is a need to obtain the peripheral hardware information being currently powered further.
Accordingly, described configuration file table can record the terminal " shut " mode" that the maintained interface that different terminal the machine hardware configuration informations supports is powered and the terminal " shut " mode" that different terminal the machine hardware configuration informations is powered for the maintained interface that different peripheral is supported.
After obtaining terminal itself and the hardware information of peripheral hardware, the terminal " shut " mode" that the maintained interface that present terminal is supported is powered can be known by query configuration file table, or according to current collection to hardware information and configuration file table between difference generate more new configuration file, and performing this " shut " mode" more performing correspondence after new configuration file again, to maintain the power supply of this USB interface.
Described configuration file table can be preset in terminal local; Or it is preset in server, described end side the Current hardware configuration information collected is sent to server and perform and the mating of described configuration file table, and matching result is returned described terminal.
Accordingly, the present invention also provides for the closing control system of a kind of terminal for having power supply interface, and it may include that
Judge module, for when detecting user and performing the operation closed a terminal, it is judged that currently whether there is the terminal interface powered for peripheral hardware;
Perform module, for determine there is the terminal interface powered for peripheral hardware time, control described terminal so that the terminal " shut " mode" corresponding shutoff operation of execution that this interface is powered can be maintained for peripheral hardware.
Wherein, described execution module, it is possible to by collecting described terminal current system configuration information, and determine that the maintained interface that described terminal is currently supported is the terminal " shut " mode" that peripheral hardware is powered according to described current system configuration information.
Described execution module can collect described terminal current system configuration information when detecting and there is currently the terminal interface powered for peripheral hardware.
Described execution module, it is also possible to described can to maintain this interface be the terminal " shut " mode" that peripheral hardware is powered for pointing out for user, and selects to perform corresponding shutoff operation according to user.
Described judge module, it is possible to be further used for judging described powered types, if described powered types is charging, then controls described terminal can maintain the terminal " shut " mode" corresponding shutoff operation of execution that this interface is powered for peripheral hardware.
Described judge module, it is possible to be further used for judging described peripheral hardware type, and the terminal " shut " mode" that terminal according to described peripheral hardware Type Control is powered can maintain this interface for peripheral hardware performs corresponding shutoff operation.
Described execution module, can pass through to mate configuration file table preset to the described current system configuration information collected and, and determine, according to matching result, the terminal " shut " mode" that the maintained interface that described terminal is currently supported is powered, wherein, in described configuration file table, record has this interface that maintains that different system configuration information is supported is the terminal " shut " mode" that peripheral hardware is powered; Without when finding the " shut " mode" matched, then according to current system configuration information and configuration file table generation one more new configuration file, and determining the terminal " shut " mode" that this maintained interface that more new configuration file is supported is powered; When performing described shutoff operation, more new configuration file described in first carrying out, then perform the " shut " mode" of correspondence.
Described execution module is further used for collecting the configuration information of described peripheral hardware, and configuration file table preset with to the described current system configuration information collected and peripheral configuration information is mated, and determine, according to matching result, the terminal " shut " mode" that the maintained interface that described terminal is currently supported is powered, wherein, in described configuration file table, record has the maintained interface that different system configuration information is supported for different peripheral configuration to be the terminal " shut " mode" that peripheral hardware is powered.
As shown in Figure 4, for the closing control system schematic of a kind of terminal for having power supply interface according to further embodiment of this invention, including: information collection module 401, mode decision module 402 and pattern perform module 403, wherein:
Information collection module 401, for detect there is currently the terminal interface powered for peripheral hardware time, collect described terminal Current hardware configuration information;
Mode decision module 402, for determining the terminal " shut " mode" of maintained power supply that described terminal currently supports according to described Current hardware configuration information;
Pattern performs module 403, for when user closes described terminal, and the terminal " shut " mode" that the maintained interface currently supported according to described terminal is powered, perform corresponding " shut " mode".
Described pattern performs module 403, it is also possible to the " shut " mode" that the terminal " shut " mode" powered for user's prompting and current the maintained interface supported matches, and selects to perform corresponding " shut " mode" according to user, to improve the interactivity with user.
As it is shown in figure 5, be the structural representation of mode decision module 502 described according to embodiments of the present invention, including: memory element 501 and matching unit 502, wherein:
Memory element 501, for a preset configuration file table, the terminal " shut " mode" that the maintained interface that record different hardware configurations information is supported is powered;
Matching unit 502, for being mated with described preset configuration file table by the described Current hardware configuration information collected, and determines, according to matching result, the terminal " shut " mode" that the maintained interface that described terminal is currently supported is powered.
In addition, farther include: generate unit 503, for when not finding the " shut " mode" matched, according to Current hardware configuration information and configuration file table generation one more new configuration file, and determine the terminal " shut " mode" that this maintained interface that more new configuration file is supported is powered, so that described pattern performs module 403 when user closes described terminal, more new configuration file described in being first carried out, then perform the " shut " mode" that described user selectes.
Equally, described terminal Current hardware configuration information, it is possible to include the hardware configuration information of terminal the machine, it is also possible to include the peripheral hardware information being currently powered.
Described configuration file table record has terminal " shut " mode" that the maintained interface that different terminal the machine hardware configuration informations is supported powers and the terminal " shut " mode" that different terminal the machine hardware configuration informations is powered for the maintained interface that different peripheral is supported.
Described configuration file table can be preset in terminal local, it is also possible to is preset in server, described mode decision module sent by the Current hardware configuration information collected to server and perform and the mating of described configuration file table, and return matching result.
Application embodiments of the invention, user is in the process using terminal, if employing terminal interface external equipment is powered, then can control terminal and automatically collect the hardware information of present terminal and peripheral hardware, determine that support can maintain the terminal " shut " mode" that interface is powered, and when user needs to close a terminal, will provide and can maintain terminal " shut " mode" confession user's execution that interface is powered, make user in use, naturally keep the power supply to peripheral hardware, will not cause stopping the power supply to external equipment because of hastily shutdown.