WO2020102964A1 - 一种按键数据的处理方法、装置、设备及存储介质 - Google Patents

一种按键数据的处理方法、装置、设备及存储介质

Info

Publication number
WO2020102964A1
WO2020102964A1 PCT/CN2018/116367 CN2018116367W WO2020102964A1 WO 2020102964 A1 WO2020102964 A1 WO 2020102964A1 CN 2018116367 W CN2018116367 W CN 2018116367W WO 2020102964 A1 WO2020102964 A1 WO 2020102964A1
Authority
WO
WIPO (PCT)
Prior art keywords
trigger signal
sensor
key
function operation
current position
Prior art date
Application number
PCT/CN2018/116367
Other languages
English (en)
French (fr)
Inventor
周金宝
易阳科
王政砚
Original Assignee
海能达通信股份有限公司
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 海能达通信股份有限公司 filed Critical 海能达通信股份有限公司
Priority to PCT/CN2018/116367 priority Critical patent/WO2020102964A1/zh
Publication of WO2020102964A1 publication Critical patent/WO2020102964A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Definitions

  • the present invention relates to the technical field of data processing, and more specifically, to a method, device, device and storage medium for processing key data.
  • buttons are also widely used in many industries.
  • buttons on the outside of the device to achieve full control of the device functions.
  • setting too many buttons on the outside of the device not only affects the appearance, but also has a high cost; in addition, some devices cannot be set with too many buttons due to the volume structure.
  • the present invention provides a method, device, device and storage medium for processing key data, so as to overcome the problems in the prior art that too many keys cannot be provided outside the device, and too many keys are expensive.
  • the present invention provides the following technical solutions:
  • a method for processing key data, applied to electronic devices with keys including:
  • the first sensor When receiving the key trigger signal, determine the measured value of the first sensor, the first sensor is fixedly installed on the device;
  • Optional also includes:
  • determining the function operation to be performed according to the key trigger signal and the current position state includes:
  • the function operation corresponding to the button trigger signal and the current position state at the same time is the function operation to be performed.
  • the determining the current position status of the device based on the measurement value includes:
  • the tilt angle of the device with respect to the horizontal plane is determined based on the measurement value.
  • Optional also includes:
  • the tilt direction of the device is determined based on the measurement value.
  • the key trigger signal is a single key trigger signal or a multi-key trigger signal.
  • a button data processing device applied to electronic equipment with buttons, including:
  • Signal receiving module used to receive key trigger signal
  • the measured value determination module is used to determine the measured value of the first sensor when the signal receiving module receives the key trigger signal, the first sensor is fixedly installed on the device;
  • a position determination module configured to determine the current position status of the device based on the measurement value
  • a function determining module configured to determine a function operation to be performed according to the key trigger signal and the current position state
  • the function execution module is used to trigger the execution of the function operation.
  • a configuration module which is used to pre-configure the corresponding relationship between the key trigger signal, the position status and the function operation;
  • the function determination module is specifically configured to: based on the correspondence between the key trigger signal, the position state, and the function operation, determine that the function operation corresponding to the key trigger signal and the current position state at the same time is the function operation to be performed.
  • the first sensor is an angle sensor, an inclination sensor, or a gravity sensor
  • the position determination module is specifically configured to determine the inclination angle of the device relative to a horizontal plane based on the measurement value.
  • the key trigger signal is a single key trigger signal or a multi-key trigger signal.
  • An electronic device with buttons includes at least one button, a first sensor, and a processor;
  • the first sensor is used to collect the measured value of the device when the processor receives a key trigger signal
  • the processor is used to receive a key trigger signal, and obtain the measured value of the first sensor when receiving the key trigger signal, determine the current position status of the device based on the measured value, and trigger the key trigger
  • the signal and the current position state determine the functional operation to be performed, and trigger the execution of the functional operation.
  • An electronic device including: a memory and a processor
  • the memory is used to store programs
  • the processor is used to execute the program, and the program is specifically used to:
  • the first sensor When receiving the key trigger signal, determine the measured value of the first sensor, the first sensor is fixedly installed on the device;
  • the method, device, device and storage medium for processing key data determine the measured value of the first sensor when receiving a key trigger signal, the first A sensor is fixedly installed on the device, determines the current position state of the device based on the measurement value, determines the function operation to be performed according to the key trigger signal and the current position state, and triggers the execution of the function operation.
  • the above key data processing method, device, equipment and storage medium, for a specific key trigger signal, when the device is in a different position state can trigger the execution of different functional operations, on the premise of reducing the number of keys and reducing costs, the realization The purpose of diversified control of the device with a few keys.
  • FIG. 1 is a flowchart of a method for processing key data disclosed in an embodiment of the present invention
  • FIG. 2 is a schematic diagram of the device disclosed by the embodiment of the present invention inclined at an angle of ⁇ with respect to the horizontal plane;
  • FIG. 3 is a flowchart of another key data processing method disclosed in an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a key data processing device disclosed in an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of another key data processing device disclosed in an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for processing key data disclosed in an embodiment of the present invention. The method shown in FIG. 1 is applied to an electronic device with keys. Referring to FIG. 1, the method for processing key data may include:
  • Step 101 When receiving the key trigger signal, determine the measured value of the first sensor, the first sensor is fixedly installed on the device.
  • the processor in the device can receive the button trigger signal, and at the same time, the processor can obtain the measured value of the first sensor.
  • the processor can obtain the measured value of the first sensor.
  • the first sensor is used to obtain a measurement value capable of characterizing the position state of the device
  • the position state may be the tilt state of the device
  • the first sensor may be any sensing device capable of detecting the tilt angle of the device, for example, the angle Sensors, tilt sensors, gravity sensors, etc.
  • Step 102 Determine the current position status of the device based on the measurement value
  • the function operations corresponding to different position states can be pre-stored in the system. After acquiring the measurement value of the first sensor, the current position state of the device is first determined according to the measurement value. It should be noted that, in different implementation manners, determining the position status of the device according to the measured value may be performed by different execution bodies. For example, it may be the processor of the first sensor itself, or may be the processor of the device with buttons.
  • the determining the current position status of the device based on the measurement value includes determining the tilt angle of the device relative to a horizontal plane based on the measurement value.
  • the determining the current position status of the device based on the measurement value may also include: determining the tilt angle of the device relative to the horizontal plane based on the measurement value, and based on the measurement The value determines the tilt direction of the device.
  • the device position status can be determined according to the device tilt angle (regardless of direction), or according to the tilt angle and Tilt the direction to determine the position and status of the device. This latter case can be designed for devices with many types of functions.
  • FIG. 2 is a schematic diagram of the device disclosed by the embodiment of the present invention inclined at an angle of ⁇ with respect to the horizontal plane, and the content recorded in this embodiment can be understood with reference to FIG. 2.
  • Step 103 Determine the function operation to be performed according to the key trigger signal and the current position state.
  • the user trigger button After determining the current position status of the device (the position status of the device when the key trigger signal is generated), the user trigger button is determined according to the pre-stored correspondence between the key trigger signal, the position status and the function operation, such as the function operation correspondence table Operate the function operation you want to achieve.
  • each piece of data corresponds to a specific function operation, and each piece of data has a unique key trigger signal and a unique position state corresponding to the functional operation
  • the position state in each piece of data may be a state with a fixed name, such as a forward leaning state, an upright state, a backward leaning state, It can be a range of tilt angles, such as a tilt range of 30-60 degrees.
  • Step 104 Trigger the execution of the functional operation.
  • a law enforcement recorder is fixedly installed with a gravity sensor, which is used to detect the tilt angle of the law enforcement recorder.
  • the law enforcement recorder When the user presses a specific button, the law enforcement recorder is in an upright state, and the key trigger signal and upright corresponding to the specific button At the same time, the corresponding function operation of the two parameters of the state is the recording function, then the law enforcement recorder starts the recording function; when the user presses the above-mentioned specific button, the law enforcement recorder is in a forward leaning state, and the law enforcement is controlled according to the corresponding function operation correspondence.
  • the recorder enters the standby state; for another example, when the user presses the above-mentioned specific button, the law enforcement recorder is in an inverted state, and the law enforcement recorder is controlled to automatically make an emergency alarm according to the corresponding function operation correspondence. Therefore, in this embodiment, multiple functions of a key when the device is in different positions are realized.
  • the first sensor must be fixedly installed on the device with a key to ensure that the first sensor can synchronously and accurately obtain the measured value of the device's position status when the device changes its position status such as tilt.
  • the key data processing method is directed to a specific key trigger signal.
  • the device When the device is in a different position, it can trigger the execution of different functional operations.
  • a small number of keys are realized The purpose of diversified control of equipment.
  • FIG. 3 is a flowchart of another key data processing method disclosed in an embodiment of the present invention.
  • the key data processing method may include:
  • Step 301 Pre-configure the corresponding relationship between the key trigger signal, position status and function operation.
  • the corresponding relationship between the button trigger signal, the position state and the function operation is pre-configured in the system, and then the corresponding function operation is directly determined according to the above correspondence relationship when the button trigger signal and the position state are obtained later.
  • Step 302 When receiving the key trigger signal, determine the measured value of the first sensor, the first sensor is fixedly installed on the device.
  • Step 303 Determine the current position status of the device based on the measurement value.
  • Step 304 Based on the correspondence between the key trigger signal, the position state, and the function operation, determine that the function operation corresponding to the key trigger signal and the current position state at the same time is the function operation to be performed.
  • Step 305 Trigger to execute the function operation.
  • the specific scenario of this embodiment may be a specific test configuration before the device leaves the factory, or it may be an adjustment configuration of the function trigger button and the position status of the device in the middle of the device.
  • the corresponding relationship between the button trigger signal, the position state and the function operation is pre-configured, and then when the button trigger signal and the position state are obtained, the corresponding function operation is directly determined according to the corresponding relationship, and then the determined function operation is quickly executed.
  • the key trigger signal may be a single key trigger signal or a multi-key trigger signal, such as a double key trigger signal.
  • a multi-key trigger signal such as a double key trigger signal.
  • the two buttons can control up to 9 functions. operating.
  • the scenario in which the key trigger signal is a multi-key trigger signal is suitable for key devices with a small number of keys and many types of functions.
  • FIG. 4 is a schematic structural diagram of an apparatus for processing key data disclosed in an embodiment of the present invention.
  • the apparatus shown in FIG. 4 may be applied to an electronic device with keys.
  • the apparatus 40 for processing key data may include:
  • the signal receiving module 401 is used to receive a key trigger signal.
  • the measurement value determination module 402 is used to determine the measurement value of the first sensor when the signal receiving module receives the key trigger signal, and the first sensor is fixedly installed on the device.
  • the processor in the device can receive the button trigger signal, and at the same time, the processor can obtain the measured value of the first sensor.
  • the processor can obtain the measured value of the first sensor.
  • the first sensor is used to obtain a measurement value capable of characterizing the position state of the device
  • the position state may be the tilt state of the device
  • the first sensor may be any sensing device capable of detecting the tilt angle of the device, for example, the angle Sensors, tilt sensors, gravity sensors, etc.
  • the position determination module 403 is configured to determine the current position status of the device based on the measurement value.
  • the function operations corresponding to different position states can be pre-stored in the system. After acquiring the measurement value of the first sensor, the current position state of the device is first determined according to the measurement value. It should be noted that, in different implementation manners, determining the position status of the device according to the measured value may be performed by different execution bodies. For example, it may be the processor of the first sensor itself, or may be the processor of the device with buttons.
  • the position determination module 403 is specifically configured to determine the inclination angle of the device relative to the horizontal plane based on the measurement value.
  • the position determination module 403 may also be used to determine the tilt angle of the device relative to the horizontal plane based on the measurement value, and determine the tilt direction of the device based on the measurement value.
  • the device position status can be determined according to the device tilt angle (regardless of direction), or according to the tilt angle and Tilt the direction to determine the position and status of the device. This latter case can be designed for devices with many types of functions.
  • the function determining module 404 is configured to determine the function operation to be performed according to the key trigger signal and the current position state.
  • the user trigger button After determining the current position status of the device (the position status of the device when the key trigger signal is generated), the user trigger button is determined according to the pre-stored correspondence between the key trigger signal, the position status and the function operation, such as the function operation correspondence table Operate the function operation you want to achieve.
  • the function execution module 405 is configured to trigger execution of the function operation.
  • the first sensor must be fixedly installed on the device with a key to ensure that when the device changes its position status such as tilt, the first sensor can synchronously and accurately obtain the measured value of the device's position status.
  • the key data processing device can trigger and execute different functional operations when the device is in a different position state for a specific key trigger signal.
  • a small number of keys are realized The purpose of diversified control of equipment.
  • FIG. 5 is a schematic structural diagram of another key data processing apparatus disclosed in an embodiment of the present invention.
  • the key data processing apparatus 50 may include:
  • the configuration module 501 is used to pre-configure the corresponding relationship between the key trigger signal, the position status and the function operation.
  • the corresponding relationship between the button trigger signal, the position state and the function operation is pre-configured in the system, and then the corresponding function operation is directly determined according to the above correspondence relationship when the button trigger signal and the position state are obtained later.
  • the signal receiving module 401 is used to receive a key trigger signal.
  • the measurement value determination module 402 is used to determine the measurement value of the first sensor when the signal receiving module receives the key trigger signal, and the first sensor is fixedly installed on the device.
  • the position determination module 403 is configured to determine the current position status of the device based on the measurement value.
  • the function determining module 404 determines that the function operation corresponding to the button trigger signal and the current position state at the same time is the function operation to be performed based on the correspondence between the button trigger signal, the position state, and the function operation.
  • the function execution module 405 is configured to trigger execution of the function operation.
  • the specific scenario of this embodiment may be a specific test configuration before the device leaves the factory, or it may be an adjustment configuration of the function trigger button and the position status of the device in the middle of the device.
  • the corresponding relationship between the button trigger signal, the position state and the function operation is pre-configured, and then when the button trigger signal and the position state are obtained, the corresponding function operation is directly determined according to the corresponding relationship, and then the determined function operation is quickly performed.
  • the key trigger signal may be a single key trigger signal or a multi-key trigger signal, such as a double key trigger signal.
  • a multi-key trigger signal such as a double key trigger signal.
  • the scenario in which the key trigger signal is a multi-key trigger signal is suitable for key devices with a small number of keys and many types of functions.
  • an embodiment of the present application discloses an electronic device with buttons, the electronic device includes at least one button, a first sensor, and a processor.
  • the first sensor is used to collect the measured value of the device when the processor receives a key trigger signal.
  • the processor is used to receive a key trigger signal, and obtain the measured value of the first sensor when receiving the key trigger signal, determine the current position status of the device based on the measured value, and trigger the key trigger
  • the signal and the current position state determine the functional operation to be performed, and trigger the execution of the functional operation.
  • FIG. 6 shows a schematic structural diagram of a terminal device 60 provided by an embodiment of the present invention, which may include: a memory 601 and a processor 602.
  • the memory 601 is used to store programs
  • the processor 602 is configured to execute the program, and the program is specifically used to:
  • the first sensor When receiving the key trigger signal, determine the measured value of the first sensor, the first sensor is fixedly installed on the device;
  • the processor 602 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., may also be an application-specific integrated circuit (ASIC), or one or more used to control the present invention Integrated circuit for program execution. It can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • the processor 602 may include a main processor, and may also include a baseband chip, a modem, and the like.
  • the memory 601 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services.
  • the program may include program code, and the program code includes computer operation instructions.
  • the memory 601 may include read-only memory (read-only memory, ROM), other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), storable information, and Instruction of other types of dynamic storage devices, disk storage, flash, etc.
  • the processor 602 executes the program stored in the memory 601 and calls other devices, and can be used to implement each step of the key data processing method provided by the embodiment of the present invention.
  • An embodiment of the present invention further provides a readable storage medium on which a computer program is stored.
  • a computer program is stored on which a computer program is stored.
  • RAM random access memory
  • ROM read-only memory
  • electrically programmable ROM electrically erasable and programmable ROM
  • registers hard disks, removable disks, CD-ROMs, or all fields of technology Any other known storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

本申请提供了一种按键数据的处理方法、装置、设备和存储介质,在接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上,基于所述测量值确定所述设备的当前位置状态,根据所述按键触发信号和所述当前位置状态确定待执行的功能操作,触发执行所述功能操作。上述按键数据的处理方法、装置、设备及存储介质,针对特定的按键触发信号,在设备处于不同位置状态时,能够触发执行不同的功能操作,在减少按键数量、降低成本的前提下,实现了少量按键对设备进行多样化控制的目的。

Description

一种按键数据的处理方法、装置、设备及存储介质 技术领域
本发明涉及数据处理技术领域,更具体的说,是涉及一种按键数据的处理方法、装置、设备及存储介质。
背景技术
以按键作为输入载体来控制相关设备,是最传统的控制操作方式。因具有易于盲操作、手感回馈佳、安全性好等特点,按键在众多行业中的应用也十分广泛。
随着社会的发展,许多产品、设备的功能也越来越多,而功能单一的按键已不能满足全方位控制设备的需求。为了解决上述问题,一些厂家在设备外部设置了越来越多的按键,以实现全方位对设备功能的控制。然而,在设备外部设置过多按键,不仅影响美观,且成本高;另外,一些设备受体积结构影响,也无法设置过多按键。
发明内容
有鉴于此,本发明提供了一种按键数据的处理方法、装置、设备及存储介质,以克服现有技术中无法在设备外部设置过多按键,以及设置按键过多成本高的问题。
为实现上述目的,本发明提供如下技术方案:
一种按键数据的处理方法,应用于具有按键的电子设备上,包括:
在接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上;
基于所述测量值确定所述设备的当前位置状态;
根据所述按键触发信号和所述当前位置状态确定待执行的功能操作;
触发执行所述功能操作。
可选的,还包括:
预先配置按键触发信号、位置状态和功能操作的对应关系;
则所述根据所述按键触发信号和所述当前位置状态确定待执行的功能操作,包括:
基于所述按键触发信号、位置状态和功能操作的对应关系,确定所述按键触发信号和所述当前位置状态同时对应的功能操作为待执行的功能操作。
可选的,所述第一传感器为角度传感器、倾角传感器或重力传感器,则所述基于所述测量值确定所述设备的当前位置状态,包括:
基于所述测量值确定所述设备相对于水平面的倾斜角度。
可选的,还包括:
基于所述测量值确定所述设备的倾斜方向。
可选的,所述按键触发信号为单键触发信号或多键触发信号。
一种按键数据的处理装置,应用于具有按键的电子设备上,包括:
信号接收模块,用于接收按键触发信号;
测量值确定模块,用于在所述信号接收模块接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上;
位置确定模块,用于基于所述测量值确定所述设备的当前位置状态;
功能确定模块,用于根据所述按键触发信号和所述当前位置状态确定待执行的功能操作;
功能执行模块,用于触发执行所述功能操作。
可选的,还包括:配置模块,用于预先配置按键触发信号、位置状态和功能操作的对应关系;
则所述功能确定模块具体用于:基于所述按键触发信号、位置状态和功能操作的对应关系,确定所述按键触发信号和所述当前位置状态同时对应的功能操作为待执行的功能操作。
可选的,所述第一传感器为角度传感器、倾角传感器或重力传感器,则所述位置确定模块具体用于:基于所述测量值确定所述设备相对于水平面的倾斜角度。
可选的,所述按键触发信号为单键触发信号或多键触发信号。
一种带有按键的电子设备,所述电子设备包括至少一个按键、第一传感器 和处理器;
其中,所述第一传感器用于在所述处理器接收到按键触发信号时,采集所述设备的测量值;
所述处理器用于接收按键触发信号,并在接收到所述按键触发信号时获取所述第一传感器的测量值,根据基于所述测量值确定所述设备的当前位置状态,根据所述按键触发信号和所述当前位置状态确定待执行的功能操作,并触发执行所述功能操作。
一种电子设备,包括:存储器和处理器;
所述存储器,用于存储程序;
所述处理器,用于执行所述程序,所述程序具体用于:
在接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上;
基于所述测量值确定所述设备的当前位置状态;
根据所述按键触发信号和所述当前位置状态确定待执行的功能操作;
触发执行所述功能操作。
一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现上述任一种按键数据的处理方法的各个步骤。
经由上述的技术方案可知,与现有技术相比,本发明提供的按键数据的处理方法、装置、设备和存储介质,在接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上,基于所述测量值确定所述设备的当前位置状态,根据所述按键触发信号和所述当前位置状态确定待执行的功能操作,触发执行所述功能操作。上述按键数据的处理方法、装置、设备及存储介质,针对特定的按键触发信号,在设备处于不同位置状态时,能够触发执行不同的功能操作,在减少按键数量、降低成本的前提下,实现了少量按键对设备进行多样化控制的目的。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本发明实施例公开的一种按键数据的处理方法的流程图;
图2为本发明实施例公开的设备相对于水平面倾斜α角度的示意图;
图3为本发明实施例公开的另一种按键数据的处理方法的流程图;
图4为本发明实施例公开的一种按键数据的处理装置的结构示意图;
图5为本发明实施例公开的另一种按键数据的处理装置的结构示意图;
图6为本发明实施例公开的电子设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1为本发明实施例公开的一种按键数据的处理方法的流程图,图1所示方法应用于具有按键的电子设备上,参见图1所示,按键数据的处理方法可以包括:
步骤101:在接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上。
在用户按下设备上的按键时,设备中的处理器可以接收到按键触发信号,与此同时,处理器可以获取确定第一传感器的测量值,本实施例实施过程中,需要尽可能保证用户按下按键与获取第一传感器测量值的同步性,以保证后续确定的待执行的功能操作的准确性,使得最终设备执行的操作符合用户的真实意愿。
其中,所述第一传感器用于获取能够表征设备位置状态的测量值,所述位置状态可以是设备的倾斜状态,所述第一传感器可以是任何能够检测设备倾斜角度的传感设备,例如角度传感器、倾角传感器、重力传感器等。
步骤102:基于所述测量值确定所述设备的当前位置状态;
其中,不同的位置状态可以对应不同的功能操作。
系统中可预先存储不同的位置状态对应的功能操作,在获取到第一传感器的测量值后,首先根据测量值确定设备的当前位置状态。需要说明的是,在不同的实现方式中,根据测量值确定设备的位置状态可以由不同的执行主体来执行。例如,是第一传感器自身的处理器,也可以是所述带有按键的设备的处理器。
在一个具体实现中,所述基于所述测量值确定所述设备的当前位置状态,包括:基于所述测量值确定所述设备相对于水平面的倾斜角度。当然,在不同的实现方式中,所述基于所述测量值确定所述设备的当前位置状态,也可以包括:基于所述测量值确定所述设备相对于水平面的倾斜角度,并基于所述测量值确定所述设备的倾斜方向。这样,根据实际设备的按钮、位置状态与功能操作的配置,在按键触发信号相同的情况下,可以单独根据设备倾斜角度(不分方向)来确定设备的位置状态,也可以同时根据倾斜角度和倾斜方向来确定设备的位置状态,后面这种情况可以针对功能类型比较多的设备来设计。
图2为本发明实施例公开的设备相对于水平面倾斜α角度的示意图,可结合图2理解本实施例记载的内容。
步骤103:根据所述按键触发信号和所述当前位置状态确定待执行的功能操作。
在确定了设备的当前位置状态(按键触发信号生成时设备的位置状态)后,根据预先存储的按键触发信号、位置状态与功能操作的对应关系,例如功能操作对应关系表,来确定用户触发按键操作想要实现的功能操作。其中,所述功能操作对应关系表中可以有多条数据,每一条数据对应一个特定的功能操作,每条数据中,都有唯一的一个按键触发信号和唯一的位置状态与其中的功能操作对应,所述功能操作对应关系表中不存在完全相同的两条或多条数据,每一条数据中的位置状态可以是一个固定名称的状态,如前倾状态、直立状态、后倾状态等,也可以是一个倾斜角范围,如倾斜30——60度范围。
步骤104:触发执行所述功能操作。
例如,一个执法记录仪中固定安装了一个重力传感器,用于检测执法记录 仪的倾斜角度,用户按下一特定按钮时,该执法记录仪处于直立状态,该特定按钮对应的按键触发信号以及直立状态两项参数同时对应的功能操作是录像功能,则该执法记录仪启动录像功能;而在用户按下上述特定按钮时,执法记录仪处于前倾状态,根据相应的功能操作对应关系,控制执法记录仪进入待机状态;再如,用户按下上述特定按钮时,执法记录仪处于倒立状态,根据相应的功能操作对应关系,控制执法记录仪自动进行紧急报警。从而本实施例实现了一个按键在设备处于不同位置状态时的多种功能控制。
需要说明的是,第一传感器必须固定安装在所述带有按键的设备上,以保证该设备在发生倾斜等位置状态变化时,第一传感器能够同步准确得到设备位置状态的测量值。
本实施例中,所述按键数据的处理方法针对特定的按键触发信号,在设备处于不同位置状态时,能够触发执行不同的功能操作,在减少按键数量、降低成本的前提下,实现了少量按键对设备进行多样化控制的目的。
在上述本发明公开的实施例的基础上,图3为本发明实施例公开的另一种按键数据的处理方法的流程图,如图3所示,按键数据的处理方法可以包括:
步骤301:预先配置按键触发信号、位置状态和功能操作的对应关系。
预先在系统中配置好按键触发信号、位置状态和功能操作的对应关系,便与后续在得到按键触发信号和位置状态时,直接根据上述对应关系确定对应的功能操作。
步骤302:在接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上。
步骤303:基于所述测量值确定所述设备的当前位置状态。
步骤304:基于所述按键触发信号、位置状态和功能操作的对应关系,确定所述按键触发信号和所述当前位置状态同时对应的功能操作为待执行的功能操作。
步骤305:触发执行所述功能操作。
本实施例的具体场景可以是设备出厂前的具体测试配置,也可以是设备使用中期对功能触发按钮及设备位置状态的调整配置。预先配置了按键触发信 号、位置状态和功能操作的对应关系,便与后续在得到按键触发信号和位置状态时,直接根据上述对应关系确定对应的功能操作,进而快速执行确定的功能操作。
上述任一实施例中,所述按键触发信号可以为单键触发信号,也可以是多键触发信号,如双键触发信号。例如,在位置状态只有直立、倾斜、倒立三种状态时,一个按键对应可以触发三种不同的功能。而如果有两个按键,每个按键分别能够触发三种不同的功能,同时按下两个按键时,也有三种位置状态可以对应,则按照上述场景,两个按键最多能够控制触发9种功能操作。所述按键触发信号是多键触发信号的场景适用于按键数量少且功能类型多的按键设备。
对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
上述本发明公开的实施例中详细描述了方法,对于本发明的方法可采用多种形式的装置实现,因此本发明还公开了一种装置,下面给出具体的实施例进行详细说明。
图4为本发明实施例公开的一种按键数据的处理装置的结构示意图,图4所示装置可应用于具有按键的电子设备上,如图4所示,按键数据的处理装置40可以包括:
信号接收模块401,用于接收按键触发信号。
测量值确定模块402,用于在所述信号接收模块接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上。
在用户按下设备上的按键时,设备中的处理器可以接收到按键触发信号, 与此同时,处理器可以获取确定第一传感器的测量值,本实施例实施过程中,需要尽可能保证用户按下按键与获取第一传感器测量值的同步性,以保证后续确定的待执行的功能操作的准确性,使得最终设备执行的操作符合用户的真实意愿。
其中,所述第一传感器用于获取能够表征设备位置状态的测量值,所述位置状态可以是设备的倾斜状态,所述第一传感器可以是任何能够检测设备倾斜角度的传感设备,例如角度传感器、倾角传感器、重力传感器等。
位置确定模块403,用于基于所述测量值确定所述设备的当前位置状态。
其中,不同的位置状态可以对应不同的功能操作。
系统中可预先存储不同的位置状态对应的功能操作,在获取到第一传感器的测量值后,首先根据测量值确定设备的当前位置状态。需要说明的是,在不同的实现方式中,根据测量值确定设备的位置状态可以由不同的执行主体来执行。例如,是第一传感器自身的处理器,也可以是所述带有按键的设备的处理器。
在一个具体实现中,所述位置确定模块403具体用于:基于所述测量值确定所述设备相对于水平面的倾斜角度。当然,在不同的实现方式中,位置确定模块403也可以用于:基于所述测量值确定所述设备相对于水平面的倾斜角度,并基于所述测量值确定所述设备的倾斜方向。这样,根据实际设备的按钮、位置状态与功能操作的配置,在按键触发信号相同的情况下,可以单独根据设备倾斜角度(不分方向)来确定设备的位置状态,也可以同时根据倾斜角度和倾斜方向来确定设备的位置状态,后面这种情况可以针对功能类型比较多的设备来设计。
功能确定模块404,用于根据所述按键触发信号和所述当前位置状态确定待执行的功能操作。
在确定了设备的当前位置状态(按键触发信号生成时设备的位置状态)后,根据预先存储的按键触发信号、位置状态与功能操作的对应关系,例如功能操作对应关系表,来确定用户触发按键操作想要实现的功能操作。
功能执行模块405,用于触发执行所述功能操作。
以上,实现了一个按键在设备处于不同位置状态时的多种功能控制。
本实施例中,第一传感器必须固定安装在所述带有按键的设备上,以保证该设备在发生倾斜等位置状态变化时,第一传感器能够同步准确得到设备位置状态的测量值。
本实施例中,所述按键数据的处理装置针对特定的按键触发信号,在设备处于不同位置状态时,能够触发执行不同的功能操作,在减少按键数量、降低成本的前提下,实现了少量按键对设备进行多样化控制的目的。
在上述本发明公开的实施例的基础上,图5为本发明实施例公开的另一种按键数据的处理装置的结构示意图,如图5所示,按键数据的处理装置50可以包括:
配置模块501,用于预先配置按键触发信号、位置状态和功能操作的对应关系。
预先在系统中配置好按键触发信号、位置状态和功能操作的对应关系,便与后续在得到按键触发信号和位置状态时,直接根据上述对应关系确定对应的功能操作。
信号接收模块401,用于接收按键触发信号。
测量值确定模块402,用于在所述信号接收模块接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上。
位置确定模块403,用于基于所述测量值确定所述设备的当前位置状态。
功能确定模块404,基于所述按键触发信号、位置状态和功能操作的对应关系,确定所述按键触发信号和所述当前位置状态同时对应的功能操作为待执行的功能操作。
功能执行模块405,用于触发执行所述功能操作。
本实施例的具体场景可以是设备出厂前的具体测试配置,也可以是设备使用中期对功能触发按钮及设备位置状态的调整配置。预先配置了按键触发信号、位置状态和功能操作的对应关系,便与后续在得到按键触发信号和位置状态时,直接根据上述对应关系确定对应的功能操作,进而快速执行确定的功能操作。
上述任一实施例中,所述按键触发信号可以为单键触发信号,也可以是多键触发信号,如双键触发信号。所述按键触发信号是多键触发信号的场景适用于按键数量少且功能类型多的按键设备。
进一步,本申请实施例公开了一种带有按键的电子设备,所述电子设备包括至少一个按键、第一传感器和处理器。
其中,所述第一传感器用于在所述处理器接收到按键触发信号时,采集所述设备的测量值。
所述处理器用于接收按键触发信号,并在接收到所述按键触发信号时获取所述第一传感器的测量值,根据基于所述测量值确定所述设备的当前位置状态,根据所述按键触发信号和所述当前位置状态确定待执行的功能操作,并触发执行所述功能操作。
本发明实施例还提供了一种电子设备,请参阅图6,示出了本发明实施例提供的终端设备60的结构示意图,可以包括:存储器601和处理器602。
存储器601,用于存储程序;
处理器602,用于执行所述程序,所述程序具体用于:
在接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上;
基于所述测量值确定所述设备的当前位置状态;
根据所述按键触发信号和所述当前位置状态确定待执行的功能操作;
触发执行所述功能操作。
处理器602可以是通用处理器,例如通用中央处理器(CPU)、微处理器等,也可以是特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本发明方案程序执行的集成电路。还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
处理器602可包括主处理器,还可包括基带芯片、调制解调器等。
存储器601中保存有执行本发明技术方案的程序,还可以保存有操作系统 和其他关键业务。具体地,程序可以包括程序代码,程序代码包括计算机操作指令。更具体的,存储器601可以包括只读存储器(read-only memory,ROM)、可存储静态信息和指令的其他类型的静态存储设备、随机存取存储器(random access memory,RAM)、可存储信息和指令的其他类型的动态存储设备、磁盘存储器、flash等等。
处理器602执行存储器601中所存放的程序,以及调用其他设备,可用于实现本发明实施例所提供的按键数据的处理方法的各个步骤。
本发明实施例还提供了一种可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时,实现上述任一实施例提供的按键数据的处理方法的各个步骤。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式 的存储介质中。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (12)

  1. 一种按键数据的处理方法,应用于具有按键的电子设备上,其特征在于,包括:
    在接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上;
    基于所述测量值确定所述设备的当前位置状态;
    根据所述按键触发信号和所述当前位置状态确定待执行的功能操作;
    触发执行所述功能操作。
  2. 根据权利要求1所述的按键数据的处理方法,其特征在于,还包括:
    预先配置按键触发信号、位置状态和功能操作的对应关系;
    则所述根据所述按键触发信号和所述当前位置状态确定待执行的功能操作,包括:
    基于所述按键触发信号、位置状态和功能操作的对应关系,确定所述按键触发信号和所述当前位置状态同时对应的功能操作为待执行的功能操作。
  3. 根据权利要求1所述的按键数据的处理方法,其特征在于,所述第一传感器为角度传感器、倾角传感器或重力传感器,则所述基于所述测量值确定所述设备的当前位置状态,包括:
    基于所述测量值确定所述设备相对于水平面的倾斜角度。
  4. 根据权利要求3所述的按键数据的处理方法,其特征在于,还包括:
    基于所述测量值确定所述设备的倾斜方向。
  5. 根据权利要求1-4任一项所述的按键数据的处理方法,其特征在于,所述按键触发信号为单键触发信号或多键触发信号。
  6. 一种按键数据的处理装置,应用于具有按键的电子设备上,其特征在于,包括:
    信号接收模块,用于接收按键触发信号;
    测量值确定模块,用于在所述信号接收模块接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上;
    位置确定模块,用于基于所述测量值确定所述设备的当前位置状态;
    功能确定模块,用于根据所述按键触发信号和所述当前位置状态确定待执行的功能操作;
    功能执行模块,用于触发执行所述功能操作。
  7. 根据权利要求6所述的按键数据的处理装置,其特征在于,还包括:配置模块,用于预先配置按键触发信号、位置状态和功能操作的对应关系;
    则所述功能确定模块具体用于:基于所述按键触发信号、位置状态和功能操作的对应关系,确定所述按键触发信号和所述当前位置状态同时对应的功能操作为待执行的功能操作。
  8. 根据权利要求6所述的按键数据的处理方法,其特征在于,所述第一传感器为角度传感器、倾角传感器或重力传感器,则所述位置确定模块具体用于:基于所述测量值确定所述设备相对于水平面的倾斜角度。
  9. 根据权利6-8任一项所述按键数据的处理方法,其特征在于,所述按键触发信号为单键触发信号或多键触发信号。
  10. 一种带有按键的电子设备,其特征在于,所述电子设备包括至少一个按键、第一传感器和处理器;
    其中,所述第一传感器用于在所述处理器接收到按键触发信号时,采集所述设备的测量值;
    所述处理器用于接收按键触发信号,并在接收到所述按键触发信号时获取所述第一传感器的测量值,根据基于所述测量值确定所述设备的当前位置状态,根据所述按键触发信号和所述当前位置状态确定待执行的功能操作,并触发执行所述功能操作。
  11. 一种电子设备,其特征在于,包括:存储器和处理器;
    所述存储器,用于存储程序;
    所述处理器,用于执行所述程序,所述程序具体用于:
    在接收到按键触发信号时,确定第一传感器的测量值,所述第一传感器固定安装在所述设备上;
    基于所述测量值确定所述设备的当前位置状态;
    根据所述按键触发信号和所述当前位置状态确定待执行的功能操作;
    触发执行所述功能操作。
  12. 一种存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,实现如权利要求1至5中任一项所述的按键数据的处理方法的各个步骤。
