Interaction method, electronic equipment and handwriting pen

By determining the posture and operation of the stylus, the electronic device or stylus does not respond to user operations in the preset posture, which solves the problem of unintentional stylus operation triggering functions and improves the user experience.

CN121704709APending Publication Date: 2026-03-20HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

When a stylus is connected to an electronic device, unintentional user actions can easily trigger unwanted functions, affecting the user experience.

Method used

By determining the pen's posture and the received operation, the electronic device or pen will not respond to the user's operation in a preset posture, thus avoiding accidental triggering of functions.

Benefits of technology

This reduces accidental triggering of functions due to unintentional user operations, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121704709A_ABST
    Figure CN121704709A_ABST
Patent Text Reader

Abstract

The invention provides an interaction method, electronic equipment and a handwriting pen, relates to the technical field of terminals, and can not respond to an operation received by the handwriting pen under the condition that the handwriting pen is in a specific posture, so that the condition that the function of the handwriting pen is mistakenly triggered due to the operation of a user is reduced, and the use experience of the user is improved. When the interaction method is applied to the electronic equipment, the electronic equipment determines a first posture where a handwriting pen is located currently and a first operation received by the handwriting pen under the first posture. If the first posture is a non-preset posture, the electronic equipment responds to the first operation, and a function corresponding to the first operation is achieved. If the first posture is the preset posture, the electronic equipment does not respond to the first operation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminal, and in particular, to an interaction method, an electronic device and a stylus. BACKGROUND

[0002] At present, after the stylus is connected with the electronic device, the user can operate on the screen of the electronic device by using the stylus, so as to realize corresponding functions, for example, writing and drawing. When drawing, the user can click the stylus body to control the stylus to switch the brush on the electronic device, so that the user can use the stylus more conveniently.

[0003] However, since the stylus is very similar to the ordinary pencil and ballpoint pen in terms of the feel and shape, when the user uses the stylus, the user will habitually make the operations of turning the stylus and flicking the stylus, just like using the pencil and ballpoint pen. However, compared with the pencil and ballpoint pen, the stylus has a more complex structure and can realize more functions. If the user makes the same operation as using the pencil and ballpoint pen when using the stylus, the current function of the user will be easily triggered, thereby affecting the user experience. SUMMARY

[0004] The embodiment of the present application provides an interaction method, an electronic device and a stylus, so that the stylus does not respond to the operation received by the stylus or responds to the specific operation received by the stylus in the case that the stylus receives a specific posture, thereby reducing the function mis-triggering of the stylus due to the operation of the user and improving the user experience.

[0005] In a first aspect, an interaction method is provided. The method is applied to an electronic device, and the electronic device establishes a communication connection with a stylus. In the method, the electronic device determines a first posture of the stylus and a first operation received by the stylus in the first posture. If the first posture is a non-pre-set posture, the electronic device responds to the first operation to realize a function corresponding to the first operation. If the first posture is a pre-set posture, the electronic device does not respond to the first operation.

[0006] In the above method, when the stylus is in the pre-set posture, the operation received by the stylus can be regarded as an operation made by the user unintentionally. Then, the electronic device does not respond to the operation received by the stylus (for example, the first operation) and does not realize the function corresponding to the operation. In this way, the electronic device can reduce the function mis-triggering due to the operation of the user unintentionally and improve the user experience.

[0007] In an implementation form of the first aspect, the electronic device determining the first posture of the stylus currently comprises: the electronic device receiving a plurality of first information continuously sent by the stylus, wherein the first information is generated according to sensor data obtained by at least one sensor on the stylus; the electronic device determining a posture change of the stylus according to at least two first information, wherein a time difference between two adjacent first information is within a preset time range; and the electronic device determining the first posture of the stylus currently according to the posture change of the stylus.

[0008] In the implementation form, the electronic device can determine the posture of the stylus more accurately through data or information from multiple sensors, so as to give a more accurate response or no response subsequently, and improve the user experience.

[0009] In an implementation form of the first aspect, the electronic device determining the first operation received by the stylus in the first posture comprises: the electronic device determining the first operation according to at least one first information sent by the stylus in the first posture.

[0010] In the implementation form, since the electronic device can receive a plurality of first information continuously sent by the stylus, the electronic device can determine the first operation received by the stylus in the first posture according to at least one first information received when the stylus is in the first posture.

[0011] In an implementation form of the first aspect, the posture change of the stylus is used to indicate at least one of: a change of a pen body angle when the stylus is held, a change of a touched position of the pen body when the stylus is held, and a change of a touched area of the pen body when the stylus is held; and the at least one sensor comprises at least one of: a pressure sensor, a touch sensor, or an angle sensor.

[0012] In an implementation form of the first aspect, the preset posture comprises at least one of: a rotation of the stylus when the stylus is held and / or a sliding of the stylus when the stylus is held; and the first operation comprises at least one of: clicking the pen body, double-clicking the pen body, or pressing the pen body.

[0013] In some examples, the first operation can be an operation performed on the stylus by the same hand holding the stylus, or the first operation can also be an operation performed on the stylus by another hand when the stylus is held by one hand.

[0014] In an implementation form of the first aspect, the electronic device implementing the function corresponding to the first operation comprises: the electronic device switching a first brush corresponding to the stylus on the electronic device to a second brush; or the electronic device switching a brush corresponding to the stylus on the electronic device to an eraser; or the electronic device switching an eraser corresponding to the stylus on the electronic device to a brush.

[0015] In a second aspect, an interaction method is provided. The method is applied to an electronic device, and the electronic device establishes a communication connection with a stylus. In the method, the electronic device determines a first posture in which the stylus currently is, and a first operation received by the stylus in the first posture. If the first posture is a preset posture, the electronic device responds to the first operation to implement a function corresponding to the first operation, wherein the preset posture includes that the stylus is held horizontally or the stylus is held vertically.

[0016] In the above method, when the stylus is in the preset posture, the received user operation can be regarded as an operation that the user needs to make, and then the electronic device will respond to the user operation (e.g., the first operation) received by the stylus and implement the function corresponding to the operation. When the stylus is in a non-preset posture, the received user operation can be regarded as an operation that the user makes unintentionally, and then the electronic device will not respond to the operation and will not implement the function corresponding to the operation. In this way, the electronic device can reduce the situation that a function is triggered by mistake due to an unintentional operation of the user, and improve the user experience.

