Interaction method, stylus, and electronic device
Activating the electronic device function through stylus detection and pressing actions, solving the problems of frequent user interaction and screen occupation, and achieving efficient and friendly function activation.
Patent Information
- Application Number
- CN202210313717.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-03-28
AI Technical Summary
When activating the functions of certain applications installed on electronic devices, users need to frequently interact with the interface, increase workload and occupy screen space.
Detect target actions, such as pen swing and pressing actions, send messages to electronic devices to request activation or switching functions, and avoid user interaction with the interface.
Reduce user workload, improve efficiency, avoid screen occupation, reduce the risk of misoperation, and is suitable for users of all ages.
Smart Images

Figure CN114816086B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technologies, and more particularly, to an interaction method, a stylus, and an electronic device. Background Art
[0002] Currently, certain functions of some applications installed on an electronic device can be activated by a stylus that is connected to the electronic device.
[0003] When activating certain functions of some applications installed on an electronic device by a stylus, the user often needs to use the stylus to interact with a relevant interface in the electronic device.
[0004] However, if the user needs to frequently activate certain functions of some applications installed on the electronic device, in this case, the user needs to frequently interact with the above-mentioned interface. During the interaction with the above-mentioned interface, the user needs to frequently pop up and hide the interface, which not only increases the user's workload and thus affects efficiency, but also the pop-up of the interface occupies the screen space of the electronic device. Summary of the Invention
[0005] This application provides an interaction method, a stylus, and an electronic device. When activating a first function, this method does not require the user to interact with a relevant interface in the electronic device through the stylus. Therefore, the user's workload can be reduced, and thus the efficiency can be improved. In addition, since this solution does not require a relevant interface to pop up when activating the first function, this solution can avoid occupying the screen of the electronic device when activating the first function.
[0006] In a first aspect, an interaction method is provided. This method is applied to an interaction scenario between a stylus and an electronic device, and includes: when the stylus detects a target action, in response to the target action, the stylus sends a first message to the electronic device, where the first message requests the electronic device to activate a first function corresponding to the target action, and the first function is a system function inside the electronic device or a function of a first application in the electronic device. Among them, the target action includes a detected first action and at least one pen-swinging action, and the first action is a user action detected at the end of the stylus other than the at least one pen-swinging action.
[0007] Based on the above technical solution, if the stylus detects a target action, in this case, the stylus can consider that the user requests the electronic device to activate the first function through the target action. The stylus responds to at least one pen-swinging action of the user and requests the electronic device to activate the first function through a first message. The electronic device activates the first function according to the request of the stylus. Since this solution does not require the user to interact with the relevant interface in the electronic device through the stylus when activating the first function, it can reduce the workload of the user and thus improve efficiency. In addition, since this solution does not require a relevant interface to pop up when activating the first function, this solution can avoid occupying the screen of the electronic device when activating the first function.
[0008] In addition to the above beneficial effects, compared with solely using the pen-swinging action as the condition for determining whether to trigger the electronic device to activate the first function, when this method has the beneficial effect that when solely using the pen-swinging action as the condition for determining whether to trigger the electronic device to activate the first function, since the pen-swinging action is more in line with the user's usage habits of the stylus in real life and is easier to learn and remember, it is more user-friendly for all-age users of the stylus. By combining the pen-swinging action with the first action as the condition for determining whether to trigger the electronic device to activate the first function, in other words, only when the stylus detects both the pen-swinging action and the first action, the stylus will trigger the electronic device to activate the first function. Therefore, this method can also reduce the risk of the stylus triggering the electronic device to activate the first function due to the user's misoperation (for example, the user accidentally swings the stylus due to hand fatigue).
[0009] Combined with the first aspect, in some implementation manners of the first aspect, after detecting the target action, if the stylus detects the target action again, in response to the detected target action again, a second message is sent to the electronic device, and the second message requests the electronic device to switch the currently activated function from the first function to the second function, where the second function is the function that was activated before the first function was activated, or the second message requests the electronic device to turn off the first function, or the second message requests the electronic device to activate the first function again.
[0010] Based on the above technical solution, when the stylus detects a target action once and then detects the target action again, the stylus sends a second message to the electronic device, so that the electronic device switches the currently activated function from the first function to the second function according to the second message, so that it is possible to switch back and forth between two functions according to multiple detected target actions. For example, if the stylus detects the target action again after the first two detected target actions, the stylus can request the electronic device to switch the currently activated function from the second function to the first function, and so on.
[0011] Combined with the first aspect and the above implementation, in some implementations of the first aspect, the at least one pen flicking action is a pen flicking action that meets a preset condition, and the preset condition includes: the acceleration corresponding to the at least one pen flicking action is greater than or equal to a preset acceleration.
[0012] Based on the above technical solution, by setting a preset condition: only when the acceleration corresponding to the at least one pen flicking action is greater than or equal to a preset acceleration, the electronic device will be triggered to activate or deactivate the corresponding function, thereby further reducing the risk of the electronic device being activated or deactivated due to the user's accidental operation.
[0013] Combined with the first aspect and the above implementation, in some implementations of the first aspect, the preset condition further includes: the interval between the occurrence times of any two adjacent pen flicking actions among the at least two pen flicking actions is less than or equal to a preset time length.
[0014] Based on the above technical solution, by setting a preset condition: only when the interval between the occurrence times of any two adjacent pen flicking actions among the at least two pen flicking actions is less than or equal to a preset time length, the electronic device will be triggered to activate or deactivate the corresponding function, thereby further reducing the risk of the electronic device being activated or deactivated due to the user's accidental operation.
[0015] Combined with the first aspect and the above implementation, in some implementations of the first aspect, the first action includes a pressing action detected at the tail end of the stylus.
[0016] Combined with the first aspect and the above implementation, in some implementations of the first aspect, the method further includes: receiving an instruction or operation input by the user, where the instruction or operation input by the user is used to indicate that the first function is associated with the target action; determining, according to the instruction or operation input by the user, that the first function is associated with the target action.
[0017] Combined with the first aspect and the above implementation, in some implementations of the first aspect, the first message further indicates the first function to the electronic device.
[0018] Second aspect, there is provided an interaction method, which is applied to an interaction scenario between a stylus and an electronic device, including: receiving a first message from the stylus, the first message requesting the electronic device to activate a first function corresponding to a target action detected by the stylus, where the first function is a system function inside the electronic device or a function of a first application in the electronic device, and where the target action includes a detected first action and at least one pen flicking action, and the first action is a user action detected at the end of the stylus other than the at least one pen flicking action; activating the first function according to the first message.
[0019] Based on the above technical solution, if the stylus detects a target action, in this case, the stylus can consider that the user requests the electronic device to activate the first function through the target action. The stylus responds to at least one pen flicking action of the user and requests the electronic device to activate the first function through the first message, and the electronic device activates the first function according to the request of the stylus. Since this solution does not require the user to interact with a relevant interface in the electronic device when activating the first function, the workload of the user can be reduced, and thus the efficiency can be improved. In addition, since this solution does not require a relevant interface to pop up when activating the first function, this solution can avoid occupying the screen of the electronic device when activating the first function.
[0020] In addition to the above beneficial effects, compared with separately using the pen flicking action as a condition for determining whether to trigger the electronic device to activate the first function, when this method has the beneficial effect that when separately using the pen flicking action as a condition for determining whether to trigger the electronic device to activate the first function, since the pen flicking action is more in line with the user's usage habit of the stylus in real life and is easier to learn and remember, it is more friendly to users of all ages of the stylus. By combining the pen flicking action with the first action as a condition for determining whether to trigger the electronic device to activate the first function, in other words, only when the stylus detects both the pen flicking action and the first action, the stylus will trigger the electronic device to activate the first function. Therefore, this method can also reduce the risk that the stylus triggers the electronic device to activate the first function due to the user's misoperation (for example, the user accidentally flicks the stylus due to hand soreness).
[0021] In combination with the second aspect, in some implementations of the second aspect, the method further includes: receiving a second message from the stylus, the second message requesting the electronic device to switch the currently activated function from the first function to a second function, the second function being a function that was activated before the first function was activated, the second message being sent when the stylus detects the target action again, where the target action includes a first action detected again and at least one pen flicking action detected again, the first action being a user action detected at the end of the stylus other than the at least one pen flicking action; according to the second message, switching the currently activated function from the first function to the second function.
[0022] Based on the above technical solution, when the stylus detects the target action once and then detects the target action again, the stylus sends a second message to the electronic device, so that the electronic device, according to the second message, switches the currently activated function from the first function to the second function, so that it is possible to switch back and forth between two functions according to the target action detected multiple times. For example, if the stylus detects the target action again after the first two detected target actions, the stylus can request the electronic device to switch the currently activated function from the second function to the first function, and so on.
[0023] In combination with the second aspect and the above implementation, in some implementations of the second aspect, the method further includes: receiving a second message from the stylus, the second message requesting the electronic device to turn off the first function, the second message being sent when the stylus detects the target action again, where the target action includes a first action detected again and at least one pen flicking action detected again, the first action being a user action detected at the end of the stylus other than the at least one pen flicking action; according to the second message, turning off the first function.
[0024] Based on the above technical solution, when the stylus detects the target action once and then detects the target action again, the stylus sends a second message to the electronic device, so that the electronic device, according to the second message, turns off the first function, so that it is possible to activate or turn off the first function according to the target action detected multiple times. For example, if the stylus detects the target action again after the first two detected target actions, the stylus can request the electronic device to activate the first function again, and so on.
[0025] Combined with the second aspect and the above implementation manners, in some implementation manners of the second aspect, the method further includes: receiving a second message from the stylus, where the second message requests the electronic device to activate the first function again, and the second message is sent when the stylus detects the target action again, where the target action includes a first action detected again and at least one pen-swinging action detected again, and the first action is a user action detected at the tail end of the stylus other than the at least one pen-swinging action; and activating the first function again according to the second message.
[0026] Based on the above technical solution, when the stylus detects a target action once and then detects the target action again, the stylus sends a second message to the electronic device so that the electronic device activates the first function again according to the second message, so that the first function can be repeatedly activated according to the target actions detected multiple times. For example, if the stylus detects a target action again after detecting the target actions in the previous two times, the stylus can request the electronic device to activate the first function again, and so on.
[0027] Combined with the second aspect and the above implementation manners, in some implementation manners of the second aspect, the at least one pen-swinging action is a pen-swinging action that meets a preset condition, and the preset condition includes: the acceleration corresponding to the at least one pen-swinging action is greater than or equal to a preset acceleration.
[0028] Based on the above technical solution, by setting a preset condition: only when the acceleration corresponding to the at least one pen-swinging action is greater than or equal to the preset acceleration, the electronic device will be triggered to activate or deactivate the corresponding function, thereby further reducing the risk of the electronic device activating or deactivating the corresponding function due to the user's misoperation.
[0029] Combined with the second aspect and the above implementation manners, in some implementation manners of the second aspect, the preset condition further includes: the interval between the occurrence times of any two adjacent pen-swinging actions among the at least two pen-swinging actions is less than or equal to a preset time length.
[0030] Based on the above technical solution, by setting a preset condition: only when the interval between the occurrence times of any two adjacent pen-swinging actions among the at least two pen-swinging actions is less than or equal to the preset time length, the electronic device will be triggered to activate or deactivate the corresponding function, thereby further reducing the risk of the electronic device activating or deactivating the corresponding function due to the user's misoperation.
[0031] Combined with the second aspect and the above implementation manners, in some implementation manners of the second aspect, the first action includes a pressing action detected at the tail end of the stylus.
[0032] Combined with the second aspect and the above implementation manners, in some implementation manners of the second aspect, the method further includes: receiving an instruction or an operation input by a user, where the instruction or the operation input by the user is used to indicate that the first function is associated with the target action; and determining, according to the instruction or the operation input by the user, that the first function is associated with the target action.
[0033] Combined with the second aspect and the above implementation manners, in some implementation manners of the second aspect, the first message further indicates the first function to the electronic device.
[0034] In a third aspect, the present application provides a device, which is included in a stylus. The device has a function of implementing the behavior of the stylus in any possible implementation manner of the first aspect and the above first aspect. The function can be implemented by hardware or by hardware executing corresponding software.
[0035] In a fourth aspect, the present application provides a device, which is included in an electronic device. The device has a function of implementing the behavior of the electronic device in any possible implementation manner of the second aspect and the above second aspect. The function can be implemented by hardware or by hardware executing corresponding software.
[0036] In a fifth aspect, the present application provides a stylus, including: one or more processors; a memory; a plurality of applications; and one or more computer programs. Among them, the one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the stylus, the stylus is caused to execute the interaction method in any possible implementation manner of the first aspect.
[0037] In a sixth aspect, the present application provides an electronic device, including: one or more processors; a memory; a plurality of applications; and one or more computer programs. Among them, the one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device is caused to execute the interaction method in any possible implementation manner of the second aspect.
[0038] In a seventh aspect, the present application provides a stylus, including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code. The computer program code includes computer instructions. When the one or more processors execute the computer instructions, the stylus is caused to execute the interaction method in any possible implementation manner of the first aspect.
[0039] In an eighth aspect, the present application provides an electronic device, including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are configured to store computer program code, where the computer program code includes computer instructions. When the one or more processors execute the computer instructions, the electronic device is caused to execute the interaction method in any possible implementation of the above second aspect.
[0040] In a ninth aspect, the present application provides a computer-readable storage medium, including computer instructions. When the computer instructions run on a stylus, the stylus is caused to execute the interaction method in any possible implementation of the above first aspect.
[0041] In a tenth aspect, the present application provides a computer-readable storage medium, including computer instructions. When the computer instructions run on an electronic device, the electronic device is caused to execute the interaction method in any possible implementation of the above second aspect.
[0042] In an eleventh aspect, the present application provides a computer program product. When the computer program product runs on a stylus, the stylus is caused to execute the interaction method in any possible implementation of the above first aspect.
[0043] In a twelfth aspect, the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device is caused to execute the interaction method in any possible implementation of the above second aspect. Description of the Drawings
[0044] Figure 1 is a schematic structural diagram of a stylus provided by the present application;
[0045] Figure 2 is a schematic diagram of external features of a stylus provided by the present application;
[0046] Figure 3 is a schematic structural diagram of an electronic device provided by the present application;
[0047] Figure 4 is an interaction flowchart of an interaction method provided by the present application;
[0048] Figure 5 is a schematic diagram of a user's hand movement when applying a target action to a stylus provided by the present application;
[0049] Figure 6 is a schematic diagram of another user's hand movement when applying a target action to a stylus provided by the present application;
[0050] Figure 7 is a schematic diagram of a display interface provided by the present application;
[0051] Figure 8 This is a schematic diagram of another display interface provided by this application. Detailed implementation manners
[0052] Next, the technical solutions in this application will be described with reference to the accompanying drawings in this application. Among them, in the description of this application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B. The "and / or" herein is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of this application, "a plurality of" means two or more than two.
[0053] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. For example, the "first message" and "second message" described in this application.
[0054] Figure 1 The structure diagram of the stylus 100 provided by this application is shown.
[0055] The stylus 100 may include a processor 110, a first sensor 120, a second sensor 130, and a communication module 140.
[0056] It can be understood that the structure schematically shown in the embodiments of the present invention does not constitute a specific limitation on the stylus 100. In other embodiments of this application, the stylus 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0057] A memory may be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0058] The first sensor 120 may be used to detect a first action acting on the stylus. For example, the first action may be other actions except the pen-throwing action acting on the tail end of the stylus, such as a pressing action acting on the tail end of the stylus or a contact action with the tail end of the stylus. Figure 2 A schematic diagram of a stylus is shown.
[0059] When the first action is a pressing action applied to the end of the stylus or a contact action with the end of the stylus (hereinafter simply referred to as "contact action"), the first sensor can be a pressure sensor or a photosensitive sensor. Among them, in order to facilitate detecting whether a pressing action or a contact action is applied to the end of the stylus, the first sensor can be arranged at the end of the stylus.
[0060] The second sensor 130 can be used to detect the action of shaking the stylus. For example, the second sensor can be an acceleration sensor.
[0061] The communication module 140 can be used to support communication between the stylus and other electronic devices.
[0062] Optionally, as an implementation manner, the stylus 100 can further include a display module 150, and the display module 150 can be used to support the display function of the stylus 100.
[0063] Figure 3 The structural schematic diagram of the electronic device 200 provided by the present application is shown. The electronic device 200 can be an electronic device that supports a user to interact with it through a stylus.
[0064] The electronic device 200 can include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, antenna 1, antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc. Among them, the sensor module 280 can include a pressure sensor 280A, a gyroscope sensor 280B, a barometric pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.
[0065] It can be understood that the structure illustrated in this application does not constitute a specific limitation on the electronic device 200. In some other embodiments of this application, the electronic device 200 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 components shown in the figure can be implemented in hardware, software, or a combination of software and hardware.
[0066] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), 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 may be independent devices or integrated in one or more processors.
[0067] Among them, the controller may be the nerve center and command center of the electronic device 200. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0068] A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can save the instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0069] In some embodiments, the processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0070] The I2C interface is a two-way synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 210 may include multiple groups of I2C buses. The processor 210 may be respectively coupled to the touch sensor 280K, the charger, the flash, the camera 293, etc. through different I2C bus interfaces. For example, the processor 210 may be coupled to the touch sensor 280K through the I2C interface, enabling the processor 210 and the touch sensor 280K to communicate through the I2C bus interface to implement the touch function of the electronic device 200.
[0071] The I2S interface can be used for audio communication. In some embodiments, the processor 210 may include multiple groups of I2S buses. The processor 210 may be coupled to the audio module 270 through the I2S bus to implement communication between the processor 210 and the audio module 270. In some embodiments, the audio module 270 may transmit an audio signal to the wireless communication module 260 through the I2S interface to implement the function of answering a call through a Bluetooth headset.
[0072] The PCM interface can also be used for audio communication to sample, quantize, and encode analog signals. The UART interface is a general-purpose serial data bus for asynchronous communication. The MIPI interface can be used to connect the processor 210 to peripheral devices such as the display screen 294 and the camera 293. The MIPI interface includes the camera serial interface (CSI), the display serial interface (DSI), etc. In some embodiments, the processor 210 and the camera 293 communicate through the CSI interface to implement the shooting function of the electronic device 200. The processor 210 and the display screen 294 communicate through the DSI interface to implement the display function of the electronic device 200.
[0073] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 210 to the camera 293, the display screen 294, the wireless communication module 260, the audio module 270, the sensor module 280, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0074] The USB interface 230 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 230 can be used to connect a charger to charge the electronic device 200, and can also be used to transfer data between the electronic device 200 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices, etc.
[0075] It can be understood that the interface connection relationships between the modules illustrated in this application are only illustrative and do not constitute a structural limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 can also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0076] The charging management module 240 is used to receive a charging input from a charger. Among them, the charger can be a wireless charger or a wired charger. While the charging management module 240 charges the battery 242, it can also supply power to the electronic device through the power management module 241.
[0077] The power management module 241 is used to connect the battery 242, the charging management module 240, and the processor 210. The power management module 241 receives inputs from the battery 242 and / or the charging management module 240 and supplies power to the processor 210, the internal memory 221, the external memory, the display screen 294, the camera 293, and the wireless communication module 260, etc. The power management module 241 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 241 can also be disposed in the processor 210. In some other embodiments, the power management module 241 and the charging management module 240 can also be disposed in the same device.
[0078] The wireless communication function of the electronic device 200 can be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modulation and demodulation processor, and the baseband processor, etc.
[0079] The electronic device 200 implements the display function through the GPU, the display screen 294, and the application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.
[0080] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include one or N display screens 294, where N is a positive integer greater than 1.
[0081] The electronic device 200 can implement the shooting function through the ISP, the camera 293, the video codec, the GPU, the display screen 294, and the application processor, etc.
[0082] The ISP is used to process the data fed back by the camera 293. For example, when taking a photo, the shutter is opened, and light passes through the lens and is transmitted to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also optimize the algorithms for image noise, brightness, and skin color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be provided in the camera 293.
[0083] The camera 293 is used to capture still images or videos. An object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard RGB, YUV, etc. formats. In some embodiments, the electronic device 200 may include one or N cameras 293, where N is a positive integer greater than 1.
[0084] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. The video codec is used to compress or decompress digital videos. The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission pattern between human brain neurons, it can quickly process the input information and can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 200 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0085] The internal memory 221 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0086] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation of DDR SDRAM is generally referred to as DDR5 SDRAM), and so on.
[0087] Non-volatile memory may include disk storage devices and flash memory.
[0088] Flash memory can be classified into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle, and can be classified into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the number of potential levels of storage units. According to the storage specification, it can include universal flash storage (UFS), embedded multi media Card (eMMC), etc.
[0089] Random access memory can be directly read and written by the processor 210, and can be used to store the operating system or executable programs (such as machine instructions) of other running programs, and can also be used to store data of users and application programs, etc.
[0090] Non-volatile memory can also store executable programs and data of users and application programs, etc., and can be pre-loaded into random access memory for direct reading and writing by the processor 210. The external memory interface 220 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 200. The external non-volatile memory communicates with the processor 210 through the external memory interface 220 to implement the data storage function. For example, files such as music and videos are saved in the external non-volatile memory.
[0091] The electronic device 200 can implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, and an application processor, etc. For example, music playback, recording, etc. The keys 290 of the electronic device 200 can include a power-on key, volume keys, etc. The keys 290 can be mechanical keys or touch keys. The motor 291 can generate a vibration prompt. The motor 291 can be used for incoming call vibration prompts and can also be used for touch vibration feedback. The indicator 292 can be an indicator light, which can be used to indicate the charging state, power change, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 295 is used to connect the SIM card.
[0092] In addition, the electronic device 200 also includes various different sensors. For example, the pressure sensor 280A is used to sense pressure signals and can convert the pressure signals into electrical signals. The gyroscope sensor 280B can be used to determine the motion posture of the electronic device 200. The barometric pressure sensor 280C is used to measure barometric pressure. The magnetic sensor 280D includes a Hall sensor. The acceleration sensor 280E can detect the magnitude of the acceleration of the electronic device 200 in various directions (generally three axes). The distance sensor 280F is used to measure distance. The electronic device 200 can measure distance through infrared or laser. In some embodiments, in the shooting scene, the electronic device 200 can use the distance sensor 280F to measure distance to achieve rapid focusing. The proximity light sensor 280G can include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The ambient light sensor 280L is used to sense the ambient light brightness. The electronic device 200 can adaptively adjust the brightness of the display screen 294 according to the sensed ambient light brightness. The fingerprint sensor 280H is used to collect fingerprints. The electronic device 200 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access to application locks, fingerprint photography, fingerprint answering of incoming calls, etc. The touch sensor 280K, also known as the "touch panel". The touch sensor 280K can be disposed on the display screen 294, and the touch sensor 280K and the display screen 294 form a touch screen, also known as the "touch screen". The touch sensor 280K is used to detect touch operations acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. The bone conduction sensor 280M can acquire vibration signals.
[0093] In the following embodiments of this application, a Figure 1 stylus with the Figure 2 shown structure and with the Figure 3 shown external features, and a mobile phone with the
[0094] shown structure will be used as examples to specifically elaborate on the interaction method provided by this application. Figures 4 to 8 The following will introduce in detail the interaction method provided by this application in combination with Figure 4Fig. 0 shows a schematic interaction flowchart of an interaction method 300 provided by the present application.
[0095] In step 301, if the stylus detects a target action, the stylus responds to the target action and sends a first message to the mobile phone. The first message requests the mobile phone to activate a first function corresponding to the target action. The first function is a system function inside the mobile phone or a function of a first application in the mobile phone. Herein, the target action includes a first action detected by the stylus and at least one pen flicking action. The first action is a user action detected at the tail end of the stylus other than the at least one pen flicking action. Correspondingly, the mobile phone receives the first message from the stylus. In the following, the interaction method provided by the present application will be introduced by taking the first action as a pressing action applied to the tail end of the stylus as an example.
[0096] Exemplarily, it is assumed that there is a communication connection between the stylus and the mobile phone currently, for example, a short-range communication connection. When the user wants to activate a system function inside the mobile phone, for example, the screenshot function of the mobile phone (for example, an example of the first function), the user applies the target action to the stylus to activate the system function inside the mobile phone.
[0097] For example, the user can hold the stylus and shake it. For example, the user has completed one pen flicking action while holding the stylus. In addition, the user also applies a pressing action to the tail end of the stylus. For example, the user Figure 5 applies the pen flicking action and the pressing action to the stylus through the Figure 5 shown hand movement. It can be seen from Figure 1 that the user applies a pressing action to the tail end of the stylus and applies one pen flicking action to the body of the stylus while holding it. In this case, the stylus can not only Figure 1 detect the pressing action at the tail end of the stylus through the first sensor in
[0098] Figure 6 Figure 6 shown hand movement. It can be seen from Figure 6 that the user applies a pressing action to the tail end of the stylus and applies two consecutive pen flicking actions to the body of the stylus while holding it. In this case, the stylus can not only Figure 1The first sensor in the pen tip detects a pressing action, and can Figure 1 The second sensor in the pen tip detects two consecutive pen - flicking actions. In this case, the pen can send a first message to the mobile phone to request the mobile phone to activate the eraser function of the drawing APP.
[0099] It is worth mentioning that the above only takes Figure 5 or Figure 6 the hand actions shown as examples to illustrate the hand actions relied on by the user when applying a target action to the pen. However, the embodiments of the present application are not limited thereto. In specific implementation, other hand actions can also be used to apply a target action to the pen. In other words, as long as the user can apply a target action to the pen through this hand action, then this hand action should fall within the protection scope of the present application.
[0100] It is worth mentioning that when the user applies a target operation to the pen, the present application does not make a special limitation on the sequence of the pen - flicking action and the pressing action. For example, the user can apply a pressing action at the pen tip after flicking the pen, or the user can apply a pressing action at the pen tip before flicking the pen, or the user can apply a pressing action at the pen tip while flicking the pen.
[0101] Step 302, the mobile phone activates the first function according to the first message.
[0102] Optionally, as an implementation manner, the first message can indicate to the mobile phone that the pen has detected a target action. After receiving the first message, the mobile phone can determine that the pen has detected a target action according to the first message. Further, the mobile phone can determine the first function corresponding to the target action according to the settings made by the user on it. After that, the mobile phone can activate the first function.
[0103] Exemplarily, taking the first function as a system function inside the mobile phone as an example, the user can set in advance the first function corresponding to the target action through the relevant interface provided by the mobile phone. For example, the mobile phone can provide an interface as Figure 7 shown, and the user can set the first function corresponding to the target action through the Figure 7 shown interface. For example, the user can set the user action and the first function respectively through the options 6011 and 6012 in the interface 601 shown in the (a) figure of Figure 7 . For example, after the user selects the option 6011, the mobile phone displays the interface 602 shown in the (b) figure of Figure 7 . The user can select the option 6021 from the options 6021 and 6022 in the interface 602, that is, the option corresponding to the pressing and pen - flicking action. After the user selects the option 6012, the mobile phone displays the interface as Figure 7The interface 603 shown in Figure (c). Through the interface 603, the user can select to set one of the system functions inside the mobile phone, such as screenshot, lock screen, mute, night mode, eye protection mode, etc. as the first function corresponding to the target action. Or, the user can select to set a certain function of a certain application in the mobile phone as the first function corresponding to the target action. For example, if the user selects the option 6031 in the interface 603, that is, the user sets the system function inside the mobile phone, namely the screenshot function, as the first function corresponding to the target action. It is worth mentioning that Figure 7 The pressing and flicking pen action corresponding to the option 6022 in Figure (b) is another name for the target action.
[0104] After that, if the stylus detects the target operation, the stylus can send a first message to the mobile phone. The first message can indicate to the mobile phone that the stylus has detected the target action. After receiving the first message, the mobile phone can determine, according to the first message, that the stylus has detected the target operation. Further, the mobile phone can determine the first function corresponding to the target action according to the settings made by the user on it, that is, the screenshot function. After that, the mobile phone can activate the screenshot function.
[0105] Exemplarily, taking the first function as a certain function of a certain application in the mobile phone as an example, the user can pre-set the first function corresponding to the target action through the relevant interface provided by the mobile phone. For example, the mobile phone can provide an interface as Figure 8 shown. The user can set the first function corresponding to the target action through the Figure 8 shown interface. For example, the user can set the user action and the first function respectively through the options 7011 and 7012 in the interface 701 shown in Figure (a) of Figure 8 . For example, after the user selects the option 7011, the mobile phone displays an interface 702 as shown in Figure (b) of Figure 8 . The user can select the option 7021 from the options 7021 and 7022 in the interface 702, that is, the option corresponding to the pressing and flicking pen action. After the user selects the option 7012, the mobile phone displays an interface 703 as shown in Figure (c) of Figure 8 . Through the interface 703, the user can select to set one of the system functions inside the mobile phone, such as screenshot, lock screen, mute, night mode, eye protection mode, etc. as the first function corresponding to the target action. Or, the user can select to set a certain function of a certain application in the mobile phone as the first function corresponding to the target action. For example, if the user selects the option 7036 in the interface 703, that is, the user selects to set a certain function of a certain application as the first function corresponding to the target action. In response to the user's action of selecting the option 7036, the mobile phone displays an interface as shown in Figure 8The interface 704 shown in Figure (d). The interface 704 presents multiple applications in the mobile phone to the user for selection. For example, the user selects option 7041 in the interface 704, which means the user selects to set a certain function of the drawing APP as the first function corresponding to the target action. In response to the user's operation of selecting option 7041, the mobile phone displays the interface 705 as shown in Figure (e) Figure 8 The interface 705 presents various functions of the drawing APP to the user. The user can select to set a certain function of the drawing APP as the first function corresponding to the target action through the interface 705. For example, the user selects option 7052 in the interface 705, which means the user selects to set the eraser function of the drawing APP as the first function corresponding to the target action. It is worth mentioning that Figure 8 The pressing and flicking pen action corresponding to option 7022 in Figure (b) is another name for the target action.
[0106] After that, if the stylus detects the target operation, the stylus can send a first message to the mobile phone. The first message can indicate to the mobile phone that the stylus has detected the target action. After receiving the first message, the mobile phone can determine that the stylus has detected the target operation based on the first message. Further, the mobile phone can determine the first function corresponding to the target action according to the settings made by the user on it, that is, the eraser function of the drawing APP. After that, the mobile phone can activate the eraser function of the drawing APP.
[0107] Optionally, as an implementation method, the first message can indicate to the mobile phone that the stylus has detected the target action and indicate the first function corresponding to the target action to the mobile phone. After receiving the first message, the mobile phone can determine that the stylus has detected the target action based on the first message. In addition, the mobile phone can also determine the first function corresponding to the target action according to the first message. After that, the mobile phone can activate the first function.
[0108] For example, the user can pre-set the first function corresponding to the target action through the relevant interface provided by the stylus. For example, the user sets a system function inside the mobile phone, such as the mute function, as the first function corresponding to the target action through the relevant interface provided by the stylus.
[0109] After that, if the stylus detects the target operation, the stylus can send a first message to the mobile phone. The first message can indicate to the mobile phone that the stylus has detected the target action and indicate the first function corresponding to the target action to the mobile phone, that is, the mute function. After receiving the first message, the mobile phone can determine that the stylus has detected the target operation based on the first message and can determine the first function corresponding to the target action, that is, the mute function. After that, the mobile phone can activate the mute function.
[0110] It is worth mentioning that the above only takes the mobile phone setting the first function corresponding to the target action according to the interaction operation between the user and the relevant interface provided by the user, or the stylus setting the first function corresponding to the target action according to the interaction operation between the user and the relevant interface provided by the user as an example to illustrate the method for the user to set the first function corresponding to the target action. However, this does not limit the present application. In specific implementation, the stylus or the mobile phone can also set the first function corresponding to the target action according to the voice command input by the user. In addition, the first function can also be determined based on the factory settings.
[0111] In method 300, if the stylus detects the target action again after detecting the target action in step 301, in this case, method 300 may further include the following steps:
[0112] Step 303, the stylus responds to the detected target action again and sends a second message to the mobile phone. The second message requests the mobile phone to switch the currently activated function from the first function to the second function, where the second function is the function that was activated before the first function was activated, or the second message requests the mobile phone to turn off the first function, or the second message requests the mobile phone to activate the first function again. Correspondingly, the mobile phone receives the second message from the stylus.
[0113] Step 304, the mobile phone switches the currently activated function from the first function to the second function according to the second message, or turns off the first function, or activates the first function again.
[0114] For example, the stylus detects the target action in step 301. Assume that the first function corresponding to the target action is the mute function. After detecting the target action, the stylus sends a first message to the mobile phone, requesting the mobile phone to activate the mute function. The mobile phone activates the mute function according to the first message from the stylus. If the stylus detects the target action again later, in this case, the stylus can send a second message to the mobile phone. The second message requests the mobile phone to turn off the mute function. The mobile phone turns off the mute function that was activated according to the first message before according to the second message. It is worth mentioning that if the stylus detects the target action again after these two detections of the target action, the stylus can request the mobile phone to activate the mute function again, and so on.
[0115] For example, the stylus detects the target action in step 301. Assume that the first function corresponding to the target action is the brush function of the drawing APP. After detecting the target action, the stylus sends a first message to the mobile phone to request activation of the brush function of the drawing APP. The mobile phone activates the brush function of the drawing APP according to the first message from the stylus. If the stylus detects the flicking action again later, in this case, the stylus can send a second message to the mobile phone. The second message requests the mobile phone to switch the currently activated function from the first function to the second function, where the second function is the function that was activated before the first function was activated. For example, assume that before the mobile phone activates the brush function of the drawing APP according to the first message, the activated function of the drawing APP is the eraser function, that is, the second function. Then the mobile phone switches the currently activated function of the drawing APP from the brush function to the eraser function according to the second message from the stylus. It is worth mentioning that if the stylus detects the target action again after these two detections of the target action, the stylus can request the mobile phone to switch the currently activated function of the drawing APP from the eraser function to the brush function, and so on.
[0116] For example, the stylus detects the target action in step 301. Assume that the first function corresponding to the target action is the screenshot function. After detecting the target action, the stylus sends a first message to the mobile phone to request the mobile phone to activate the screenshot function. The mobile phone activates the screenshot function according to the first message from the stylus. If the stylus detects the target action again later, in this case, the stylus can send a second message to the mobile phone. The second message requests the mobile phone to activate the screenshot function again. The mobile phone activates the screenshot function again according to the second message. It is worth mentioning that if the stylus detects the target action again after these two detections of the target action, the stylus can request the mobile phone to activate the screenshot function again, and so on.
[0117] Optionally, as an implementation, when the stylus detects the target action in step 301 or the target action in step 303, it can further determine whether the flicking action included in the detected target action meets a preset condition. If the stylus determines that the flicking action included in the target action detected in step 301 meets the preset condition, the stylus can send a first message to the mobile phone. Or, if the stylus determines that the flicking action included in the target action detected in step 303 meets the preset condition, the stylus can send a second message to the mobile phone.
[0118] For example, the preset condition is that the acceleration corresponding to any pen - flicking action is greater than or equal to a preset acceleration. Suppose the stylus detects the target action in step 301, and this target action includes a pen - flicking action. In this case, the stylus can determine the acceleration corresponding to this pen - flicking action through the second sensor. For example, the preset acceleration is 40m / s 2 , and the stylus determines through the second sensor that the acceleration of this detected pen - flicking action is 50m / s 2 . Since the acceleration corresponding to this pen - flicking action is greater than the preset acceleration, based on this, the stylus can send a first message to the mobile phone to request the mobile phone to activate the first function. It should be noted that the acceleration corresponding to the pen - flicking action can be understood as: when the user flicks the stylus, the acceleration generated by the pen - flicking action.
[0119] For example, the preset condition is that the interval between the occurrence times of two adjacent pen - flicking actions is less than or equal to a preset time length, and the acceleration corresponding to any pen - flicking action is greater than or equal to a preset acceleration. For example, the preset acceleration is 35m / s 2 , the preset time length is 1.8 seconds (s). Suppose the stylus detects the target action in step 301, and this target action includes two consecutive pen - flicking actions. And suppose the stylus determines that the interval between the occurrence times of these two consecutive pen - flicking actions is 1.5s, and determines that the accelerations of these two consecutive pen - flicking actions are 45m / s 2 and 50m / s 2 . Since the interval between the occurrence times of these two consecutive pen - flicking actions is less than the preset interval, and the accelerations of these two consecutive pen - flicking actions are both greater than the preset acceleration, based on this, the stylus can send a first message to the mobile phone to request the mobile phone to activate the first function.
[0120] It can be understood that in order for the stylus or the electronic device to implement the above functions, it includes the corresponding hardware and / or software modules for executing each function. Combining the algorithm steps of each example described in the embodiments disclosed in this article, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or 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 combination with the embodiments, but such implementation should not be considered to exceed the scope of the present application.
[0121] This application can divide the functional modules of the stylus or the electronic device according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this application is illustrative, only a logical function division, and there can be other division methods in actual implementation.
[0122] It should be noted that all relevant contents of each step involved in the above method embodiments can be cited in the function descriptions of the corresponding functional modules, and will not be repeated here.
[0123] The electronic device provided by this application is used to execute the above interaction method, so it can achieve the same effect as the above implementation method.
[0124] In the case of adopting an integrated unit, the stylus or the electronic device may further include a processing module, a storage module, and a communication module. Among them, the processing module can be used to control and manage the actions of the stylus or the electronic device. The storage module can be used to support the stylus or the electronic device to execute stored program codes and data, etc. The communication module can be used to support the communication between the stylus or the electronic device and other devices.
[0125] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logical blocks, modules, and circuits described in combination with the disclosure of this application. The processor can also be a combination that realizes computing functions, such as a combination including one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module can be a memory. The communication module can specifically be a device for interacting with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.
[0126] In one embodiment, when the processing module is a processor and the storage module is a memory, the stylus involved in this application can be a device with Figure 1 the structure shown, and the electronic device involved in this application can be a device with Figure 2 the structure shown.
[0127] This application also provides a computer storage medium, in which computer instructions are stored. When the computer instructions run on the stylus or the electronic device, the stylus or the electronic device is enabled to execute the above relevant method steps to implement the interaction method in the above embodiments.
[0128] This application also provides a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above relevant steps to implement the interaction method in the above embodiments.
[0129] In addition, an embodiment of the present application further provides a device, which may specifically be a chip, component, or module. The device may include a processor and a memory connected to each other; wherein, the memory is used to store computer-executable instructions. When the device runs, the processor may execute the computer-executable instructions stored in the memory, so that the chip executes the interaction method in each of the above method embodiments.
[0130] Among them, the stylus, electronic device, computer storage medium, computer program product, or chip provided in the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.
[0131] Through the description of the above embodiments, those skilled in the art can understand that for the convenience and conciseness of description, only the above division of each functional module is used as an example for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0132] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces. The indirect coupling or communication connection of the device or unit may be in an electrical, mechanical, or other form.
[0133] The units described as separate components may or may not be physically separated. The components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the present application.
[0134] In addition, in each embodiment of the present application, each functional unit may be integrated in a processing unit, or each unit may exist physically separately, or two or more units may be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0135] When the integrated unit is implemented in the form of 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 this application, in essence, or the part that contributes to the prior art, or all or part of this 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 for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0136] The above content is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. An interaction method, characterized in that, Applied to the interaction scenario between a stylus and an electronic device, the method is executed by the stylus and includes: In the case of detecting a target action, in response to the target action, send a first message to the electronic device, the first message requesting the electronic device to activate a first function corresponding to the target action, where the first function is a system function inside the electronic device or a function of a first application in the electronic device. Among them, the target action includes a detected first action and at least one pen-swinging action, and the first action is a user action detected at the tail end of the stylus other than the at least one pen-swinging action; a first sensor is provided at the tail end of the stylus, and the first action includes a pressing action detected at the tail end of the stylus through the first sensor; After detecting the target action, if the target action is detected again, in response to the detected-again target action, send a second message to the electronic device, the second message requesting the electronic device to switch the currently activated function from the first function to a second function, where the second function is a function that was activated before the first function was activated, or the second message requests the electronic device to turn off the first function, or the second message requests the electronic device to activate the first function again.
2. The method according to claim 1, wherein The at least one pen-swinging action is a pen-swinging action that meets a preset condition, and the preset condition includes: the acceleration corresponding to the at least one pen-swinging action is greater than or equal to a preset acceleration.
3. The method according to claim 2, characterized in that, The preset condition further includes: the interval between the occurrence times of any two adjacent pen-swinging actions among at least two pen-swinging actions is less than or equal to a preset time length.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Receiving an instruction or operation input by the user, where the instruction or operation input by the user is used to indicate that the first function is associated with the target action; Determining, according to the instruction or operation input by the user, that the first function is associated with the target action.
5. The method according to any one of claims 1 to 4, characterized in that The first message also indicates the first function to the electronic device.
6. An interaction method, characterized in that Applied to the interaction scenario between a stylus and an electronic device, the method is executed by the electronic device and includes: Receiving a first message from the stylus, the first message requesting the electronic device to activate a first function corresponding to the target action detected by the stylus, where the first function is a system function inside the electronic device or a function of a first application in the electronic device. Among them, the target action includes a detected first action and at least one pen-swinging action, and the first action is a user action detected at the tail end of the stylus other than the at least one pen-swinging action; a first sensor is provided at the tail end of the stylus, and the first action includes a pressing action detected at the tail end of the stylus through the first sensor; Activating the first function according to the first message; Receive a second message from the stylus, the second message requesting the electronic device to switch the currently activated function from the first function to a second function, the second function being a function that was activated before the first function was activated, the second message being sent when the stylus detects the target action again, wherein the target action includes a first action detected again and at least one pen flick action detected again, the first action being a user action detected at the tail end of the stylus other than the at least one pen flick action; According to the second message, switch the currently activated function from the first function to the second function.
7. The method according to claim 6, characterized in that, The method further includes: Receive a second message from the stylus, the second message requesting the electronic device to turn off the first function, the second message being sent when the stylus detects the target action again, wherein the target action includes a first action detected again and at least one pen flick action detected again, the first action being a user action detected at the tail end of the stylus other than the at least one pen flick action; According to the second message, turn off the first function.
8. The method according to claim 7, characterized in that The method further includes: Receive a second message from the stylus, the second message requesting the electronic device to activate the first function again, the second message being sent when the stylus detects the target action again, wherein the target action includes a first action detected again and at least one pen flick action detected again, the first action being a user action detected at the tail end of the stylus other than the at least one pen flick action; According to the second message, activate the first function again.
9. The method according to any one of claims 6 to 8, characterized in that The at least one pen flick action is a pen flick action that meets a preset condition, the preset condition including: the acceleration corresponding to the at least one pen flick action is greater than or equal to a preset acceleration.
10. The method according to claim 9, wherein, The preset condition further includes: the interval between the occurrence times of any two adjacent pen flick actions among at least two pen flick actions is less than or equal to a preset time length.
11. The method according to any one of claims 6 to 10, characterized in that, The method further includes: Receive an instruction or operation input by the user, the instruction or operation input by the user being used to indicate that the first function is associated with the target action; According to the instruction or operation input by the user, determine that the first function is associated with the target action.
12. The method according to any one of claims 7 to 11, characterized in that, The first message also indicates the first function to the electronic device.
13. A stylus pen, characterized in that, Includes: One or more processors; A memory; And one or more programs, wherein the one or more programs are stored in the memory, and when the one or more programs are executed by the processor, the stylus is caused to execute the method according to any one of claims 1 to 5.
14. An electronic device, characterized in that, Includes: One or more processors; A memory; And one or more programs, wherein the one or more programs are stored in the memory, and when the one or more programs are executed by the processor, the electronic device is caused to execute the method according to any one of claims 6 to 12.
15. A computer storage medium, characterized in that, Comprising computer instructions which, when run on a stylus, cause the stylus to execute the interaction method according to any one of claims 1 to 5.
16. A computer storage medium, characterized in that, Comprising computer instructions which, when run on an electronic device, cause the electronic device to execute the interaction method according to any one of claims 6 to 12.
17. A computer program product, characterized in that, When the computer program product runs on a computer, it causes the computer to execute the interaction method according to any one of claims 1 to 5, or claims 6 to 12.
Citation Information
Patent Citations
Control method and device based on touch pen
CN113238649A