PCT/CN2018/116367 2018-11-20 2018-11-20 一种按键数据的处理方法、装置、设备及存储介质 WO2020102964A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/116367 WO2020102964A1 (zh) 2018-11-20 2018-11-20 一种按键数据的处理方法、装置、设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/116367 WO2020102964A1 (zh) 2018-11-20 2018-11-20 一种按键数据的处理方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020102964A1 true WO2020102964A1 (zh) 2020-05-28

Family

ID=70773704

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116367 WO2020102964A1 (zh) 2018-11-20 2018-11-20 一种按键数据的处理方法、装置、设备及存储介质

Country Status (1)

Country Link
WO (1) WO2020102964A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110117970A1 (en) * 2009-11-19 2011-05-19 Samsung Electronics Co., Ltd. Mobile device and method for touch lock control based on motion sensing
CN103699318A (zh) * 2014-01-06 2014-04-02 联想(北京)有限公司 一种电子设备触控响应方法及装置
CN106383658A (zh) * 2016-09-27 2017-02-08 宇龙计算机通信科技(深圳)有限公司 一种虚拟按键的操作方法及系统
CN107566579A (zh) * 2017-10-19 2018-01-09 广东欧珀移动通信有限公司 拍摄方法、装置、终端及存储介质
CN107967098A (zh) * 2017-12-22 2018-04-27 海能达通信股份有限公司 一种按键交互方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110117970A1 (en) * 2009-11-19 2011-05-19 Samsung Electronics Co., Ltd. Mobile device and method for touch lock control based on motion sensing
CN103699318A (zh) * 2014-01-06 2014-04-02 联想(北京)有限公司 一种电子设备触控响应方法及装置
CN106383658A (zh) * 2016-09-27 2017-02-08 宇龙计算机通信科技(深圳)有限公司 一种虚拟按键的操作方法及系统
CN107566579A (zh) * 2017-10-19 2018-01-09 广东欧珀移动通信有限公司 拍摄方法、装置、终端及存储介质
CN107967098A (zh) * 2017-12-22 2018-04-27 海能达通信股份有限公司 一种按键交互方法及装置