[0017] In an implementation form of the second aspect, the electronic device implements the function corresponding to the first operation, including: displaying strokes at at least one position on a page displayed by the electronic device.

[0018] For example, when the stylus is held horizontally, if the stylus receives an operation of double-clicking the body of the stylus, the tablet computer displays multiple strokes on the canvas in response to the operation, thereby realizing the effect of "spraying gold"; or, when the stylus is held vertically, if the stylus receives an operation of clicking the tail of the stylus, the tablet computer displays multiple strokes on the canvas in response to the operation, thereby realizing the effect of "spraying gold".

[0019] In an implementation form of the second aspect, the first operation includes at least one of the following: clicking the body of the stylus, double-clicking the body of the stylus, or flicking the body of the stylus.

[0020] In some examples, the first operation can be an operation performed on the stylus by the same hand that holds the stylus, or the first operation can also be an operation performed on the stylus by another hand when the stylus is held by one hand.

[0021] In the above implementation forms, the user can perform various operations on the stylus to trigger the electronic device to implement corresponding functions, so that the interaction between the stylus and the electronic device is various, and the user can have a better interaction experience.

[0022] In an implementation of the second aspect, the electronic device determines the first posture of the stylus currently, including: the electronic device receives a plurality of first information continuously sent by the stylus, wherein the first information is generated according to sensor data obtained by at least one sensor on the stylus; the electronic device determines a posture change of the stylus according to at least two first information, wherein a time difference between two adjacent first information is within a preset time range; and the electronic device determines the first posture of the stylus currently according to the posture change of the stylus.

[0023] In the above implementation, the electronic device can determine the posture of the stylus more accurately through data or information from multiple sensors, so as to give a more accurate response or no response subsequently, and improve the user experience.

[0024] In an implementation of the second aspect, the electronic device determines the first operation received by the stylus in the first posture, including: the electronic device determines the first operation according to at least one first information sent by the stylus in the first posture.

[0025] In the above implementation, since the electronic device can receive a plurality of first information continuously sent by the stylus, the electronic device can determine the first operation received by the stylus in the first posture according to at least one first information received when the stylus is in the first posture.

[0026] In an implementation of the second aspect, the posture change of the stylus is used to indicate at least one of: a change of a pen body angle when the stylus is held, a change of a touched position of the pen body when the stylus is held, and a change of a touched area of the pen body when the stylus is held; and the at least one sensor includes at least one of: a pressure sensor, a touch sensor, or an angle sensor.

[0027] In a third aspect, an interaction method is provided. The method is applied to a stylus, and the stylus establishes a communication connection with an electronic device. In the method, the stylus determines a first posture currently and a first operation received in the first posture. If the first posture is a non-preset posture, the stylus sends indication information to the electronic device, and the indication information is used to instruct the electronic device to respond to the first operation and implement a function corresponding to the first operation. If the first posture is a preset posture, the stylus does not send the indication information to the electronic device.

[0028] In the above method, when the stylus is in a preset posture, the user operation received by the stylus can be considered as an unintentional action by the user. Therefore, the stylus will not send instruction information to the electronic device, and the electronic device will not respond to the user operation received by the stylus (such as the first operation) to implement the function corresponding to that operation. In this way, the electronic device will reduce the possibility of erroneous function triggering due to unintentional user operations, thus improving the user experience.

[0029] In one possible implementation of the third aspect, the preset posture includes holding and rotating the stylus and / or holding and sliding the stylus; the first operation includes at least one of the following: clicking the pen body, double-clicking the pen body, or pressing the pen body.

[0030] In some examples, the first operation can be an operation performed on the stylus by the same hand holding it, or, when the stylus is held by one hand, the first operation can be an operation performed on the stylus by the other hand.

[0031] In one possible implementation of the third aspect, the stylus determines its current first posture by: the stylus receiving a plurality of first pieces of information continuously transmitted by the stylus, wherein the first pieces of information are generated based on sensor data acquired by at least one sensor on the stylus. The stylus determines its posture change based on at least two pieces of first information, wherein the time difference between the acquisition of two adjacent pieces of first information is within a preset time range. The stylus determines its current first posture based on the posture change.

[0032] In the above implementation, the stylus can more accurately determine its posture by using data or information from multiple sensors, which makes it easier to respond more accurately or not respond at all, thus improving the user experience.

[0033] In one possible implementation of the third aspect, the stylus determines a first operation received by the stylus in a first posture, including: the stylus determining the first operation based on at least one first piece of information sent by the stylus in the first posture.

[0034] In one possible implementation of the third aspect, the posture changes of the stylus are used to indicate at least one of the following: changes in the pen body tilt angle when the stylus is held, changes in the touch position of the pen body when the stylus is held, and changes in the touch area of ​​the pen body when the stylus is held; at least one sensor includes at least one of the following: a pressure sensor, a touch sensor, or an angle sensor.

[0035] In one possible implementation of the third aspect, the electronic device performs the function corresponding to the first operation, including: the electronic device switching the first brush corresponding to the stylus on the electronic device to a second brush; or, the electronic device switching the brush corresponding to the stylus on the electronic device to an eraser; or, the electronic device switching the eraser corresponding to the stylus on the electronic device to a brush.

[0036] Fourthly, an electronic device is provided, including a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform an interaction method as described in the first aspect and any implementation thereof, or to perform an interaction method as described in the second aspect and any implementation thereof.

[0037] Fifthly, a stylus is provided, including a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the stylus to perform the interaction method as described in the third aspect and any of its implementations.

[0038] A sixth aspect provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform an interaction method as described in the first aspect and any implementation thereof, or to perform an interaction method as described in the second aspect and any implementation thereof; or, when executed on a stylus pen, cause the stylus pen to perform an interaction method as described in the third aspect and any implementation thereof.

[0039] In a seventh aspect, a computer program product is provided that, when the computer program product is run on a computer, causes the computer to execute the interaction method as described in the first aspect and any implementation thereof, or to execute the interaction method as described in the second aspect and any implementation thereof, or to execute the interaction method as described in the third aspect and any implementation thereof.

[0040] The beneficial effects that the electronic device provided in the fourth aspect, the stylus provided in the fifth aspect, the computer-readable storage medium provided in the sixth aspect, and the computer program product provided in the seventh aspect can achieve can be referred to the beneficial effects that can be achieved in the first aspect and any of its implementations, or the beneficial effects that can be achieved in the second aspect and any of its implementations, or the beneficial effects that can be achieved in the third aspect and any of its implementations, and will not be repeated here. Attached Figure Description

[0041] Figure 1 This illustration shows an interaction diagram between the electronic device and the stylus provided in an embodiment of this application;

[0042] Figure 2 A schematic diagram of the interactive system provided in an embodiment of this application is shown;

[0043] Figure 3 A schematic diagram of the structure of the stylus provided in an embodiment of this application is shown;

[0044] Figure 4 A schematic diagram of the structure of the electronic device provided in the embodiments of this application is shown. Figure 1 ;

[0045] Figure 5 A schematic diagram of the structure of the electronic device provided in the embodiments of this application is shown. Figure 2 ;

[0046] Figure 6 This application illustrates a flowchart of the interaction method provided in an embodiment. Figure 1 ;

[0047] Figure 7 A schematic diagram illustrating the determination of stylus posture provided in an embodiment of this application is shown;

[0048] Figure 8 This illustration shows an electronic device according to an embodiment of the present application responding to a first operation. Figure 1 ;

[0049] Figure 9 A schematic diagram illustrating that an electronic device provided in an embodiment of this application does not respond to a first operation is shown;

[0050] Figure 10 This application illustrates a flowchart of the interaction method provided in an embodiment. Figure 2 ;

[0051] Figure 11 This illustration shows an electronic device according to an embodiment of the present application responding to a first operation. Figure 2 ;

[0052] Figure 12 This illustration shows an electronic device according to an embodiment of the present application responding to a first operation. Figure 3 ;

[0053] Figure 13 This application illustrates a flowchart of the interaction method provided in an embodiment. Figure 3 ;

[0054] Figure 14 This illustration shows a schematic diagram of the stylus reconnection provided in an embodiment of this application;

[0055] Figure 15 A schematic diagram of the structure of the electronic device provided in the embodiments of this application is shown. Figure 3 . Detailed Implementation

[0056] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0057] Furthermore, the business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0058] To facilitate user experience with electronic devices such as mobile phones and tablets, styluses are typically included. Users can use the stylus to write, draw, and perform other actions on the screen. See [link to details]. Figure 1 As shown in (a) and (b) in the figure.

[0059] Taking drawing as an example, when drawing, users often need to switch between brushes with different line thicknesses or to change the eraser. When switching brushes or erasers, users can directly operate the stylus. The stylus then sends the received operation as a signal to the electronic device, which responds accordingly. For example, a user can tap the stylus, causing the electronic device to display the corresponding brush and respond to the stylus's movement on the screen, allowing the brush to be used to draw on the canvas. Alternatively, a user can tap the stylus, causing the electronic device to display the corresponding eraser and respond to the stylus's movement on the screen, using the eraser to erase lines on the canvas.

[0060] Styluses are very similar in feel and shape to ordinary pencils and ballpoint pens, but their structure is more complex. For example, styluses may have a communication module to facilitate communication with electronic devices; or they may have a sensor module to detect the operations received by the stylus.

[0061] When using a stylus, users will habitually perform actions such as twirling and flicking the pen, just like when using a pencil or ballpoint pen. Since the actions received by the stylus can trigger certain functions, these actions may also trigger some functions when the user twirls or flicks the pen. However, the user may not need to use these functions at the moment. This can lead to the user feeling that there will be many misoperations when using the stylus, making them feel that using the stylus is inconvenient and affecting the user experience.

[0062] Based on the above, this application provides an interaction method that can be applied to an electronic device communicating with a stylus, and also to a stylus communicating with an electronic device. This method allows the stylus to either not respond to operations received by the stylus when it is in a specific posture, or to respond to specific operations received by the stylus, thereby reducing the possibility of erroneous function triggering due to user operations and improving the user experience.

[0063] In some examples, when this interaction method is applied to an electronic device, the device determines the current first posture of the stylus and the first operation received by the stylus in that first posture. If the first posture is not a preset posture, the electronic device responds to the first operation and performs the function corresponding to the first operation. If the first posture is a preset posture, the electronic device does not respond to the first operation.

[0064] In the above method, when the stylus is in a preset posture, the user operation received by the stylus can be considered as an unintentional action by the user. Therefore, the electronic device will not respond to the user operation received by the stylus (such as the first operation) nor will it implement the function corresponding to that operation. In this way, the electronic device reduces the possibility of erroneous function triggering due to unintentional user operations, thus improving the user experience.

[0065] In some examples, when this interaction method is applied to an electronic device, the electronic device determines the current first posture of the stylus and the first operation received by the stylus in the first posture. If the first posture is a preset posture, the electronic device responds to the first operation and implements the function corresponding to the first operation. The preset posture includes the stylus being held horizontally or vertically.

[0066] In the above method, when the stylus is in a preset posture, the received user operation can be considered as an operation that the user needs to perform. The electronic device will then respond to the user operation received by the stylus (such as the first operation) and implement the corresponding function. However, when the stylus is not in a preset posture, the received user operation can be considered as an unintentional operation by the user. The electronic device will not respond to this operation, nor will it implement the corresponding function. This reduces the likelihood of the electronic device erroneously triggering functions due to unintentional user operations, thus improving the user experience.

[0067] In some examples, when this interaction method is applied to a stylus, the stylus determines its current first posture and the first operation received in that first posture. If the first posture is not a preset posture, the stylus sends an instruction to the electronic device, which instructs the electronic device to respond to the first operation and perform the function corresponding to that operation. If the first posture is a preset posture, the stylus does not send an instruction to the electronic device.

[0068] In the above method, when the stylus is in a preset posture, the user operation received by the stylus can be considered as an unintentional action by the user. Therefore, the stylus will not send instruction information to the electronic device, and the electronic device will not respond to the user operation received by the stylus (such as the first operation) to implement the function corresponding to that operation. In this way, the electronic device will reduce the possibility of erroneous function triggering due to unintentional user operations, thus improving the user experience.

[0069] The above interaction method can also be applied to interactive systems. For example, see [link to example]. Figure 2 As shown, the interactive system may include an electronic device 100 and a stylus 200. Furthermore, the electronic device 100 and the stylus 200 are communicatively connected.

[0070] The communication connection between the electronic device 100 and the stylus 200 can be, for example, via Bluetooth or wireless short-range connection.

[0071] The electronic device 100 can receive information sent by the stylus 200 and determine the posture of the stylus 200 and / or the operation received by the stylus 200 based on the information, thereby realizing the corresponding function based on the posture of the stylus 200 and / or the operation received.

