CN109739564B - Electronic equipment and control method - Google Patents

Electronic equipment and control method Download PDF

Info

Publication number
CN109739564B
CN109739564B CN201811647641.0A CN201811647641A CN109739564B CN 109739564 B CN109739564 B CN 109739564B CN 201811647641 A CN201811647641 A CN 201811647641A CN 109739564 B CN109739564 B CN 109739564B
Authority
CN
China
Prior art keywords
control
application
instruction
processing unit
control instruction
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.)
Active
Application number
CN201811647641.0A
Other languages
Chinese (zh)
Other versions
CN109739564A (en
Inventor
鲁希达
易贤群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201811647641.0A priority Critical patent/CN109739564B/en
Publication of CN109739564A publication Critical patent/CN109739564A/en
Application granted granted Critical
Publication of CN109739564B publication Critical patent/CN109739564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides an electronic device and a control method, wherein the electronic device comprises: the input device comprises a processing unit and at least one input unit, wherein the processing unit is used for enabling or disabling the function of the at least one input unit; the control device is connected with the processing unit and used for obtaining the control instruction sent by the basic input and output system and sending the control instruction to the processing unit so that the processing unit enables or disables the function of at least one input unit according to the control instruction.

Description

Electronic equipment and control method
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a control method and an electronic device.
Background
In some cases, it is necessary to control the input unit in the input device of the electronic device, for example, when a user plays a game, the user may easily touch a Windows key (or other keys) of the keyboard by mistake, and once the user touches the Windows key by mistake, the user may exit the game or interrupt the game, which may result in poor user experience.
Disclosure of Invention
In view of this, the present application provides an electronic device and a control method, and the technical solution is as follows:
an electronic device, comprising:
an input device comprising a processing unit and at least one input unit, the processing unit for enabling or disabling a function of the at least one input unit;
and the control device is connected with the processing unit and is used for obtaining a control instruction sent by a basic input and output system and sending the control instruction to the processing unit so that the processing unit enables or disables the function of at least one input unit according to the control instruction.
Optionally, the bios obtains the control instruction sent by the operating system through a specific interface.
Optionally, the electronic device is capable of running a first application and a second application;
and the operating system monitors the running state of the first application through the second application so as to obtain the control instruction under the condition that the running state of the first application meets the condition.
Optionally, the control instruction includes a disable instruction and an enable instruction;
the operating system obtains the forbidding instruction when the first application runs and obtains the enabling instruction when the first application stops running.
Optionally, the bios writes the control instruction in a designated memory area of the control device;
the control device monitors the designated memory area of the control device, and sends the control instruction to the processing unit when monitoring the control instruction.
Optionally, when the processing unit finishes executing the control instruction, the processing unit feeds back an execution result of the control instruction to the control device, so that the control device feeds back the execution result of the control instruction to the basic input/output system.
Optionally, the control device and the processing unit communicate based on a bidirectional two-wire system synchronous serial bus protocol.
A control method, comprising:
the control device obtains a control instruction sent by the basic input and output system;
the control device sends the control instruction to a processing unit of the input device, so that the processing unit enables or disables the function of at least one input unit in the input device according to the control instruction.
Optionally, the obtaining, by the control device, a control instruction sent by the basic input output system includes:
when a first application runs, the control device obtains a prohibition instruction sent by the basic input and output system;
when the first application stops running, the control device obtains an enabling instruction sent by the basic input and output system.
Optionally, the control method further includes:
the processing unit feeds back the execution result of the control instruction to the control device, so that the control device feeds back the execution result of the control instruction to the basic input and output system
As can be seen from the above description, in the electronic device and the control method provided in the present application, the control device in the electronic device is connected to the processing unit of the input device, so that when the control device obtains the control command sent by the basic input/output system, the control device can send the control command to the processing unit of the input device, so that the processing unit of the input device enables or disables the function of at least one input unit of the input device according to the control command. The electronic equipment and the control method provided by the embodiment of the application can realize the control of the input unit of the input device.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on the provided drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating an electronic device implementing a function of enabling or disabling at least one input unit according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a control method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In view of the problems existing at present, the inventors of the present invention have conducted intensive studies and finally provide a control scheme. The scheme of the present application is described by the following examples.
First, an embodiment of the present application provides an electronic device, please refer to fig. 1, which shows a schematic structural diagram of the electronic device, and the electronic device at least includes: an input device 101 and a control device 102.
The input device 101 may be a device for receiving data and information input by a user, such as a keyboard. The input device 101 may comprise a processing unit 1011 and at least one input unit 1012, and if the input device 101 is a keyboard, the processing unit 1011 may be keyboard firmware and one input unit may be a key.
The processing unit 1011 can interact with the bios and the input device 101, can obtain information of the bios, can control the input device (the input device may not be limited to the input device 101 in the present application), and can manage a power supply of the electronic apparatus. In the present embodiment, the processing unit 1011 is configured to control at least one input unit 1012 (here, "at least one input unit" refers to at least one of all input units included in the input apparatus 101), and enable or disable the function of the at least one input unit 1012 (here, "at least one input unit" refers to at least one of all input units controllable by the processing unit 1011).
The BIOS is a System that directly controls each item of hardware of the electronic device.
The control device 102 is connected to the processing unit 1011 of the input device 101, and the control device 102 and the processing unit 1011 can communicate based on the bidirectional two-wire system synchronous serial bus I2C protocol, but the present embodiment is not limited thereto, and the control device 102 and the processing unit 1011 can also communicate based on other protocols, and it is within the scope of the present application as long as both communication can be achieved.
The control device 102 is configured to obtain a control instruction sent by the bios, and send the control instruction to the processing unit 1011, so that the processing unit 1011 enables or disables the function of at least one input unit according to the control instruction. It should be noted that, for an input unit, when the input unit is disabled, it no longer receives the input of the user, whereas when the input unit is enabled, it can normally receive the input of the user.
Optionally, the control device 102 may be an Embedded Controller (EC), and the Embedded Controller may keep running all the time, and no matter the electronic device is in a power-on state or a relation state, the EC may wait for power-on information of a user, and after the electronic device is powered on, the EC may further control an input device such as a keyboard, may further control an indicator light such as a charging indicator light, a fan, and may further control states of the electronic device such as standby, sleep, and the like.
In one possible implementation, the bios obtains the control instruction sent by the operating system through a specific interface (such as an os management interface), that is, the control instruction sent by the operating system is forwarded to the control device 102 by the bios. The bios may send the control command to the control device 102 by writing the control command into a designated memory area of the control device 102, monitoring the designated memory area of the control device 102, and sending the control command to the processing unit 1011 when the control device monitors that the control command is written into the designated memory area of the control device.
The Operating System refers to an Operating System, that is, an OS, which is a System for managing hardware and software resources of the electronic device, and may be various Operating systems appearing later, such as Windows7, Windows8, Windows10, and the like.
In a possible implementation manner, the electronic device can run a first application and a second application, the second application can monitor the running state of the first application in real time, and the operating system monitors the running state of the first application through the second application to obtain the control instruction when the running state of the first application meets the condition.
The control instruction in the present embodiment may include a disable instruction and an enable instruction. Wherein the disable instruction is for disabling a function of the at least one input unit and the enable instruction is for enabling a function of the at least one unit. In one possible implementation, the operating system obtains the disable instruction when the first application is running and obtains the enable instruction when the first application is not running.
In addition, in order to know the state of at least one input unit controlled by the processing unit 1011 (for example, whether the control unit is disabled or enabled), after the processing unit 1011 executes the control instruction, the execution result of the control instruction may be fed back to the control device 102, the control device 102 feeds back the execution result of the control instruction to the basic input/output system, and the basic input/output system may also feed back the execution result of the control instruction to the operating system.
The following describes a process of enabling or disabling the function of at least one input unit through interaction among an operating system, a basic input/output system, a control device, and a processing unit, taking an electronic device as a notebook computer as an example:
step S201: the operating system 201 monitors the running state of the first application through the second application.
An operating system 201, such as a Windows system, monitors the running state of a first application, such as a game application, through a second application, wherein the running state of the first application is at least indicative of whether the first application is running or not running.
Step S202: when the operating system 201 monitors that the running state of the first application satisfies the condition through the second application, the control instruction is obtained.
Taking the operating system 201 as a Windows system and the first application as a game application as an example: considering that the user may mistakenly touch the Windows key while playing the game, the Windows key needs to be locked, i.e., disabled, while the game is running. When the game stops running, that is, when the user does not play the game any more, in order to ensure that the Windows key can be normally used, the Windows key needs to be enabled, so that the Windows key can receive the input of the user, and the electronic device can respond to the input of the user based on the Windows key. Based on this, the embodiment may obtain the disable instruction when the operating system 201 monitors that the first application, such as the game application, is started through the second application, that is, the first application starts to run, and obtain the enable instruction when the operating system 201 monitors that the first application, such as the game application, stops running through the second application.
Step S203: the operating system 201 sends a control instruction to the bios 202.
The operating system 201, such as a Windows system, sends a control command (such as a disable command or an enable command) to the BIOS 202, such as a BIOS, through an operating system Management interface, such as a Windows Management interface (WMI interface for short), and the BIOS 202, such as the BIOS, forwards the control command.
Step S204: the bios 202 transmits a control command to the control device 203.
Specifically, the BIOS 202, such as the BIOS, may write control commands to a designated memory area of the control device 203, such as the embedded controller EC.
Step S205: the control device 203 sends a control instruction to the processing unit 2041 of the input device 204.
The control device 203, such as the embedded controller EC, sends control instructions to the processing unit 2041, such as the keyboard firmware of the keyboard, of the input device 204. Specifically, the control device 203 may send a control command to the processing unit 2041 of the input device 204 based on the bidirectional two-wire synchronous serial bus protocol.
Step S206: the processing unit 2041 of the input device 204 disables or enables the at least one input unit 2042 according to the control instructions.
If the control instruction is a disable instruction, the processing unit 2041 of the input device 204, such as the keyboard firmware of the keyboard, controls the at least one input unit 2042, such as the Windows key, to be disabled, so that when the first application, such as the game application, is running, the at least one input unit 2042, such as the Windows key, cannot receive the input of the user, so that the electronic device does not respond to the input operation of the user on the at least one input unit 2042, such as the Windows key, and the occurrence of a situation where the user mistakenly touches the at least one input unit 2042, such as the Windows key, to interrupt or terminate the first application, such as the game application.
If the control command is an enable command, the processing unit 2041 of the input device 204, for example, the keyboard firmware of the keyboard, controls the at least one input unit 2042, for example, the Windows key, to be enabled, so that when the first application, for example, the game application stops running, the at least one input unit 2042, for example, the Windows key, enables normal receiving of the user input, and thus the electronic device normally responds to the input operation of the at least one input unit 2042, for example, the Windows key.
Step S207: the processing unit 2041 of the input device 204 feeds back the execution result of the control instruction to the control device 203.
The execution result of the control instruction is used to indicate whether at least one input unit controlled by the processing unit 2041 of the input device 204 is disabled or enabled.
Step S208: the control device 203 feeds back the execution result of the control command to the bios 202.
Step S209: the bios 202 feeds back the execution result of the control instruction to the operating system 201.
The operating system 201 can know the state of the at least one input unit 2042 controlled by the control instruction based on the execution result of the control instruction.
In the electronic device provided by the embodiment of the application, the control device is connected with the processing unit of the input device, so that when the control device obtains the control command sent by the basic input and output system, the control device can send the control command to the processing unit of the input device, and the processing unit of the input device enables or disables the function of at least one input unit of the input device according to the control command. The control method and the control device can realize control over the input unit of the input device based on the control device, the control method is high in universality and good in control effect, and the state of the input unit acquired by the operating system can be ensured to be synchronous with the actual state of the input unit.
The device is described in detail in the foregoing embodiment of the present application, and a control method is further provided in the embodiment of the present application, and the control method provided in the embodiment of the present application is described in detail below.
Referring to fig. 3, a flow chart of a control method provided in the present application is shown, where the method may include:
step S301: the control device obtains a control command sent by the basic input and output system.
Specifically, the operating system monitors the running state of the first application through the second application, obtains the control instruction when the running state of the first application meets the condition, and sends the control instruction to the basic input/output system, and the basic input/output system sends the control instruction to the control device.
Step S302: the control device sends a control instruction to the processing unit of the input device to enable or disable the function of at least one input unit in the input device according to the control instruction.
In the control method provided by the embodiment of the application, when the control device can obtain the control instruction sent by the basic input/output system, the control device can send the control instruction to the processing unit of the input device, so that the processing unit of the input device enables or disables the function of at least one input unit of the input device according to the control instruction. The control method provided by the embodiment of the application has the advantages of strong universality, simplicity in implementation and good control effect.
In one possible implementation manner, the step S301 in the above embodiment: the step of obtaining the control instruction sent by the basic input and output system by the control device may include: when a first application runs, the control device obtains a prohibition instruction sent by the basic input and output system; when the first application stops running, the control device obtains an enabling instruction sent by the basic input and output system.
Wherein the disable instruction is for disabling a function of the at least one input unit and the enable instruction is for enabling a function of the at least one unit.
In one possible implementation, step S301: the step of obtaining the control instruction sent by the basic input and output system by the control device may include: the control device monitors the designated memory area of the control device, and when the control device is monitored to write the control command into the designated memory area of the control device, the control command is obtained.
Preferably, the control instruction provided by the above embodiment may further include: the processing unit feeds back the execution result of the control instruction to the control device, so that the control device feeds back the execution result of the control instruction to the basic input and output system.
In one possible implementation manner, the "control device sends the control instruction to the processing unit of the input device" in step S302 in the above embodiment includes: the control device sends control instructions to the processing unit of the input device based on the bidirectional two-wire synchronous serial bus I2C protocol.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus, and device may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be essentially or partially embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. An electronic device, comprising:
an input device: the system comprises a processing unit and at least one input unit, wherein the processing unit is used for enabling or disabling the function of the at least one input unit;
the control device is connected with the processing unit and used for obtaining a control instruction which is sent by a basic input and output system and is obtained under the condition that the running state of a first application on the electronic equipment meets a condition, and sending the control instruction to the processing unit so that the processing unit enables or disables the function of a specific input unit corresponding to the first application according to the control instruction;
wherein the control instruction comprises a disable instruction and an enable instruction; obtaining the control instruction in a case where the operating state of the first application on the electronic device satisfies a condition includes: obtaining a forbidding instruction when the first application runs, and obtaining an enabling instruction when the first application stops running;
the electronic device is capable of running the first application and a second application;
and the operating system of the electronic equipment monitors the running state of the first application through the second application so as to obtain the control instruction under the condition that the running state of the first application meets the condition.
2. The electronic device of claim 1, wherein the bios obtains the control command sent by an operating system through a specific interface.
3. The electronic device according to claim 1, wherein the bios writes the control command in a designated memory area of the control apparatus;
the control device monitors the designated memory area of the control device, and sends the control instruction to the processing unit when monitoring the control instruction.
4. The electronic device according to claim 1, wherein the processing unit feeds back an execution result of the control instruction to the control apparatus when the control instruction is executed, so that the control apparatus feeds back the execution result of the control instruction to the bios.
5. The electronic device of claim 1, the control device and the processing unit to communicate based on a bidirectional two-wire synchronous serial bus protocol.
6. An electronic device control method comprising:
the control device obtains a control instruction which is sent by a basic input and output system and is obtained under the condition that the running state of a first application on the electronic equipment meets a condition;
the control device sends the control instruction to a processing unit of an input device, so that the processing unit enables or disables the function of a specific input unit corresponding to the first application in the input device according to the control instruction;
wherein the control instruction comprises a disable instruction and an enable instruction; obtaining the control instruction in a case where the operating state of the first application on the electronic device satisfies a condition includes: obtaining a forbidding instruction when the first application runs, and obtaining an enabling instruction when the first application stops running;
the electronic device is capable of running the first application and a second application;
and the operating system of the electronic equipment monitors the running state of the first application through the second application so as to obtain the control instruction under the condition that the running state of the first application meets the condition.
7. The control method according to claim 6, further comprising:
and the processing unit feeds back the execution result of the control instruction to the control device, so that the control device feeds back the execution result of the control instruction to the basic input and output system.
CN201811647641.0A 2018-12-29 2018-12-29 Electronic equipment and control method Active CN109739564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811647641.0A CN109739564B (en) 2018-12-29 2018-12-29 Electronic equipment and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811647641.0A CN109739564B (en) 2018-12-29 2018-12-29 Electronic equipment and control method

Publications (2)

Publication Number Publication Date
CN109739564A CN109739564A (en) 2019-05-10
CN109739564B true CN109739564B (en) 2021-02-19

Family

ID=66362764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811647641.0A Active CN109739564B (en) 2018-12-29 2018-12-29 Electronic equipment and control method

Country Status (1)

Country Link
CN (1) CN109739564B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294220A (en) * 2015-06-12 2017-01-04 联想(北京)有限公司 A kind of information processing method and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661332A (en) * 2008-08-28 2010-03-03 纬创资通股份有限公司 Key processing method and computer system
CN103902396B (en) * 2012-12-28 2019-04-23 联想(北京)有限公司 A kind of information processing method and electronic equipment
US9383852B2 (en) * 2013-01-09 2016-07-05 Samsung Electronics Co., Ltd. Electronic apparatus and method of controlling thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294220A (en) * 2015-06-12 2017-01-04 联想(北京)有限公司 A kind of information processing method and electronic equipment

Also Published As

Publication number Publication date
CN109739564A (en) 2019-05-10

Similar Documents

Publication Publication Date Title
US9721660B2 (en) Configurable volatile memory without a dedicated power source for detecting a data save trigger condition
US7698584B2 (en) Method, apparatus and system for enabling a new data processing device operating state
US9310838B2 (en) Power management method for switching power mode of a computer system based on detection of a human interface device
US7627696B2 (en) Electronic device, method for controlling the same, information processing apparatus, and computer program
CA2793617C (en) Dynamic configuration of connectors for system-level communications
US10515040B2 (en) Data bus host and controller switch
US20070156942A1 (en) Method and apparatus for independently managing a chipset-integrated bus controller
US8578182B2 (en) Power lock-up setting method performed by baseboard management controller and electronic apparatus using the same
CN106104504B (en) System and method for disconnection detection on a dual mode port of a USB hub
KR20130108658A (en) Method and system for managing sleep states of interrupt controllers in a portable computing device
US20070206019A1 (en) Computer having removable input/output device
US20100115144A1 (en) Wireless Switch State Using Controller Powered with System in Various Low-Powered States
WO2009017556A1 (en) Electronic device interface control system
US8103895B2 (en) Information processing apparatus and wake-up control method
US9170640B2 (en) System and method for turning off unused components in a plurality of limited operation modes, users have different terminal usage rights for each
JP2014523584A (en) Power management module for USB devices
CN103984616A (en) Server monitoring method and server
CN109739564B (en) Electronic equipment and control method
TWI581186B (en) Method for inhibiting local input, remotely-bootable computing system, and related computer-readable medium
CN105653297A (en) Electronic device and control method thereof
JP2010134508A (en) Relay apparatus for connecting hot plug type device
US9710286B2 (en) Enhanced wakeup mode
US11226862B1 (en) System and method for baseboard management controller boot first resiliency
CN113343316A (en) Device and method for realizing isolated switching of multiple computing devices
US9678557B2 (en) Electricity saving method for USB data transmission system and host device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant