CN-121996135-A - Terminal equipment control method, device, equipment and storage medium
Abstract
The application discloses a terminal equipment control method, a device, equipment and a storage medium, which are convenient for a user to control the terminal equipment. In the embodiment of the application, the terminal equipment detects a first operation according to an offset signal, an acceleration value and a displacement amount, and responds to the first operation to execute an instruction corresponding to the first operation, wherein the offset signal is used for representing the directional offset amount of the terminal equipment, the acceleration value is used for representing the acceleration of the terminal equipment, and the displacement amount is used for representing the displacement of the crown in a preset direction. According to the application, a user can control the terminal equipment by knocking the crown, and the operation of knocking the crown is not needed to be performed based on the touch screen function, so that when the touch screen function cannot be used normally, the user can accurately control the terminal equipment by knocking the crown, the operation difficulty of the terminal equipment is reduced, and the user experience is ensured.
Inventors
- LIU CHANG
- JIAO JIAN
Assignees
- 华为终端有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241104
Claims (15)
- 1. A terminal device control method, wherein a crown is provided in the terminal device, the method comprising: The terminal equipment detects a first operation according to an offset signal, an acceleration value and a displacement amount, wherein the first operation is an operation of knocking the crown, the offset signal is used for representing the direction offset amount of the terminal equipment, the acceleration value is used for representing the acceleration of the terminal equipment, and the displacement amount is used for representing the displacement of the crown in a preset direction; and responding to the first operation, and executing an instruction corresponding to the first operation.
- 2. The method of claim 1, wherein the step of determining the position of the substrate comprises, The first operation includes a1 tap operation, the 1 tap operation corresponding to a first instruction, and/or, The first operation includes a double-click operation, the double-click operation corresponding to a second instruction, and/or, The first operation includes a three-click operation, the three-click operation corresponding to a third instruction.
- 3. The method of claim 2, wherein the terminal device detects 1 tap operation according to the offset signal, the acceleration value, and the displacement amount, comprising: if the offset signal is determined to be greater than or equal to a first offset threshold and less than or equal to a second offset threshold, the acceleration value is greater than or equal to a first acceleration threshold and less than or equal to a second acceleration threshold, and the displacement is greater than or equal to a first displacement threshold and less than or equal to a second displacement threshold, then 1 tap operation is determined to be detected, or If the offset signal is determined to be greater than or equal to the first offset threshold, the acceleration value is greater than or equal to the first acceleration threshold, and the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, then a 1-tap operation is determined to be detected.
- 4. The method of claim 2, wherein the terminal device detects 1 tap operation according to the offset signal, the acceleration value, and the displacement amount, comprising: If the offset signal is determined to be greater than or equal to a first offset threshold and less than or equal to a second offset threshold, the acceleration value is greater than or equal to a first acceleration threshold and less than or equal to a second acceleration threshold, the displacement is greater than or equal to a first displacement threshold and less than or equal to a second displacement threshold, and only one first event is detected within a preset period of time, determining that 1 tap operation is detected, wherein the first event is that the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, or And if the offset signal is determined to be greater than or equal to the first offset threshold, the acceleration value is greater than or equal to the first acceleration threshold, the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, and only one first event is detected within a preset time period, determining that 1 knocking operation is detected.
- 5. The method according to any one of claims 2-4, wherein the terminal device detects a double click operation based on the offset signal, the acceleration value, and the displacement amount, comprising: If the offset signal is determined to be greater than or equal to a first offset threshold and less than or equal to a second offset threshold, the acceleration value is greater than or equal to a first acceleration threshold and less than or equal to a second acceleration threshold, the displacement is greater than or equal to a first displacement threshold and less than or equal to a second displacement threshold, and a time interval between detecting two first events is greater than or equal to a first interval threshold and less than or equal to a second interval threshold, a double click operation is determined to be detected, wherein the first event is that the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, or And if the offset signal is determined to be greater than or equal to the first offset threshold, the acceleration value is greater than or equal to the first acceleration threshold, the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, and the time interval between detecting the first event twice is greater than or equal to the first interval threshold and less than or equal to the second interval threshold, determining that a double-click operation is detected.
- 6. The method according to any one of claims 2-5, wherein the terminal device detects a triple click operation based on the offset signal, the acceleration value, and the displacement amount, comprising: If the offset signal is determined to be greater than or equal to a first offset threshold and less than or equal to a second offset threshold, the acceleration value is greater than or equal to a first acceleration threshold and less than or equal to a second acceleration threshold, the displacement is greater than or equal to a first displacement threshold and less than or equal to a second displacement threshold, three first events are detected, and the time interval between two adjacent first events is greater than or equal to a first interval threshold and less than or equal to a second interval threshold, a three-click operation is determined to be detected, wherein the first event is that the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, or If the offset signal is determined to be greater than or equal to the first offset threshold, the acceleration value is greater than or equal to the first acceleration threshold, the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, three times of the first event are detected, and the time interval between two adjacent times of the first event is greater than or equal to a first interval threshold and less than or equal to a second interval threshold, then the detection of the three-click operation is determined.
- 7. The method according to any one of claims 1-6, wherein the directional offset comprises an angular velocity of the terminal device in three dimensions.
- 8. The method according to any of claims 1-7, wherein the offset signal is obtained based on a gyroscope of the terminal device, the acceleration value is obtained based on an accelerometer of the terminal device, and the displacement amount is obtained based on a direction sensor of the terminal device.
- 9. The method according to any one of claims 1-8, wherein the preset direction is a direction in which the crown is perpendicular to the body of the terminal device.
- 10. The method according to any one of claims 1-9, wherein after the first operation is detected from the offset signal, the acceleration value, and the displacement amount, the method further comprises: and controlling a motor in the terminal equipment to vibrate.
- 11. The method of any of claims 1-10, wherein the executing, in response to the first operation, an instruction corresponding to the first operation comprises: and responding to the first operation, and executing an instruction corresponding to the first operation based on a current interface, wherein the current interface is an interface being displayed in the terminal equipment.
- 12. The method according to any one of claims 2 to 11, wherein, The first instruction is used for selecting the next content corresponding to the target content, wherein the target content is selected in a current page, and the next content is in a specified direction of the target content in the current page; The second instruction is used for entering a page corresponding to the target content; And the third instruction is used for returning to the page of the upper level of the current page.
- 13. An electronic device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method of any one of claims 1-12.
- 14. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program when run controls a device in which the computer readable storage medium is located to perform the method of any one of claims 1-12.
- 15. A computer program product, characterized in that the computer program product comprises computer program code which, when run on a computer, causes the computer to perform the method according to any of the preceding claims 1-12.
Description
Terminal equipment control method, device, equipment and storage medium Technical Field The present application relates to the field of terminal technologies, and in particular, to a method, an apparatus, a device, and a storage medium for controlling a terminal device. Background With the development of technology, wearable devices (e.g., smart watches, smart bracelets, etc.) have become increasingly popular. In the related art, a rotary crown located on a wearable device supports only a rotation operation and a pressing operation. The operation mode is single, so that the user experience is poor. Disclosure of Invention The application aims to provide a terminal equipment control method, a device, equipment and a storage medium, so as to solve the technical problems in the prior art. In a first aspect, an embodiment of the present application provides a method for controlling a terminal device, in which a crown is provided, where the method includes that the terminal device detects a first operation according to an offset signal, an acceleration value and a displacement amount, the first operation is an operation of knocking the crown, where the offset signal is used to represent a directional offset of the terminal device, the acceleration value is used to represent acceleration of the terminal device, the displacement amount is used to represent displacement of the crown in a preset direction, and an instruction corresponding to the first operation is executed in response to the first operation. In the embodiment of the application, the user can control the terminal equipment by knocking the crown, and the operation of knocking the crown is not needed to be performed based on the touch screen function, so that when the touch screen function cannot be used normally, the user can accurately control the terminal equipment by knocking the crown, the operation difficulty of the terminal equipment is reduced, and the user experience is ensured. In some possible embodiments, the first operation comprises a 1-tap operation, the 1-tap operation corresponding to the first instruction, and/or the first operation comprises a double-tap operation, the double-tap operation corresponding to the second instruction, and/or the first operation comprises a triple-tap operation, the triple-tap operation corresponding to the third instruction. . In the embodiment of the application, by defining different functions corresponding to different knocking times, the accurate control of the user on the terminal equipment through the crown is realized. In some possible embodiments, if it is determined that the offset signal is greater than or equal to the first offset threshold and less than or equal to the second offset threshold, the acceleration value is greater than or equal to the first acceleration threshold and less than or equal to the second acceleration threshold, and the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, then it is determined that 1 tap operation is detected, or if it is determined that the offset signal is greater than or equal to the first offset threshold, the acceleration value is greater than or equal to the first acceleration threshold, and the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, then it is determined that 1 tap operation is detected. In the embodiment of the application, when the offset signal, the acceleration value and the displacement are respectively located in the corresponding threshold ranges, the detection of 1-tap operation is determined, and when any one of the three conditions is not satisfied, the false touch is determined. By setting a plurality of conditions, the situation that the crown is suspected to be knocked due to collision is eliminated, and the accuracy of knocking operation detection can be greatly improved. In some possible embodiments, if the offset signal is determined to be greater than or equal to the first offset threshold and less than or equal to the second offset threshold, the acceleration value is greater than or equal to the first acceleration threshold and less than or equal to the second acceleration threshold, the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, and only one first event is detected within a preset time period, then it is determined that 1 tap operation is detected, wherein the first event is the displacement is greater than or equal to the first displacement threshold and less than or equal to the second displacement threshold, or if the offset signal is determined to be greater than or equal to the first offset threshold, the acceleration value is greater than or equal to the first acceleration threshold and the displacement is greater than or equal to the first displacement th