[0072] In some examples, the structure of the stylus 200 can be seen in [reference needed]. Figure 3 As shown. The stylus 200 can include at least one sensor. The sensor can be, for example, a touch sensor (such as a touch film or touch screen), an angle sensor (such as a gyroscope), a pressure sensor (or stress plate), etc. Furthermore, the stylus 200 can have multiple sensors of different types installed beneath the stylus's outer casing.

[0073] The touch sensor is used to detect tactile signals. For example, when the stylus 200 is touched by a user's finger, the touch sensor can detect the contact area and position. Furthermore, as the contact area between the finger and the pen increases, the capacitive signal of the touch sensor increases, allowing it to determine the pressure received by the stylus.

[0074] Angle sensors are used to detect the tilt angle of a stylus, such as the angle between the axis of the stylus along its body and the horizontal plane.

[0075] A pressure sensor (or stress plate) can detect the pressure input received by the stylus and determine the magnitude of the pressure.

[0076] The stylus 200 can acquire sensor data through sensors and send this data as information to the electronic device 100. Based on this information, the electronic device 100 can determine the current posture of the stylus 200, the operations received by the stylus 200, and so on. It is understandable that different postures of the stylus 200 and different operations received will result in different sensor data acquired by the sensors, and consequently, different information acquired by the electronic device 100.

[0077] The stylus 200 can be in various postures, such as being attached to the electronic device 100, placed in a certain place, being held, rotating, being held and rotating, being held and sliding, etc.

[0078] The stylus 200 can receive various operations, such as clicking the pen body, double-clicking the pen body, flicking the pen body, and pressing the pen body.

[0079] In some examples, when the stylus 200 is in a preset posture, the electronic device 100 can block the operations received by the stylus 200, or not respond to the operations received by the stylus 200, and thus will not perform the corresponding function. However, when the stylus 200 is in a non-preset posture, the electronic device 100 can respond to the operations received by the stylus 200.

[0080] For example, when the stylus 200 is held and rotated, it may be that the user is rotating the pen. In this case, the user operation received by the stylus 200 is likely to be an unintentional operation by the user, such as clicking or double-clicking the pen body. Therefore, the electronic device 100 will not respond to the user operation to switch the brush or eraser, thereby reducing the possibility of the function being triggered incorrectly due to the user's unintentional operation.

[0081] In some examples, when the stylus 200 is in a preset posture, the electronic device 100 can respond to the operation received by the stylus 200 and perform the corresponding function. However, when the stylus 200 is in a non-preset posture, the electronic device 100 may not respond to the operation received by the stylus 200.

[0082] For example, when the stylus 200 is held horizontally, a double-click on the pen body will cause the electronic device 100 to display multiple ink blots on the screen or canvas, achieving a "gold-sprinkled" effect. However, if the stylus 200 is not held horizontally, a double-click might be a misoperation or unintentional action, in which case the electronic device 100 will not display the "gold-sprinkled" effect. This reduces the possibility of the function being accidentally triggered due to unintentional user actions.

[0083] In some examples, the stylus 200 can also determine its current posture and the received operation based on sensor data, and send information to the electronic device 100 to indicate the posture of the stylus 200 and the received operation.

[0084] In some examples, when the stylus 200 is in a preset posture, it may not send instruction information to the electronic device 100. Therefore, the electronic device 100 will not be aware of the operation received by the stylus 200 and will not perform the corresponding function. However, when the stylus 200 is in a non-preset posture, it can send instruction information to the electronic device 100. The electronic device 100 will then be aware of the operation received by the stylus 200 based on the instruction information and will perform the corresponding function.

[0085] For example, when the stylus 200 is held and rotated, it may be that the user is twirling the pen. In this case, the user operations received by the stylus 200 are likely to be inadvertent operations by the user, such as clicking on the pen body or double - clicking on the pen body. Therefore, the stylus 200 will not send information to the electronic device 100, and thus the electronic device 100 will not switch the brush or eraser, etc., thereby reducing the situation of erroneously triggering functions due to the user's inadvertent actions.

[0086] The above - mentioned electronic device 100 can be a mobile phone, a vehicle - mounted terminal, a wearable device (such as a smart watch, a smart bracelet, etc.), a tablet computer, a laptop computer, or other terminal devices that can communicate with the stylus.

[0087] Taking the electronic device 100 as a mobile phone as an example, in some examples, as shown in Figure 4 the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0088] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0089] The processor 110 may include one or more processing units (not shown in the figure). For example, the processor 110 may include an application processor (AP), a modulation - demodulation processor, an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural - network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors.

[0090] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0091] The processor 110 may also include a memory for storing instructions and data.

[0092] In some examples, processor 110 may include one or more interfaces (not shown in the figure). Interfaces may include inter-integrated circuit (I2C) interfaces, inter-integrated circuit sound (I2S) interfaces, pulse code modulation (PCM) interfaces, universal asynchronous receiver / transmitter (UART) interfaces, mobile industry processor interfaces (MIPI), general-purpose input / output (GPIO) interfaces, subscribing identity module (SIM) interfaces, and / or universal serial bus (USB) interfaces, etc.

[0093] The charging management module 140 receives charging input from a charger, which can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also supply power to electronic devices via the power management module 141.

[0094] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance).

[0095] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0096] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0097] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on the electronic device 100. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0098] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device or displays an image or video through a display screen 194.

[0099] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as Wi-Fi), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module 160 receives electromagnetic waves via antenna 2, modulates and filters the electromagnetic wave signal, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.

[0100] In some examples, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology.

[0101] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering.

[0102] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. In some examples, electronic device 100 may include one or N displays screens 194, where N is a positive integer greater than 1.

[0103] For example, the display screen 194 can display a page, canvas, etc. for drawing or writing, and the user can draw or write on the page or canvas displayed on the display screen 194 using a stylus.

[0104] Electronic device 100 can implement its shooting function through an ISP, camera 193, video codec, GPU, display 194, and application processor. The ISP is used to process data fed back by the camera 193. The camera 193 is used to capture still images or videos. In some examples, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0105] A digital signal processor (DSP) is used to process digital signals, including digital image signals and other digital signals. A video codec is used to compress or decompress digital video. Electronic device 100 may support one or more video codecs.