Similar Documents

Publication Publication Date Title
KR101794804B1 (ko) 후보 지문을 인증하기 위한 방법 및 지문감지 시스템
US9703941B2 (en) Electronic device with touch screen for fingerprint recognition
US11265414B2 (en) Method and device for waking up voice recognition function in mobile terminal, and computer readable storage medium
CN111198624A (zh) 一种按键数据的处理方法、装置、设备及存储介质
US20150073741A1 (en) Portable Electronic Device with Environmental Sensor
JP2017517797A5 (zh)
CN107203313B (zh) 调整桌面显示对象方法、移动终端及计算机可读存储介质
US9692871B2 (en) Information processing method and electronic device
WO2018161540A1 (zh) 指纹注册方法及相关产品
WO2015096469A1 (zh) 一种移动终端的音量调控装置及方法、移动终端
US20140189338A1 (en) Electronic device and method for detecting booting time period for electronic device
WO2019007394A1 (zh) 按键消抖方法及装置、包含机械键的设备、存储介质
CN107678983A (zh) 一种摄像头模组数据的获取方法及移动终端
US9894522B2 (en) Methods of automatically answering a phone call with a mobile terminal and associated mobile terminals
WO2015139406A1 (zh) 一种终端显示页面的操作方法及终端
WO2016145873A1 (zh) 误操作识别方法和装置
WO2020102964A1 (zh) 一种按键数据的处理方法、装置、设备及存储介质
US20190325242A1 (en) Finger Stability Detecting Method and Fingerprint Sensing Device
JP2004222299A5 (zh)
CN107396439B (zh) 一种频率调整方法及移动终端
US8310453B1 (en) Touch-screen sign-in key
US20170249497A1 (en) Method and Device for Verifying Fingerprint
WO2017101212A1 (zh) 一种指纹识别的方法、装置及终端
CN105227314B (zh) 一种登录进入系统桌面的方法及装置
CN111459272A (zh) 一种交互方法、装置、存储介质及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18941062

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18941062

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 29/09/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18941062

Country of ref document: EP

Kind code of ref document: A1