CN111314534A - Key function implementation method and electronic equipment - Google Patents

Key function implementation method and electronic equipment Download PDF

Info

Publication number
CN111314534A
CN111314534A CN202010053477.1A CN202010053477A CN111314534A CN 111314534 A CN111314534 A CN 111314534A CN 202010053477 A CN202010053477 A CN 202010053477A CN 111314534 A CN111314534 A CN 111314534A
Authority
CN
China
Prior art keywords
key
function
target
interface
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010053477.1A
Other languages
Chinese (zh)
Other versions
CN111314534B (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010053477.1A priority Critical patent/CN111314534B/en
Publication of CN111314534A publication Critical patent/CN111314534A/en
Application granted granted Critical
Publication of CN111314534B publication Critical patent/CN111314534B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/23Construction or mounting of dials or of equivalent devices; Means for facilitating the use thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides a key function implementation method and electronic equipment, wherein the electronic equipment comprises the following steps: a processor, a first key and a second key; the processor is provided with a first function interface and a first communication interface corresponding to a first target function; the first end of the first key and the first end of the second key are respectively connected with the first function interface, and the first end of the first key or the first end of the second key is connected with the first communication interface. This scheme can be fine solution electronic equipment's button has awkward problem among the prior art.

Description

Key function implementation method and electronic equipment
Technical Field
The invention relates to the technical field of electronic equipment, in particular to a key function implementation method and electronic equipment.
Background
Currently, most electronic devices are provided with an AI (artificial intelligence) key in addition to a power key and a volume key. The AI key and the power key are generally provided on both sides of the electronic apparatus.
In the prior art, the key design of the electronic equipment has the following problems:
(1) the position of the key is not adjustable; namely, the power key is arranged on the right side of the electronic equipment and is always on the right side, and the power key cannot be changed to the left side. There are more or less uncomfortable situations of use due to differences in the usage habits of the users. If the user who is used to press the power key with the left thumb cannot be well adapted to the electronic equipment with the power key on the right side. Similarly, if the power key is disposed on the left side, the user can operate only with the thumb of the right hand or the index finger of the left hand.
(2) The key function definition cannot be adjusted; at present, the definition of keys of electronic equipment is generally fixed, a power key can only be set as a power key, and particularly, the starting function of the power key determines that only the power key can be used for starting; even if the keys for turning on and off the screen can be randomly set through software, the starting key can only be connected to the fixed interface.
Based on the above problems, the electronic device cannot adapt to all user groups, and only allows the user to be used to adapt to the position of the key passively.
Disclosure of Invention
The invention aims to provide a key function implementation method and electronic equipment, and aims to solve the problem that keys of the electronic equipment in the prior art are inconvenient to use.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes:
a processor, a first key and a second key;
the processor is provided with a first function interface and a first communication interface corresponding to a first target function; the first end of the first key and the first end of the second key are respectively connected with the first function interface, and the first end of the first key or the first end of the second key is connected with the first communication interface.
In a second aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes:
a processor, a first key and a second key;
the processor is provided with a first function interface corresponding to a first target function; the first end of the first key and/or the first end of the second key are connected with the first function interface through a control circuit.
In a third aspect, an embodiment of the present invention further provides a method for implementing a key function, where the method is applied to the electronic device, and the method includes:
receiving a first input of a first target key by a user, wherein the first target key is the first key or the second key;
and responding to the first input, and executing the first target function according to the corresponding relation between the first target key and the first target function.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes a first key, a second key, and a processor, or the first key, the second key, the processor, and a control circuit, included in the electronic device; the electronic device further includes:
the first receiving module is used for receiving a first input of a first target key by a user, wherein the first target key is the first key or the second key;
and the first processing module is used for responding to the first input and executing the first target function according to the corresponding relation between the first target key and the first target function.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor, where the computer program, when executed by the processor, implements the steps of the above-mentioned key function implementing method.
In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the key function implementation method described above are implemented.
In the embodiment of the invention, the processor, the first key and the second key are arranged; the processor is provided with a first function interface and a first communication interface corresponding to a first target function; the first end of the first key and the first end of the second key are respectively connected with the first function interface, and the first end of the first key or the first end of the second key is connected with the first communication interface; make first key and second key all can realize and the first objective function between the corresponding relation through setting up to after selecting, can realize first objective function, thereby the different habits of different users of adaptation that can be better.
Drawings
FIG. 1 is a first schematic structural diagram of an electronic device according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a key function implementation method according to an embodiment of the present invention;
FIG. 3 is a second schematic structural diagram of an electronic device according to an embodiment of the invention;
FIG. 4 is a first schematic view of a specific application flow of a key function implementation method according to an embodiment of the present invention;
FIG. 5 is a third schematic structural diagram of an electronic device according to an embodiment of the invention;
FIG. 6 is a second flowchart illustrating a specific application of a key function implementation method according to an embodiment of the present invention;
FIG. 7 is a fourth schematic structural diagram of an electronic device according to an embodiment of the invention;
fig. 8 is a third schematic view of a specific application flow of the key function implementation method according to the embodiment of the present invention;
FIG. 9 is a fifth schematic structural diagram of an electronic device according to an embodiment of the invention;
fig. 10 is a sixth schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. 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 invention.
The present invention provides an electronic device, aiming at the problem of inconvenient use of the keys of the electronic device in the prior art, as shown in fig. 1, the electronic device comprises:
processor 1, first key 2 and second key 3;
the processor 1 is provided with a first function interface and a first communication interface corresponding to a first target function; the first end of the first key 2 and the first end of the second key 3 are respectively connected with the first function interface, and the first end of the first key 2 or the first end of the second key 3 is connected with the first communication interface.
In the embodiment of the present invention, the first key and the second key are two different keys, and specifically, the first key and the second key are disposed at different positions on the electronic device; the different positions may be different positions on the same side or different sides of the electronic device, and may also be different areas on the screen, which is not limited herein.
The electronic equipment provided by the embodiment of the invention is provided with a processor, a first key and a second key; the processor is provided with a first function interface and a first communication interface corresponding to a first target function; the first end of the first key and the first end of the second key are respectively connected with the first function interface, and the first end of the first key or the first end of the second key is connected with the first communication interface; the first key and the second key can realize the corresponding relation with the first target function through setting, so that the first target function can be realized after the first key and the second key are selected; instead of being fixed on the first key to realize the first target function or being fixed on the second key to realize the first target function, the electronic equipment can better adapt to different habits of different users, and the problem that the keys of the electronic equipment in the prior art are inconvenient to use is well solved.
The first function interface is a power-on key interface, and the first target function is a power-on and power-off function or a screen on and off function.
In the embodiment of the invention, the processor is also provided with a second communication interface corresponding to a second target function; if the first end of the first key is connected with the first communication interface, the first end of the second key is connected with the second communication interface; and if the first end of the second key is connected with the first communication interface, the first end of the first key is connected with the second communication interface. Therefore, the switching function of the side key function definition can be completed through software setting under the condition that no cost is added on hardware.
Wherein the second target function may be an AI function.
In order to ensure the normal implementation of the function, in the embodiment of the present invention, the second end of the first key and the second end of the second key are grounded, respectively.
An embodiment of the present invention further provides an electronic device, as shown in fig. 1, where the electronic device includes:
processor 1, first key 2 and second key 3;
the processor 1 is provided with a first function interface corresponding to a first target function; the first end of the first key 2 and/or the first end of the second key 3 are connected with the first function interface through a control circuit.
In the embodiment of the present invention, the first key and the second key are two different keys, and specifically, the first key and the second key are disposed at different positions on the electronic device; the different positions may be different positions on the same side or different sides of the electronic device, and may also be different areas on the screen, which is not limited herein.
The electronic equipment provided by the embodiment of the invention is provided with a processor, a first key and a second key; the processor is provided with a first function interface corresponding to a first target function; the first end of the first key and/or the first end of the second key are/is connected with the first function interface through a control circuit; the first key and the second key can realize the corresponding relation with the first target function through setting, so that the first target function can be realized after the first key and the second key are selected; instead of being fixed on the first key to realize the first target function or being fixed on the second key to realize the first target function, the electronic equipment can better adapt to different habits of different users, and the problem that the keys of the electronic equipment in the prior art are inconvenient to use is well solved.
The first function interface is a power-on key interface, and the first target function is a power-on and power-off function or a screen on and off function.
In the embodiment of the invention, the processor is also provided with a second function interface corresponding to a second target function; if the first end of the first key is connected with the first function interface through the control circuit, the first end of the second key is connected with the second function interface through the control circuit; or if the first end of the second key is connected with the first function interface through the control circuit, the first end of the first key is connected with the second function interface through the control circuit.
Wherein the second target function is an AI function; correspondingly, the second functional interface may be an artificial intelligence AI key interface.
With regard to specific implementation of the control circuit, the following two examples are provided in the embodiment of the present invention:
in an example one, the processor is further provided with a third communication interface corresponding to an information transmission function, and the control circuit includes an analog switch and a storage control unit; the first end of the first key and the first end of the second key are respectively connected with the first end of the analog switch, the second end of the analog switch is respectively connected with the first functional interface and the second functional interface, the third end of the analog switch is connected with the first end of the storage control unit, and the second end of the storage control unit is connected with the third communication interface.
In example two, the processor is further provided with a third communication interface corresponding to an information transmission function, and the control circuit includes a control sub-circuit; the first end of the first key and the first end of the second key are respectively connected with the first end of the control sub-circuit, the second end of the control sub-circuit is respectively connected with the first functional interface and the second functional interface, and the third end of the control sub-circuit is connected with the third communication interface.
In this example, the first key and the second key may be hidden keys.
In order to ensure the normal implementation of the function, in the embodiment of the present invention, the second end of the first key and the second end of the second key are grounded, respectively.
An embodiment of the present invention further provides a key function implementation method, which is applied to the electronic device described above, and as shown in fig. 2, the method includes:
step 21: receiving a first input of a user to a first target key, wherein the first target key is the first key or the second key.
The first input may be a preset pressing operation, a preset sliding track operation, a preset clicking operation, a preset voice command, and the like, which is not limited herein.
Step 22: and responding to the first input, and executing the first target function according to the corresponding relation between the first target key and the first target function.
In this embodiment, the first key and/or the second key may have a preset corresponding relationship with the first target function, that is, the first target function is executed after the first key and/or the second key is selected, which is not limited herein.
The key function implementation method provided by the embodiment of the invention receives a first input of a first target key by a user, wherein the first target key is the first key or the second key; responding to the first input, and executing the first target function according to the corresponding relation between the first target key and the first target function; the first target function can be realized through the first key and/or the second key, so that different habits of different users can be better adapted, and the problem that the keys of the electronic equipment in the prior art are inconvenient to use can be well solved.
Under the condition that the first end of the first key and the first end of the second key are respectively connected with a first function interface corresponding to the first target function, if the electronic equipment is in a power-off state, the first target function is a power-on function; or, if the electronic device is in a power-on state, the first target function is a power-off function, a screen-on function or a screen-off function.
Further, in a case where the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, before executing the first target function, the method further includes: determining whether a preset corresponding relation exists between the first target key and the first target function by utilizing an analog switch of the control circuit; or, determining whether a preset corresponding relation exists between the first target key and the first target function by using a control sub-circuit of the control circuit.
Through the embodiment, the key function definition can be more flexibly performed.
In this embodiment of the present invention, the electronic device may further implement a second target function, and the key function implementation method further includes: receiving a second input of a second target key by a user, wherein the second target key is the second key or the first key; responding to the second input, and executing the second target function according to the corresponding relation between the second target key and the second target function; the first target key is the first key, and the second target key is the second key; or, the first target key is the second key, and the second target key is the first key.
The second input may be a preset pressing operation, a preset sliding track operation, a preset clicking operation, a preset voice command, and the like, which is not limited herein. The first key and/or the second key may have a preset corresponding relationship with the second target function, that is, the second target function is executed after the first key and/or the second key is selected, which is not limited herein.
Wherein the second target function is an Artificial Intelligence (AI) function.
Further, in a case where the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, before executing the second target function, the method further includes: determining whether a preset corresponding relation exists between the second target key and a second target function by using an analog switch of the control circuit; or, determining whether a preset corresponding relation exists between the second target key and the second target function by using a control sub-circuit of the control circuit.
In this embodiment of the present invention, before executing the first target function, or before executing the second target function, the method further includes: obtaining the corresponding relation according to the first input information; and storing the corresponding relation.
Therefore, the user can set different corresponding relations according to own habits, and user experience is improved.
Specifically, in a case where the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, the storing the corresponding relationship includes: storing the corresponding relation into a storage control unit of the control circuit, and storing the corresponding relation into an analog switch of the control circuit by using the storage control unit; or, the correspondence is stored in a control sub-circuit of the control circuit.
Thus, even if the AP of the electronic equipment is upgraded and the parameters are cleared, the setting of the corresponding relation is not changed.
Further, after executing the first target function, or after executing the second target function, the method further includes: updating the corresponding relation according to the second input information; and storing the updated corresponding relation.
Therefore, diversified requirements of the user can be further met, and the corresponding relation is adjusted in real time according to the requirements of the user.
Specifically, in a case where the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, the storing the updated corresponding relationship includes: storing the updated corresponding relation into a storage control unit of the control circuit, and storing the updated corresponding relation into an analog switch of the control circuit by using the storage control unit; or storing the updated corresponding relation into a control sub-circuit of the control circuit.
In the following, the electronic device and the key function implementing method provided by the embodiment of the present invention are further described, where the first function interface is an open key interface, the second function interface is an AI key interface, and the electronic device is a mobile phone.
Aiming at the technical problem, considering that the key function of the current mobile phone can not be adjusted to lead the user to only passively adapt to the key function, the scheme enables the current mobile phone with the AI key and the power key to be capable of customizing the key function through the hardware circuit design, and solves the problem that the user can not customize the key function of the power key.
Specifically, the scheme can realize the function exchange of the AI key and the power key through circuit design and user-defined setting, and after the exchange, the mobile phone can remember the setting of the user, and after the mobile phone is restarted, the setting of the user can be kept; particularly, after the power key is set, the power key may be changed with the setting.
The following specifically exemplifies the scheme provided by the embodiment of the present invention.
For example, one:
(1) the hardware part of this example is shown in fig. 3:
①, SW1 (i.e. the first key) and SW2 (i.e. the second key) respectively represent the side keys at the left and right sides of the mobile phone, the two keys are connected with the opening key interface of the mobile phone when being connected with GPIO (general purpose input/output) interfaces of the mobile phone (two different GPIO interfaces are respectively connected with GPIO1 and GPIO2), and the mobile phone can be opened when any one key is pressed in the off state.
②, SW1 and SW2 are connected to GPIO1 and GPIO2 of the mobile phone, and the mobile phone can acquire which key of SW1 or SW2 is pressed by acquiring the states of GPIO1 and GPIO 2.
The AP may be connected to a battery, which is not limited herein.
(2) The software portion of this example is shown in fig. 4, and includes:
step 41: in the power-on state of the mobile phone, a key press event of a user is detected through the GPIO1 and the GPIO2 connected with the SW1 and the SW 2.
Step 42: and querying the key functions corresponding to SW1 and SW2 set by the user through software.
Step 43: and carrying out corresponding response according to the key function definition set by the user, namely an AI function key, a screen on/off function or a power-off function.
When the user needs to change the key function definition, the mobile phone only needs to record the key function definition of the user again, which is not described in detail here. The key function definition may be stored in an AP (processor), but is not limited thereto.
In this example, when the mobile phone is powered off, the power-on operation is executed no matter which key is pressed, and after the mobile phone is powered on, the corresponding key function can be determined and executed by identifying the GPIO port corresponding to the pressed key.
The scheme of the example does not increase any cost on hardware, and the switching function defined by the side key function of the mobile phone can be completed only by setting on software by a user.
Example two:
(1) the hardware part of this example is shown in fig. 5:
different from the first example, the second example realizes the function definition switching of the side keys of the mobile phone by arranging an external (independent from the AP, i.e. the CPU) storage control unit and an analog switch.
The side keys SW1 (i.e. the first key) and SW2 (i.e. the second key) of the mobile phone are respectively connected with the input end of the analog switch, and the output end of the analog switch is connected with the on-key interface and the AI key interface of the mobile phone AP. The analog switch is controlled by an external storage control unit independent of the mobile phone AP, and the control end of the analog switch is connected with the output end of the storage control unit. Finally, the mobile phone AP may control the external storage control unit through a communication protocol such as IIC (serial communication bus). The communication port of the AP may be connected to an input of the memory control unit.
(2) Software part of this example:
since the analog switch is adopted to map the key signal, that is, SW1 and SW2 can be mapped to the interface of the power key and the AI key of the mobile phone AP at will, there is no difference between the key response and the normal situation that the side key is directly connected to the mobile phone AP, and the details are not described here.
The second embodiment is that when the user changes the side key function definition, the software flow is greatly different from the first embodiment, as shown in fig. 6, and includes:
step 61: a user sends a requirement for self-defining the function definition of the side key;
step 62: when receiving a requirement for changing the key function definition of the side by a user, the mobile phone AP writes the key function definition changed by the user into the external storage control unit through the IIC and other communication protocols.
And step 63: the external storage control unit can control the input and output corresponding relation of the analog switch in real time. And after receiving the requirement for changing the key function definition of the mobile phone AP. The external storage control unit can immediately switch the input and output corresponding relation of the analog switch, and the self-defining function of the side key function is realized.
Further, if the user desires not only to switch the AI key or the power key but also to shield the AI key function, only the power key function is retained, or both the left and right keys are set to the power key function. The second example can be implemented by controlling the external storage control unit through the mobile phone AP so as to control the input/output corresponding relationship of the analog switch, and the detailed operation scheme is different from the switching side key function definition, which is not described herein again.
In this example scenario, user-defined or default may be: which is the power-on key in the power-off state, or both the power-on key and the power-off key; and which key corresponds to which function in the power-on state, etc., and is not limited herein.
In the scheme of the example, the side key function definition is realized through the external storage control unit and the analog switch, and the complete switching of the key function definition can be realized. After the user changes the power key, the power key can also take effect in the power-off state; moreover, as the key function definition is actually stored in the external storage control unit, the mobile phone AP only plays a control role when the user changes the setting; therefore, after the user sets the key function, the setting is not changed even if the mobile phone is upgraded and the parameters are cleared.
Example three:
(1) for the existing hidden key technology, the hardware part of the third example is shown in fig. 7:
the currently common scheme of the hidden key is to sense an external excitation signal through a sensor, wherein the excitation signal can be pressure, capacitance, contact area and the like; then the signal of the sensor is processed through a sub-control system circuit (namely the control sub-circuit), logic judgment is carried out, and finally the key reporting function is completed to the AP through the GPIO (output end) of the sub-system control circuit. For the mobile phone AP, the key reporting mode of the hidden key and the common entity key is completely the same, and special treatment is not needed.
When the hidden key technology is adopted as the power key, a sub-control system circuit is required to independently process the signal sensed by the sensor and complete the key reporting function. The subsystem control circuit is generally an MCU (micro controller unit) with memory capability, so this scheme can also fulfill the requirement of key function definition.
The first key and the second key take a power key and an AI key as examples, and specifically: the first key may be a power key or an AI key, and the second key may be an AI key or a power key, which is not limited herein;
the Sensor takes power key Sensor and AI key Sensor as examples; the power key sensor and the AI key sensor are respectively connected with the input end of the sub-control system circuit; the output end of the sub-control system circuit is respectively connected with the start-up key interface and the AI key interface of the AP; the communication port of the AP is connected with the control end of the sub-control system circuit, and the AP can send the setting information to the control circuit through the communication port. The sub-control system circuit and the AP may be connected to a battery, respectively, and are not limited herein.
(2) The software portion of this example is shown in fig. 8, and includes:
step 81: a user sends a requirement for changing the side key function definition;
step 82: the mobile phone AP sends the setting information input by the user to the subsystem control circuit of the hidden key through a protocol;
step 83: and the subsystem control circuit changes GPIO output signals corresponding to the power key and the AI key.
Specifically, assume that the original power key corresponds to GPIO1 in the sub-control system circuit, and the AI key corresponds to GPIO 2; and the user needs to exchange the power key and the AI key function through setting, after the AP sends the change information (setting information) to the sub-control system circuit through the protocol, the sub-control system circuit directly changes the power key to the GPIO2 and changes the AI key to the GPIO1, and then the requirement of the user for exchanging the power key and the AI key function can be completed.
Further, if the user wants to not only switch the AI key or the power key but also shield the AI key function, only the power key function is retained, or both the left and right keys are set to the power key function. This third example can be realized through the GPIO port that power key and AI key correspond in the mobile phone AP control outside sub-control system circuit, and the detailed operation scheme is different from the switch side key function definition, and is not repeated here.
In this example scenario, user-defined or default may be: which is the power-on key in the power-off state, or both the power-on key and the power-off key; and which key corresponds to which function in the power-on state, etc., and is not limited herein.
The embodiment of the invention also provides electronic equipment, which comprises the first key, the second key and the processor contained in the electronic equipment, or comprises the first key, the second key, the processor and the control circuit contained in the electronic equipment; as shown in fig. 9, the electronic device further includes:
a first receiving module 91, configured to receive a first input of a first target key from a user, where the first target key is the first key or the second key;
the first processing module 92 is configured to respond to the first input, and execute the first target function according to a corresponding relationship between the first target key and the first target function.
The electronic equipment provided by the embodiment of the invention receives a first input of a user to a first target key, wherein the first target key is the first key or the second key; responding to the first input, and executing the first target function according to the corresponding relation between the first target key and the first target function; the first target function can be realized through the first key and/or the second key, so that different habits of different users can be better adapted, and the problem that the keys of the electronic equipment in the prior art are inconvenient to use can be well solved.
Under the condition that the first end of the first key and the first end of the second key are respectively connected with a first function interface corresponding to the first target function, if the electronic equipment is in a power-off state, the first target function is a power-on function; or, if the electronic device is in a power-on state, the first target function is a power-off function, a screen-on function or a screen-off function.
Further, the electronic device further includes: a first determining module, configured to determine, before executing the first target function, whether a preset correspondence exists between the first target key and the first target function by using an analog switch of a control circuit when a first end of the first key or a first end of the second key is connected to a first function interface corresponding to the first target function through the control circuit; or, determining whether a preset corresponding relation exists between the first target key and the first target function by using a control sub-circuit of the control circuit.
Through the embodiment, the key function definition can be more flexibly performed.
In an embodiment of the present invention, the electronic device further includes: the second receiving module is used for receiving a second input of a second target key by a user, wherein the second target key is the second key or the first key; the second processing module is used for responding to the second input and executing the second target function according to the corresponding relation between the second target key and the second target function; the first target key is the first key, and the second target key is the second key; or, the first target key is the second key, and the second target key is the first key.
Wherein the second target function is an AI function.
Further, the electronic device further includes: a second determining module, configured to determine, before executing the second target function, whether a preset correspondence exists between the second target key and the second target function by using an analog switch of a control circuit when a first end of the first key or a first end of the second key is connected to a first function interface corresponding to the first target function through the control circuit; or, determining whether a preset corresponding relation exists between the second target key and the second target function by using a control sub-circuit of the control circuit.
In an embodiment of the present invention, the electronic device further includes: a fifth processing module, configured to obtain the corresponding relationship according to the first input information before the first target function is executed or before the second target function is executed; and the first storage module is used for storing the corresponding relation.
Therefore, the user can set different corresponding relations according to own habits, and user experience is improved.
Specifically, in a case where the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, the first storage module includes: the first storage submodule is used for storing the corresponding relation into a storage control unit of the control circuit and storing the corresponding relation into an analog switch of the control circuit by utilizing the storage control unit; or, the correspondence is stored in a control sub-circuit of the control circuit.
Thus, even if the AP of the electronic equipment is upgraded and the parameters are cleared, the setting of the corresponding relation is not changed.
Further, the electronic device further includes: a first updating module, configured to update the corresponding relationship according to second input information after the first target function is executed or after the second target function is executed; and the second storage module is used for storing the updated corresponding relation.
Specifically, in a case where the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, the second storage module includes: the second storage submodule is used for storing the updated corresponding relation into a storage control unit of the control circuit and storing the updated corresponding relation into an analog switch of the control circuit by using the storage control unit; or storing the updated corresponding relation into a control sub-circuit of the control circuit.
The electronic device provided in the embodiment of the present invention can implement each process implemented by the electronic device in the method embodiments of fig. 1 to 8, and is not described herein again to avoid repetition.
Fig. 10 is a schematic diagram of a hardware structure of an electronic device 100 for implementing various embodiments of the present invention, where the electronic device 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 1010, and power source 1011. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 10 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The electronic equipment comprises a first key, a second key and a processor contained in the electronic equipment, or comprises a first key, a second key, a processor and a control circuit contained in the electronic equipment; a processor 1010, configured to receive a first input of a first target key from a user, where the first target key is the first key or the second key; and responding to the first input, and executing the first target function according to the corresponding relation between the first target key and the first target function.
In the embodiment of the invention, a first input of a first target key by a user is received, wherein the first target key is the first key or the second key; responding to the first input, and executing the first target function according to the corresponding relation between the first target key and the first target function; the first target function can be realized through the first key and/or the second key, so that different habits of different users can be better adapted, and the problem that the keys of the electronic equipment in the prior art are inconvenient to use can be well solved.
Optionally, under the condition that the first end of the first key and the first end of the second key are respectively connected to the first function interface corresponding to the first target function, if the electronic device is in a power-off state, the first target function is a power-on function; or, if the electronic device is in a power-on state, the first target function is a power-off function, a screen-on function or a screen-off function.
Optionally, the processor 1010 is further configured to, when the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, before the first target function is executed, determine whether a preset corresponding relationship exists between the first target key and the first target function by using an analog switch of the control circuit; or, determining whether a preset corresponding relation exists between the first target key and the first target function by using a control sub-circuit of the control circuit.
Optionally, the processor 1010 is further configured to receive a second input of a second target key from the user, where the second target key is the second key or the first key; responding to the second input, and executing the second target function according to the corresponding relation between the second target key and the second target function; the first target key is the first key, and the second target key is the second key; or, the first target key is the second key, and the second target key is the first key.
Optionally, the second target function is an AI function.
Optionally, the processor 1010 is further configured to, when the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, before executing the second target function, determine whether a preset corresponding relationship exists between the second target key and the second target function by using the analog switch of the control circuit; or, determining whether a preset corresponding relation exists between the second target key and the second target function by using a control sub-circuit of the control circuit.
Optionally, the processor 1010 is further configured to, before executing the first target function, or before executing the second target function, obtain the corresponding relationship according to first input information; and storing the corresponding relation.
Optionally, when the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, the processor 1010 is specifically configured to store the correspondence relationship into a storage control unit of the control circuit, and store the correspondence relationship into the analog switch of the control circuit by using the storage control unit; or, the correspondence is stored in a control sub-circuit of the control circuit.
Optionally, the processor 1010 is further configured to update the corresponding relationship according to second input information after the first target function is executed or after the second target function is executed; and storing the updated corresponding relation.
Optionally, under the condition that the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, the processor 1010 is specifically configured to store the updated corresponding relationship into the storage control unit of the control circuit, and store the updated corresponding relationship into the analog switch of the control circuit by using the storage control unit; or storing the updated corresponding relation into a control sub-circuit of the control circuit.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 101 may be used for receiving and sending signals during a message transmission or call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 1010; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 102, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the electronic apparatus 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 104 is used to receive an audio or video signal. The input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the Graphics processor 1041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102. The microphone 1042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode.
The electronic device 100 also includes at least one sensor 105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or the backlight when the electronic device 100 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. Touch panel 1071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 1071 (e.g., operations by a user on or near touch panel 1071 using a finger, stylus, or any suitable object or attachment). The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1010, and receives and executes commands sent by the processor 1010. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 1071 may be overlaid on the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 1010 to determine the type of the touch event, and then the processor 1010 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in fig. 10, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the electronic device, and is not limited herein.
The interface unit 108 is an interface for connecting an external device to the electronic apparatus 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 100 or may be used to transmit data between the electronic apparatus 100 and the external device.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 1010 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the electronic device. Processor 1010 may include one or more processing units; preferably, the processor 1010 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1010.
The electronic device 100 may further include a power source 1011 (e.g., a battery) for supplying power to various components, and preferably, the power source 1011 may be logically connected to the processor 1010 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.
In addition, the electronic device 100 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 1010, a memory 109, and a computer program stored in the memory 109 and capable of running on the processor 1010, where the computer program is executed by the processor 1010 to implement each process of the above-mentioned key function implementation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the embodiment of the key function implementing method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (15)

1. An electronic device, characterized in that the electronic device comprises:
a processor, a first key and a second key;
the processor is provided with a first function interface and a first communication interface corresponding to a first target function; the first end of the first key and the first end of the second key are respectively connected with the first function interface, and the first end of the first key or the first end of the second key is connected with the first communication interface.
2. The electronic device of claim 1, wherein the first functional interface is a power-on key interface, and the first target function is a power-on/off function or a screen-on/off function.
3. The electronic device of claim 1, wherein a second communication interface corresponding to a second target function is further disposed on the processor;
if the first end of the first key is connected with the first communication interface, the first end of the second key is connected with the second communication interface;
and if the first end of the second key is connected with the first communication interface, the first end of the first key is connected with the second communication interface.
4. An electronic device, characterized in that the electronic device comprises:
a processor, a first key and a second key;
the processor is provided with a first function interface corresponding to a first target function; the first end of the first key and/or the first end of the second key are connected with the first function interface through a control circuit.
5. The electronic device of claim 4, wherein the first functional interface is a power-on key interface, and the first target function is a power-on/off function or a screen-on/off function.
6. The electronic device of claim 4, wherein the processor is further provided with a second function interface corresponding to a second target function;
if the first end of the first key is connected with the first function interface through the control circuit, the first end of the second key is connected with the second function interface through the control circuit; or
And if the first end of the second key is connected with the first function interface through the control circuit, the first end of the first key is connected with the second function interface through the control circuit.
7. The electronic device of claim 6, wherein the processor is further provided with a third communication interface corresponding to an information transmission function, and the control circuit comprises an analog switch and a storage control unit;
the first end of the first key and the first end of the second key are respectively connected with the first end of the analog switch, the second end of the analog switch is respectively connected with the first functional interface and the second functional interface, the third end of the analog switch is connected with the first end of the storage control unit, and the second end of the storage control unit is connected with the third communication interface.
8. The electronic device of claim 6, wherein the processor is further provided with a third communication interface corresponding to an information transmission function, and the control circuit comprises a control sub-circuit;
the first end of the first key and the first end of the second key are respectively connected with the first end of the control sub-circuit, the second end of the control sub-circuit is respectively connected with the first functional interface and the second functional interface, and the third end of the control sub-circuit is connected with the third communication interface.
9. A key function implementation method applied to the electronic device of any one of claims 1 to 8, the method comprising:
receiving a first input of a first target key by a user, wherein the first target key is the first key or the second key;
and responding to the first input, and executing the first target function according to the corresponding relation between the first target key and the first target function.
10. The method according to claim 9, wherein when the first end of the first key and the first end of the second key are connected to the first functional interface corresponding to the first target function, respectively, if the electronic device is in a power-off state, the first target function is a power-on function; or
If the electronic equipment is in a power-on state, the first target function is a power-off function, a screen-on function or a screen-off function.
11. The method according to claim 9, wherein when the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, before executing the first target function, the method further comprises:
determining whether a preset corresponding relation exists between the first target key and the first target function by utilizing an analog switch of the control circuit; alternatively, the first and second electrodes may be,
and determining whether a preset corresponding relation exists between the first target key and the first target function or not by utilizing a control sub-circuit of the control circuit.
12. The method for implementing key functions of claim 9, further comprising:
receiving a second input of a second target key by a user, wherein the second target key is the second key or the first key;
responding to the second input, and executing the second target function according to the corresponding relation between the second target key and the second target function;
the first target key is the first key, and the second target key is the second key; or, the first target key is the second key, and the second target key is the first key.
13. The method according to claim 12, wherein when the first end of the first key or the first end of the second key is connected to the first function interface corresponding to the first target function through the control circuit, before executing the second target function, the method further comprises:
determining whether a preset corresponding relation exists between the second target key and a second target function by using an analog switch of the control circuit; alternatively, the first and second electrodes may be,
and determining whether a preset corresponding relation exists between the second target key and the second target function by utilizing a control sub-circuit of the control circuit.
14. An electronic device comprising the first key, the second key and the processor of the electronic device of any one of claims 1 to 3, or comprising the first key, the second key, the processor and the control circuit of the electronic device of any one of claims 4 to 8; characterized in that, the electronic equipment still includes:
the first receiving module is used for receiving a first input of a first target key by a user, wherein the first target key is the first key or the second key;
and the first processing module is used for responding to the first input and executing the first target function according to the corresponding relation between the first target key and the first target function.
15. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the key function implementing method according to any one of claims 9 to 13.
CN202010053477.1A 2020-01-17 2020-01-17 Key function implementation method and electronic equipment Active CN111314534B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010053477.1A CN111314534B (en) 2020-01-17 2020-01-17 Key function implementation method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010053477.1A CN111314534B (en) 2020-01-17 2020-01-17 Key function implementation method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111314534A true CN111314534A (en) 2020-06-19
CN111314534B CN111314534B (en) 2021-06-04

Family

ID=71150940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010053477.1A Active CN111314534B (en) 2020-01-17 2020-01-17 Key function implementation method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111314534B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095917A (en) * 2013-01-08 2013-05-08 广东欧珀移动通信有限公司 Mobile phone physical button user-defined achieving method and device
US20160260558A1 (en) * 2013-08-29 2016-09-08 Mark A. Casparian Systems And Methods For Lighting Spring Loaded Mechanical Key Switches
US20180300967A1 (en) * 2017-04-17 2018-10-18 Connected Holdings, Llc Apparatus and Method for Monitoring Vehicle ON/OFF State
CN110174987A (en) * 2019-05-30 2019-08-27 努比亚技术有限公司 A kind of keypress function defines method, double screen terminal and computer-readable medium
CN110174934A (en) * 2019-05-30 2019-08-27 努比亚技术有限公司 A kind of power button device and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095917A (en) * 2013-01-08 2013-05-08 广东欧珀移动通信有限公司 Mobile phone physical button user-defined achieving method and device
US20160260558A1 (en) * 2013-08-29 2016-09-08 Mark A. Casparian Systems And Methods For Lighting Spring Loaded Mechanical Key Switches
US20180300967A1 (en) * 2017-04-17 2018-10-18 Connected Holdings, Llc Apparatus and Method for Monitoring Vehicle ON/OFF State
CN110174987A (en) * 2019-05-30 2019-08-27 努比亚技术有限公司 A kind of keypress function defines method, double screen terminal and computer-readable medium
CN110174934A (en) * 2019-05-30 2019-08-27 努比亚技术有限公司 A kind of power button device and mobile terminal

Also Published As

Publication number Publication date
CN111314534B (en) 2021-06-04

Similar Documents

Publication Publication Date Title
CN108459797B (en) Control method of folding screen and mobile terminal
CN109710150B (en) Key control method and terminal
CN109871174B (en) Virtual key display method and mobile terminal
CN110531915B (en) Screen operation method and terminal equipment
CN109343788B (en) Operation control method of mobile terminal and mobile terminal
CN108196815B (en) Method for adjusting call sound and mobile terminal
CN110471559B (en) False touch prevention method and mobile terminal
CN107728923B (en) Operation processing method and mobile terminal
CN110764675A (en) Control method and electronic equipment
CN111142679A (en) Display processing method and electronic equipment
CN111061404A (en) Control method and first electronic device
CN111352559B (en) Electronic equipment and control method
CN110995924B (en) Account management method and electronic equipment
CN109933196B (en) Screen control method and device and terminal equipment
US20220174146A1 (en) Incoming call processing method and electronic device
CN109521937B (en) Screen display control method and mobile terminal
CN108021315B (en) Control method and mobile terminal
CN111261128B (en) Screen brightness adjusting method and electronic equipment
CN111443860B (en) Touch control method and electronic equipment
CN111526248B (en) Audio output mode switching method and electronic equipment
CN111352566B (en) Parameter adjusting method and electronic equipment
CN110673761B (en) Touch key detection method and terminal equipment thereof
CN110213437B (en) Editing method and mobile terminal
CN109739430B (en) Display method and mobile terminal
CN108920090B (en) Control method of mobile terminal and mobile terminal

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