[0106] NPU stands for Neural Network (NN) computing processor. By drawing inspiration from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can quickly process input information and continuously learn on its own.

[0107] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.

[0108] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121.

[0109] For example, the processor 110 can obtain information from the stylus by executing instructions stored in the internal memory 121, and determine the stylus's posture, received operations, etc. based on the information.

[0110] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170 and application processor.

[0111] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals.

[0112] Button 190 includes the power button, volume buttons, etc. Button 190 can be a mechanical button or a touch button.

[0113] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.

[0114] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0115] The SIM card interface 195 is used to connect the SIM card.

[0116] Based on the above-mentioned electronic device 100, the interaction method in the embodiments of this application can be implemented. When the stylus is in a specific posture, it can either not respond to the operation received by the stylus or respond to the specific operation received by the stylus, thereby reducing the situation where the stylus is erroneously triggered by the user's operation and improving the user experience.

[0117] In some examples, the software system of the aforementioned electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered architecture mobile operating system as an example to exemplify the software structure of the electronic device 100. A layered architecture divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. For example, see [link to example]. Figure 5 As shown, the architecture of the aforementioned electronic device 100 divides the mobile operating system into four layers, from top to bottom: the application layer, the application framework layer, the system service layer, and the kernel layer.

[0118] The application layer can include a series of application packages.

[0119] like Figure 5 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0120] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions.

[0121] like Figure 5 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0122] The window manager manages window programs. The content provider stores and retrieves data, making it accessible to applications. The view system includes visual controls, such as controls for displaying text and images. The phone manager provides communication functionality for electronic devices, such as managing call status (connection, hang-up, etc.). The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, etc. The notification manager allows applications to display notifications in the status bar, conveying informative messages that can disappear automatically after a short pause without user interaction. Notifications can also appear as icons or scrollbar text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen, such as displaying text messages in the status bar, emitting sounds, vibrating electronic devices, or flashing indicator lights.

[0123] The system service layer can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL, Vulkan), etc.

[0124] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0125] The media library supports playback and recording of various commonly used audio and video formats, as well as still image files.

[0126] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0127] A 2D graphics engine is a graphics engine for 2D drawing.

[0128] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0129] Based on the above-mentioned electronic device 100, the interaction method in the embodiments of this application can be implemented. When the stylus is in a specific posture, it can either not respond to the operation received by the stylus or respond to the specific operation received by the stylus, thereby reducing the situation where the stylus is erroneously triggered by the user's operation and improving the user experience.

[0130] The following uses a tablet computer as an example to further explain the above interaction method.

[0131] In some embodiments, see Figure 6 As shown, the above interaction method may include the following steps S601-S605.

[0132] S601, the stylus obtains the first information.

[0133] The first piece of information is generated based on sensor data acquired by at least one sensor on the stylus.

[0134] Sensors on a stylus can include touch sensors, angle sensors (such as gyroscopes), pressure sensors, etc.

[0135] In some examples, part of the first information is used to indicate the operation received by the stylus. For example, this information can also be called operation information. The sensor data that generates this information can be continuously acquired by the sensor. For example, the stylus can acquire this information at preset time intervals or preset time periods. Alternatively, this information can be passively acquired after the stylus receives an operation. For example, when the user double-clicks the pen body, the pressure sensor on the pen body will acquire pressure data.

[0136] When the stylus does not receive user input, the multiple input information entries it continuously acquires are the same. When the stylus receives user input, the input information it acquires changes.

[0137] In some examples, another part of the first information is used to indicate the pen's posture. For example, this information can also be called posture information. The sensor data that generates this information is continuously acquired. For example, the pen can acquire this information at preset time intervals or preset time periods; or, the pen can acquire posture information after acquiring operation data.

[0138] When the stylus is stationary, the multiple posture information acquired by the stylus during this period are the same, indicating that the stylus's state has not changed. When the stylus's posture changes, the multiple posture information acquired by the stylus during this period are different.

[0139] S602, the stylus sends the first message to the tablet computer.

[0140] In some examples, in order for the tablet computer to understand the changes in the pen's posture and / or whether the pen has received user input more promptly, the pen can continuously send initial information to the tablet computer so that the tablet computer can promptly know the pen's posture, received user input, etc.

[0141] S603. The tablet computer determines the current first posture of the stylus and the first operation received by the stylus in the first posture based on the first information.

[0142] In some examples, since the tablet can receive multiple first messages continuously sent by the stylus, the tablet can determine the stylus's posture changes based on the received multiple first messages, and thus determine the stylus's current first posture.

[0143] The tablet computer can determine the stylus's posture changes based on at least two pieces of first information. The time difference between acquiring two adjacent pieces of first information is within a preset time range. The stylus's posture changes indicate at least one of the following: changes in the stylus's tilt angle when held, changes in the position of the stylus when held, and changes in the area of ​​the stylus when held.

[0144] For example, information 1 includes the contact area (or sensor capacitance) S1 and the contact position (i.e., the distance between the touch sensor and the pen tip) L1 of the stylus being touched, obtained by the touch sensor of the stylus at time T1, and information 2 includes the contact area S2 and the contact position L2 of the stylus being touched, obtained by the touch sensor of the stylus at time T2, wherein the time difference between time T1 and time T2 is 2 seconds.

[0145] See Figure 7 As shown in (a), the tablet computer determines that S1 and S2 are within a preset area range (a1, a2), and L1 and L2 are within a preset length range (b1, b2), thus determining that the stylus is being held. Then, the tablet computer determines that the area change value ΔS between S1 and S2 is within a preset area change range (c1, c2), and the position change value ΔL between L1 and L2 is within a preset length change range (d1, d2), thus determining that the stylus's grip has changed; the stylus may be rotated or slid (e.g., the stylus slides in the user's hand).

[0146] For example, information 1 includes the contact area S1 and contact position L1 of the stylus being touched, obtained by the stylus's touch sensor at time T1, and also includes the stylus's tilt angle α1 obtained by the angle sensor at time T1; information 2 includes the contact area S2 and contact position L2 of the stylus being touched, obtained by the stylus's touch sensor at time T2, and also includes the stylus's tilt angle α2 obtained by the angle sensor at time T2; information 3 includes the contact area S3 and contact position L3 of the stylus being touched, obtained by the stylus's touch sensor at time T3, and also includes the stylus's tilt angle α3 obtained by the angle sensor at time T3. The time difference between time T1 and time T2 is 1 second, and the time difference between time T2 and time T3 is 1 second.

