Interaction method of touch pen and electronic equipment, touch pen and electronic equipment
By transmitting a second coded signal when the stylus leaves the screen and allowing the electronic device to continuously collect coded signals, the problems of writing delay and back-ticking are solved, and the chirality and user experience of the stylus are improved.
Patent Information
- Application Number
- CN202311480916.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-07
- Publication Date
- 2025-05-09
AI Technical Summary
The existing stylus does not emit coded signals after leaving the screen, resulting in writing delays and back-ticks when the electronic device touches the screen again, affecting the user experience.
The stylus transmits a second coding signal of different frequencies when leaving the screen. The electronic device continues to use the first sampling frequency to collect the coding signal, ensuring that the screen can quickly detect and perform writing operations when it comes into contact with again.
By continuously collecting coding signals, electronic devices can quickly respond to the contact and departure of the stylus, avoid writing delays and back-ticking, and improve the chirality and user experience of the stylus.
Smart Images

Figure CN119960631A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and more particularly to an interaction method between a stylus pen and an electronic device, a stylus pen, and an electronic device. Background Art
[0002] With the development of touch technology, more and more electronic devices use touch to perform human-computer interaction. For example, a user can use a stylus to operate the screen of an electronic device to provide input to the electronic device, and the electronic device can perform corresponding operations based on the input.
[0003] Currently, there is a stylus that can work all the time and send out coding signals all the time. When the electronic device detects the coding signal, the writing operation can be performed. When the electronic device cannot detect the coding signal, the electronic device enters a low power consumption mode. When the electronic device detects the coding signal again, the electronic device can exit the low power consumption mode and continue to perform the writing operation. There is a time delay during this period, which causes writing delay. Summary of the invention
[0004] The embodiments of the present application provide an interaction method between a stylus pen and an electronic device, a stylus pen, and an electronic device. When the stylus pen leaves the screen, the electronic device still uses the first sampling frequency to collect coding signals. When the screen touches the screen again, the electronic device can quickly detect that the stylus pen touches the screen, thereby avoiding writing delays and improving the hand-tracking performance of the stylus pen.
[0005] In a first aspect, an embodiment of the present application provides an interactive method between a stylus pen and an electronic device, and the method is applied to an interactive system between a stylus pen and an electronic device, and the system may include a stylus pen and an electronic device. In the method, when the stylus pen contacts the screen of the electronic device, the stylus pen transmits a first coding signal, and when the stylus pen transmits the first coding signal, the electronic device uses a first sampling frequency to collect the coding signal and performs a writing operation. Among them, when the electronic device detects that the stylus pen transmits the first coding signal, the electronic device can determine that the stylus pen contacts the screen, and the electronic device can perform a writing operation according to the position of the stylus pen on the screen.
[0006] When the stylus leaves the screen, the stylus transmits a second coding signal, and the frequency of the first coding signal is different from the frequency of the second coding signal. When the stylus transmits the second coding signal, the electronic device uses the first sampling frequency to collect the coding signal. When the electronic device detects that the stylus transmits the first coding signal, the electronic device can determine that the stylus leaves the screen, and the electronic device can stop performing the writing operation. In the embodiment of the present application, the electronic device will not reduce the sampling frequency, but continue to collect the coding signal with the first sampling frequency.
[0007] In the embodiment of the present application, the stylus can emit coding signals of different frequencies to indicate that the stylus touches the screen or leaves the screen, so that the electronic device can determine whether the stylus touches the screen or leaves the screen based on the detected coding signals. When the stylus leaves the screen, the electronic device still uses the first sampling frequency to collect the coding signals, so that when the screen touches the screen again, the electronic device can detect that the stylus touches the screen more quickly and can perform the line drawing operation in time, avoiding the problem of no water when the stylus touches the screen, and improving the hand-following performance of the stylus.
[0008] In addition, in an embodiment of the present application, the stylus can emit coding signals of different frequencies to indicate that the stylus touches the screen or leaves the screen. Compared with the solution in the prior art that does not emit a coding signal after the stylus leaves the screen, in the present application, the stylus can emit a second coding signal after leaving the screen, so that the electronic device can detect the second coding signal more quickly, and the electronic device can stop the drawing operation more promptly, thereby reducing the response delay and avoiding the back-hook phenomenon.
[0009] Similarly, when the stylus touches the screen again, the stylus transmits the first coding signal. Accordingly, when the stylus transmits the first coding signal, the electronic device collects the coding signal using the first sampling frequency, and the electronic device can perform writing operations according to the position of the stylus on the screen.
[0010] The following uses the stylus pen starting from power-on as an example to introduce the interaction process between the stylus pen and the electronic device:
[0011] First, after the stylus is powered on, it enters a first sleep state. When the stylus enters the first sleep state, the stylus performs a detection of the acceleration sensor. The detection of the acceleration sensor by the stylus can be understood as: the stylus detects whether the stylus is in use based on the data collected by the acceleration sensor. In some embodiments, when the data collected by the acceleration sensor is greater than or equal to the acceleration threshold, the stylus can determine that the stylus is in use, and when the data collected by the acceleration sensor is less than the acceleration threshold, the stylus can determine that the stylus is not in use.
[0012] In some embodiments, when the stylus is in use, the stylus can emit a second coding signal, indicating that the stylus is in use but has not yet touched the screen of the electronic device. Accordingly, when the stylus emits the second coding signal, the electronic device uses the first sampling frequency to collect the coding signal.
[0013] When the stylus pen transmits the second coding signal, timing can be started. If the stylus pen is not detected to be in contact with the screen within the first preset time, the stylus pen enters the first dormant state, which can reduce the power consumption of the stylus pen. If the stylus pen is detected to be in contact with the screen within the first preset time, the stylus pen can transmit the first coding signal. Accordingly, when the electronic device detects that the stylus pen transmits the first coding signal, the electronic device can determine that the stylus pen is in contact with the screen, and the electronic device can perform a writing operation according to the position of the stylus pen on the screen.
[0014] Similarly, when the stylus pen leaves the screen, the stylus pen transmits a second coding signal, and the electronic device can collect the coding signal using the first sampling frequency.
[0015] Secondly, after the stylus pen is powered on, it enters a first dormant state. When the stylus pen enters the first dormant state, the stylus pen performs detection by an acceleration sensor.
[0016] In some embodiments, when the stylus is in use, the stylus enters a second dormant state. When the stylus enters the second dormant state, the stylus performs acceleration sensor detection and pressure sensor detection. The pressure sensor detection can be understood as: the stylus detects whether the stylus touches the screen based on the data collected by the pressure sensor.
[0017] When the stylus touches the screen, the stylus emits a first coding signal, and accordingly, the electronic device collects the coding signal using a first sampling frequency and performs a writing operation. Similarly, when the stylus leaves the screen, the stylus emits a second coding signal, and the electronic device collects the coding signal using the first sampling frequency.
[0018] In this example, when the stylus is in use, the stylus does not need to start emitting the second coding signal, but starts pressure sensor detection. In this example, the step of the stylus emitting the second coding signal is reduced, saving the power consumption of the stylus.
[0019] In a possible implementation, after the stylus enters the second sleep state, if the stylus is not detected to be in contact with the screen within a second preset time period, the stylus may enter the first sleep state to reduce the power consumption of the stylus. If the stylus is detected to be in contact with the screen within the second preset time period, the stylus transmits the first coding signal.
[0020] In a possible implementation, after the stylus transmits the second coding signal, if the stylus is not detected to be in contact with the screen within a third preset time period, the stylus enters the second dormant state to reduce the power consumption of the stylus. If the stylus is detected to be in contact with the screen within the third preset time period, the stylus transmits the first coding signal.
[0021] Third, after the stylus is powered on, it enters a second dormant state. When the stylus touches the screen, the stylus transmits a first coding signal, and accordingly, the electronic device uses a first sampling frequency to collect the coding signal and performs a writing operation. Similarly, when the stylus leaves the screen, the stylus transmits a second coding signal, and the electronic device uses the first sampling frequency to collect the coding signal.
[0022] In a possible implementation, after the stylus enters the second sleep state, if the stylus is not detected to be in contact with the screen within a second preset time period, the stylus may enter the first sleep state to reduce the power consumption of the stylus. If the stylus is detected to be in contact with the screen within the second preset time period, the stylus transmits the first coding signal.
[0023] In a possible implementation, after the stylus transmits the second coding signal, if the stylus is not detected to be in contact with the screen within a third preset time period, the stylus enters the second dormant state to reduce the power consumption of the stylus. If the stylus is detected to be in contact with the screen within the third preset time period, the stylus transmits the first coding signal.
[0024] In the embodiment of the present application, after the stylus is powered on, there are various ways for the stylus to enter a sleep state and various ways for transmitting a coding signal, which facilitates the flexible configuration of the stylus and has a wide range of applications.
[0025] In a second aspect, an embodiment of the present application provides an interaction method between a stylus pen and an electronic device, which is applied to a stylus pen. The execution subject of the method may be an electronic device or a chip in the electronic device, and the following is an explanation using an electronic device as an example. In the method, when the screen of the electronic device is touched, the stylus pen emits a first coding signal. When leaving the screen, the stylus pen emits a second coding signal, and the frequency of the first coding signal is different from the frequency of the second coding signal.
[0026] In a possible implementation, before the stylus pen contacts the screen of the electronic device, it also includes: after power-on, entering a first sleep state, wherein when entering the first sleep state, the stylus pen performs acceleration sensor detection; or, after power-on, entering a second sleep state, wherein when entering the second sleep state, the stylus pen performs acceleration sensor detection and pressure sensor detection.
[0027] In a possible implementation, after entering the first sleep state, it also includes: based on the data collected by the acceleration sensor, when it is determined that the stylus is in use, transmitting a second coding signal, and based on the data collected by the pressure sensor, detecting whether the stylus is in contact with the screen.
[0028] In a possible implementation, after transmitting the second coding signal, the method further includes: if the stylus is not detected to be in contact with the screen within a first preset time period, entering the first sleep state.
[0029] The transmitting of the first coding signal when the screen of the electronic device is touched includes: if it is detected that the stylus touches the screen within the first preset time period, transmitting the first coding signal.
[0030] In a possible implementation, after entering the first dormant state, the method further includes: based on data collected by the acceleration sensor, when it is determined that the stylus pen is in use, entering a second dormant state.
[0031] In a possible implementation, after entering the second dormant state, the method further includes: detecting whether the stylus pen contacts the screen based on data collected by the pressure sensor.
[0032] In a possible implementation, the method further includes: if the stylus is not detected to be in contact with the screen within a second preset time period, entering the first sleep state.
[0033] The transmitting of the first coding signal when the screen of the electronic device is touched includes: if it is detected that the stylus touches the screen within the second preset time period, transmitting the first coding signal.
[0034] In a possible implementation, after transmitting the second coding signal, it also includes: if the stylus is not detected touching the screen within a third preset time period, entering the second sleep state; if the stylus is detected touching the screen within the third preset time period, transmitting the first coding signal.
[0035] In a possible implementation, after emitting the second coding signal when leaving the screen, the method further includes: emitting the first coding signal when touching the screen again.
[0036] In a third aspect, an embodiment of the present application provides an interaction method between a stylus pen and an electronic device, which is applied to an electronic device. The execution subject of the method may be an electronic device or a chip in the electronic device, and the following is an explanation using an electronic device as an example. In the method, when the stylus pen transmits a first coding signal, the electronic device uses a first sampling frequency to collect the coding signal and performs a writing operation, and the first coding signal is emitted when the stylus pen contacts the screen of the electronic device.
[0037] When the stylus pen transmits a second coding signal, the electronic device collects the coding signal using the first sampling frequency. The second coding signal is emitted when the stylus pen leaves the screen, and the frequency of the first coding signal is different from the frequency of the second coding signal.
[0038] In a possible implementation, when the stylus transmits a second coding signal, after the coding signal is collected using the first sampling frequency, it also includes: when the intensity of the second coding signal is less than or equal to an intensity threshold, the electronic device uses a second sampling frequency to detect the coding signal, and the second sampling frequency is less than the first sampling frequency.
[0039] In this implementation, when the stylus emits a second coding signal, it indicates that the stylus has left the screen, and the electronic device can detect the strength of the second coding signal. When the electronic device detects that the strength of the second coding signal is less than the strength threshold, it is determined that the stylus has left the screen far away (such as the distance between the stylus and the screen is greater than or equal to the distance threshold), and the electronic device can enter a low power consumption mode. The electronic device entering the low power consumption mode can be understood as: the electronic device uses the second sampling frequency to detect the coding signal, which can reduce the power consumption of the electronic device.
[0040] In one possible implementation, when the electronic device does not detect the first coding signal within a preset time after detecting the second coding signal, the electronic device can determine that the stylus has not touched the screen for a long time and the user may not be writing. The electronic device can enter a low power consumption mode, which can also reduce the power consumption of the electronic device.
[0041] In a fourth aspect, an embodiment of the present application provides a stylus pen, which may include: a processor and a memory. The memory is used to store computer executable program codes, and the program codes include instructions; when the processor executes the instructions, the instructions cause the electronic device to execute the method in the second aspect.
[0042] In a fifth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory. The memory is used to store computer executable program code, and the program code includes instructions; when the processor executes the instructions, the instructions cause the electronic device to execute the method in the third aspect.
[0043] In a sixth aspect, an embodiment of the present application provides an interactive system between a stylus pen and an electronic device, the system comprising the stylus pen as described in the fourth aspect above, and the electronic device as described in the fifth aspect above. The interactive system between the stylus pen and the electronic device can be used to execute the method in the first aspect.
[0044] In a seventh aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the methods in the first and second aspects above.
[0045] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the methods in the first and second aspects above.
[0046] The beneficial effects of the possible implementation methods of the second to eighth aspects mentioned above can be referred to the beneficial effects brought about by the first aspect mentioned above, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A structural diagram of a screen;
[0048] Figure 2 A schematic diagram of the touch control principle of the screen;
[0049] Figure 3 A timing diagram of the interaction between the In-cell screen and the stylus;
[0050] Figure 4 Another timing diagram of the interaction between the In-cell screen and the stylus;
[0051] Figure 5 A timing diagram showing a delay in the current interaction between the screen and the stylus;
[0052] Figure 6 A schematic diagram of a current stylus pen not producing ink when writing;
[0053] Fig. 7A A schematic diagram of the structure of a stylus provided in an embodiment of the present application;
[0054] Figure 7B Another schematic diagram of the structure of the stylus provided in the embodiment of the present application;
[0055] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0056] Fig. 9A A schematic diagram of a flow chart of an embodiment of a method for interacting with a stylus pen and an electronic device provided in an embodiment of the present application;
[0057] Fig. 9B A flowchart of another embodiment of the method for interacting with a stylus pen and an electronic device provided in an embodiment of the present application;
[0058] Fig. 9C A flowchart of another embodiment of the method for interacting with a stylus pen and an electronic device provided in an embodiment of the present application;
[0059] Fig.9D A flowchart of another embodiment of the method for interacting with a stylus pen and an electronic device provided in an embodiment of the present application;
[0060] Fig.9E A flowchart of another embodiment of the method for interacting with a stylus pen and an electronic device provided in an embodiment of the present application;
[0061] Fig.10 A schematic diagram of reducing writing delay by interacting with a stylus pen and an electronic device provided in an embodiment of the present application;
[0062] Fig.11A A flowchart of another embodiment of the method for interacting with a stylus pen and an electronic device provided in an embodiment of the present application;
[0063] Fig. 11B A flowchart of another embodiment of the method for interacting with a stylus pen and an electronic device provided in an embodiment of the present application;
[0064] Fig. 11C A flowchart of another embodiment of the method for interacting with a stylus pen and an electronic device provided in an embodiment of the present application;
[0065] Fig.11D A flowchart of another embodiment of the method for interaction between a stylus pen and an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] For ease of understanding, the following first introduces the relevant terms and concepts involved in the embodiments of the present application:
[0067] Stylus: The basic principle of interaction between a stylus and an electronic device is that when the stylus touches the screen of the electronic device, it affects the capacitance value of the screen. The electronic device responds to the change in the capacitance value of the screen and can identify input events and information such as the coordinates of the stylus. In some embodiments, the stylus can also be called a handwriting pen. In some embodiments, the stylus can also be a capacitive pen.
[0068] Screen: The embodiment of the present application refers to the screen of an electronic device, and the screen may also be called a touch screen, a touch screen, etc.
[0069] In some embodiments, reference Figure 1 The structure of the screen can be divided into three layers, namely, a protective layer, a touch layer, and a display layer. For example, the protective layer can be glass. For example, the touch layer can include an electrode array. For example, the display layer can include liquid crystal, or a light-emitting diode, etc. Among them, the display layer can be different based on different display principles.
[0070] In some embodiments, the screen of the electronic device may include an In-cell screen and an On-Cell screen. Among them, the In-cell screen integrates the touch layer and the display layer together. For example, taking the display layer including liquid crystal as an example, the In-cell screen embeds the touch layer into the liquid crystal of the display layer. The innovation of the In-cell screen is that the circuit is loaded on the liquid crystal, so that the liquid crystal screen has the ability of perception and touch input. The In-cell screen is not only more accurate, but also eliminates the need for a touch layer, making the entire screen thinner. Among them, the On-Cell screen is a screen in which the touch layer is embedded between the color filter substrate and the polarizer of the display layer. In the following embodiments, the screen is an In-cell screen as an example for explanation. It can be understood that the method provided in the embodiments of the present application can be applied to an On-Cell screen with a sampling frequency.
[0071] In some embodiments, the screen of the electronic device may include: a self-capacitive screen and a mutual-capacitive screen. The touch control principles of these two types of screens are described below.
[0072] Reference Figure 2 In a, the self-capacitive screen may include electrode arrays arranged horizontally and vertically, and are grounded to form capacitance, which is self-capacitance, that is, the capacitance of the electrode to the ground. Taking a finger as an example, when the finger touches the self-capacitive screen, the capacitance value of the finger will be superimposed on the original capacitance value of the self-capacitive screen, so that the capacitance value of the self-capacitive screen increases. During touch detection, the electronic device detects the horizontal electrodes and the vertical electrodes respectively in turn. The electronic device can determine the horizontal coordinates and the vertical coordinates at the time of touch according to the changes in the capacitance values before and after the touch, and obtain the touch coordinates of the finger.
[0073] Reference Figure 2b in the figure, the mutual capacitance screen may include an array of electrodes arranged horizontally and vertically. Unlike the self-capacitive screen, the mutual capacitance screen forms a capacitor at the intersection of two electrodes, and the two electrodes constitute the two poles of the capacitor respectively. Taking a finger as an example, when a finger touches the mutual capacitance screen, the finger affects the coupling between the two electrodes near the touch point, thereby changing the capacitance value between the two electrodes. During touch detection, the electronic device can determine the touch coordinates of the finger based on the position of the intersection of the two electrodes. It should be understood that Figure 2 In the figure, electrode 1 and electrode 2 represent two electrodes near the touch point.
[0074] It should be understood that the embodiments of the present application do not limit the type of screen of the electronic device.
[0075] Currently, capacitive pens can include passive capacitive pens and active capacitive pens. The following briefly describes the touch control principles of passive capacitive pens and active capacitive pens:
[0076] 1. Passive capacitive stylus:
[0077] The touch principle of a passive capacitive pen is similar to that of a finger. When the passive capacitive pen touches the screen, a coupling capacitor is formed between the passive capacitive pen and the screen, which affects the capacitance value of the screen. The electronic device can determine information such as the coordinates of the passive capacitive pen based on the change in the capacitance value of the screen.
[0078] 2. Active capacitive stylus:
[0079] In some embodiments, the tip of the active capacitive pen may be provided with an electrode, which may be referred to as a transmitting electrode. The active capacitive pen may transmit a coding signal through the transmitting electrode, and the coding signal may transmit pressure information, the coding frequency of the active capacitive pen, version information, etc., which is not limited in the embodiments of the present application. The coding signal may be regarded as a voltage signal, and accordingly, the electronic device may receive the coding signal through the electrode array.
[0080] In some embodiments, the active capacitive stylus may include: a capacitive stylus with a protocol and a capacitive stylus without a protocol.
[0081] Among them, for a capacitive stylus with a protocol, a protocol for interacting with an electronic device is pre-stored in the capacitive stylus, and the protocol is used to indicate the interaction method between the capacitive stylus and the electronic device. Figure 3 Taking the In-cell screen as an example, the working principle of the interaction between the In-cell screen and the stylus (capacitive pen with protocol) is introduced:
[0082] The In-cell screen has the characteristics of time-sharing multiplexing of display and touch. In some embodiments, the In-cell screen can also be called a display and touch integrated screen. The In-cell screen does not always collect the coding signal of the stylus. The In-cell screen also needs to intermittently collect the signal of the hand, and needs to perform the display work in time-sharing. In order to ensure that the In-cell screen can collect the coding signal of the stylus, the In-cell screen needs to be synchronized with the stylus in advance to ensure that the sampling frequency of the In-cell screen is equal to the coding frequency of the stylus, and that the In-cell screen is collecting the coding signal when the stylus is emitting the coding signal. In addition, when the In-cell screen is not collecting the coding signal of the stylus, the In-cell screen can collect hand signals, display the interface of the electronic device, etc.
[0083] The electronic device can broadcast a synchronization signal through the electrode array, and the synchronization signal is used to request synchronization with the stylus. In some embodiments, the synchronization signal can be regarded as a voltage signal. Figure 3 This is a working sequence diagram of the interaction between the In-cell screen and the stylus. Figure 3 , when the stylus receives the signal through the receiving electrode in the stylus, at time T1, the stylus can be synchronously aligned with the electronic device.
[0084] The synchronization alignment may include: the stylus pen and the electronic device exchanging their respective information. For example, the stylus pen may synchronize its coding frequency with the electronic device, so that the electronic device may sample the coding signal at the same frequency. For example, the stylus pen and the electronic device may negotiate the coding frequency and the frequency of sampling the coding signal to ensure that the frequency of the electronic device sampling the coding signal is the same as the coding frequency of the stylus pen.
[0085] In some embodiments, the synchronous alignment may also include: the stylus and the electronic device negotiate the time when the stylus starts to transmit the coding signal, and the number of times the stylus transmits the coding signal in a cycle. The time when the stylus starts to transmit the coding signal can also be regarded as the time when the electronic device starts to collect the coding signal, for example Figure 3 It should be understood that Figure 3 In the example, it is taken that the number of times the stylus pen transmits the coding signal is 4 times in one cycle.
[0086] The specific process of synchronously aligning the stylus pen and the electronic device is not described in detail in the embodiment of the present application, and reference may be made to the existing related technologies.
[0087] In some embodiments, the stylus pen and the electronic device may be synchronized and aligned using the following coding methods: direct sequence spread spectrum (DSSS), or non return to zero line code (NRZ), etc.
[0088] Reference Figure 3 At time T2, the stylus transmits a coding signal through the transmitting electrode according to the coding frequency. Correspondingly, at time T2, the electronic device can collect the coding signal at the same sampling frequency as the coding frequency. Taking the writing scene as an example, the electronic device collects the coding signal and can perform a line drawing operation at the position where the stylus touches the screen according to the coding signal. Among them, the electronic device can collect hand signals and display the interface of the electronic device in the interval of collecting the coding signal. The electronic device performing the line drawing operation can be understood as: as the position of the stylus on the screen changes, the electronic device displays the line drawing at the corresponding position on the screen.
[0089] In summary, before the stylus transmits the coding signal to the electronic device, in order to ensure that the electronic device can collect the coding signal, the stylus needs to be synchronized with the electronic device, which requires the deployment of the protocol and related protocol hardware in the stylus. In this example, on the one hand, the cost of the electronic device is increased, and the electronic device also needs to support the protocol.
[0090] In some embodiments, in order to simplify the structure of the stylus, there is currently a capacitive stylus without a protocol, which does not require the deployment of a protocol and related protocol hardware. Figure 4 This is another working sequence diagram of the interaction between the In-cell screen and the stylus. Figure 4 , the stylus (capacitive pen without protocol) can work all the time and send out coding signals all the time. Taking the in-cell screen of an electronic device as an example, the electronic device can collect coding signals at a certain frequency. Taking the writing scene as an example, the electronic device can perform writing operations according to the coding signals.
[0091] In some embodiments, writing operations may include, but are not limited to, drawing, writing, painting, and the like on the screen.
[0092] In some embodiments, the detection logic of the signal amount of the coding signal can be deployed in the electronic device, and the signal amount can be understood as the signal strength. Taking the writing scenario as an example, when the user holds the stylus pen in contact with the screen, the distance between the stylus pen and the screen is getting closer and closer, and the signal strength of the coding signal collected by the electronic device is getting stronger and stronger. When the electronic device detects that the signal strength of the coding signal reaches the strength threshold, the electronic device can determine that the stylus pen is in contact with the screen, and the electronic device can perform a writing operation, such as drawing a line on the screen. However, in this example, the detection logic of the signal amount of the coding signal needs to be deployed in the electronic device, which imposes many restrictions on the electronic device and has a small scope of application.
[0093] In some embodiments, a pressure sensor may be provided in the stylus, and the stylus may detect whether the tip of the stylus touches the screen through the pressure sensor. When the tip of the stylus touches the screen, the stylus may sense that the tip of the stylus touches the screen through the data collected by the pressure sensor. When the stylus determines that the tip of the stylus touches the screen, the stylus may work full-time, that is, the stylus may transmit a coding signal uninterruptedly, and the coding signal may be a pulse width modulation (PWM) wave with a frequency of F1. Accordingly, when the electronic device detects a PWM wave with a frequency of F1, the electronic device may determine that the stylus touches the screen, and the electronic device may perform a line drawing operation on the screen. When the tip of the stylus leaves the screen, the stylus may sense that the tip of the stylus leaves the screen through the data collected by the pressure sensor, and the stylus may not transmit a coding signal. Accordingly, when the electronic device does not detect a PWM wave with a frequency of F1, the electronic device determines that the stylus leaves the screen, and the electronic device ends the line drawing operation.
[0094] It should be understood that in some embodiments, because the stylus (capacitive pen without a protocol) works full-time when transmitting the coding signal, that is, the stylus transmits the coding signal full-time. When the electronic device detects a PWM wave with a frequency of F1, in order to be able to comprehensively and accurately collect the coding signal, the electronic device can collect the coding signal at a first sampling frequency and perform a line drawing operation on the screen. When the electronic device determines that the stylus has left the screen, in order to reduce power consumption, the electronic device can enter a low power consumption mode, and the low power consumption mode can be understood as: the electronic device collects the coding signal at a second sampling frequency. Among them, the second sampling frequency is less than the first sampling frequency. Exemplarily, for example, the first sampling frequency can be 240Hz, and the second sampling frequency can be 60Hz.
[0095] In this example, after the electronic device enters the low power consumption mode, if the user touches the screen again with the stylus, the stylus can sense that the pen tip touches the screen through the data collected by the pressure sensor, and the stylus can continue to transmit the PWM wave with a frequency of F1. Because the electronic device collects the coding signal at the second sampling frequency, when the electronic device detects the PWM wave with a frequency of F1, the electronic device can determine that the stylus touches the screen, and the electronic device can exit the low power consumption mode, that is, the electronic device can collect the coding signal at the first sampling frequency and perform the line drawing operation on the screen.
[0096] On the one hand, when the stylus senses that the tip of the stylus touches the screen through the pressure sensor, it transmits a PWM wave with a frequency of F1. There is a first part of the delay from the stylus touching the screen to the stylus transmitting the coding signal. On the other hand, when the electronic device enters the low power mode, because the electronic device collects the coding signal at the second sampling frequency, the interval between two adjacent samples is longer because the sampling frequency is reduced, resulting in the electronic device detecting the coding signal with a second part of the delay. Here, combined with Figure 5 , explain the delay of the second part:
[0097] Reference Figure 5 a in , for example, when the stylus touches the screen at time T3, the stylus starts to emit a PWM wave with a frequency of F1. It should be understood that Figure 5 In order to reflect that the stylus pen works all the time, the waveform of the PWM wave with a frequency of F1 is shown above. At time T3, if the electronic device does not enter the low power mode, the electronic device can collect the coding signal at the first sampling frequency. It should be understood that Figure 5 In order to reflect that the first sampling frequency is greater than the second sampling frequency, it can be characterized by the difference in the interval between two samplings. For example, when the electronic device collects the coding signal at the first sampling frequency, the interval between the two samplings is t1, and when the electronic device collects the coding signal at the second sampling frequency, the interval between the two samplings is t2, and t1 is less than t2.
[0098] When the stylus leaves the screen at time T4, the stylus will not emit a coding signal. Figure 5 In b, at time T4, the electronic device cannot detect the coding signal and believes that the stylus has left the screen. There is no need to perform the drawing operation temporarily. The electronic device can enter the low power consumption mode, that is, the electronic device can collect the coding signal at the second sampling frequency. Figure 5 Figures b and c respectively show the timing diagrams of the electronic device collecting the coding signal at the second sampling frequency and the electronic device collecting the coding signal at the first sampling frequency.
[0099] For example, at time T5, the stylus touches the screen again, and the stylus continues to transmit a PWM wave with a frequency of F1, which does not hit the sampling time of the electronic device. Figure 5 In b, when the electronic device collects the coding signal at the second sampling frequency, it is necessary to wait until time T6 before the electronic device can collect the coding signal and perform the writing operation on the screen. Figure 5 In c, when the electronic device collects the coding signal at the first sampling frequency, at time T7, the electronic device can collect the coding signal and perform a writing operation on the screen. Figure 5 In b and c, compared with the first sampling frequency, after the electronic device enters the low power consumption mode, if the stylus touches the screen again, the electronic device detects a longer duration of the PWM wave with a frequency of F1 due to the low sampling frequency, and there is a time delay in the second part, resulting in no water in the first section when the electronic device draws a line on the screen.
[0100] In this way, from the time the stylus touches the screen to the time the electronic device performs the line drawing operation on the screen, there is a first delay and a second delay, resulting in no water flowing in the first part when the electronic device draws a line on the screen, and no line is displayed, giving the user a feeling of line drawing delay, and a poor user experience. Figure 6 At time T5, the user touches the screen with the stylus pen and starts drawing a line. However, due to the delay in the first part and the delay in the second part, the electronic device does not display the drawing line at time T5. Instead, at time T6, the electronic device collects the coding signal at the second sampling frequency and starts to execute the drawing operation.
[0101] An embodiment of the present application provides an interaction method between a stylus pen and an electronic device. The stylus pen is a capacitive pen without a protocol. The embodiment of the present application aims to reduce the delay of the second part, avoid the problem that the first part does not produce water when the electronic device draws a line on the screen, and improve the tracking performance of the stylus pen.
[0102] In some embodiments, the electronic device in the embodiments of the present application may be an electronic device with a screen, and the electronic device may be referred to as user equipment (UE), terminal, etc. For example, the electronic device may be a mobile phone, a portable android device (PAD), a personal digital assistant (PDA), a handheld device with a wireless communication function, a computing device, a vehicle-mounted device or a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in a smart home, etc. The form of the electronic device in the embodiments of the present application is not specifically limited.
[0103] In some embodiments, in addition to exchanging signals through electrodes (such as transmitting electrodes and receiving electrodes in the stylus, and electrode arrays in the electronic device), the electronic device and the stylus can also be interconnected through other communication networks to achieve wireless signal interaction. The communication network can be, but is not limited to, a short-range communication network such as a WI-FI hotspot network, a WI-FI peer-to-peer (P2P) network, a Bluetooth network, a zigbee network, or a near field communication (NFC) network.
[0104] Before introducing the interaction method between the stylus pen and the electronic device provided in the embodiment of the present application, the structure of the stylus pen and the electronic device in the embodiment of the present application is first introduced:
[0105] 1. The structure of the stylus
[0106] Fig. 7A A schematic diagram of the structure of a stylus provided in an embodiment of the present application. Fig. 7A The stylus pen 100 may include: a processor 110 , a pressure sensor 120 , a coding circuit 130 , an electrode module 140 , a power module 150 , and an inertial sensor 160 .
[0107] The processor 110 may include storage and processing circuitry for supporting the operation of the stylus 100. The storage and processing circuitry may include storage devices such as non-volatile memory (e.g., flash memory or other electrically programmable read-only memory configured as a solid-state drive), volatile memory (e.g., static or dynamic random access memory), etc. The processing circuitry in the processor 110 may be used to control the operation of the stylus 100. The processing circuitry may be based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio chips, application specific integrated circuits, etc.
[0108] In some embodiments, the processor 110 may be used to run software or logic on the stylus 100 to control the operation of the stylus 100. During the operation of the stylus 100, the software running on the processor 110 may process sensor input, output of coding signals, and interaction with electronic devices.
[0109] In an embodiment of the present application, the processor 110 is used to determine whether the stylus 100 is in contact with the screen based on the data collected by the pressure sensor 120. When the stylus 100 is in contact with the screen, the processor 110 is used to control the coding circuit to transmit a PWM wave with a first frequency. When the stylus 100 leaves the screen, the processor 110 is used to control the coding circuit to transmit a PWM wave with a second frequency. In some embodiments, for example, the first frequency may be included in 100-400KHz, and the second frequency may be included in 100-400KHz. Exemplarily, for example, the first frequency is 200KHz and the second frequency may be 100KHz.
[0110] The pressure sensor 120 may be disposed in the tip or the pen holder of the stylus 100. After one end of the tip of the stylus 100 contacts the screen and is subjected to force, the other end of the tip moves to apply force to the pressure sensor 120. Exemplarily, when the stylus 100 does not contact the screen, the pressure value collected by the pressure sensor 120 may be 0, and when the stylus 100 contacts the screen, the pressure value collected by the pressure sensor 120 increases.
[0111] In some embodiments, the processor 110 is further configured to adjust the thickness of a line written by the tip of the stylus pen 100 according to the pressure value detected by the pressure sensor 120 .
[0112] The coding circuit 130 is used to transmit a coding signal through the electrode module 140 under the control of the processor 110 .
[0113] In some embodiments, the electrode module 140 may include a transmitting electrode. The coding circuit 130 is specifically configured to transmit a coding signal through the transmitting electrode under the control of the processor 110.
[0114] In some embodiments, the electrode module 140 may further include a receiving electrode, wherein the receiving electrode is used to receive a signal transmitted from an electronic device.
[0115] In some embodiments, the transmitting electrode may be located at the tip of the stylus pen 100 , and the receiving electrode may be located inside the pen shaft. The embodiments of the present application do not limit the position and number of the transmitting electrode and the receiving electrode.
[0116] The power module 150 is used to provide power to the stylus pen.
[0117] In some embodiments, the power module 150 may include a dry cell battery. In this example, the stylus pen 100 may not have a charging function. After the user installs the dry cell battery, the stylus pen 100 is powered on and the stylus pen can start working full-time.
[0118] In some embodiments, the stylus pen 100 may have a charging function, and the power module 150 may support the charging of the stylus pen 100 .
[0119] The inertial sensor 160 is used to detect the posture of the stylus 100 to determine whether the user is holding the stylus 100 to write. In some embodiments, the inertial sensor may include a three-axis acceleration sensor and a three-axis gyroscope, and / or other components for measuring the movement of the stylus 100. In the following embodiments, the inertial sensor 160 includes an acceleration transducer as an example.
[0120] In order to support wireless communication between the stylus pen 100 and the electronic device, the stylus pen 100 may include a wireless module, such as a WI-FI hotspot module, a WI-FI point-to-point module, a Bluetooth module, a near field communication module, etc.
[0121] It is understandable that, according to actual needs, the stylus 100 may also include: buttons, microphones, speakers, audio generators, vibrators, cameras, data ports, and other types of sensors. For example, the user can turn on or off the stylus 100 by operating the button. In some embodiments, the button can also trigger the stylus 100 to turn on or off a specific function, such as a screenshot function, a writing function, etc. In some embodiments, the button may include a mechanical button and a non-mechanical button, and the button may be used to collect button pressing information from the user.
[0122] Other types of sensors may include, for example, temperature sensors, ambient light sensors, light-based proximity sensors, contact sensors, magnetic sensors, and the like.
[0123] The stylus pen 100 may further include a status indicator such as a light emitting diode (LED). The status indicator is used to prompt the user of the status of the stylus pen 100 .
[0124] Figure 7B This is another schematic diagram of the structure of the stylus provided in the embodiment of the present application. It should be understood that Figure 7B for Fig. 7A It should be understood that Figure 7B This is an example diagram of setting various modules or components in the stylus pen. The embodiment of the present application does not limit the position and quantity of various modules or components in the stylus pen. It should be understood that Figure 7B The receiving electrodes in the electrode module 140 and the inertial sensor 160 are not shown.
[0125] Understandably, Fig. 7A and Figure 7BThe structure shown does not constitute a specific limitation on the stylus pen 100. In other embodiments of the present application, the stylus pen 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0126] 2. Structure of electronic equipment
[0127] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 The electronic device 200 may include: a processor 210 , a memory 220 , an electrode circuit 230 , an electrode array 240 , and a screen 250 .
[0128] In some embodiments, the processor 210 may be configured to execute, coordinate and / or manage functions of the electronic device 200. Such functions may include, but are not limited to: communicating and / or exchanging data with the stylus 100, and receiving coding signals from one or more styluses.
[0129] In some embodiments, for example, the processor can be a microprocessor, a central processing unit, an application specific integrated circuit, a field programmable gate array, a digital signal processor, an analog circuit, a digital circuit, or a combination of these devices. The processor can be a single-threaded or multi-threaded processor. The processor can be a single-core or multi-core processor.
[0130] The processor 210 may be configured to access the memory 220 storing instructions. The instructions may be configured to cause the processor 210 to execute, coordinate or monitor one or more operations or functions of the electronic device 200.
[0131] The memory 220 may store electronic data that may be used by the stylus or the processor 210. For example, the memory 220 may store data or content (such as media files, documents and applications, device settings and preferences, timing signals and control signals, or data, data structures or databases for various modules, files or configurations related to detecting tip signals and / or ring signals), etc. The memory 220 may be configured as any type of memory. For example, the memory 220 may be implemented as a random access memory, a read-only memory, a flash memory, a removable memory, other types of storage elements, or a combination of such devices.
[0132] The processor 210 can be used to control the electrode circuit 220 to transmit a signal through the electrode array 230. In addition, in the embodiment of the present application, the processor 210 is also used to control the electrode array 230 to detect the coding signal from the stylus 100 according to the set sampling frequency. In some embodiments, after the electrode circuit 220 collects the coding signal, the coding signal can be reported to the processor 210.
[0133] The screen 250 may be used to display the interface of the electronic device 200. In the embodiment of the present application, as the position of the stylus pen 100 on the screen 250 changes, the screen 250 may display a stroke at the corresponding position.
[0134] In some embodiments, the electronic device 200 may further include: a power supply 260, a communication bus 270, and a communication port 280. The power supply 260 is used to provide power to the electronic device 200. The communication bus 270 is used to connect the modules and components in the electronic device 200. The communication port 280 is used to realize the connection and communication between the electronic device 200 and other peripherals.
[0135] Understandably, Figure 8 The structure shown does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0136] The following describes the interaction method between the stylus pen and the electronic device provided in the embodiments of the present application in combination with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0137] Fig. 9A A flowchart of an embodiment of the interactive method between a stylus pen and an electronic device provided in an embodiment of the present application. Fig. 9A The interaction method between the stylus pen and the electronic device provided in the embodiment of the present application may include:
[0138] S901, the stylus pen enters a first sleep state after being powered on.
[0139] In some embodiments, when the power module of the stylus is configured as a dry cell battery and the stylus is not configured with a switch button, the user installs the dry cell battery to power on the stylus, and the user removes the dry cell battery to power off the stylus. In some embodiments, when the stylus is configured with a switch button, regardless of whether the power module of the stylus is configured as a dry cell battery or a rechargeable battery, the user can operate the switch button to control the stylus to power on or off.
[0140] After the stylus is powered on, the user may not use the stylus immediately. In order to reduce the power consumption of the stylus, the stylus can enter a sleep state, wherein the sleep mode includes a first sleep state (sleep1) and a second sleep state (sleep2). Fig. 9A In the example shown, the first sleep state is first introduced.
[0141] The first dormant state refers to: the stylus performs acceleration sensor detection. Because the data collected by the acceleration sensor can represent the use state of the stylus, the stylus can detect the use state of the stylus according to the data collected by the acceleration sensor. Among them, the use state may include: use state and non-use state.
[0142] In some embodiments, an acceleration threshold can be set in advance, and the stylus can determine the use status of the stylus by comparing the data collected by the acceleration sensor and the acceleration threshold. Exemplarily, when the data collected by the acceleration sensor is greater than or equal to the acceleration threshold, the stylus can determine that the stylus is in use, and when the data collected by the acceleration sensor is less than the acceleration threshold, the stylus can determine that the stylus is not in use. Exemplarily, after the stylus is powered on, the user places the stylus on the desktop, and the data collected by the acceleration sensor of the stylus is less than the acceleration threshold, at which time the stylus is not in use. After the stylus is powered on, the user holds the stylus and starts writing, and the data collected by the acceleration sensor is greater than or equal to the acceleration threshold, and the stylus is in use.
[0143] The embodiments of the present application do not limit the manner in which the stylus determines the usage status of the stylus. For example, an infrared sensor may also be provided on the stylus. If the infrared sensor detects that the user is holding the stylus, it may be determined that the stylus is in use. If the infrared sensor does not detect that the user is holding the stylus, it may be determined that the stylus is not in use.
[0144] S902, when the stylus pen is in use, the stylus pen transmits a second coding signal.
[0145] The second coding signal is: a PWM wave with a second frequency. When the stylus is in use, it indicates that the user is using the stylus, but at this time, because the stylus has not yet touched the screen, the stylus can emit a PWM wave with a second frequency.
[0146] S903, when the stylus pen transmits a second coding signal, the electronic device collects the coding signal using the first sampling frequency.
[0147] It should be understood that the electronic device can determine whether the stylus touches the screen by detecting the frequency of the PWM wave in the coding signal emitted by the stylus. When the stylus emits a second coding signal, for example, the electronic device detects a PWM wave with a second frequency (i.e., the second coding signal), the electronic device can determine that the stylus has not touched the screen. In order to detect that the stylus touches the screen in a timely manner and to quickly respond to the line drawing operation, the electronic device can collect the coding signal at the first sampling frequency.
[0148] S904, when the stylus pen contacts the screen, the stylus pen transmits a first coding signal.
[0149] In some embodiments, when the stylus is in use, the stylus can also start pressure sensor detection. The stylus can detect whether the stylus touches the screen through data collected by the pressure sensor, and reference can be made to the relevant description in the above embodiments.
[0150] The first coding signal is: a PWM wave having a first frequency.
[0151] In some embodiments, it can be considered that the frequency of the first coding signal is different from the frequency of the second coding signal. In some embodiments, for example, the first frequency may be included in 100-400KHz, and the second frequency may be included in 100-400KHz. In some embodiments, the frequency of the second coding signal is less than the frequency of the first coding signal, for example, the first frequency is 200KHz, and the second frequency may be 100KHz.
[0152] S905, when the stylus pen transmits a first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a drawing operation on the screen.
[0153] Among them, the electronic device detects a PWM wave with a first frequency (i.e., a first coding signal), the electronic device can determine that the stylus touches the screen, the electronic device can use the first sampling frequency to collect the coding signal, and perform a drawing operation according to the position of the stylus on the screen.
[0154] S906, when the stylus pen leaves the screen, the stylus pen transmits a second coding signal.
[0155] S907, when the stylus pen transmits the second coding signal, the electronic device stops the marking operation and uses the first sampling frequency to collect the coding signal.
[0156] In the prior art, when a user holds a stylus pen and writes, when the user lifts the pen, the electronic device will enter a low power consumption mode and use the second sampling frequency to collect coding signals, which will cause a writing delay when the user writes again. In the embodiment of the present application, when a user holds a stylus pen and writes, when the user lifts the pen, the electronic device can stop the line drawing operation and continue to use the first sampling frequency to collect coding signals, so that when the user writes again, the electronic device can quickly detect the coding signal of the stylus pen, reduce the writing delay, and improve the hand tracking of the stylus pen.
[0157] Reference Figure 5 At time T5, when the stylus touches the screen again (writes down again), the stylus continues to transmit a PWM wave with a frequency of F1 (such as the first coding signal), but the sampling time of the electronic device is not hit at this time. Figure 5In b, in the prior art, when the electronic device collects the coding signal at the second sampling frequency, it is necessary to wait until time T6 before the electronic device can collect the coding signal and perform the writing operation on the screen. Figure 5 In c, in the embodiment of the present application, the electronic device collects the coding signal at the first sampling frequency, and when the time T7 comes, the electronic device can collect the coding signal and perform the writing operation on the screen. Figure 5 In b and c, in the embodiment of the present application, when the stylus leaves the screen, the electronic device still uses the first sampling frequency to collect the coding signal. When the stylus touches the screen again, the electronic device can quickly detect the coding signal of the stylus, thereby reducing the delay of the second part and improving the tracking performance of the stylus.
[0158] Fig.10 In the example, the first time the stylus touches the screen (the first time the pen is put down) and the second time the stylus touches the screen (the second time the pen is put down) after being powered on are used to introduce the scenario of reducing the writing delay in the embodiment of the present application:
[0159] Reference Fig.10 In a, when the stylus touches the screen for the first time after being powered on, the stylus determines that the stylus touches the screen based on the data collected by the pressure sensor, and the stylus transmits a first coding signal. The electronic device responds to the collection of the first coding signal and performs a line drawing operation. There is a delay in the first part of this process, and the embodiment of the present application does not optimize this process.
[0160] Reference Fig.10 In b, after the user lifts the pen, the stylus will emit a second coding signal. In the embodiment of the present application, in order to quickly detect the next time the stylus is put down (i.e., the second time), the electronic device may not enter the low power consumption mode, but continue to use the first sampling frequency to collect coding signals. Fig.10 In c, when the stylus touches the screen for the second time to emit the first coding signal, because the first sampling frequency is greater than the second sampling frequency, the electronic device can collect the first coding signal earlier and perform the line drawing operation. In the embodiment of the present application, the delay of the second part is reduced, and the electronic device can perform the line drawing operation more quickly, improving the hand tracking performance of the stylus. Fig.10 In c, when the stylus touches the screen for the second time to start drawing a line, there will be no phenomenon of ink leakage, and the electronic device will start to display the line from the moment the stylus is put down.
[0161] In addition, in the embodiment of the present application, the stylus can emit coding signals of different frequencies to indicate that the stylus touches the screen or leaves the screen, which can also avoid the phenomenon of back-hook when the electronic device performs a writing operation:
[0162] In the prior art, when the stylus leaves the screen during writing, the stylus stops sending the coding signal, and the electronic device needs to detect no coding signal, or detect a coding signal with a frequency of 0, before it can stop drawing. However, when the stylus stops sending the coding signal, due to the influence of the electrode array in the screen or other noise, the electronic device will not immediately fail to detect the coding signal, that is, it takes a long time for the electronic device to detect the coding signal with a frequency of 0, resulting in the electronic device still drawing after the stylus is lifted, and there is a back-hook phenomenon.
[0163] In the embodiment of the present application, the stylus can emit coding signals of different frequencies to indicate that the stylus touches the screen or leaves the screen. Compared with the prior art solution that the electronic device takes a long time to detect the coding signal with a frequency of 0, in the embodiment of the present application, the electronic device can easily distinguish the first frequency and the second frequency of the stylus, and the electronic device takes a short time to detect the coding signal with the second frequency compared to the coding signal with a frequency of 0. Therefore, when the stylus leaves the screen, the electronic device can detect the PWM wave of the second frequency (i.e., the second coding signal) more quickly, so that the electronic device can stop drawing the line more promptly, avoid the back-hook phenomenon, and reduce the response delay.
[0164] In some embodiments, in response to detecting the second coding signal, the electronic device may determine that the stylus has left the screen, and the user may continue to write, or the user may not write. In order to reduce the power consumption of the electronic device, when the electronic device detects that the intensity of the second coding signal is less than an intensity threshold, it determines that the stylus has left the screen far away (such as the distance between the stylus and the screen is greater than or equal to the distance threshold), and the electronic device can enter a low power consumption mode.
[0165] In some embodiments, in order to reduce the power consumption of the electronic device, when the electronic device does not detect the first coding signal within a preset time after detecting the second coding signal, the electronic device can determine that the stylus has not touched the screen for a long time and the user may not be writing, and the electronic device can enter a low power consumption mode.
[0166] S908, when the stylus touches the screen again, the stylus transmits a first coding signal.
[0167] S909, when the stylus pen transmits a first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a drawing operation on the screen.
[0168] Fig.11A for Fig. 9A A simplified flowchart of the steps executed by the stylus pen in the figure. For details, please refer to Fig. 9A Description in . Fig.11A Take the stylus pen being put down and lifted up once as an example.
[0169] In an embodiment of the present application, the stylus can emit coding signals of different frequencies to indicate that the stylus touches the screen or leaves the screen, so that the electronic device can determine whether the stylus touches the screen or leaves the screen based on the detected coding signals. In an embodiment of the present application, when the stylus leaves the screen, the electronic device still uses the first sampling frequency to collect coding signals, so that when the screen touches the screen again, the electronic device can detect that the stylus touches the screen more quickly, and can perform the line drawing operation in time, avoiding the problem of no water when the stylus touches the screen, and improving the hand-following property of the stylus. In addition, in an embodiment of the present application, the stylus can emit coding signals of different frequencies to indicate that the stylus touches the screen or leaves the screen. Compared with the solution in the prior art that the stylus does not emit a coding signal after leaving the screen, the stylus in the present application can emit a second coding signal after leaving the screen, so that the electronic device can detect the second coding signal more quickly, and the electronic device can stop drawing more promptly, reduce the response delay, and avoid the back-hook phenomenon.
[0170] Fig. 9B A flowchart of another embodiment of the method for interacting between a stylus pen and an electronic device provided in an embodiment of the present application. Fig. 9B The interaction method between the stylus pen and the electronic device provided in the embodiment of the present application may include:
[0171] S901A, the stylus enters the first sleep state after being powered on.
[0172] S902A, when the stylus pen is in use, the stylus pen enters a second dormant state.
[0173] The second dormant state refers to: the stylus performs acceleration sensor detection and pressure sensor detection, wherein the stylus can detect whether the stylus touches the screen according to the data collected by the pressure sensor.
[0174] S903A, when the stylus pen contacts the screen, the stylus pen transmits a first coding signal.
[0175] Compared to Fig. 9A , Fig. 9B In the embodiment of the present invention, when the stylus pen is in use, the stylus pen does not need to transmit the second coding signal, but starts to detect the pressure sensor. When the stylus pen determines that the stylus pen touches the screen based on the data collected by the pressure sensor, the stylus pen can directly start to transmit the first coding signal. In this example, the step of the stylus pen transmitting the second coding signal is reduced, saving the power consumption of the stylus pen.
[0176] in other words, Fig. 9B and Fig. 9AIn the embodiment of the present invention, the timing when the stylus pen starts to perform pressure sensor detection is the same (for example, the pressure sensor detection is started when the stylus pen is in use), but the manner in which the stylus pen transmits the coding signal is different. Fig. 9A In the embodiment of the present invention, when the stylus pen is in use, the stylus pen starts to emit a second coding signal. Fig. 9B In an embodiment of the present invention, when the stylus pen is in use, the stylus pen does not need to transmit the second coding signal, but instead transmits the first coding signal when the stylus pen contacts the screen.
[0177] S904A, when the stylus pen transmits a first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a line drawing operation on the screen.
[0178] S905A, when the stylus leaves the screen, the stylus transmits a second coding signal.
[0179] S906A, when the stylus pen transmits the second coding signal, the electronic device stops the marking operation and uses the first sampling frequency to collect the coding signal.
[0180] S907A, when the stylus touches the screen again, the stylus transmits a first coding signal.
[0181] S908A, when the stylus pen transmits a first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a line drawing operation on the screen.
[0182] S903A-S908A may refer to the description in S904-S909.
[0183] Fig. 11B for Fig. 9B A simplified flowchart of the steps executed by the stylus pen in the figure. For details, please refer to Fig. 9B Description in . Fig. 11B Take the stylus pen being put down and lifted up once as an example.
[0184] In the embodiment of the present application, after the stylus is powered on, there are various ways for the stylus to enter the dormant state and various ways for transmitting the coding signal, which facilitates the flexible configuration of the stylus. Fig. 9A The same technical effects as those of the embodiments shown can be referred to Fig. 9A Described in.
[0185] Fig. 9A An example of how the stylus can enter the first sleep state after being powered on is introduced, and Fig. 9B An example is described in which the stylus pen can enter the first sleep state after being powered on, and switch from the first sleep state to the second sleep state. In some embodiments, the stylus pen can directly enter the second sleep state after being powered on. Fig. 9C As shown:
[0186] Fig. 9C A flowchart of another embodiment of the method for interacting between a stylus pen and an electronic device provided in an embodiment of the present application. Fig. 9C The interaction method between the stylus pen and the electronic device provided in the embodiment of the present application may include:
[0187] S901B, the stylus enters the second sleep state after being powered on.
[0188] The second dormant state may refer to the description in S902A.
[0189] Compared to Fig. 9B , Fig. 9C In the embodiment of the present invention, the stylus pen can directly enter the second dormant state after being powered on, and after the stylus pen enters the second dormant state, the stylus pen does not need to transmit the second coding signal, but directly performs acceleration sensor detection and pressure sensor detection. When the stylus pen determines that the stylus pen touches the screen based on the data collected by the pressure sensor, the stylus pen starts to transmit the first coding signal. In other words, Fig. 9B and Fig. 9C In the embodiment of the present invention, the timing when the stylus pen starts to perform pressure sensor detection is different, but the manner in which the stylus pen transmits the coding signal is the same.
[0190] S902B, when the stylus pen contacts the screen, the stylus pen transmits a first coding signal.
[0191] S903B, when the stylus pen transmits a first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a line drawing operation on the screen.
[0192] S904B, when the stylus pen leaves the screen, the stylus pen transmits a second coding signal.
[0193] S905B, when the stylus pen transmits the second coding signal, the electronic device stops the marking operation and uses the first sampling frequency to collect the coding signal.
[0194] S906B, when the stylus touches the screen again, the stylus transmits a first coding signal.
[0195] S907B, when the stylus pen transmits a first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a drawing operation on the screen.
[0196] S902B-S907B may refer to the description in S903A-S908A.
[0197] In some embodiments, Fig. 9A Similarly, before S902B, S908B-S909B can also be included:
[0198] S908B, when the touch pen is in use, the electronic device transmits a second coding signal.
[0199] S909B, when the stylus pen transmits a second coding signal, the electronic device collects the coding signal using the first sampling frequency.
[0200] S908B-S909B may refer to the description in S902-S903.
[0201] It should be understood that this example is similar to Fig. 9A The difference between the embodiments of the present invention is that the dormant state entered by the stylus pen after powering on is different, and the way in which the stylus pen transmits the coding signal is the same. Fig. 9B The difference between the embodiments of the present invention and the present invention is that the dormant state entered by the stylus pen after being powered on is different, and the way in which the stylus pen transmits the coding signal is different. Fig. 9C The difference between the embodiments is that the dormant state entered by the stylus pen after being powered on is the same, and the manner in which the stylus pen transmits the coding signal is different.
[0202] In the embodiment of the present application, after the stylus is powered on, there are various ways for the stylus to enter the dormant state and various ways for transmitting the coding signal, which facilitates the flexible configuration of the stylus side. Fig. 9A The same technical effects as those of the embodiments shown can be referred to Fig. 9A Described in.
[0203] Figure 9A-9C In the embodiment shown, a method is introduced in which the stylus transmits a first coding signal when the stylus touches the screen after being powered on, and transmits a second coding signal when the stylus leaves the screen. In this method, when the stylus leaves the screen, if the user does not use the stylus again, but the stylus continues to transmit the second coding signal, the power consumption of the stylus is large. In the embodiment of the present application, a dormancy mechanism of the stylus can be provided to reduce the power consumption of the stylus during the use of the stylus.
[0204] Fig.9D This is a flow chart of another embodiment of the method for interacting between a stylus pen and an electronic device provided in an embodiment of the present application. It should be understood that Fig.9D is Fig. 9A Improvements are made on this basis.
[0205] Reference Fig.9D The interaction method between the stylus pen and the electronic device provided in the embodiment of the present application may include:
[0206] S901C, the stylus enters the first sleep state after being powered on.
[0207] S902C, when the stylus pen is in use, the stylus pen transmits a second coding signal.
[0208] S903C, when the stylus pen transmits a second coding signal, the electronic device collects the coding signal using the first sampling frequency.
[0209] S904C: If the stylus pen does not touch the screen within a first preset time period, the stylus pen enters a first sleep state.
[0210] S905C: If the stylus touches the screen within a first preset time period, the stylus transmits a first coding signal.
[0211] and Fig. 9A What is different from the embodiment of the present application is that the embodiment of the present application adds a dormancy mechanism for the stylus. Among them, when the stylus is detected to be in use, the stylus can start timing, or when the stylus starts to emit the second coding, the stylus can start timing. Among them, if the stylus does not touch the screen within the first preset time of timing, it means that the user has not been writing. In order to reduce the power consumption of the stylus, the stylus can no longer emit the second coding signal, but enter the first dormant state. Similarly, if the stylus touches the screen within the first preset time of timing, it means that the user is writing, and the stylus can emit the first coding signal.
[0212] In some embodiments, for example, the first preset duration may be 1 minute.
[0213] Among them, if the stylus does not touch the screen within the first preset time, when the stylus enters the first sleep state, the electronic device does not detect the coding signal from the stylus, the electronic device can enter the low power consumption mode, or the electronic device can enter the low power consumption mode after a fourth preset time.
[0214] S906C, when the stylus pen transmits a first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a drawing operation on the screen.
[0215] S907C, when the stylus leaves the screen, the stylus transmits a second coding signal.
[0216] Similarly, when the stylus starts to transmit the second coding signal, the stylus can start timing. If the stylus does not touch the screen within the third preset time of timing, the stylus can no longer transmit the second coding signal, but enter the first dormant state. Similarly, if the stylus touches the screen within the third preset time of timing, the stylus can execute S907C. It should be understood that Fig.9D This step is not shown in FIG.
[0217] In some embodiments, the third preset duration may be equal to or different from the first preset duration. For example, the third preset duration may be 5 seconds.
[0218] S908C, when the stylus pen transmits a second coding signal, the electronic device collects the coding signal using the first sampling frequency.
[0219] S909C, when the stylus touches the screen again, the stylus transmits a first coding signal.
[0220] S910C, when the stylus pen transmits a first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a drawing operation on the screen.
[0221] S906C-S910C may refer to the description in S905-S909.
[0222] Fig. 11C for Fig.9D A simplified flowchart of the steps executed by the stylus pen in the figure. For details, please refer to Fig.9D Description in . Fig. 11C Take the stylus pen being put down and lifted up once as an example.
[0223] In an embodiment of the present application, when the stylus transmits the second coding signal, it indicates that the stylus has left the screen or has not yet touched the screen. In this case, if the stylus touches the screen within a first preset time period, the stylus can transmit the first coding signal to interact with the electronic device. If the stylus does not touch the screen within the first preset time period, the stylus can enter a first sleep state and no longer transmit the second coding signal, thereby reducing the power consumption of the stylus.
[0224] Fig.9E This is a flow chart of another embodiment of the method for interacting between a stylus pen and an electronic device provided in an embodiment of the present application. It should be understood that Fig.9E is Fig. 9B Improvements are made on this basis.
[0225] Reference Fig.9E The interaction method between the stylus pen and the electronic device provided in the embodiment of the present application may include:
[0226] S901D, the stylus enters the first sleep state after being powered on.
[0227] S902D: When the stylus pen is in use, the stylus pen enters a second sleep state.
[0228] S901D-S902D can refer to the description in S901A-S902A.
[0229] S903D: If the stylus pen does not touch the screen within a second preset time period, the stylus pen enters a first sleep state.
[0230] S904D, if the stylus touches the screen within a second preset time period, the stylus transmits a first coding signal.
[0231] and Fig. 9A What is different from the embodiment of the present application is that the embodiment of the present application adds a dormancy mechanism for the stylus. Among them, when the stylus is in use, the stylus can start timing, or when the stylus starts to transmit the second coding signal, the stylus can start timing. Among them, if the stylus does not touch the screen within the second preset time of timing, it means that the user has not been writing. In order to reduce the power consumption of the stylus, the stylus can not perform pressure sensor detection, but enter the first dormant state. Similarly, if the stylus touches the screen within the first preset time of timing, it means that the user is writing, and the stylus can transmit the first coding signal.
[0232] In some embodiments, for example, the second preset duration may be equal to or different from the first preset duration.
[0233] Among them, if the stylus does not touch the screen within the second preset time, when the stylus enters the first sleep state, the electronic device does not detect the coding signal from the stylus, the electronic device can enter the low power consumption mode, or the electronic device can enter the low power consumption mode after a fourth preset time.
[0234] S905D, when the stylus pen transmits a first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a line drawing operation on the screen.
[0235] S906D, when the stylus leaves the screen, the stylus transmits a second coding signal.
[0236] S907D, when the stylus pen transmits a second coding signal, the electronic device collects the coding signal using the first sampling frequency.
[0237] Similarly, when the stylus starts to transmit the second coding signal, the stylus can start timing. If the stylus does not touch the screen within the third preset time of timing, the stylus can no longer transmit the second coding signal, but enter the second dormant state. Similarly, if the stylus touches the screen within the third preset time of timing, the stylus can execute S908D. It should be understood that Fig.9E This step is not shown in FIG.
[0238] S908D, when the stylus touches the screen again, the stylus transmits a first coding signal.
[0239] S909D, when the stylus pen sends a first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a drawing operation on the screen.
[0240] S905D-S909D can refer to the description in S904A-S908A.
[0241] Fig.11D for Fig.9E A simplified flowchart of the steps executed by the stylus pen in the figure. For details, please refer to Fig.9E Description in . Fig.11D Take the stylus pen being put down and lifted up once as an example.
[0242] In an embodiment of the present application, when the stylus transmits the second coding signal, it indicates that the stylus has left the screen or has not yet touched the screen. In this case, if the stylus touches the screen within a second preset time period, the stylus can transmit the first coding signal to interact with the electronic device. If the stylus does not touch the screen within the second preset time period, the stylus can enter a second sleep state and no longer transmit the second coding signal, thereby reducing the power consumption of the stylus.
[0243] It should be understood that Fig. 9C In the illustrated embodiment, when the stylus transmits the second coding signal, if the stylus touches the screen within a second preset time period, the stylus can transmit the first coding signal to interact with the electronic device; if the stylus does not touch the screen within the second preset time period, the stylus can enter a second sleep state and no longer transmit the second coding signal, thereby reducing the power consumption of the stylus.
[0244] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0245] The term "plurality" in this article refers to two or more than two. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0246] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.
[0247] It can be understood that in the embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Claims
1. A method for interaction between a stylus pen and an electronic device, characterized in that: include: When the stylus pen contacts the screen of the electronic device, the stylus pen emits a first coding signal; When the stylus pen transmits the first coding signal, the electronic device collects the coding signal using a first sampling frequency and performs a writing operation; When the stylus pen leaves the screen, the stylus pen transmits a second coding signal, and the frequency of the first coding signal is different from the frequency of the second coding signal; When the stylus pen transmits the second coding signal, the electronic device collects the coding signal using the first sampling frequency.
2. The method according to claim 1, characterized in that Before the stylus touches the screen of the electronic device, the method further comprises: After the stylus pen is powered on, it enters a first dormant state, wherein when the stylus pen enters the first dormant state, the stylus pen performs detection by an acceleration sensor; or, After the stylus pen is powered on, it enters a second dormant state. When the stylus pen enters the second dormant state, the stylus pen performs detection of the acceleration sensor and the pressure sensor.
3. The method according to claim 2, characterized in that After entering the first dormant state, the method further includes: Based on the data collected by the acceleration sensor, when it is determined that the stylus pen is in use, the stylus pen emits a second coding signal, and based on the data collected by the pressure sensor, detects whether the stylus pen contacts the screen; When the stylus pen transmits the second coding signal, the electronic device collects the coding signal using the first sampling frequency.
4. The method according to claim 3, characterized in that After the stylus pen transmits the second coding signal, the method further includes: If the stylus is not detected to be in contact with the screen within a first preset time period, the stylus enters the first dormant state; When the stylus pen contacts the screen of the electronic device, the stylus pen transmits a first coding signal, including: If the stylus is detected to be in contact with the screen within the first preset time period, the stylus transmits the first coding signal.
5. The method according to claim 2, characterized in that: After entering the first dormant state, the method further includes: Based on the data collected by the acceleration sensor, when it is determined that the stylus pen is in use, the stylus pen enters a second dormant state.
6. The method according to claim 2 or 5, characterized in that: After entering the second dormant state, the method further includes: The stylus detects whether the stylus is in contact with the screen based on the data collected by the pressure sensor.
7. The method according to claim 6, characterized in that The method further comprises: If the stylus is not detected to be in contact with the screen within a second preset time period, the stylus enters the first dormant state; When the stylus pen contacts the screen of the electronic device, the stylus pen transmits a first coding signal, including: If the stylus is detected to be in contact with the screen within the second preset time period, the stylus transmits the first coding signal.
8. The method according to claim 6 or 7, characterized in that: After the stylus pen transmits the second coding signal, the method further includes: If the stylus is not detected to be in contact with the screen within a third preset time period, the stylus enters the second dormant state; If the stylus is detected to be in contact with the screen within the third preset time period, the stylus transmits the first coding signal.
9. The method according to any one of claims 1 to 8, characterized in that When the stylus pen transmits the second coding signal, and the electronic device collects the coding signal using the first sampling frequency, the method further includes: When the stylus touches the screen again, the stylus transmits a first coding signal; When the stylus pen transmits the first coding signal, the electronic device collects the coding signal using the first sampling frequency and performs a writing operation.
10. A method for interaction between a stylus pen and an electronic device, characterized in that: Applied to a stylus pen, the method comprises: When the screen of the electronic device is touched, a first coding signal is emitted; When leaving the screen, a second coding signal is emitted, and the frequency of the first coding signal is different from the frequency of the second coding signal.
11. The method according to claim 10, characterized in that Before the stylus touches the screen of the electronic device, the method further comprises: After power-on, the device enters a first sleep state, wherein when the device enters the first sleep state, the stylus performs detection by the acceleration sensor; or, After power-on, the device enters a second sleep state, wherein when the device enters the second sleep state, the stylus performs detection of the acceleration sensor and the pressure sensor.
12. The method according to claim 11, characterized in that After entering the first dormant state, the method further includes: Based on the data collected by the acceleration sensor, when it is determined that the stylus pen is in use, a second coding signal is emitted, and based on the data collected by the pressure sensor, it is detected whether the stylus pen contacts the screen.
13. The method according to claim 12, characterized in that After transmitting the second coding signal, the method further comprises: If the stylus is not detected touching the screen within a first preset time period, entering the first dormant state; When the screen of the electronic device is touched, the first coding signal is emitted, comprising: If the stylus is detected to be in contact with the screen within the first preset time period, the first coding signal is emitted.
14. The method according to claim 11, characterized in that After entering the first dormant state, the method further includes: Based on the data collected by the acceleration sensor, when it is determined that the stylus pen is in use, the second dormant state is entered.
15. The method according to claim 11 or 14, characterized in that After entering the second dormant state, the method further includes: Based on the data collected by the pressure sensor, it is detected whether the stylus pen contacts the screen.
16. The method according to claim 15, characterized in that The method further comprises: If the stylus is not detected touching the screen within a second preset time period, entering the first dormant state; When the screen of the electronic device is touched, the first coding signal is emitted, comprising: If the stylus is detected to be in contact with the screen within the second preset time period, the first coding signal is emitted.
17. The method according to claim 15 or 16, characterized in that After transmitting the second coding signal, the method further comprises: If the stylus is not detected touching the screen within a third preset time period, entering the second dormant state; If the stylus is detected to be in contact with the screen within the third preset time period, the first coding signal is emitted.
18. The method according to any one of claims 10 to 17, characterized in that: When leaving the screen, after transmitting the second coding signal, the method further comprises: When the screen is touched again, the first coding signal is emitted.
19. A method for interaction between a stylus pen and an electronic device, characterized in that: Applied to electronic equipment, the method comprises: When the stylus pen emits a first coding signal, the coding signal is collected using a first sampling frequency and a writing operation is performed, wherein the first coding signal is emitted when the stylus pen contacts the screen of the electronic device; When the stylus pen transmits a second coding signal, the coding signal is collected using the first sampling frequency. The second coding signal is emitted when the stylus pen leaves the screen, and the frequency of the first coding signal is different from the frequency of the second coding signal.
20. The method according to claim 19, characterized in that When the stylus pen transmits the second coding signal, after the coding signal is collected at the first sampling frequency, the method further includes: When the intensity of the second coding signal is less than or equal to the intensity threshold, the coding signal is detected using a second sampling frequency, and the second sampling frequency is less than the first sampling frequency.
21. A touch pen, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 10 to 18.
22. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to claim 19 or 20.
23. An interactive system between a stylus pen and an electronic device, characterized in that: It includes the stylus pen as described in claim 21 above, and the electronic device as described in claim 22 above.
24. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed, the method according to any one of claims 10 to 20 is implemented.
Citation Information
Cited By
Interaction method for stylus and electronic device, and stylus and electronic device
EP4742013A1
Interaction method for stylus and electronic device, and stylus and electronic device
WO2025098289A1