CN116069223A - Anti-shake method, anti-shake device and wearable equipment - Google Patents

Anti-shake method, anti-shake device and wearable equipment Download PDF

Info

Publication number
CN116069223A
CN116069223A CN202310210555.8A CN202310210555A CN116069223A CN 116069223 A CN116069223 A CN 116069223A CN 202310210555 A CN202310210555 A CN 202310210555A CN 116069223 A CN116069223 A CN 116069223A
Authority
CN
China
Prior art keywords
layer
application
data
rotation
angle data
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
CN202310210555.8A
Other languages
Chinese (zh)
Other versions
CN116069223B (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310210555.8A priority Critical patent/CN116069223B/en
Publication of CN116069223A publication Critical patent/CN116069223A/en
Application granted granted Critical
Publication of CN116069223B publication Critical patent/CN116069223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G21/00Input or output devices integrated in time-pieces
    • 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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • 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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The embodiment of the application provides an anti-shake method, an anti-shake device and a wearable device, which define predefined data outside a first angle range, wherein the first angle range comprises a non-0 angle which can be periodically detected by the wearable device, after a first angle data which is used for indicating that the rotation angle of a rotatable input device is 0 is acquired by an application framework layer, a service of ending rotation is not processed temporarily, whether the rotation of the rotatable input device is really ended is determined according to the condition of the predefined data acquired in M periods, and therefore the accuracy of the wearable device in identifying a rotation ending event of the rotatable input device can be effectively improved, the service of ending rotation can be executed after the real rotation is ended or the rotation service is continuously executed when the rotation is not ended, the problem that the display picture shakes is effectively avoided, the good anti-shake effect is achieved, and the user experience is improved.

Description

Anti-shake method, anti-shake device and wearable equipment
Technical Field
The present application relates to the field of wearable devices, and more particularly, to an anti-shake method, an anti-shake apparatus, and a wearable device.
Background
Currently, wearable devices (e.g., smartwatches) have been increasingly used. A rotatable input device, such as a crown, is mounted within the wearable device, and a user can implement functions or operations of starting up the wearable device, scrolling a list, switching pages, rotating unlocking, zooming a desktop icon, adjusting a signal (e.g., adjusting volume or brightness), etc., by rotating the rotatable input device.
However, in the above-mentioned implementation of related functions or operations by rotating the rotatable input device, a problem of shaking of the display screen may occur, thereby affecting the user experience. For example, in a function of scrolling a list by rotating a crown, a problem of shaking of a screen due to up-and-down alternate movement of the list occurs, affecting user experience. For another example, in the function of zooming a desktop icon by rotating a crown, a problem of screen shake due to the size alternation of icons may occur, affecting user experience. For another example, in the function of unlocking by rotating the crown, a problem of screen shake due to alternate hiding and displaying of the unlocking screen occurs, affecting the user experience.
Accordingly, there is a need to provide a technology capable of reducing the shake of the display screen during the implementation of related functions or operations through the rotatable input device, so as to improve the user experience.
Disclosure of Invention
The embodiment of the application provides an anti-shake method, an anti-shake device and wearable equipment, which can effectively improve the anti-shake effect of pictures so as to improve user experience.
In a first aspect, an anti-shake method is provided, applied to a wearable device configured with a rotatable input apparatus, where the wearable device includes an application layer and an application frame layer, and the method includes:
the application framework layer obtains the first angle data from the application layer, wherein the first angle data is used for indicating that the rotation angle of the rotatable input device is 0;
after the application framework layer acquires the first angle data, if the application framework layer acquires predefined data from the application layer in M continuous periods, the application framework layer executes a service of ending rotation, wherein the predefined data is used for indicating angle data outside a first angle range, the first angle range comprises angles which can be periodically detected by the wearable device and are not 0, and M is an integer greater than 1; or alternatively, the first and second heat exchangers may be,
After the application framework layer acquires the first angle data, if the application framework layer acquires data outside the predefined data from the application layer in the M periods, the application framework layer continues to execute the rotation service.
According to the anti-shake method provided by the embodiment of the application, predefined data for indicating angle data outside a first angle range are defined, the first angle range comprises a non-0 angle which can be periodically detected by the wearable device, after the application frame layer of the wearable device acquires the first angle data for indicating the rotation angle of the rotatable input device to be 0 from the application layer, if the application frame layer acquires the predefined data for M continuous periods, which means that the application frame layer does not acquire normal angle data (angle data in the first angle range), the service that the rotation of the rotatable input device is actually ended to execute the rotation end can be determined; if data other than the predefined data is acquired in M periods, meaning that the application framework layer acquires angle data in the first angle range, it may be determined that the rotation of the rotatable input device is not finished to continue to perform the rotation service. In this way, compared with the problem that in the prior art, the rotation of the rotatable input device is mistakenly detected by the wearable equipment to cause the shaking of the display screen, after the first angle data is acquired, the method and the device for processing the rotation of the rotatable input device temporarily do not process the shaking of the display screen, and whether the rotation of the rotatable input device is really finished or not is determined according to the conditions of the predefined data acquired in M periods, so that the accuracy of the wearable equipment for identifying the rotation ending event of the rotatable input device can be effectively improved, the operation of the rotation ending can be executed after the rotation is really finished or the rotation operation can be continuously executed when the rotation is not finished, the shaking problem of the display screen is effectively avoided, the good shaking prevention effect is achieved, and the user experience is improved. Furthermore, since the predefined data is definitely available data for the application framework layer to determine the rotation end event, determining the rotation end of the rotatable input device by the definitely available predefined data is more advantageous for the implementation of the software system, i.e. the application framework layer more easily recognizes the acquired predefined data to determine the rotation end of the rotatable input device.
Optionally, the application framework layer continues to perform the rotation service, including:
after the application framework layer acquires the first angle data, if the application framework layer acquires data other than the predefined data from the application layer for the first time in the M periods, the application framework layer continues to execute the rotation service.
According to the anti-shake method provided by the embodiment of the application framework layer, after the application framework layer acquires the angle data in the first angle range for the first time, the application framework layer starts to continuously execute the rotation service instead of continuously executing the rotation service after the data of M periods are acquired, so that the response speed of equipment can be improved, and the user experience is improved.
Optionally, the application framework layer continues to perform the rotation service, including:
after the application framework layer acquires the first angle data, if the application framework layer acquires the predefined data from the application layer in the first N periods and acquires data except the predefined data from the application layer in the (n+1) th period, the application framework layer continues to execute the rotation service, wherein N is greater than or equal to 1 and less than M; or alternatively, the first and second heat exchangers may be,
After the application framework layer acquires the first angle data, if the application framework layer acquires data outside the predefined data from the application layer in the 1 st period, the application framework layer continues to execute the rotation service.
Optionally, the predefined data is non-0 data; and, the method further comprises:
after the application framework layer acquires the first angle data, the application layer sets the angle data of the rotatable input device as the predefined data, so that the application framework layer acquires the predefined data from the application layer when the application layer does not acquire new angle data.
According to the anti-shake method provided by the embodiment of the application framework layer, after the application framework layer acquires the first angle data, the application layer sets the rotation angle of the rotatable input device as the predefined data, so that the application framework layer can acquire the first angle data and can start to judge whether rotation is finished after acquiring the first angle data, and the implementation of a software system is facilitated.
Optionally, the wearable device further comprises a driving layer; and, the method further comprises:
when detecting that the rotatable input device starts rotating, the driving layer starts a timer to report angle data of the rotatable input device to the application layer during the running of the timer;
And after the driving layer reports the first angle data to the application layer, the driving layer closes the timer.
According to the anti-shake method provided by the embodiment of the application, after the driving layer reports the first angle data to the application layer, the driving layer closes the timer, and if the rotation of the rotatable input device is truly finished, the driving layer can not need to read the angle data any more, so that the power consumption is saved.
Optionally, the predefined data is a minimum value of an integer variable.
According to the anti-shake method provided by the embodiment of the application, the predefined data are defined as the minimum value of the integer variable (int), and for a software system, the minimum value of the int is illegal data which is very easy to identify by the software system, and the illegal data can be clearly known to be not angle data in the first angle range by acquiring the illegal data, so that the method is convenient to realize, and the accuracy of the screening data of the software system is improved.
Optionally, the first angular range includes angular data in the ranges [ -120, 0) and (0, 120 ].
In a second aspect, there is provided another anti-shake method applied to a wearable apparatus configured with a rotatable input device, the method comprising:
acquiring first angle data, wherein the first angle data is used for indicating that the rotation angle of the rotatable input device is 0;
After the first angle data is acquired, if the angle data in a first angle range is not acquired in S periods, executing a service of ending rotation, wherein the first angle range comprises a non-0 angle which can be periodically detected by the wearable equipment, and S is an integer larger than 1; or alternatively, the first and second heat exchangers may be,
after the first angle data is acquired, if the angle data in the first angle range is acquired in the S periods, continuing to execute the rotation service.
According to the anti-shake method provided by the embodiment of the invention, since the first angle range includes the angle which is not 0 and can be periodically detected by the wearable device, after the wearable device acquires the first angle data for indicating that the rotation angle of the rotatable input device is 0, if the angle data in the first angle range is not acquired in S periods, the rotation of the rotatable input device can be determined to be truly ended to execute the service of rotation ending, and if the angle data in the first angle range is acquired in S periods, the rotation of the rotatable input device can be determined to be not ended to continue executing the rotation service. In this way, compared with the problem that in the prior art, the rotation of the rotatable input device is mistakenly detected by the wearable equipment to cause the shaking of the display screen, after the first angle data is acquired, the method and the device for detecting the rotation of the rotatable input device temporarily do not process the shaking of the display screen, and whether the rotation of the rotatable input device is really ended or not is determined according to whether the angle data in the first angle range is acquired in S periods or not, so that the accuracy of the wearable equipment for identifying the rotation ending event of the rotatable input device can be effectively improved, the shaking of the display screen can be effectively avoided, the user experience is improved, and the operation of executing the rotation ending service after the real rotation is finished or continuing to execute the rotation service when the rotation is not ended.
Optionally, the continuing to perform the rotation service includes:
after the first angle data is acquired, if the angle data in the first angle range is acquired for the first time in the S periods, the rotation service is continuously executed.
According to the anti-shake method provided by the embodiment of the application, after the angle data in the first angle range are acquired for the first time, the wearable device starts to continuously execute the rotation service instead of continuously executing the rotation service after the data of S periods are acquired, so that the response speed of the device can be improved, and the user experience is improved.
Optionally, the wearable device includes an application layer and an application framework layer;
the acquiring the first angle data includes:
the application framework layer acquires the first angle data from the application layer; the method comprises the steps of,
the service for executing the rotation end comprises the following steps:
after the application framework layer acquires the first angle data, if the application framework layer is within the S periods
The application framework layer performs the rotation if the angle data within the first angle range is not acquired from the application layer
Ending business; the method comprises the steps of,
the continuing to execute the rotation service includes:
After the application framework layer acquires the first angle data, if the application framework layer acquires the angle data in the first angle range from the application layer in the S periods, the application framework layer continues to execute the rotation service.
According to the anti-shake method provided by the embodiment of the application, whether the rotation of the rotatable input device is finished or not is determined by applying the angle data acquired from the application layer by the framework layer, so that related services are executed, and the implementation of a software system is facilitated.
Optionally, the wearable device further comprises a driving layer; and, the method further comprises:
when detecting that the rotatable input device starts rotating, the driving layer starts a timer to report angle data of the rotatable input device to the application layer during the running of the timer;
and after the driving layer reports the first angle data to the application layer, the driving layer closes the timer.
According to the anti-shake method provided by the embodiment of the application, after the driving layer reports the first angle data to the application layer, the driving layer closes the timer, and if the rotation of the rotatable input device is truly finished, the driving layer can not need to read the angle data any more, so that the power consumption is saved.
Optionally, the first angular range includes angular data in the ranges [ -120, 0) and (0, 120 ].
In a third aspect, an anti-shake apparatus is provided for use in a wearable device provided with a rotatable input device for performing the method provided in the first or second aspect above. In particular, the anti-shake apparatus may comprise means for performing any one of the possible implementations of the first or second aspect described above.
In a fourth aspect, a wearable device is provided that includes a rotatable input device, a processor. The processor is coupled to the memory and operable to execute instructions in the memory to implement the method of any one of the possible implementations of the first or second aspects. Optionally, the wearable device further comprises a memory. Optionally, the wearable device further comprises a communication interface, the processor being coupled with the communication interface.
In a fifth aspect, a computer readable storage medium is provided, on which a computer program is stored, which, when executed by a wearable device, causes the electronic device to implement the method of any one of the possible implementations of the first or second aspects.
In a sixth aspect, there is provided a computer program product comprising instructions that, when executed by a computer, cause a wearable device to implement the method of any one of the possible implementations of the first or second aspects.
In a seventh aspect, there is provided a chip comprising: the device comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method in any one of the possible implementation manners of the first aspect or the second aspect.
Drawings
Fig. 1 is a schematic functional block diagram of a wearable device provided by some embodiments of the present application.
Fig. 2 is a schematic structural diagram of a wearable device provided in an embodiment of the present application.
Fig. 3 is a schematic diagram of a software system of a wearable device of an embodiment of the present application.
Fig. 4 is an exemplary flowchart of an anti-shake method provided in an embodiment of the present application.
Fig. 5 is another exemplary flowchart of an anti-shake method provided in an embodiment of the present application.
Fig. 6 is another exemplary flowchart of an anti-shake method provided in an embodiment of the present application.
Fig. 7 is another exemplary flowchart of an anti-shake method provided in an embodiment of the present application.
Fig. 8 is another exemplary flowchart of an anti-shake method provided in an embodiment of the present application.
Fig. 9 is a further exemplary flowchart of an anti-shake method provided in an embodiment of the present application.
Fig. 10 is an exemplary block diagram of an anti-shake apparatus provided by an embodiment of the present application.
Fig. 11 is a schematic structural diagram of a wearable device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the present application will be described below with reference to the accompanying drawings.
The method provided by the embodiment of the application can be applied to the wearable equipment provided with the rotatable input device, and a user can realize functions or operations of starting the wearable equipment, scrolling a list, switching pages, unlocking the rotation, zooming desktop icons, adjusting signals (for example, adjusting the volume or brightness) and the like by rotating the rotatable input device.
The wearable device provided by the embodiment of the application is a portable device which can be integrated to the skin, clothes or accessories of a user, has a computing function, and can be connected with a mobile phone and various terminal devices. By way of example, the wearable device may be a watch, a smart wristband, a portable music player, a health monitoring device, a computing or gaming device, a smart phone, accessories, and the like. In some embodiments, the wearable apparatus may be a watch worn around a wrist of the user, and the rotatable input device is a crown.
Fig. 1 is a schematic functional block diagram of a wearable device provided by some embodiments of the present application. Illustratively, the wearable device 100 may be a smart watch or a smart bracelet, or the like. Referring to fig. 1, the wearable device 100 may exemplarily include a processor 110, a rotatable input apparatus 120, a sensor module 130, a display screen 140, a camera 150, a memory 160, a power supply module 170, an audio device 180, a wireless communication module 191, and a mobile communication module 192. It is to be understood that the components shown in fig. 1 do not constitute a particular limitation of the wearable device 100, and that the wearable device 100 may also include more or less components than illustrated, or may combine certain components, or may split certain components, or may have a different arrangement of components.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signalprocessor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-networkprocessing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. The controller may be, among other things, a neural hub and a command center of the wearable device 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution. In other embodiments, memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be directly recalled from the memory, avoiding repeated accesses, reducing the latency of the processor 110, and thus improving the efficiency of the wearable device 100.
The rotatable input device 120 may be a mechanical device, with a user contacting the rotatable input device 120 such that the rotatable input device 120 rotates to enable functions or operations of activation of the wearable device 100, scrolling of a list, page switching, rotational unlocking, zooming of a desktop icon, adjusting a signal (e.g., adjusting a volume or brightness level), etc. In some embodiments, the user may contact the rotatable input device 120, and may further cause other forms of movement, such as panning or tilting, of the rotatable input device 120, so as to implement other functions or operations of the wearable device, for example, by pressing the rotatable input device 120 to implement power on or power off of the wearable device.
It is to be appreciated that the wearable apparatus 100 may include one or more rotatable input devices 120.
The sensor module 130 may include one or more sensors, for example, may include a PPG sensor 130A, a pressure sensor 130B, a capacitance sensor 130C, an acceleration sensor 130D, an ambient light sensor 130E, a proximity light sensor 130F, a touch sensor 130G, a light sensor 130H, and the like. It should be understood that fig. 1 is only an example of a few sensors, and in practical applications, the wearable device 100 may further include more or fewer sensors, or use other sensors with the same or similar functions instead of the above listed sensors, and the like, and the embodiments of the present application are not limited.
The PPG sensor 130A may be used to detect heart rate, i.e. the number of beats per unit time. In some embodiments, PPG sensor 130A may include a light transmitting unit and a light receiving unit. The light transmitting unit may irradiate a light beam into a human body (such as a blood vessel), the light beam is reflected/refracted in the human body, and the reflected/refracted light is received by the light receiving unit to obtain an optical signal. Since the transmittance of blood changes during the fluctuation, the emitted/refracted light changes, and the optical signal detected by the PPG sensor 130A also changes. The PPG sensor 130A may convert the optical signal into an electrical signal, determining the heart rate to which the electrical signal corresponds. In the embodiment of the present application, the PPG sensor 130A may be disposed in the rotatable input device 120 or in the housing of the wearable apparatus 100, and the function of PPG detection may be achieved by the optical signal detected by the PPG sensor 130A.
The pressure sensor 130B is configured to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 130B may be disposed on display screen 140. The pressure sensor 130B is of various kinds, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. When a force is applied to the pressure sensor 130B, the capacitance between the electrodes changes. The wearable device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 140, the wearable device 100 detects the touch operation intensity according to the pressure sensor 130B. The wearable device 100 may also calculate the location of the touch from the detection signal of the pressure sensor 130B. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The capacitive sensor 130C may be used to detect the capacitance between two electrodes to achieve a particular function.
In some embodiments, the capacitance sensor 130C may be used to detect a capacitance between the human body and the wearable device 100, which may reflect whether the contact between the human body and the wearable device is good, and may be applied to Electrocardiography (ECG) detection, where the human body may act as one electrode. When the capacitive sensor 130C is disposed at an electrode on the wearable device, the capacitive sensor 130C may detect a capacitance between a human body and the electrode. When the capacitance detected by the capacitance sensor 105D is too large or too small, it indicates that the human body is in poor contact with the electrode; when the capacitance detected by the capacitance sensor 130C is moderate, it is indicated that the human body is in good contact with the electrode. Since whether or not the contact between the human body and the electrode is good may affect the electrode to detect the electrical signal and thus the generation of the ECG, the wearable device 100 may refer to the capacitance detected by the capacitance sensor 130C when generating the ECG.
The acceleration sensor 130D may be used to detect the magnitude of acceleration of the wearable device 100 in various directions (typically three axes). The wearable device 100 is a wearable device, when a user wears the wearable device 100, the wearable device 100 moves under the driving of the user, so that the acceleration of the acceleration sensor 130D in each direction can reflect the movement state of the human body.
An ambient light sensor 130E for sensing an ambient light parameter. For example, the ambient light parameter may include the ambient light intensity or a coefficient of ultraviolet light in the ambient light, or the like. The wearable device 100 may adaptively adjust the brightness of the display screen according to the perceived intensity of ambient light. The ambient light sensor 130E may also be used to automatically adjust white balance during photographing. Ambient light sensor 130E may also cooperate with proximity light sensor 130F to detect whether wearable device 100 is in a pocket to prevent false touches. In the embodiment of the present application, the ambient light sensor 130E may be disposed in the housing of the wearable device 100, and the ambient light detection function may be implemented by detecting the ambient light parameter in the environment where the wearable device 100 is located by the ambient light sensor 130E.
Proximate to the light sensor 130F, may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The wearable device 100 emits infrared light outwards through the light emitting diode. The wearable device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the wearable device 100. When insufficient reflected light is detected, the wearable device 100 may determine that there is no object in the vicinity of the wearable device 100. The wearable device 100 can detect that the user holds the wearable device 100 close to the ear to talk by using the proximity light sensor 130F, so as to automatically extinguish the screen to achieve the purpose of saving electricity. The proximity light sensor 130F may also be used in holster mode, pocket mode to automatically unlock or lock the screen.
The touch sensor 130G may be disposed on a display screen, and the touch sensor 130G and the display screen form a touch screen, which is also referred to as a "touch screen". The touch sensor 130G is for detecting a touch operation acting thereon or thereabout. The touch sensor 130G may communicate the detected touch operation to the processor to determine the type of touch event. Visual output associated with a touch operation may be provided through a display screen. In other embodiments, the touch sensor 130G may also be disposed on the surface of the display screen at a different location than the display screen.
The light sensor 130H may be used to detect the rotation angle and rotation direction (counterclockwise or clockwise) of the rotatable input device 120, e.g., a crown, to obtain angle data, such that the processor processes the rotation-related traffic based on the angle data.
The display screen 140 includes a display panel. The display panel may employ a liquid crystal display (liquidcrystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (FLED), a mini, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, a touch sensor may be disposed in the display screen to form a touch screen, which is not limited in this embodiment. It will be appreciated that in some embodiments, the wearable device 100 may or may not include the display 140, for example, when the wearable device 100 is a wristband, the display may or may not be included, and when the wearable device 100 is a wristwatch, the display may be included.
A camera 150 for capturing still images or video, the object producing an optical image through a lens and projecting it onto a photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format.
In some embodiments, the camera 150 may be applied in a front-facing shooting scene, and may also be simply referred to as a "front-facing camera". In other embodiments, the camera 150 is configured to be rotatable, and may be capable of capturing multiple azimuth or angle scenes, for example, in either a front-facing or rear-facing scene. In other embodiments, the wearable device may include 1 or more cameras 150, without limitation. Illustratively, the camera 150 has smaller pixels and smaller volume, occupies smaller space of the device, and can be well applied to wearable devices with small volume and portability.
Memory 160 may be used to store computer-executable program code including instructions. The processor 110 executes various functional applications of the wearable device 100 and data processing by executing instructions stored in the memory. The memory 160 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), etc., as embodiments of the present application are not limited.
The power module 170 may power various components in the wearable device 100, such as the processor 110, the sensor module 130, and the like. In some embodiments, the power module 170 may be a battery or other portable power element. In other embodiments, the wearable device 100 may also be connected to a charging device (e.g., via a wireless or wired connection), and the power module 170 may receive power input from the charging device for storage by a battery.
The audio device 180 may include a microphone, a speaker, or an earpiece, etc. that may receive or output sound signals.
A horn, also called a "loudspeaker", is used to convert an audio electrical signal into a sound signal. The wearable device 100 may listen to music through a speaker or to hands-free conversation.
Headphones, also known as "receivers," are used to convert the audio electrical signals into sound signals. When the wearable device 100 is answering a phone call or voice message, the voice can be heard by placing the earpiece close to the human ear.
Microphones, also known as "microphones" and "microphones", are used to convert sound signals into electrical signals. When making a call or transmitting voice information, a user can sound near the microphone through the mouth, inputting a sound signal to the microphone. The wearable device 100 may be provided with at least one microphone. In other embodiments, the wearable device 100 may be provided with two microphones, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the wearable device 100 may also be provided with three, four, or more microphones to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
In addition, the wearable device 100 may have a wireless communication function. With continued reference to fig. 1, the wearable device 100 may also include a wireless communication module 191, a mobile communication module 192, one or more antennas 1, and one or more antennas 2. The wearable device 100 may implement wireless communication functions through the antenna 1, the antenna 2, the wireless communication module 191, and the mobile communication module 192.
In some embodiments, the wireless communication module 191 may provide a solution for wireless communication that is applied on the wearable device 100 that conforms to various types of network communication protocols or communication technologies. By way of example, the network communication protocol may include a wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (globalnavigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), and the like. For example, the wearable device 100 may establish a bluetooth connection with other electronic devices, such as a cell phone, through a bluetooth protocol. In other embodiments, the wireless communication module 191 may be one or more devices that integrate at least one communication processing module.
The wireless communication module 191 receives electromagnetic waves via the antenna 1, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 191 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves to radiate through the antenna 1. In some embodiments, the wireless communication module 191 may be coupled to one or more antennas 1 such that the wearable device 100 may communicate with a network and other devices through wireless communication techniques.
In some embodiments, the mobile communication module 192 may provide a solution for wireless communication conforming to various types of network communication protocols or communication technologies for use on the wearable device 100. Illustratively, the network communication protocol may be various wired or wireless communication protocols, such as Ethernet, global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packetradio service, GPRS), code division multiple access (codedivision multiple access, CDMA), wideband code division multiple access (widebandcode division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (longterm evolution, LTE), voice over Internet protocol (voiceover Internet protocol, voIP), communication protocols supporting a network slice architecture, or any other suitable communication protocol. For example, the wearable device 100 may establish a wireless communication connection with other electronic devices, such as a cell phone, through a WCDMA communication protocol.
In other embodiments, the mobile communication module 192 may include at least one filter, switch, power amplifier, low noise amplifier (lownoise amplifier, LNA), or the like. In other embodiments, at least some of the functional modules of the mobile communication module 192 may be disposed in the processor 110. In other embodiments, at least some of the functional modules of the mobile communication module 192 may be disposed in the same device as at least some of the modules of the processor 110.
The mobile communication module 192 may receive electromagnetic waves from the antenna 2, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 192 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 2 to radiate. In some embodiments, the mobile communication module 192 may be coupled with one or more antennas 2 such that the wearable device 100 may communicate with a network and other devices through wireless communication technology.
Fig. 2 is a schematic structural diagram of a wearable device 100 provided in an embodiment of the present application. Fig. 2 exemplifies wearable device 100 as a smart watch or smart bracelet. Referring to fig. 2, the wearable apparatus 100 includes a main body 101 and 2 wristbands 102 (a partial area of the wristbands 102 is shown in fig. 2). The wristband 102 may be fixedly attached or movably attached to the body 101, and the wristband 102 may be wrapped around a wrist, arm, leg, or other portion of the body to secure the wearable device 100 to a user. The body 101 may include a housing 103 and a display screen 140, the housing 103 surrounding the display screen 140, an outer surface of the display screen 140 being formed on a front surface of the body 101. The housing 103 and the display screen 140 form a structure having an accommodating space inside which one or more components shown in fig. 1 and not shown are combined to realize various functions of the wearable device 100. The main body 101 further includes a crown 120A, and an accommodating space in a structure formed by the display 140 and the case 103 accommodates a portion of the crown 120A, and an exposed portion of the crown 120A is convenient for a user to access. It is understood that crown 120A is a specific example of rotatable input device 120.
In some embodiments, a user may interact with wearable device 100 through display 140. For example, the display screen 140 may receive user input and, in response to the user input, make a corresponding output, e.g., the user may select (or otherwise open, edit, etc. a graphic by touching or pressing at the graphic location on the display screen 140.
The crown 120A is attached to the outside of the case 103 and extends to the inside of the case 103. In some embodiments, crown 120A includes a head portion 121 and a stem portion 122 that are connected. The stem 122 extends into the housing 103 and the head 121 is exposed to the housing 103 as part of a contact with the user to allow the user to contact the crown 120A to receive user input by rotating, tilting or translating the head 121, the stem 122 being movable with the head 121 when the user manipulates the head 121. It is understood that the head 121 may be any shape, for example, the head 121 may be cylindrical.
Crown 120A may be in mechanical form, coupled with a sensor (e.g., a light sensor) for converting physical movement of crown 120A into an electrical signal. In some embodiments, crown 120A may rotate in a clockwise direction and in a counter-clockwise direction. In other embodiments, crown 120A may also tilt or translate. The number of crowns 120A may be one or more.
The software system of the wearable device 100 may adopt a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, and the embodiment of the present application exemplifies the software system of the layered architecture, which exemplifies the software system of the wearable device 100.
Fig. 3 is a schematic diagram of a software system of the wearable device 100 of an embodiment of the present application. The software system includes several layers, each with distinct roles and branches, that communicate via software interfaces, and in some embodiments, as shown in fig. 3, the software system may include five layers, from top to bottom, an application layer 210, an application framework layer 220, a system library 230, a hardware abstraction layer 240, and a driver layer 250, respectively.
The application layer 210 may include applications such as cameras, gallery, calendar, talk, map, navigation, WLAN, bluetooth, music, video, short messages, health applications, system applications, and device management.
In the embodiment of the present application, the application layer 210 may receive the angle data of the rotatable input device reported by the driving layer 250, so as to supply the application framework layer 220 to obtain the angle data from the application layer.
The application framework layer 220 provides an application programming interface (application programming interface, API) and programming framework for the application programs of the application layer 210; the application framework layer may include some predefined functions.
For example, the application framework layer 220 may include a front end framework UIKIT, a User Interface (UI) graphical interface for building and managing applications. In the embodiment of the present application, after obtaining the angle data for indicating that the rotation angle is 0, UIKIT of the application framework layer 220 may further determine whether the rotatable input device is actually finished according to the predefined data obtained in the subsequent multiple periods, so as to execute the related service.
The application layer 210 and the application framework layer 220 run in virtual machines. The virtual machine executes java files of the application layer 210 and the application framework layer 220 as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library 230 may include a plurality of functional modules, such as a sleep algorithm, a motion algorithm, a pressure algorithm, a base C library, a surface manager (surface manager), a media library (media library), a three-dimensional graphics processing library (e.g., openGL ES), a 2D graphics engine (e.g., SGL), and the like.
The hardware abstraction layer 240 is used to abstract hardware. For example, the hardware abstraction layer 240 may include an abstraction layer 241 of a rotatable input device (e.g., crown) and an abstraction layer of other hardware devices (e.g., camera device, audio device, display screen).
The driver layer 250 is used to provide drivers for different hardware devices. For example, the drive layer may include a drive 251 of the rotatable input device as well as a drive of other hardware devices (e.g., camera device, audio device, display screen).
In the embodiment of the present application, the driving layer 250 is configured to periodically read and report the angle data of the rotatable input device to the application layer from the register.
As described in the background art, in the process of implementing related functions or operations by rotating the rotatable input device, a problem of shaking a display screen may occur, thereby affecting user experience. Through analysis, it is found that the reason is that when the user rotates the rotatable input device at a slower speed, the hardware module of the wearable device may not accurately detect whether the rotation of the rotatable input device is finished, and therefore, when the rotation of the rotatable input device is not finished, the hardware module may detect that the rotation of the rotatable input device is finished, which results in a service that an upper layer (application framework layer) triggers the rotation to finish, so that a problem that a display screen shakes occurs, and user experience is affected.
In order to solve the above-mentioned problems, the embodiments of the present application provide an anti-shake method, which defines predefined data for indicating angle data outside a first angle range, where the first angle range includes angles other than 0 that can be periodically detected by the wearable device, and the wearable device, after acquiring angle data for indicating that the rotation angle of the rotatable input device is 0, does not temporarily process a service of ending rotation, but determines whether rotation of the rotatable input device is actually ended according to whether the predefined data is acquired in a period of a continuous predefined number of times, and then executes a rotation service or a service of ending rotation. Therefore, the defect that the wearable equipment erroneously detects the rotation end of the rotatable input device is overcome, the accuracy of the wearable equipment for identifying the rotation end event of the rotatable input device is effectively improved, and therefore the service of executing the rotation end after the rotation is truly ended or the rotation service can be continuously executed when the rotation is not ended, the problem that the display picture shakes is effectively avoided, the good anti-shake effect is achieved, and the user experience is improved.
Hereinafter, the anti-shake method according to the embodiments of the present application will be described in detail with reference to fig. 4 to 9.
Fig. 4 is an exemplary flowchart of an anti-shake method 300 provided by an embodiment of the present application. The method 300 is applied in a wearable apparatus configured with a rotatable input device. Illustratively, the wearable device may be a watch and the rotatable input means is a crown of the watch. For a specific description of the structure of the wearable apparatus and the rotatable input device, reference may be made to the above related description, and no further description is given.
In the method 300, through interactions between the various layers of the wearable device, the application framework layer determines whether rotation of the rotatable input device is finished according to angle data acquired from the application layer, so as to execute related services.
In step S310, the application framework layer of the wearable device acquires first angle data from the application layer, the first angle data being used to indicate that the rotation angle of the rotatable input device is 0.
Specifically, UIKIT of the application framework layer may periodically read angle data from the application layer to acquire angle data, and at a certain period, UIKIT reads first angle data for indicating that the rotation angle of the rotatable input device is 0 degrees.
After the rotatable input device starts to rotate, the driving layer of the wearable device periodically detects angle data of the rotatable input device through the hardware module, and the driving layer reports the angle data to the application layer, so that the application frame layer obtains the angle data from the application layer and executes related operations according to the angle data. In a certain period, the driving layer detects that the rotation angle of the rotatable input device is 0 through the hardware module, the driving layer reports first angle data to the application layer, and the application frame layer reads the first angle data from the application layer.
In the embodiment of the present application, the angle data is used to indicate the rotation angle and the rotation direction of the rotatable input device, for example, if the rotatable input device is rotated a degrees in the clockwise direction, the angle data may be expressed as "+a", abbreviated as "a", and if the rotatable input device is rotated a degrees in the counterclockwise direction, the angle data may be expressed as "—a". When the angle data is the first angle data, there is no direction because the rotation angle is 0 degrees.
For example, in order to save space, the rotation angle can be counted in counting the angle data. If the rotatable input device is capable of rotating 360 degrees, then 360 degrees may be divided into P (e.g., 500 parts, 0.72 degrees per part) and the rotation angle recorded in parts. Thus, the rotation angle in the angle data can be expressed in terms of the number of copies.
In step S321, after the application framework layer acquires the first angle data, if the application framework layer acquires predefined data from the application layer in M consecutive periods, the application framework layer executes the service of ending the rotation, where the predefined data is used to indicate angle data outside a first angle range, and the first angle range includes angles that can be periodically detected by the wearable device and are other than 0, where M is an integer greater than 1.
Specifically, if the UIKIT of the application framework layer acquires predefined data from the application layer in M consecutive periods, the UIKIT executes the service of ending the rotation.
It should be understood that the predefined data is acquired for each of the consecutive M periods, meaning that the predefined data is acquired for each of the consecutive M periods.
The predefined data is used to indicate angle data outside a first range of angles, including angles other than 0 that the wearable device is able to periodically detect. Angle data within the first angle range may be understood as normal range of angle data that the wearable device is able to detect, and thus, angle data indicated by the predefined data may be considered as abnormal angle data. In other words, the angle data indicated by the predefined data includes angles that cannot be periodically detected by the wearable device and angles with a size of 0, or the angle data indicated by the predefined data is angle data that cannot be reported to the application layer by the driving layer after detecting that the rotation angle is 0 degrees, including angles that cannot be detected and angles that cannot be 0 degrees, or the predefined data is data that can be acquired from the application layer by the application frame layer when new angle data reported by the driving layer is not acquired by the application layer.
If the rotation of the rotatable input device has actually ended, since the rotation is not performed, the wearable device cannot detect any angle data in the first angle range again when the rotation angle is detected to be 0, so that the driving layer cannot acquire new angle data in the first angle range or report the new angle data to the application layer through the hardware module, and the application frame layer cannot acquire new angle data naturally, and only predefined data can be acquired from the application layer. Conversely, since the predefined data indicates angular data outside the first angular range, when the application framework layer acquires the predefined data, meaning that the application framework layer does not acquire angular data within the first angular range, the rotation of the rotary input device may be considered to have actually ended.
In order to improve accuracy of the judging process, the embodiment of the application provides that if the application framework layer acquires predefined data from the application layer in M continuous periods, it can be determined that rotation of the rotatable input device has ended, and a service of ending the rotation is executed. Therefore, the rotation of the rotatable input device can be accurately identified, so that the service of rotation ending can be executed after the actual rotation ending, the problem of shaking of a display picture is effectively avoided, a good anti-shaking effect is achieved, and the user experience is improved.
It should be noted that, with respect to the hardware, the upper limit of the detection capability is high or the detection capability is not high, but, with respect to the user, the rotation speed of the user is limited, that is, the rotation speed of the user is not particularly high, and thus, the rotation angle that the hardware module can periodically detect is limited. Therefore, the angle that the wearable device can periodically detect is a result obtained by combining the use habit of the user and the hardware capability.
It should be further noted that, the angle periodically detected by the wearable device indicates an angle that the driving layer of the wearable device can detect in each period through the hardware module. For example, the duration of one detection period of the drive layer is 20ms, the maximum value of the angles that can be detected in 20ms is 120 degrees, and then the first angle range includes angle data of [ -120, 0) and (0, 120 ].
In the present embodiment, the first angular range may illustratively include any possible angular range of [ -120, 0) and (0, 120], or, [ -100, 0) and (0, 100], or, [ -80, 0) and (0,80 ], or, [ -60,0) and (0,60 ].
The specific values of the predefined data in the embodiments of the present application are not limited in any way, and any data outside the first angle range may be used.
In an example, the predefined data may be extrema of an integer variable (int). For example, the extremum for 16 bits int may be a minimum value of-32768 or a maximum value of 32767, and the extremum for 32 bits int may be a minimum value of-21474883648 or a maximum value of 2147483647. Illustratively, the predefined data may be a minimum value of an integer variable (int). For a software system, the minimum value of int is illegal data which is very easy to identify by the software system, and the illegal data can be clearly obtained, so that the illegal data is not angle data in a first angle range, the realization is convenient, and the accuracy of the software system screening data is improved.
In another example, the predefined data may be 0.
In this embodiment of the present application, the M periods may be predefined by the system, and are periods for acquiring angle data by using the frame layer, and specific values are not limited in any way. It can be understood that the smaller M is, the lower the detection accuracy is, the larger M is, the detection accuracy is high, but the response speed is slow. Therefore, M periods are designed moderately as much as possible, and under the condition of small influence on the response speed, the detection precision can be improved, so that the anti-shake effect can be better achieved. For example, m=15, the duration of 15 cycles is 250ms, and the duration of one cycle is about 16ms.
In the embodiment of the present application, the service for ending the rotation may be, for example, a service for performing homing operation on the list, stopping page switching, stopping or completing unlocking (the unlocking screen disappears or is hidden), stopping zooming of the desktop icon, stopping signal adjustment, and the like.
It should be noted that, the service of executing the rotation end by the application framework layer may be the service of executing the rotation end by the application framework layer itself, or the service of executing the rotation end by the application framework layer in combination with related modules of other layers, which is not limited in any way.
In step S322, after the application framework layer acquires the first angle data, if the application framework layer acquires data other than the predefined data from the application layer in M periods, the application framework layer continues to execute the rotation service.
Specifically, if UIKIT of the application framework layer acquires data other than the predefined data from the application layer in M periods, the UIKIT continues to execute the rotation service.
It should be appreciated that, since the predefined data is used to indicate angular data outside the first angular range, if the frame layer is applied to data outside the predefined data, that is, angular data within the first angular range is acquired.
If the rotation of the rotatable input device is not finished, the driving layer can acquire and report new angle data within the first angle range to the application layer, and the new angle data can cover the predefined data, so that the application frame layer can acquire the new angle data within the first angle range without acquiring the predefined data. Conversely, when the application framework layer acquires data other than the predefined data, which means that the application framework layer acquires the angle data in the first angle range, it can be determined that the rotation of the rotatable input device is not finished, and the hardware module of the wearable device is subjected to false detection, so that the rotation service is continuously executed.
In order to improve accuracy of the judging process, the embodiment of the application provides that if the application framework layer acquires data except the predefined data from the application layer in M periods, it can be determined that rotation of the rotatable input device is not finished, and the application framework layer continues to execute the rotation service. Therefore, the rotation of the rotatable input device can be accurately identified, so that the service of rotation ending can be executed after the actual rotation ending, the problem of shaking of a display picture is effectively avoided, a good anti-shaking effect is achieved, and the user experience is improved.
It should be understood that, in the embodiment of the present application, the data other than the predefined data is acquired in M periods, which means that the data other than the predefined data is acquired in one period of the M periods.
In the embodiment of the application, the rotation service may be, for example, a service such as scrolling of a list, page switching, rotation unlocking, zooming of a desktop icon, or signal adjustment.
It should be noted that, the application framework layer may execute the rotation service, which may be executed by the application framework layer itself or may be executed by an application framework layer in combination with related modules of other layers, which is not limited in any way.
According to the anti-shake method provided by the embodiment of the application, predefined data for indicating angle data outside a first angle range are defined, the first angle range comprises a non-0 angle which can be periodically detected by the wearable device, after the application frame layer of the wearable device acquires the first angle data for indicating the rotation angle of the rotatable input device to be 0 from the application layer, if the application frame layer acquires the predefined data for M continuous periods, which means that the application frame layer does not acquire normal angle data (angle data in the first angle range), the service that the rotation of the rotatable input device is actually ended to execute the rotation end can be determined; if data other than the predefined data is acquired in M periods, meaning that the application framework layer acquires angle data in the first angle range, it may be determined that the rotation of the rotatable input device is not finished to continue to perform the rotation service. In this way, compared with the problem that in the prior art, the rotation of the rotatable input device is mistakenly detected by the wearable equipment to cause the shaking of the display screen, after the first angle data is acquired, the method and the device for processing the rotation of the rotatable input device temporarily do not process the shaking of the display screen, and whether the rotation of the rotatable input device is really finished or not is determined according to the conditions of the predefined data acquired in M periods, so that the accuracy of the wearable equipment for identifying the rotation ending event of the rotatable input device can be effectively improved, the operation of the rotation ending can be executed after the rotation is really finished or the rotation operation can be continuously executed when the rotation is not finished, the shaking problem of the display screen is effectively avoided, the good shaking prevention effect is achieved, and the user experience is improved. Furthermore, since the predefined data is definitely available data for the application framework layer to determine the rotation end event, determining the rotation end of the rotatable input device by the definitely available predefined data is more advantageous for the implementation of the software system, i.e. the application framework layer more easily recognizes the acquired predefined data to determine the rotation end of the rotatable input device.
For the case of judging that the rotation of the rotatable input device is not finished, in some embodiments, after the application framework layer acquires the first angle data, if the application framework layer acquires data beyond the predefined data from the application layer for the first time in M periods, the application framework layer continues to execute the rotation service.
That is, after the application framework layer acquires data other than the predefined data (i.e., angle data within the first angle range) for the first time, the application framework layer starts to continue to perform the rotation service, instead of continuing to perform the rotation service after the M periods of data are acquired. Thus, the response speed of the equipment can be improved, and the user experience is improved.
Embodiments in which the application framework layer continues to perform the rotation service after first acquiring data other than the predefined data include the following two examples.
In an example, after the application framework layer acquires the first angle data, if the application framework layer acquires the predefined data from the application layer in the first N periods and acquires the data outside the predefined data from the application layer in the n+1th period, the application framework layer continues to execute the rotation service, where N is greater than or equal to 1 and less than M.
Taking m=15 as an example, for example, after the application framework layer acquires the first angle data, the application framework layer acquires the predefined data in the first 10 periods, and in the 11 th period, the driving layer detects the new angle data through the hardware module, at this time, the application framework layer acquires the new angle data instead of the predefined data, so it is determined that the rotation of the rotatable input device is not finished, and the rotation service is continuously executed.
In another example, after the application framework layer acquires the first angle data, if the application framework layer acquires data other than the predefined data from the application layer in the 1 st period, the application framework layer continues to execute the rotation service.
Taking m=15 as an example, for example, after the application framework layer acquires the first angle data, in the 1 st period, the driving layer detects new angle data that is not 0 through the hardware module, and at this time, the application framework layer acquires the new angle data instead of the predefined data, so it is determined that the rotation of the rotatable input device is not finished, and the rotation service is continuously executed.
FIG. 4 is an exemplary flow chart of an anti-shake method 300 that embodiments of the present application illustrate from the perspective of driver layer, application layer, and application framework layer interactions. Through interaction between each layer for the rotation of rotatable input device is whether ending can be comparatively accurately confirmed to wearable equipment, thereby reaches effective anti-shake effect.
When a hardware module (not shown) of the wearable device detects angle data of the rotatable input device other than 0, it indicates that the rotatable input device starts to rotate, and the hardware module sends an interrupt to the driving layer. Wherein the hardware module comprises at least a sensor, a rotatable input device, a register, etc. for detecting angle data.
During rotation of the rotatable input device, a sensor in the hardware module periodically detects angle data and writes the detected angle data into the register so that an upper layer reads the angle data from the register. In an implementation, during rotation of the rotatable input device, the angle data in the register is refreshed continuously, so that the driving layer can acquire the latest angle data.
In step S301, the drive layer starts a timer after receiving the interrupt.
Specifically, actuation of the rotatable input device in the actuation layer starts a timer upon receipt of an interrupt.
The timer is a periodic timer, which restarts counting after one period ends, enters the next period, and so on. The duration of the period of the timer may be arbitrary, and is not limited in any way herein. Illustratively, the period of the timer may be 20ms long.
In step S302, during the timer running, the driving layer periodically acquires and reports angle data to the application layer.
Specifically, during operation of the timer, the actuation of the rotatable input means of the actuation layer periodically reads angle data from the register and periodically reports the angle data to the application layer, so that the application layer obtains angle data for each period.
In the implementation process, when one period of the timer is finished, the driving layer reads the angle data of the period from the register and reports the angle data of the period to the application layer; the timer restarts to count, the next period is entered, and when the next period is finished, the driving layer continues to read the angle data of the next period, and continues to report the angle data of the next period to the application layer.
For example, when the application layer receives the angle data of the next period reported by the driving layer, the angle data (new angle data) of the next period will cover the angle (old angle data) of the previous period, so that the application framework layer can be ensured to acquire the latest angle data.
In step S303, the application framework layer periodically acquires angle data from the application layer.
Specifically, the application layer obtains angle data of each period from the driving layer, and UIKIT in the application framework layer actively reads the angle data from the application layer to obtain the angle data of each period.
It should be appreciated that the angle data acquired by UIKIT in the application framework layer each time is the latest angle data received by the application layer from the driver layer. In an implementation, in order to ensure that the application framework layer acquires the latest angle data from the application layer, the duration of the period in which the application framework layer acquires the angle data from the application layer is smaller than the duration of the period in which the driving layer detects rotation (angle data) (i.e., the duration of the timer). For example, the duration of the period in which the driving layer detects rotation (the duration of the timer) may be 20ms, and the duration of the period in which the application framework layer acquires angle data from the application layer may be 16ms.
In step S304, the driving layer acquires and reports the first angle data.
Specifically, the driving of the rotatable input device of the driving layer reads the first angle data from the register, and reports the first angle data to the application layer.
Optionally, in step S305, after the driving layer reports the first angle data to the application layer, the driving layer closes the timer.
Specifically, after the first angle data is acquired, the rotatable input device of the driving layer is driven, and the rotation of the rotatable input device is considered to be ended, the acquisition of the angle data is not needed any more, and therefore, after the first angle data is reported to the application layer, the driving layer closes the timer. Therefore, if the rotation of the rotatable input device is really finished, the driving layer can not need to read the angle data any more, and the power consumption is saved.
In other embodiments, the driving layer may not turn off the timer, and may turn off the timer after the application framework layer finally determines that the rotation of the rotatable input device is finished, which is disadvantageous in that power consumption is wasted because the timer is always in an on state in a subsequent short time.
It should be noted that, if the rotation of the rotatable input device is not finished, when the hardware module misdetects that the angle data is 0, even if the timer is turned off in step S305, the wearable device may repeatedly execute step S301 and step S303 after detecting the new angle data, so that the driving layer may acquire and report the new angle data, so that the application frame layer acquires the new angle data to determine that the rotation of the rotatable input device is not finished.
In step S310, the application framework layer acquires first angle data from the application layer.
Specifically, UIKIT in the application framework layer actively reads the first angle data from the application layer to acquire the first angle data.
Optionally, in step S330, after the application framework layer acquires the first angle data, the application layer sets the angle data of the rotatable input device to the predefined data, so that the application framework layer acquires the predefined data from the application layer when the application layer does not acquire the new angle data.
In this step, the predefined data may be data of non-0 of the application layer settings.
It can be understood that the application layer sets the angle data to the predefined data after detecting that the application frame layer acquires the first angle data from the application layer, so that it can be ensured that the application frame layer can acquire the first angle data and start to determine whether the rotation is finished after acquiring the first angle data.
In other embodiments, the predefined data may also be 0.
In this embodiment, since the application layer has acquired the first angle data (i.e., 0 value) indicating the rotation angle of 0, the application layer may not need to perform step S330. It will be appreciated that if the rotation of the rotatable input device is completed, the application framework layer will acquire up to 0 from the application layer; if the rotation of the rotatable input device is not finished, the new angle data will cover the angle data of 0, so the application frame layer can acquire the new angle data, but not acquire 0.
After step S330, the application framework layer continues to periodically acquire angle data from the application layer to determine whether the rotation of the rotatable input device is ended according to the acquired angle data to perform related services.
In step S321, after the application framework layer acquires the first angle data, if the application framework layer acquires the predefined data from the application layer in M consecutive periods, the application framework layer executes the service of ending the rotation.
For a specific description of this step, reference is made to the above related description, and no further description is given.
In step S322, after the application framework layer acquires the first angle data, if the application framework layer acquires data other than the predefined data from the application layer in M periods, the application framework layer continues to execute the rotation service.
For a specific description of this step, reference is made to the above related description, and no further description is given.
Fig. 6 is an exemplary flowchart of an anti-shake method 400 provided by an embodiment of the present application. As a specific example, method 400 describes a scenario in which it is ultimately determined that rotation of a rotatable input device has not ended.
In step S401, the user rotates the rotatable input device, and the hardware module detects that the rotatable input device starts rotating.
In this step, it is detected by a sensor in the hardware module whether the rotation input means starts to rotate. When the sensor detects non-0 angle data of the rotatable input device, the rotatable input device is considered to start rotating.
In step S402, the hardware module triggers an interrupt to notify the driver layer to start a timer.
In step S403, the drive layer starts a timer upon receiving the interrupt. The specific description may refer to the related description of step S301, and will not be repeated.
In step S404, during the running of the timer, the driving layer periodically acquires and reports angle data. The specific description may refer to the related description of step S302, and will not be repeated.
In step S405, the application framework layer periodically acquires angle data from the application layer. The specific description may refer to the related description of step S303, and will not be repeated.
In step S406, the hardware module detects that the rotatable input device stops rotating.
In method 400, since the user does not stop rotating the rotatable input device, a situation occurs in which detection that the rotatable input device is stopped is a false detection of the hardware module.
In step S407, the driving layer acquires and reports the angle data 1 with the rotation angle of 0. The specific description may refer to the related description of step S304, and will not be repeated.
In step S408, the driving layer turns off the timer. The specific description may refer to the related description of step S305, and will not be repeated.
In step S409, the application framework layer acquires angle data 1 from the application layer.
In step S410, after the application framework layer acquires angle data 1 from the application layer, the application layer sets the angle data as predefined data. The specific description may refer to the related description of step S330, and will not be repeated.
In step S411, the application frame layer determines whether the rotation angle is 0 degrees.
Specifically, the application layer framework layer determines whether the rotation angle in the angle data 1 is 0 degrees based on the angle data 1 obtained in step S409.
If the rotation angle is not 0 degrees, meaning that the user is rotating the rotatable input device, the rotatable input device is in a rotated state, UIKIT of the application framework layer continues to perform the rotation service.
If the rotation angle is 0 degrees, it means that the rotation of the rotatable input device may end, in which case the rotation of the rotatable input device is actually ended, and in which case the rotation of the rotatable input device is not ended but reporting is wrong due to the detection of the hardware module, so that it is necessary to further determine whether the rotation of the rotatable input device is actually ended, UIKIT of the application framework layer continues to perform step S412.
In step S412, the application framework layer determines whether predefined data is acquired for M consecutive periods.
Specifically, after determining that the rotation angle is 0 degrees in step S411, UIKIT of the application framework layer continues to periodically acquire angle data from the application layer, and determines whether the angle data obtained in consecutive M periods is predefined data.
If the application framework layer does not acquire the predefined data in M consecutive periods, it indicates that the application framework layer acquires data other than the predefined data from the application layer in M periods, based on which it may be determined that the rotation of the rotatable input device is not ended, the application framework layer continues to execute the rotation service, that is, step S413 is performed.
It should be noted that, if the rotation of the rotatable input device is not ended, when the hardware module misdetects that the rotation angle is 0, even if the timer is closed in step S408, after detecting new angle data, step S402 and step S403 are repeatedly executed, so that the driving layer may acquire and report new angle data, so that the uinit of the application frame layer acquires new angle data, as shown in steps S401' to S404' in fig. 5, in step S404', the driving layer acquires and reports new angle data (denoted as angle data 2), and in the process of periodically acquiring angle data by the application frame layer, after the application frame layer acquires angle data 2 in M periods, it may be determined that the rotation of the rotatable input device is not ended.
In step S413, the application framework layer performs a rotation service.
Fig. 7 is an exemplary flowchart of an anti-shake method 500 provided by an embodiment of the present application. Method 500 depicts a scenario in which the end of rotation of the rotatable input device is ultimately determined.
For the specific description of steps S501 to S512, reference may be made to the related descriptions of steps S401 to S412 of the method 400, respectively. Since the user does stop rotating the rotatable input device in step S506, after acquiring the angle data 1, the application framework layer acquires the predefined data for M consecutive periods in step S512, and performs step S514, i.e., performs the service of ending the rotation.
Fig. 8 is an exemplary flowchart of an anti-shake method 600 provided by an embodiment of the present application. The difference from the methods 300, 400 and 500 is that predefined data is not defined in the method 600, but whether the rotation of the rotatable input device is actually ended is determined by taking whether the wearable device acquires angle data within the first angle range in a continuous plurality of periods as a judgment condition, so that a rotation service or a service of rotation ending is performed.
In step S610, the wearable apparatus acquires first angle data for indicating that the rotation angle of the rotatable input device is 0.
After the rotatable input device starts to rotate, the wearable device periodically detects angle data of the rotatable input device to acquire the angle data and performs related operations according to the angle data. In a certain period, the wearable device detects that the rotation angle of the rotatable input device is 0, so that first angle data is obtained.
In step S621, after the first angle data is acquired, if the angle data in the first angle range is not acquired in S periods, the wearable device executes the service of ending the rotation, and S is an integer greater than 1.
Wherein the first range of angles comprises angles other than 0 that the wearable device is capable of periodically detecting. For a specific description of the angle data of the first angle range, reference may be made to the above related description, and no further description is given.
It should be understood that the angle data in the first angle range is not acquired in S cycles, which means that the angle data in the first angle range is not acquired in each of S cycles.
If the rotation of the rotatable input means is actually ended, then it is not possible for the wearable device to detect any angle data within the normal range (i.e. the first angle range) again, in case a rotation angle of 0 has been detected. Therefore, after the first angle data is acquired, if the wearable device does not acquire the angle data in the first angle data range in S periods, this means that the rotation of the rotatable input device is actually finished, and the service of the rotation finish can be executed. Therefore, the rotation of the rotatable input device can be accurately identified, so that the service of rotation ending can be executed after the actual rotation ending, the problem of shaking of a display picture is effectively avoided, a good anti-shaking effect is achieved, and the user experience is improved.
In the embodiment of the present application, S periods are predefined by the system, and specific values are not limited in any way. It can be understood that the smaller S, the lower the detection accuracy, the larger S, the higher the detection accuracy, but the slower the response speed. Therefore, the S periods are designed as moderate as possible, and under the condition of small influence on the response speed, the detection precision can be improved so as to better achieve the anti-shake effect. For example, s=15.
For a specific description of the service of the end of rotation, reference may be made to the above related description, and no further description is given.
In step S622, after the first angle data is acquired, if the angle data in the first angle range is acquired in S periods, the wearable device executes the rotation service.
For a specific description of the rotation service, reference may be made to the above related description, and no description is repeated.
If the rotation of the rotatable input means is not finished, the wearable device is able to detect to obtain angle data within the first angle range, i.e. new angle data that is not 0. Therefore, after the first angle data is acquired, if the angle data in the first angle range is acquired in S periods, it means that the rotation of the rotatable input device is not finished, the hardware module of the wearable device is misdetected, and the wearable device continues to execute the rotation service. Therefore, the rotatable input device can be accurately identified that the rotation of the rotatable input device is not finished, so that the rotation service can be continuously executed after the rotation is not finished, the problem that the display picture shakes is effectively avoided, a good anti-shake effect is achieved, and the user experience is improved.
It should be further understood that, in the embodiment of the present application, the angle data in the first angle range is acquired in S periods, which means that the angle data in the first angle range is only acquired in one period in S periods.
In some embodiments, after the first angle data is acquired, if the angle data in the first angle range is acquired for the first time in S periods, the wearable device continues to perform the rotation service.
That is, after the angle data in the first angle range is acquired for the first time, the wearable device starts to continue to perform the rotation service, instead of continuing to perform the rotation service after the S periods of data are all acquired. Thus, the response speed of the equipment can be improved, and the user experience is improved.
According to the anti-shake method provided by the embodiment of the invention, since the first angle range includes the angle which is not 0 and can be periodically detected by the wearable device, after the wearable device acquires the first angle data for indicating that the rotation angle of the rotatable input device is 0, if the angle data in the first angle range is not acquired in S periods, the rotation of the rotatable input device can be determined to be truly ended to execute the service of rotation ending, and if the angle data in the first angle range is acquired in S periods, the rotation of the rotatable input device can be determined to be not ended to continue executing the rotation service. In this way, compared with the problem that in the prior art, the rotation of the rotatable input device is mistakenly detected by the wearable equipment to cause the shaking of the display screen, after the first angle data is acquired, the method and the device for detecting the rotation of the rotatable input device temporarily do not process the shaking of the display screen, and whether the rotation of the rotatable input device is really ended or not is determined according to whether the angle data in the first angle range is acquired in S periods or not, so that the accuracy of the wearable equipment for identifying the rotation ending event of the rotatable input device can be effectively improved, the shaking of the display screen can be effectively avoided, the user experience is improved, and the operation of executing the rotation ending service after the real rotation is finished or continuing to execute the rotation service when the rotation is not ended.
For implementation convenience, the embodiment of the application may enable the application framework layer to determine whether rotation of the rotatable input device is finished or not through interaction among the hardware module, the driving layer, the application layer and the application framework layer so as to execute related services.
In some embodiments, the application framework layer periodically acquires angle data from the application layer, and after acquiring the first angle data, the application framework layer continues to periodically acquire angle data from the application layer: if the application framework layer does not acquire the angle data in the first angle range from the application layer in S periods, the application framework layer executes the service of ending the rotation; and if the application framework layer acquires the angle data in the first angle range from the application layer in S periods, the application framework layer executes the service of ending the rotation.
In other embodiments, after acquiring the first angle data, the other layer may determine whether the rotation of the rotatable input device is finished according to whether the angle data in the first angle range is acquired in S periods, so as to send an instruction to the application framework layer to instruct the application framework layer to execute the related service.
Illustratively, the application layer periodically acquires angle data from the driving layer, and after the application layer acquires the first angle data, the application layer continues to acquire angle data periodically reported by the driving layer: if the application layer does not acquire the angle data in the first angle range from the driving layer in the S periods, the application layer can send a first instruction to the application frame layer to instruct the application frame layer to execute the service of ending the rotation; if the application layer acquires the angle data in the first angle range from the driving layer in S periods, the application layer may send a second instruction to the application frame layer to instruct the application frame layer to execute the rotation service.
In the embodiment where the application framework layer determines whether the rotation of the rotatable input device is finished to execute the related service according to the data acquired in S periods, the S periods represent periods in which the application framework layer acquires the angle data from the application layer. In an embodiment in which the application layer determines whether the rotation of the rotatable input device is ended according to the data acquired in S periods to instruct the application framework layer to execute the related service, the S periods represent periods in which the application layer acquires angle data from the driving layer, and the duration of the periods in which the application framework layer acquires angle data from the application layer may be the same or different.
In the following, taking an example of whether the application framework layer acquires the angle data in the first angle range in S periods to determine whether the rotation of the rotatable input device is finished or not, executing related services, the anti-shake method in the embodiment of the present application is described from the perspective of interaction of each layer. Fig. 9 is an exemplary flow chart of an anti-shake method 600 illustrated by embodiments of the present application from the perspective of driver layer, application layer, and application framework layer interactions.
When a hardware module (not shown) of the wearable device detects angle data of the rotatable input device other than 0, it indicates that the rotatable input device starts to rotate, and the hardware module sends an interrupt to the driving layer.
In step S601, the drive layer starts a timer after receiving the interrupt. The specific description may refer to the related description of step S301, and will not be repeated.
Illustratively, the period of the timer may be 20ms long.
In step S602, during the timer running, the driving layer periodically acquires and reports angle data to the application layer. The specific description may refer to the related description of step S302, and will not be repeated.
In step S603, the application framework layer periodically acquires angle data from the application layer. The specific description may refer to the related description of step S303, and will not be repeated.
Illustratively, the duration of the period in which the application framework layer acquires angle data from the application layer may be 16ms.
In step S604, the driving layer acquires and reports the first angle data.
Optionally, in step S605, after the driving layer reports the first angle data to the application layer, the driving layer turns off the timer.
In other embodiments, the driving layer may not turn off the timer, and may turn off the timer after the application framework layer finally determines that the rotation of the rotatable input device is finished, which is disadvantageous in that power consumption is wasted because the timer is always in an on state in a subsequent short time.
It should be noted that, if the rotation of the rotatable input device is not finished, when the hardware module misdetects that the angle data is 0, even if the timer is turned off in step S605, the wearable device may repeatedly execute step S601 and step S603 after detecting the new angle data, so that the driving layer may acquire and report the new angle data, so that the application frame layer acquires the new angle data to determine that the rotation of the rotatable input device is not finished.
The specific description of this step may refer to the related description of step S305, and will not be repeated.
In step S611, the application framework layer acquires first angle data from the application layer.
Specifically, UIKIT in the application framework layer actively reads the first angle data from the application layer to acquire the first angle data.
After step S611, the application framework layer continues to periodically acquire angle data from the application layer.
In step S6211, after the application framework layer acquires the first angle data, if the application framework layer does not acquire the angle data in the first angle range from the application layer in S periods, the application framework layer executes the service of ending rotation.
If the rotation of the rotatable input means is actually ended, in case the application frame layer has acquired the first angle data of the rotation angle 0, it is impossible for the application frame layer to detect any angle data including 0 again. Therefore, after the application framework layer acquires the first angle data, if the application framework layer does not acquire the angle data in the first angle data range from the application layer in S periods, this means that the rotation of the rotatable input device is actually finished, and the service of ending the rotation can be executed.
In step S6221, after the application framework layer acquires the first angle data, if the application framework layer acquires the angle data within the first angle range from the application layer in S periods, the application framework layer continues to execute the rotation service.
If the rotation of the rotatable input device is not finished, the driving layer is capable of detecting to acquire angle data within the first angle range and reporting new angle data of the application layer, that is, non-0, so that the application frame layer acquires the new angle data. Therefore, after the application framework layer acquires the first angle data, if the application framework layer acquires the angle data in the first angle range from the application layer in S periods, it means that the rotation of the rotatable input device is not finished, and the hardware module has false detection, and the application framework layer continues to execute the rotation service.
In some embodiments, after the application framework layer acquires the first angle data, if the application framework layer acquires the angle data within the first angle range from the application layer for the first time in S periods, the application framework layer continues to execute the rotation service.
The anti-shake method provided by the embodiment of the present application is described in detail above with reference to fig. 1 to 9, and the anti-shake apparatus and the wearable device provided according to the embodiment of the present application will be described in detail below with reference to fig. 10 to 11.
Fig. 10 is an exemplary block diagram of an anti-shake apparatus 700 provided by an embodiment of the present application. The anti-shake apparatus 700 includes a processing unit 710.
In one possible implementation, the anti-shake apparatus 700 may be used to perform the various steps performed by the wearable device in the method 300. Wherein the processing unit 710 is configured to perform the following steps:
acquiring, by the application framework layer, the first angle data from the application layer, the first angle data being used to indicate that a rotation angle of the rotatable input device is 0;
after the application framework layer acquires the first angle data, if the application framework layer acquires predefined data from the application layer in M continuous periods, executing a service of ending rotation through the application framework layer, wherein the predefined data is used for indicating angle data outside a first angle range, the first angle range comprises angles which can be periodically detected by the wearable device and are not 0, and M is an integer greater than 1;
after the application framework layer acquires the first angle data, if the application framework layer acquires data except the predefined data from the application layer in the M periods, continuing to execute the rotation service through the application framework layer.
It should be understood that the processing unit 710 may be configured to perform the steps performed by the wearable device in the method 300, and the detailed description may refer to the related description above, which is not repeated.
In another possible implementation, the anti-shake apparatus 700 may be used to perform the steps performed by the wearable device in the method 600, where the processing unit 710 is configured to perform the following steps:
acquiring first angle data, wherein the first angle data is used for indicating that the rotation angle of the rotatable input device is 0;
after the first angle data is acquired, if the angle data in a first angle range is not acquired in S periods, executing a service of ending rotation, wherein the first angle range comprises a non-0 angle which can be periodically detected by the wearable equipment, and S is an integer larger than 1;
after the first angle data is acquired, if the angle data in the first angle range is acquired in the S periods, continuing to execute the rotation service.
It should be understood that the anti-shake apparatus 700 herein is embodied in the form of a functional unit. The term "unit" herein may refer to an application specific integrated circuit (applicationspecific integrated circuit, ASIC), an electronic circuit, a processor (e.g., a shared, dedicated, or group processor, etc.) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that support the described functionality.
In the embodiment of the present application, the anti-shake apparatus in fig. 10 may also be a chip or a chip system, for example: system on chip (SoC).
Fig. 11 an embodiment of the present application provides a schematic block diagram of a wearable device 800. The wearable device 800 is configured to perform the respective steps and/or flows corresponding to the embodiments of the methods 300-600 described above. The wearable device 800 may be the wearable device 100 of fig. 1 above.
Wearable device 800 includes a processor 810, a transceiver 820, and a memory 830. Wherein the processor 810, the transceiver 820 and the memory 830 communicate with each other through internal connection paths, the processor 810 may implement the functions of the processing unit 710 in various possible implementations of the anti-shake apparatus. Memory 830 is used to store instructions and processor 810 is used to execute the instructions stored by memory 730.
The memory 830 may optionally include read-only memory and random access memory, and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store information of the device type. The processor 810 may be configured to execute instructions stored in a memory, and when the processor 810 executes the instructions stored in the memory, the processor 810 is configured to perform the steps and/or processes of the method embodiments described above with respect to the electronic device.
In one possible implementation, the wearable device 800 may be used to perform the various steps performed by the wearable device in the method 300. Wherein the processor 810 is configured to perform the steps of:
acquiring, by the application framework layer, the first angle data from the application layer, the first angle data being used to indicate that a rotation angle of the rotatable input device is 0;
after the application framework layer acquires the first angle data, if the application framework layer acquires predefined data from the application layer in M continuous periods, executing a service of ending rotation through the application framework layer, wherein the predefined data is used for indicating angle data outside a first angle range, the first angle range comprises angles which can be periodically detected by the wearable device and are not 0, and M is an integer greater than 1;
after the application framework layer acquires the first angle data, if the application framework layer acquires data except the predefined data from the application layer in the M periods, continuing to execute the rotation service through the application framework layer.
It should be appreciated that the processor 810 may be configured to perform the steps performed by the wearable device in the method 300, and the detailed description may refer to the related description above, and will not be repeated.
In another possible implementation, the wearable device 800 may be used to perform the various steps performed by the wearable device in the method 600. Wherein the processor 810 is configured to perform the steps of:
acquiring first angle data, wherein the first angle data is used for indicating that the rotation angle of the rotatable input device is 0;
after the first angle data is acquired, if the angle data in a first angle range is not acquired in S periods, executing a service of ending rotation, wherein the first angle range comprises a non-0 angle which can be periodically detected by the wearable equipment, and S is an integer larger than 1;
after the first angle data is acquired, if the angle data in the first angle range is acquired in the S periods, continuing to execute the rotation service.
It should be appreciated that the processor 810 may be configured to perform the steps performed by the wearable device in the method 600, and the detailed description may refer to the related description above, which is not repeated.
It should be understood that, the specific process of each device performing the corresponding step in each method is described in detail in the above method embodiments, and for brevity, will not be described in detail herein.
It should be appreciated that in embodiments of the present application, the processor of the apparatus described above may be a central processing unit (central processing unit, CPU), which may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software elements in the processor for execution. The software elements may be located in a random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor executes instructions in the memory to perform the steps of the method described above in conjunction with its hardware. To avoid repetition, a detailed description is not provided herein.
Embodiments of the present application provide a computer program product, which when executed on an electronic device, causes the electronic device to perform the technical solutions in the foregoing embodiments. The implementation principle and technical effects are similar to those of the related embodiments of the method, and are not repeated here.
An embodiment of the present application provides a readable storage medium, where the readable storage medium contains instructions, where the instructions, when executed on an electronic device, cause the electronic device to execute the technical solution of the foregoing embodiment. The implementation principle and technical effect are similar, and are not repeated here.
The embodiment of the application provides a chip for executing instructions, and when the chip runs, the technical scheme in the embodiment is executed. The implementation principle and technical effect are similar, and are not repeated here.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a high-density digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
It should be appreciated that reference throughout this specification to "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, various embodiments are not necessarily referring to the same embodiments throughout the specification. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application.
It should also be understood that, in this application, "when …," "if," and "if" all refer to that the UE or the base station will make a corresponding process under some objective condition, and are not limited in time, nor do they require that the UE or the base station must have a judgment action when it is implemented, nor are they meant to have other limitations.
Those of ordinary skill in the art will appreciate that: the first, second, etc. numbers referred to in this application are merely for convenience of description and are not intended to limit the scope of the embodiments of the present application, but also to indicate the sequence.
Elements referred to in the singular are intended to be used in this application to mean "one or more" rather than "one and only one" unless specifically indicated. In this application, unless specifically stated otherwise, "at least one" is intended to mean "one or more" and "a plurality" is intended to mean "two or more".
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: there are three cases where a alone exists, where a may be singular or plural, and where B may be singular or plural, both a and B exist alone.
The term "at least one of … …" or "at least one of … …" herein means all or any combination of the listed items, e.g., "at least one of A, B and C," may mean: there are six cases where a alone, B alone, C alone, a and B together, B and C together, A, B and C together, where a may be singular or plural, B may be singular or plural, and C may be singular or plural.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described embodiments of the electronic device are merely illustrative, e.g., the division of the modules is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
It should be understood that, in various embodiments of the present application, the size of the sequence number of each process does not mean that the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
In addition, the term "and/or" herein is merely an association relation describing an association object, and means that three kinds of relations may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random accessmemory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application should be defined by the claims, and the above description is only a preferred embodiment of the technical solution of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (16)

1. An anti-shake method applied to a wearable device provided with a rotatable input device, the wearable device including an application layer and an application framework layer, the method comprising:
the application framework layer obtains first angle data from the application layer, wherein the first angle data is used for indicating that the rotation angle of the rotatable input device is 0;
after the application framework layer acquires the first angle data, if the application framework layer acquires predefined data from the application layer in M continuous periods, the application framework layer executes a service of ending rotation, wherein the predefined data is used for indicating angle data outside a first angle range, the first angle range comprises angles which can be periodically detected by the wearable device and are not 0, and M is an integer greater than 1; or alternatively, the first and second heat exchangers may be,
after the application framework layer acquires the first angle data, if the application framework layer acquires data outside the predefined data from the application layer in the M periods, the application framework layer continues to execute the rotation service.
2. The anti-shake method according to claim 1, wherein the application framework layer continues to perform a rotation service, comprising:
After the application framework layer acquires the first angle data, if the application framework layer acquires data other than the predefined data from the application layer for the first time in the M periods, the application framework layer continues to execute the rotation service.
3. The anti-shake method according to claim 2, wherein the application framework layer continues to perform a rotation service, comprising:
after the application framework layer acquires the first angle data, if the application framework layer acquires the predefined data from the application layer in the first N periods and acquires data except the predefined data from the application layer in the (n+1) th period, the application framework layer continues to execute the rotation service, wherein N is greater than or equal to 1 and less than M; or alternatively, the first and second heat exchangers may be,
after the application framework layer acquires the first angle data, if the application framework layer acquires data outside the predefined data from the application layer in the 1 st period, the application framework layer continues to execute the rotation service.
4. A method according to any one of claims 1 to 3, wherein the predefined data is non-0 data; and, the method further comprises:
After the application framework layer acquires the first angle data, the application layer sets the angle data of the rotatable input device as the predefined data, so that the application framework layer acquires the predefined data from the application layer when the application layer does not acquire new angle data.
5. A method according to any one of claims 1 to 3, wherein the wearable device further comprises a driving layer; and, the method further comprises:
when detecting that the rotatable input device starts rotating, the driving layer starts a timer to report angle data of the rotatable input device to the application layer during the running of the timer;
and after the driving layer reports the first angle data to the application layer, the driving layer closes the timer.
6. A method according to any one of claims 1 to 3, characterized in that the predefined data is a minimum value of an integer variable.
7. A method according to any one of claims 1 to 3, wherein the first angular range comprises angular data in the ranges [ -120, 0) and (0, 120 ].
8. An anti-shake method applied to a wearable device provided with a rotatable input device, the method comprising:
Acquiring first angle data, wherein the first angle data is used for indicating that the rotation angle of the rotatable input device is 0;
after the first angle data is acquired, if the angle data in a first angle range is not acquired in S periods, executing a service of ending rotation, wherein the first angle range comprises a non-0 angle which can be periodically detected by the wearable equipment, and S is an integer larger than 1; or alternatively, the first and second heat exchangers may be,
after the first angle data is acquired, if the angle data in the first angle range is acquired in the S periods, continuing to execute the rotation service.
9. The method of claim 8, wherein the continuing to perform the rotation service comprises:
after the first angle data is acquired, if the angle data in the first angle range is acquired for the first time in the S periods, the rotation service is continuously executed.
10. The method of claim 8 or 9, wherein the wearable device comprises an application layer and an application framework layer;
the acquiring the first angle data includes:
the application framework layer acquires the first angle data from the application layer; the method comprises the steps of,
The service for executing the rotation end comprises the following steps:
after the application framework layer acquires the first angle data, if the application framework layer is within the S periods
The application framework layer performs the rotation if the angle data within the first angle range is not acquired from the application layer
Ending business; the method comprises the steps of,
the continuing to execute the rotation service includes:
after the application framework layer acquires the first angle data, if the application framework layer acquires the angle data in the first angle range from the application layer in the S periods, the application framework layer continues to execute the rotation service.
11. The method of claim 10, wherein the wearable device further comprises a driving layer; and, the method further comprises:
when detecting that the rotatable input device starts rotating, the driving layer starts a timer to report angle data of the rotatable input device to the application layer during the running of the timer;
and after the driving layer reports the first angle data to the application layer, the driving layer closes the timer.
12. The method according to claim 8 or 9, wherein the first angular range comprises angular data in the ranges [ -120, 0) and (0, 120 ].
13. An anti-shake device for use in a wearable apparatus provided with a rotatable input device, characterized in that the anti-shake device comprises a processing unit for performing the method of any of claims 1 to 7, or 8 to 12.
14. A wearable device, comprising:
a rotatable input device;
a memory for storing computer instructions;
a processor for invoking computer instructions stored in the memory to perform the method of any of claims 1-7, or 8-12.
15. A computer readable storage medium storing computer instructions for implementing the method of any one of claims 1 to 7, or 8 to 12.
16. A chip, the chip comprising:
a memory: for storing instructions;
a processor for invoking and executing the instructions from the memory, causing a wearable device on which the chip is mounted to perform the method of any of claims 1-7, or 8-12.
CN202310210555.8A 2023-03-07 2023-03-07 Anti-shake method, anti-shake device and wearable equipment Active CN116069223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310210555.8A CN116069223B (en) 2023-03-07 2023-03-07 Anti-shake method, anti-shake device and wearable equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310210555.8A CN116069223B (en) 2023-03-07 2023-03-07 Anti-shake method, anti-shake device and wearable equipment

Publications (2)

Publication Number Publication Date
CN116069223A true CN116069223A (en) 2023-05-05
CN116069223B CN116069223B (en) 2023-08-04

Family

ID=86171605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310210555.8A Active CN116069223B (en) 2023-03-07 2023-03-07 Anti-shake method, anti-shake device and wearable equipment

Country Status (1)

Country Link
CN (1) CN116069223B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013019400A1 (en) * 2011-08-04 2013-02-07 Qualcomm Incorporated Sensor-based user interface control
CN105630234A (en) * 2015-12-21 2016-06-01 上海天马微电子有限公司 Touch display device and touch detection method
US20160170598A1 (en) * 2013-09-03 2016-06-16 Apple Inc. Crown input for a wearable electronic device
US20160259535A1 (en) * 2015-03-02 2016-09-08 Apple Inc. Screenreader user interface
CN106648152A (en) * 2016-12-14 2017-05-10 吉林大学 Rotary angle and distance-based three-dimensional pen interaction interface zooming method
CN107562211A (en) * 2017-10-20 2018-01-09 网易(杭州)网络有限公司 Cursor anti-fluttering method, device, storage medium and wear display device
CN109710139A (en) * 2018-12-20 2019-05-03 惠州Tcl移动通信有限公司 A kind of page processing method, device, terminal and storage medium
CN112761594A (en) * 2021-02-04 2021-05-07 苏州伟创电气科技股份有限公司 Method for acquiring rotation angle of crank, method for positioning bottom dead center and frequency converter
CN114217720A (en) * 2022-02-22 2022-03-22 荣耀终端有限公司 Screen rotating method and equipment
WO2022111705A1 (en) * 2020-11-30 2022-06-02 华为技术有限公司 Page control method and wearable device
CN115033193A (en) * 2021-03-08 2022-09-09 华为技术有限公司 Screen rotation processing method, screen rotation processing device, screen rotation processing medium and electronic equipment
CN115027690A (en) * 2022-06-28 2022-09-09 方宇勘测有限公司 Unmanned aerial vehicle surveys and shoots structure and angle with multi-angle and shoots and use linkage

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013019400A1 (en) * 2011-08-04 2013-02-07 Qualcomm Incorporated Sensor-based user interface control
US20160170598A1 (en) * 2013-09-03 2016-06-16 Apple Inc. Crown input for a wearable electronic device
US20160259535A1 (en) * 2015-03-02 2016-09-08 Apple Inc. Screenreader user interface
CN105630234A (en) * 2015-12-21 2016-06-01 上海天马微电子有限公司 Touch display device and touch detection method
CN106648152A (en) * 2016-12-14 2017-05-10 吉林大学 Rotary angle and distance-based three-dimensional pen interaction interface zooming method
CN107562211A (en) * 2017-10-20 2018-01-09 网易(杭州)网络有限公司 Cursor anti-fluttering method, device, storage medium and wear display device
CN109710139A (en) * 2018-12-20 2019-05-03 惠州Tcl移动通信有限公司 A kind of page processing method, device, terminal and storage medium
WO2022111705A1 (en) * 2020-11-30 2022-06-02 华为技术有限公司 Page control method and wearable device
CN112761594A (en) * 2021-02-04 2021-05-07 苏州伟创电气科技股份有限公司 Method for acquiring rotation angle of crank, method for positioning bottom dead center and frequency converter
CN115033193A (en) * 2021-03-08 2022-09-09 华为技术有限公司 Screen rotation processing method, screen rotation processing device, screen rotation processing medium and electronic equipment
CN114217720A (en) * 2022-02-22 2022-03-22 荣耀终端有限公司 Screen rotating method and equipment
CN115027690A (en) * 2022-06-28 2022-09-09 方宇勘测有限公司 Unmanned aerial vehicle surveys and shoots structure and angle with multi-angle and shoots and use linkage

Also Published As

Publication number Publication date
CN116069223B (en) 2023-08-04

Similar Documents

Publication Publication Date Title
US11785329B2 (en) Camera switching method for terminal, and terminal
WO2020063605A1 (en) Method for generating screenshot, control method, and electronic device
CN110956939B (en) Method for adjusting screen brightness and electronic equipment
CN111602379B (en) Voice communication method, electronic equipment and system
JP2022522453A (en) Recording frame rate control method and related equipment
US20220174143A1 (en) Message notification method and electronic device
US20230004406A1 (en) Energy-Efficient Display Processing Method and Device
WO2020056778A1 (en) Method for shielding touch event, and electronic device
CN113542580B (en) Method and device for removing light spots of glasses and electronic equipment
CN111741284A (en) Image processing apparatus and method
CN113452945A (en) Method and device for sharing application interface, electronic equipment and readable storage medium
JP2022501739A (en) Stylus pen detection method, system and related equipment
CN113804290B (en) Ambient light detection method, electronic device and chip system
US20240094858A1 (en) Window display method and electronic device
CN114257920A (en) Audio playing method and system and electronic equipment
CN116069223B (en) Anti-shake method, anti-shake device and wearable equipment
CN115032640B (en) Gesture recognition method and terminal equipment
CN112541861A (en) Image processing method, device, equipment and computer storage medium
CN110609650A (en) Application state switching method and terminal equipment
CN113573045B (en) Stray light detection method and stray light detection device
CN116069222B (en) Method and device for identifying focus view and wearable device
CN114691064A (en) Double-path screen projection method and electronic equipment
CN116320880B (en) Audio processing method and device
CN114740986A (en) Handwriting input display method and related equipment
CN113837990B (en) Noise monitoring method, electronic equipment, chip system and storage medium

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