[0147] See Figure 7 As shown in (b), the tablet computer determines that S1, S2, and S3 are within a preset area range (a1, a2), and L1, L2, and L3 are within a preset length range (b1, b2), thus determining that the stylus is being held. Then, the tablet computer determines that the angle change value Δα1 between α1 and α2 and the angle change value Δα2 between α2 and α3 are within a preset angle change range (e1, e2), thus determining that the stylus's grip has changed; the stylus may be rotated or slid while being held.

[0148] See Figure 7 As shown in (c), the tablet computer determines that S1, S2, and S3 are within a preset area range (a1, a2), and L1, L2, and L3 are within a preset length range (b1, b2), thus determining that the stylus is being held. Then, the tablet computer determines that the area change value ΔS1 between S1 and S2 and the area change value ΔS2 between S2 and S3 are within a preset area change range (c1, c2), the position change value ΔL1 between L1 and L2 and the position change value ΔL2 between L2 and L3 are within a preset length change range (d1, d2), and the angle change value Δα1 between α1 and α2 and the angle change value Δα2 between α2 and α3 are within a preset angle change range (e1, e2), thus determining that the stylus's grip has changed, and the stylus may be being rotated or slid while being held.

[0149] In the example above, the tablet computer can more accurately determine the posture of the stylus by using data or information from multiple sensors, which makes it easier to respond more accurately or not respond at all, thus improving the user experience.

[0150] In some examples, because the tablet can receive multiple first messages continuously sent by the stylus, it can determine the first operation received by the stylus when it is in the first posture based on at least one first message received while the stylus is in the first posture. Specifically, if the stylus receives a time-sensitive operation such as a click or double-click, the tablet can determine the corresponding operation based on a single received first message. However, if the stylus receives a more sequential operation such as a flick or shake, the tablet needs to determine the corresponding operation based on multiple first messages received over a period of time.

[0151] S604. If the first posture is not a preset posture, the tablet computer responds to the first operation and implements the function corresponding to the first operation.

[0152] In some examples, the preset posture may include the stylus being held and rotated and / or the stylus being held and slid, while the non-preset posture is any posture other than the stylus being held and rotated and the stylus being held and slid.

[0153] When the stylus is not in a preset posture, meaning it is not being held and rotated and / or swiped, any user actions received by the stylus can be considered as actions the user actually intends to perform, not unintentional. In this case, the tablet can respond to the user action received by the stylus (such as the first action) and implement the corresponding function. The first action can be, for example, at least one of tapping, double-tapping, or pressing the stylus. This way, the tablet will respond promptly to user actions related to the stylus, providing a better user experience.

[0154] In some examples, the first operation can be an operation performed on the stylus by the same hand holding it, or, when the stylus is held by one hand, the first operation can be an operation performed on the stylus by the other hand.

[0155] In some examples, taking a user drawing on a tablet with a stylus as an example, the function corresponding to the first operation that the tablet can perform may include: switching the first brush corresponding to the stylus on the tablet to the second brush; or, switching the brush corresponding to the stylus on the tablet to the eraser; or, switching the eraser corresponding to the stylus on the tablet to the brush.

[0156] For example Figure 8 As shown in (a), the stylus is in a non-preset posture, and the tablet computer responds to the user's double-tap operation on the stylus by switching the corresponding brush 1 on the tablet computer to brush 2; or, for example, Figure 8As shown in (b), when the stylus is in a non-preset posture, the tablet responds to the user's pressing action on the stylus by switching the corresponding brush on the tablet to the eraser; or, for example... Figure 8 As shown in (c), when the stylus is in a non-preset posture, the tablet responds to the user's double-tap operation on the stylus body and switches the corresponding eraser on the tablet to a brush.

[0157] S605. If the first posture is a preset posture, the tablet computer will not respond to the first operation.

[0158] When the stylus is in a preset posture, it means that the stylus is being held and rotated and / or held and slid. In this case, the user operation received by the stylus can be regarded as being made unintentionally by the user. In this case, the tablet will not respond to the user operation received by the stylus (such as the first operation) and will not implement the function corresponding to the operation.

[0159] For example Figure 9 As shown in (a), the stylus is held and rotated by the user's hand. During this process, the user's hand accidentally double-clicks the stylus. In this case, the tablet computer does not respond. Another example... Figure 9 As shown in (b), the stylus is held and slid by the user. During this process, the user's other hand accidentally taps the pen body. In this case, the tablet computer does not respond.

[0160] In some examples, when using a stylus, if a user's fingers are sweaty, they may shift their grip position. This can be seen as the stylus being slid by the user's grip, and during this movement, the finger may unintentionally tap, double-tap, or press the pen body. Alternatively, if a user holds the stylus in the same position for a long time, they may become uncomfortable, and they will also shift their grip position. This can also be seen as the stylus being slid by the user's grip, and during this movement, the finger may unintentionally tap, double-tap, or press the pen body.

[0161] In some examples, if a user feels uncomfortable holding the stylus in the same position for a long time, the user will move their fingers while holding the stylus. In this case, the stylus may slide on the user's hand or rotate slightly on the user's hand. During this process, the user's fingers may also unintentionally click, double-click or press the pen body.

[0162] This will reduce the chances of tablets accidentally triggering functions due to unintentional user actions, thus improving the user experience.

[0163] In some embodiments, see Figure 10As shown, the above interaction method may include the following steps S1001-S1004.

[0164] S1001, The stylus obtains the first information.

[0165] The method by which the stylus acquires the first information can be referred to in the aforementioned embodiments, and will not be repeated here.

[0166] S1002, The stylus sends the first message to the tablet computer.

[0167] The method by which the stylus sends the first information to the tablet computer can be referred to in the aforementioned embodiments, and will not be repeated here.

[0168] S1003. The tablet computer determines the current first posture of the stylus and the first operation received by the stylus in the first posture based on the first information.

[0169] The method by which the tablet computer determines the first posture and the first operation can be referred to the aforementioned embodiments, and will not be repeated here.

[0170] S1004. If the first posture is a preset posture, then respond to the first operation and the tablet computer implements the function corresponding to the first operation.

[0171] In some examples, the preset posture may include holding the stylus horizontally or vertically. Furthermore, the first operation may include at least one of the following: tapping the pen body, double-tapping the pen body, or flicking the pen body. In some examples, the first operation may further include tapping the pen body at a preset location, double-tapping the pen body at a preset location, or tapping at a preset speed.

[0172] In some examples, the first operation can be an operation performed on the stylus by the same hand holding it, or, when the stylus is held by one hand, the first operation can be an operation performed on the stylus by the other hand.

[0173] In some examples, taking a user drawing on a tablet with a stylus as an example, the function corresponding to the first operation on the tablet can include displaying ink marks at at least one location on the page or canvas displayed on the tablet.

[0174] For example Figure 11 As shown in (a), the stylus is held horizontally by the user's hand. If the user double-tap the stylus with the same hand, the tablet responds by displaying multiple ink blots on the canvas, thus achieving a "gold-sprinkled" effect; or, for example... Figure 11 As shown in (b), the stylus is held vertically by the user's one hand. If the user's other hand taps the end of the stylus, the tablet responds to the operation by displaying multiple ink blots on the canvas, thus achieving the "sprinkled gold" effect.

[0175] In the above interaction method, when the stylus is in a preset posture, the received user operation can be considered as an operation that the user needs to perform. The tablet will then respond to the user operation received by the stylus (such as the first operation) and implement the corresponding function. However, when the stylus is not in a preset posture, the received user operation can be considered as an unintentional operation by the user. The tablet will not respond to this operation, nor will it implement the corresponding function. This reduces the likelihood of the tablet erroneously triggering functions due to unintentional user operations, thus improving the user experience.

[0176] In other examples, both holding the stylus horizontally and holding it vertically can be considered as holding the stylus. Furthermore, for example, holding the stylus can also be categorized as holding it with one hand or with both hands. When the stylus is held, if it receives a first operation, the tablet computer can also respond to that operation and perform the corresponding function.

[0177] For example, when the stylus is held, if the stylus receives a double-tap operation, the tablet will also respond to the operation by displaying multiple ink marks on the canvas, thus achieving the "sprinkled gold" effect.

[0178] In other examples, the aforementioned preset posture may also include holding the stylus at an angle, and the first operation may also include pressing the pen body with a preset force and double-tapping (or clicking) the pen body. When the stylus is held at an angle, if the stylus receives a certain force of pressing the pen body or a double-tapping operation, the tablet computer can respond to these operations and perform the corresponding functions.

[0179] For example, see Figure 12 As shown in (a), the tablet computer determines that the contact area S of the stylus being touched is within a preset area range (a1, a2), and the contact position L of the stylus being touched is within a preset length range (b1, b2), thus determining that the stylus is being held. Then, the tablet computer determines that the tilt angle α of the stylus is within a preset angle range (f1, f2), the pressing pressure F received by the stylus is within a preset pressure range (m1, m2), and the clicking speed V of the stylus is within a preset speed range (n1, n2), thus determining that the stylus is being held at an angle, and that the stylus is being pressed with a preset force and clicked with a preset speed, or stylus vibration.

[0180] For example, see Figure 12 As shown in (b), the stylus is held at a tilt angle (such as α) within a preset angle range. The stylus also receives a pressing operation on the pen body and a double-click operation on the pen body within a preset pressure range. The tablet computer responds to these operations by displaying multiple ink marks on the canvas, thereby achieving the "sprinkled gold" effect.

[0181] In other examples, the tablet can also directly respond to the first action received by the stylus to perform the corresponding function, regardless of the stylus's posture. This first action can be a specific user action, such as pressing or flicking the pen.

[0182] As can be seen from the above embodiments, users can perform various operations on the stylus to trigger the tablet computer to perform corresponding functions, making the interaction between the stylus and the tablet computer more diverse and providing users with a better interactive experience.

[0183] In some embodiments, see Figure 13 As shown, the above interaction method may include the following steps S1301-S1304.

[0184] S1301, The stylus obtains the first information.

[0185] The method by which the stylus acquires the first information can be referred to in the aforementioned embodiments, and will not be repeated here.

[0186] S1302. The stylus determines its current first posture and the first operation received by the stylus in the first posture based on the first information.

[0187] The method by which the stylus determines the first posture and the first operation can refer to the method by which the tablet computer determines the first posture and the first operation in the previous embodiment, and will not be repeated here.

[0188] S1303. If the first posture is not a preset posture, the stylus sends instruction information to the electronic device.

[0189] The indication information is used to instruct the electronic device to respond to the first operation and perform the function corresponding to the first operation.

[0190] In some examples, the preset posture may include the stylus being held and rotated and / or the stylus being held and slid.

[0191] When the stylus is not in a preset posture, meaning it is not being held and rotated and / or slid, any user actions received by the stylus can be considered as genuine user intentions, not unintentional actions. In this case, the stylus can send instructions to the tablet, directing the tablet to respond to the received user action (such as the first action) and perform the corresponding function. The first action can be, for example, at least one of tapping, double-tapping, or pressing the stylus. This way, the tablet will also respond promptly to user actions related to the stylus, providing a better user experience.

[0192] In some examples, the first operation can be an operation performed on the stylus by the same hand holding it, or, when the stylus is held by one hand, the first operation can be an operation performed on the stylus by the other hand.

[0193] S1304. If the first posture is a preset posture, the stylus does not send instruction information to the electronic device.

[0194] When the stylus is in a preset posture, indicating that it is being held and rotated and / or slid, the user operation received by the stylus can be considered as unintentional. In this case, the stylus will not send any instructions to the tablet, and the tablet will not respond to the user operation received by the stylus (such as the first operation) to implement the corresponding function. This reduces the likelihood of the tablet erroneously triggering functions due to unintentional user actions, thus improving the user experience.

[0195] In other embodiments, after the stylus is disconnected from the tablet, the user can shake the stylus to trigger a reconnection between the stylus and the tablet, for example... Figure 14 As shown in the image, the effect simulates a real ballpoint pen running out of ink and then refilling after being flicked, making the interaction more natural and providing users with a more realistic interactive experience.

[0196] The above embodiments all take the interaction between a tablet computer and a stylus as an example to illustrate the above interaction method. In other embodiments, the above interaction method can also be applied to the interaction between an in-vehicle terminal and a stylus, the interaction between a wearable device and a stylus, and the interaction between a laptop computer and a stylus. The specific interaction process can be referred to the foregoing embodiments, and will not be repeated here.

[0197] In some solutions, multiple embodiments of this application can be combined, and the combined solution can be implemented. Optionally, some operations in the processes of each method embodiment may be combined, and / or the order of some operations may be changed. Furthermore, the execution order between the steps of each process is merely exemplary and does not constitute a limitation on the execution order between steps; other execution orders are also possible. It is not intended to indicate that the execution order is the only possible order in which these operations can be performed. Those skilled in the art will conceive of various ways to reorder the operations described in the embodiments of this application. In addition, it should be noted that the process details involved in one embodiment of this application are also applicable to other embodiments in a similar manner, or different embodiments may be combined.

[0198] Furthermore, some steps in the method embodiments can be equivalently replaced with other possible steps. Alternatively, some steps in the method embodiments may be optional and can be deleted in certain use cases. Or, other possible steps may be added to the method embodiments.

[0199] Furthermore, the various method embodiments can be implemented individually or in combination.

[0200] It is understood that, in order to achieve the above functions, the aforementioned electronic device includes hardware and / or software modules corresponding to perform each function. Based on the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0201] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0202] This application also provides an electronic device, such as... Figure 15 As shown, the electronic device may include one or more processors 1501, memory 1502 and communication interfaces 1503.

[0203] The memory 1502, communication interface 1503, and processor 1501 are coupled together. For example, the memory 1502, communication interface 1503, and processor 1501 can be coupled together via bus 1504.

[0204] The communication interface 1503 is used for data transmission with other devices. The memory 1502 stores computer program code. The computer program code includes computer instructions, which, when executed by the processor 1501, cause the electronic device to perform the interaction method described in this embodiment.

[0205] The processor 1501 may be a processor or controller, such as a CPU, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0206] The bus 1504 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1504 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 15 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0207] This application also provides a stylus, which may include one or more processors, memory and communication interfaces.

[0208] The memory, communication interface, and processor are coupled together. For example, the memory, communication interface, and processor can be coupled together via a bus.

[0209] The communication interface is used for data transmission with other devices. The memory stores computer program code. The computer program code includes computer instructions, which, when executed by the processor, cause the stylus to perform the interaction method described in this embodiment.

[0210] The processor can be a processor or controller, such as a CPU, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0211] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. These buses can be categorized as address buses, data buses, control buses, etc.

[0212] This application also provides a computer-readable storage medium that includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the relevant method steps in the above method embodiments; or, when the computer instructions are executed on a stylus, the stylus performs the relevant method steps in the above method embodiments.

[0213] This application also provides a computer program product that, when run on a computer, causes the computer to execute the relevant method steps described in the above method embodiments.

[0214] The electronic devices, styluses, computer-readable storage media, or computer program products provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0215] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0216] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0217] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0218] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0219] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0220] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An interaction method, characterized in that, The method is applied to an electronic device that establishes a communication connection with a stylus; the method includes: Determine the current first posture of the stylus and the first operation received by the stylus in the first posture; If the first posture is not a preset posture, then respond to the first operation and implement the function corresponding to the first operation; If the first posture is a preset posture, then the first operation will not be responded to.

2. The method according to claim 1, characterized in that, Determining the current first posture of the stylus includes: Receive multiple first messages continuously sent by the stylus; the first messages are generated based on sensor data acquired by at least one sensor on the stylus; The posture change of the stylus is determined based on at least two pieces of the first information; the acquisition time difference between two adjacent pieces of the first information is within a preset time range; Based on the changes in the posture of the stylus, the current first posture of the stylus is determined.

3. The method according to claim 2, characterized in that, Determining the first operation received by the stylus in the first posture includes: The first operation is determined based on at least one piece of the first information sent by the stylus in the first posture.

4. The method according to claim 2 or 3, characterized in that, The posture changes of the stylus are used to indicate at least one of the following: the change in the pen body tilt angle when the stylus is held, the change in the touch position of the pen body when the stylus is held, and the change in the touch area of ​​the pen body when the stylus is held; the at least one sensor includes at least one of the following: a pressure sensor, a touch sensor, or an angle sensor.

5. The method according to any one of claims 1-4, characterized in that, The preset posture includes the stylus being held and rotated and / or the stylus being held and slid; the first operation includes at least one of the following: clicking the pen body, double-clicking the pen body, or pressing the pen body.

6. The method according to any one of claims 1-5, characterized in that, The function corresponding to the first operation includes: switching the first brush of the stylus on the electronic device to the second brush. Alternatively, the brush corresponding to the stylus on the electronic device can be switched to an eraser. Alternatively, the eraser corresponding to the stylus on the electronic device can be switched to a brush.

7. An interaction method, characterized in that, The method is applied to an electronic device that establishes a communication connection with a stylus; the method includes: Determine the current first posture of the stylus and the first operation received by the stylus in the first posture; If the first posture is a preset posture, then respond to the first operation and realize the function corresponding to the first operation; the preset posture includes the stylus being held horizontally or the stylus being held vertically.

8. The method according to claim 7, characterized in that, The function corresponding to the first operation includes: displaying ink marks at at least one location on the page displayed on the electronic device.

9. The method according to claim 7 or 8, characterized in that, The first operation includes at least one of the following: clicking the pen body, double-clicking the pen body, or flicking the pen body.

10. An interaction method, characterized in that, The method is applied to a stylus, which establishes a communication connection with an electronic device; the method includes: Determine the current first posture and the first operation received in the first posture; If the first posture is not a preset posture, then an indication message is sent to the electronic device. The indication message is used to instruct the electronic device to respond to the first operation and realize the function corresponding to the first operation. If the first posture is a preset posture, then the instruction information is not sent to the electronic device.

11. The method according to claim 10, characterized in that, The preset posture includes the stylus being held and rotated and / or the stylus being held and slid; the first operation includes at least one of the following: clicking the pen body, double-clicking the pen body, or pressing the pen body.

12. An electronic device, characterized in that, The device includes a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the interaction method as described in any one of claims 1-6, or to perform the interaction method as described in any one of claims 7-9.

13. A stylus, characterized in that, The device includes a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the interaction method as described in claim 10 or 11.

14. A computer-readable storage medium, characterized in that, The computer instructions, when executed on an electronic device, cause the electronic device to perform the interaction method as described in any one of claims 1-6, or to perform the interaction method as described in any one of claims 7-9; or, when executed on a stylus, cause the stylus to perform the interaction method as described in claim 10 or 11.

15. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the interaction method as described in any one of claims 1-6, or the interaction method as described in any one of claims 7-9, or the interaction method as described in claim 10 or 11.