Stylus pen tip detection method, electronic device and system

By detecting the friction coefficient and pressure value of the stylus on the electronic device and combining it with the usage time, the pen tip wear is determined and a replacement prompt is issued, solving the problems of performance degradation and equipment damage caused by wear and achieving more efficient pen tip management.

CN116736988BActive Publication Date: 2025-09-12HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210204036.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-02
Publication Date
2025-09-12
Estimated Expiration
2042-03-02

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively detect and prompt users to replace worn stylus pen tips, resulting in decreased stylus performance and accelerated damage to the touch screen of electronic devices.

Method used

By detecting the friction coefficient, pressure value and total usage time of the stylus on the touch screen of the electronic device, the degree of pen tip wear is determined, and the user is prompted to replace the pen tip when the wear reaches a threshold.

Benefits of technology

The performance and efficiency of the stylus are improved, and the damage degree of the touch screen of the electronic device is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116736988B_ABST
    Figure CN116736988B_ABST
Patent Text Reader

Abstract

This application discloses a stylus tip detection method, electronic device, and system, relating to the field of terminals. The method includes: the electronic device can determine the degree of wear of the stylus tip based on the friction coefficient between the stylus and the electronic device's touch screen, the pressure value detected by the stylus, and the total usage time of the stylus. When the electronic device detects that the total usage time of the stylus is greater than or equal to the allowed usage time set by the electronic device, the electronic device determines that the stylus tip is worn to the extent that it needs to be replaced, and the electronic device can display a prompt message to prompt the user to replace the stylus tip.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminals, and in particular to a stylus pen tip detection method, electronic device, and system. Background Art

[0002] With the development of terminal technology, electronic devices are increasingly used in daily life. For electronic devices equipped with styluses (such as large screens, mobile phones, and tablets), users are increasingly using styluses to touch, write, and erase on the touch screens of electronic devices.

[0003] However, as a stylus pen is used, its tip inevitably wears out over time. This worn tip not only reduces the stylus's performance but also accelerates damage to the electronic device's touchscreen. Therefore, how electronic devices can detect the degree of stylus tip wear and promptly prompt the user to replace it has become a pressing issue. Summary of the Invention

[0004] This application provides a stylus tip detection method, electronic device, and system, which enable the electronic device to determine the degree of stylus tip wear based on the friction coefficient between the stylus and the electronic device's touch screen, the pressure value detected by the stylus, and the total usage time of the stylus. In this way, when the stylus tip becomes worn during use, the electronic device can promptly prompt the user to replace the stylus tip, improving the performance and efficiency of the stylus while also reducing the degree of damage to the electronic device's touch screen.

[0005] In a first aspect, the present application provides a stylus tip detection method, the method comprising: an electronic device receiving pressure information transmitted in real time by a stylus. When the electronic device detects that the stylus has touched a touch screen of the electronic device for a first duration, the electronic device determines, based on the pressure information within the first duration, a first usage duration corresponding to a first pressure value range and a second usage duration corresponding to a second pressure value range. The pressure information within the first duration includes pressure values ​​within the first pressure value range and pressure values ​​within the second pressure value range. The electronic device normalizes the first usage duration to determine a normalized usage duration corresponding to the first pressure value range. The electronic device determines a total usage duration of the stylus based on the second usage duration and the normalized usage duration corresponding to the first pressure value range. When the electronic device determines that the total usage duration of the stylus is greater than or equal to a wear duration threshold, the electronic device displays a first prompt message. The first prompt message is used to prompt a user to replace the stylus tip. In this way, when the stylus tip is worn during use, the electronic device can promptly prompt the user to replace the stylus tip, thereby improving the performance and efficiency of the stylus and reducing the degree of damage to the touch screen on the electronic device.

[0006] In one possible implementation, the electronic device determines, based on the pressure information within the first duration, a first usage duration corresponding to a first pressure value range and a second usage duration corresponding to a second pressure value range, specifically including: determining, by the electronic device, a sum of usage durations of pressure values ​​within the first pressure value range as the first usage duration, and determining, by the electronic device, a sum of usage durations of pressure values ​​within the second pressure value range as the second usage duration.

[0007] In one possible implementation, the first pressure value range corresponds to a preset first allowed time, and the second pressure value range corresponds to a preset second allowed time. The electronic device normalizes the first usage time and determines the normalized usage time corresponding to the first pressure value range, specifically including: the electronic device determines a first coefficient of the first pressure value range based on the first allowed time and the second allowed time. The electronic device determines the normalized usage time corresponding to the first pressure value range based on the first coefficient and the first usage time. In this way, when the stylus pen tip is worn during use, the electronic device can promptly prompt the user to replace the stylus pen tip, thereby improving the performance and efficiency of the stylus pen and reducing the degree of damage to the touch screen on the electronic device.

[0008] In one possible implementation, when the electronic device determines that the total usage time of the stylus is greater than or equal to a wear time threshold, before the electronic device displays a first prompt message, the method further includes: when the electronic device determines that the touch screen of the electronic device is not affixed with a protective film, the electronic device determines that the wear time threshold is a first value. When the electronic device determines that the touch screen of the electronic device is affixed with a first protective film, the electronic device determines that the wear time threshold is a second value. The second value is less than the first value. In this way, the relationship between the friction coefficient and the service life of the stylus can be reflected.

[0009] In one possible implementation, the method further includes: when the electronic device determines that the touch screen of the electronic device is affixed with a second protective film, determining that the wear time threshold is a third value. The second value is greater than the third value. This can reflect the relationship between the friction coefficient and the service life of the stylus.

[0010] In one possible implementation, the second pressure value range corresponds to a preset second allowed time. When the electronic device determines that the touch screen of the electronic device is not affixed with a protective film, the electronic device determines that the wear time threshold is a first value, specifically including: the electronic device determines that the signal amount of the stylus on the touch screen of the electronic device is a fourth value. When the electronic device determines that the difference between the value of the first signal amount and the fourth value is less than the first threshold, the electronic device determines that the touch screen of the electronic device is affixed with a protective film. The first signal amount is the signal amount of the stylus when the touch screen is not affixed with a protective film, which is stored by the electronic device. The electronic device determines the second allowed time as the first value.

[0011] In a possible implementation, when the electronic device determines that the touch screen of the electronic device is affixed with a first protective film, the electronic device determines that the wear time threshold is a second value, specifically including: the electronic device determines that the value of the touch screen of the stylus on the electronic device is a fifth value. When the electronic device determines that the difference obtained by subtracting the fifth value from the value of the first signal amount is greater than or equal to the first threshold, the electronic device determines that the touch screen of the electronic device is affixed with a first protective film. The first signal amount is the signal amount of the stylus stored by the electronic device when the touch screen is not affixed with a protective film. When the electronic device determines that the touch screen of the electronic device is affixed with the first protective film, the electronic device determines the second value based on the fifth value, the value of the first signal amount and the first value.

[0012] In a possible implementation, when the electronic device determines that the touch screen of the electronic device is affixed with a second protective film, the electronic device determines that the wear time threshold is a third value, specifically including: the electronic device determines that the value of the touch screen of the stylus on the electronic device is a sixth value. When the electronic device determines that the difference obtained by subtracting the sixth value from the value of the first signal amount is greater than or equal to the first threshold, the electronic device determines that the touch screen of the electronic device is affixed with a second protective film. The first signal amount is the signal amount of the stylus stored by the electronic device when the touch screen is not affixed with a protective film. The sixth value is less than the fifth value. When the electronic device determines that the touch screen of the electronic device is affixed with the second protective film, the electronic device determines the third value based on the sixth value, the value of the first signal amount and the first value. The third value is less than the second value.

[0013] In one possible implementation, the electronic device determines that the amount of signal generated by the stylus pen touching the touch screen of the electronic device is a fourth value, specifically including: the electronic device receives the amount of signal generated by the stylus pen at a first position and a second position on the touch screen of the electronic device. The first position and the second position are different. When the electronic device determines that the amount of signal generated by the stylus pen at the first position and the amount of signal generated by the second position are both the fourth value, the electronic device determines that the amount of signal generated by the stylus pen touching the touch screen of the electronic device is the fourth value.

[0014] In one possible implementation, the electronic device determines that the signal amount of the stylus pen touching the touch screen of the electronic device is a fifth value, specifically including: the electronic device receives the signal amount of the stylus pen at a first position and the signal amount at a second position on the touch screen of the electronic device. The first position and the second position are different. When the electronic device determines that the signal amount at the first position and the signal amount at the second position are both the fifth value, the electronic device determines that the signal amount of the stylus pen touching the touch screen of the electronic device is the fifth value.

[0015] In one possible implementation, the electronic device determines that the signal amount of the stylus pen touching the touch screen of the electronic device is a sixth value, specifically including: the electronic device receives the signal amount of the stylus pen at a first position and the signal amount at a second position on the touch screen of the electronic device. The first position and the second position are different. When the electronic device determines that the signal amount at the first position and the signal amount at the second position are both the sixth value, the electronic device determines that the signal amount of the stylus pen touching the touch screen of the electronic device is the sixth value.

[0016] In a possible implementation, the first duration includes: the duration from the electronic device detecting the starting coordinate information of the stylus pen touching the screen of the electronic device to the end coordinate information of the stylus pen touching the screen of the electronic device.

[0017] In a possible implementation, the pressure information within the first time period includes pressure values ​​within a third pressure value range. When the electronic device determines that the total usage time of the stylus is greater than or equal to the wear time threshold, before the electronic device displays the first prompt information, the method further includes: the electronic device determines the third usage time corresponding to the third pressure value range based on the pressure information within the first time period. The electronic device normalizes the third usage time and determines the normalized usage time corresponding to the third pressure value range. The electronic device determines the total usage time of the stylus based on the second usage time and the normalized usage time corresponding to the first pressure value range, specifically including: the electronic device determines the total usage time of the stylus based on the second usage time, the normalized usage time corresponding to the first pressure value range, and the normalized usage corresponding to the third pressure value range.

[0018] In a second aspect, an embodiment of the present application provides a communication system comprising: a stylus and an electronic device. The stylus is configured to detect pressure information during use in real time. The stylus is further configured to transmit the pressure information to the electronic device in real time. The electronic device is configured to detect a first duration of time during which the stylus touches a touch screen of the electronic device. The electronic device is further configured to determine, based on the pressure information during the first duration, a first usage duration corresponding to a first pressure value range and a second usage duration corresponding to a second pressure value range. The pressure information during the first duration includes pressure values ​​within the first pressure value range and pressure values ​​within the second pressure value range. The electronic device is further configured to normalize the first usage duration to determine a normalized usage duration corresponding to the first pressure value range. The electronic device is further configured to determine a total usage duration of the stylus based on the second usage duration and the normalized usage duration corresponding to the first pressure value range. When the electronic device is further configured to determine that the total usage duration of the stylus is greater than or equal to a wear duration threshold, the electronic device displays a first prompt message. The first prompt is used to prompt the user to replace the stylus tip. In this way, when the stylus tip is worn during use, the electronic device can promptly prompt the user to replace the stylus tip, thereby improving the performance and efficiency of the stylus and reducing damage to the touch screen of the electronic device.

[0019] In a possible implementation, the electronic device in the communication system may execute the method in any possible implementation of the first aspect.

[0020] In a third aspect, an embodiment of the present application provides an electronic device, which includes a display screen, 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, which includes computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the method in any possible implementation of the first aspect. In this way, when the tip of the stylus pen is worn during use, the electronic device can promptly prompt the user to replace the tip of the stylus pen, thereby improving the performance and efficiency of the stylus pen and reducing the degree of damage to the touch screen on the electronic device.

[0021] In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program, the computer program including executable instructions that, when executed by a processor, cause the processor to perform the method of any possible implementation of the first aspect. Thus, when the stylus pen tip becomes worn during use, the electronic device can promptly prompt the user to replace the stylus pen tip, thereby improving the performance and efficiency of the stylus and reducing damage to the touch screen of the electronic device.

[0022] In a fifth aspect, embodiments of the present application provide a chip or chip system, characterized in that it includes a processing circuit and an interface circuit, the interface circuit being configured to receive code instructions and transmit them to the processing circuit, and the processing circuit being configured to execute the code instructions to perform the method of any possible implementation of the first aspect. In this way, when the stylus pen tip becomes worn during use, the electronic device can promptly prompt the user to replace the stylus pen tip, thereby improving the performance and efficiency of the stylus pen and reducing the degree of damage to the touch screen of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application;

[0024] Figure 2A-2C A schematic diagram of the main structure of a stylus provided in an embodiment of the present application;

[0025] Figure 3 A schematic diagram of the hardware structure of a stylus provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of a specific process of a stylus pen tip detection method provided in an embodiment of the present application;

[0028] Figure 6 A schematic diagram of a scenario in which a stylus pen is used in conjunction with an electronic device according to an embodiment of the present application;

[0029] Figure 7A A schematic diagram of the relationship between a protective film and a signal quantity provided in an embodiment of the present application;

[0030] Figure 7B A schematic diagram of adjusting the initial wear time threshold provided in an embodiment of the present application;

[0031] Figure 8 A schematic diagram of a user interface provided in an embodiment of the present application;

[0032] Figure 9 A schematic diagram of software module interaction applied to a communication system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and claims of this application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in this application refers to any or all possible combinations including one or more of the listed features. In the embodiments of the present application, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise stated, the meaning of "multiple" is two or more.

[0034] First, a communication system 10 provided in an embodiment of the present application is introduced.

[0035] Please refer to Figure 1 , Figure 1 The schematic diagram of the architecture of a communication system 10 provided in an embodiment of the present application is exemplarily shown.

[0036] like Figure 1As shown, the communication system 10 may include a stylus 100, an electronic device 200, and a wireless keyboard 300. The electronic device 200 may be referred to as user equipment (UE), a terminal, etc. For example, the electronic device 200 may be a tablet computer (portable Android device, PAD), a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device, a vehicle-mounted device or a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc., a mobile terminal or a fixed terminal with a touch screen (also referred to as a touch screen). In this embodiment, the electronic device 200 is described as a tablet computer as an example.

[0037] The stylus 100 can provide input to the electronic device 200. Based on the input from the stylus 100, the electronic device 200 can perform an operation in response to the input. The stylus 100 and the electronic device 200 can be interconnected via a communication network to enable wireless signal interaction. The communication network can be, but is not limited to, a short-range communication network such as a Wi-Fi hotspot network, a Wi-Fi peer-to-peer (P2P) network, a Bluetooth network, a ZigBee network, or a near-field communication (NFC) network.

[0038] The stylus 100 can be, but is not limited to, an electromagnetic pen and a capacitive pen. The electronic device 200 has a touch screen 201. When the stylus 100 is an electromagnetic pen, an electromagnetic induction board needs to be integrated on the touch screen 201 of the electronic device 200 that interacts with the stylus 100. Coils are distributed on the electromagnetic induction board, and coils are also integrated in the electromagnetic pen. Based on the principle of electromagnetic induction, within the magnetic field generated by the electromagnetic induction board, as the electromagnetic pen moves, the electromagnetic pen can accumulate electrical energy. The electromagnetic pen can transfer the accumulated electrical energy to the electromagnetic induction board through free oscillation via the coil in the electromagnetic pen. The electromagnetic induction board can scan the coil on the electromagnetic induction board based on the electrical energy from the electromagnetic pen and calculate the position of the electromagnetic pen on the touch screen 201. In one embodiment, the touch screen can be called a touch screen or a display screen, and the stylus can be called a stylus.

[0039] Capacitive pens include passive capacitive pens and active capacitive pens. Passive capacitive pens can be called passive capacitive pens, while active capacitive pens can be called active capacitive pens.

[0040] One or more electrodes may be provided in an active capacitive pen (e.g., in the pen tip), and the active capacitive pen may transmit signals through the electrodes. When the stylus 100 is an active capacitive pen, an electrode array needs to be integrated on the touch screen 201 of the electronic device 200 that interacts with the stylus 100. In one embodiment, the electrode array may be a capacitive electrode array. The electronic device 200 may receive a signal from the active capacitive pen through the electrode array, and upon receiving the signal, may identify the position of the active capacitive pen on the touch screen and the inclination angle of the active capacitive pen based on the change in the capacitance value on the touch screen 201.

[0041] A passive capacitive stylus is made of a conductive material and has conductive properties. It is used to touch the touch screen 201 of the electronic device 200 to complete interactive operations. A passive capacitive stylus does not actively transmit signals. When the passive capacitive stylus comes into contact with the touch screen 201 of the electronic device 200, its conductive properties allow current on the touch screen 201 to flow through it, thereby changing the capacitance on the touch screen 201. Based on the change in capacitance on the touch screen 201, the electronic device 200 can identify the position of the passive capacitive stylus on the touch screen.

[0042] It should be noted that Figure 1 The communication system 10 shown is only used to exemplify the present application and does not constitute any limitation to the present application.

[0043] Next, the main structure of a stylus pen 100 provided in an embodiment of the present application is introduced.

[0044] Please refer to Figure 2A-2C , Figure 2A-2CA schematic diagram of the main structure of a stylus pen 100 provided in an embodiment of the present application is exemplarily shown.

[0045] Figure 2A Schematic diagram of the structure of the stylus pen 100 provided in an embodiment of the present application. The stylus pen 100 may include a pen tip 10, a pen body 20, and a back cover 30. The interior of the pen body 20 is a hollow structure, and the pen tip 10 and the back cover 30 are located at both ends of the pen body 20 respectively. The back cover 30 and the pen body 20 can be connected by plugging or snapping. The matching relationship between the pen tip 10 and the pen body 20 is detailed in Figure 2B Description.

[0046] Figure 2B This is a schematic diagram of the partially disassembled structure of the stylus provided in the embodiment of the present application. Figure 2B As shown, the stylus pen 100 further includes a spindle assembly 50, which is located within the pen barrel 20 and is slidably disposed within the pen barrel 20. The spindle assembly 50 has an external thread 51, and the pen tip 10 includes a writing end 11 and a connecting end 12, wherein the connecting end 12 of the pen tip 10 has an internal thread (not shown) that mates with the external thread 51.

[0047] When the spindle assembly 50 is assembled into the pen barrel 20, the connecting end 12 of the nib 10 extends into the pen barrel 20 and is threadedly engaged with the external thread 51 of the spindle assembly 50. In other examples, the connecting end 12 of the nib 10 and the spindle assembly 50 can be detachably connected by a snap-fit ​​mechanism or other means. This detachable connection between the connecting end 12 of the nib 10 and the spindle assembly 50 allows the nib 10 to be replaced.

[0048] In order to detect the pressure on the writing end 11 of the pen tip 10, refer to Figure 2A As shown, there is a gap 10a between the pen tip 10 and the pen body 20, which ensures that when the writing end 11 of the pen tip 10 is subjected to external force, the pen tip 10 can move toward the pen body 20, and the movement of the pen tip 10 will drive the main shaft assembly 50 to move in the pen body 20. Figure 2B As shown, a pressure-sensing assembly 60 is provided on the spindle assembly 50. Part of the pressure-sensing assembly 60 is fixedly connected to a fixed structure within the pen barrel 20, and part of the pressure-sensing assembly 60 is fixedly connected to the spindle assembly 50. In this way, when the spindle assembly 50 moves with the pen tip 10, since part of the pressure-sensing assembly 60 is fixedly connected to the fixed structure within the pen barrel 20, the movement of the spindle assembly 50 drives the pressure-sensing assembly 60 to deform. The deformation of the pressure-sensing assembly 60 is transmitted to the circuit board 70 (for example, the pressure-sensing assembly 60 and the circuit board 70 can be electrically connected via a wire or a flexible circuit board). The circuit board 70 detects the pressure of the writing end 11 of the pen tip 10 based on the deformation of the pressure-sensing assembly 60, thereby controlling the thickness of the line at the writing end 11 according to the pressure at the writing end 11 of the pen tip 10.

[0049] It should be noted that the pressure detection of the pen tip 10 includes but is not limited to the above-mentioned method. For example, a pressure sensor can be provided in the writing end 11 of the pen tip 10 to detect the pressure of the pen tip 10 by the pressure sensor.

[0050] In this embodiment, refer to Figure 2B As shown, the stylus 100 further includes multiple electrodes, such as a first emitting electrode 41, a grounding electrode 43, and a second emitting electrode 42. The first emitting electrode 41, the grounding electrode 43, and the second emitting electrode 42 are all electrically connected to a circuit board 70. The first emitting electrode 41 can be located within the pen tip 10 and near the writing end 11. The circuit board 70 can be configured as a control board that provides signals to the first emitting electrode 41 and the second emitting electrode 42, respectively. The first emitting electrode 41 is configured to emit a first signal. When the first emitting electrode 41 is near the touch screen 201 of the electronic device 200, a coupling capacitor is formed between the first emitting electrode 41 and the touch screen 201 of the electronic device 200, allowing the electronic device 200 to receive the first signal. The second emitting electrode 42 is configured to emit a second signal. The electronic device 200 can determine the tilt angle of the stylus 100 based on the received second signal. In this embodiment of the present application, the second emitting electrode 42 can be located on the inner wall of the pen shaft 20. In one example, the second emitting electrode 42 can also be located on the spindle assembly 50.

[0051] The ground electrode 43 may be located between the first radiating electrode 41 and the second radiating electrode 42 , or may be located outside the first radiating electrode 41 and the second radiating electrode 42 . The ground electrode 43 is used to reduce coupling between the first radiating electrode 41 and the second radiating electrode 42 .

[0052] When the electronic device 200 receives the first signal from the stylus 100, the capacitance value at the corresponding position on the touch screen 201 changes. Accordingly, the electronic device 200 can determine the position of the stylus 100 (or the tip of the stylus 100) on the touch screen 201 based on the change in capacitance value on the touch screen 201. Furthermore, the electronic device 200 can use the dual-tip projection method in the tilt detection algorithm to obtain the tilt angle of the stylus 100. The first emitting electrode 41 and the second emitting electrode 42 are located at different positions in the stylus 100. Therefore, when the electronic device 200 receives the first signal and the second signal from the stylus 100, the capacitance values ​​at the two positions on the touch screen 201 change. The electronic device 200 can obtain the tilt angle of the stylus 100 based on the distance between the first emitting electrode 41 and the second emitting electrode 42, and the distance between the two positions on the touch screen 201 where the capacitance value changes. For more detailed information on obtaining the tilt angle of the stylus 100, please refer to the relevant description of the dual-tip projection method in the prior art.

[0053] In the present application, refer to Figure 2B As shown, the stylus 100 further includes: a battery assembly 80, which is used to provide power to the circuit board 70. The battery assembly 80 may include a lithium-ion battery, or the battery assembly 80 may include a nickel-cadmium battery, an alkaline battery, or a nickel-metal hydride battery. In one embodiment, the battery included in the battery assembly 80 may be a rechargeable battery or a disposable battery, wherein when the battery included in the battery assembly 80 is a rechargeable battery, the stylus 100 may charge the battery in the battery assembly 80 by wireless charging. Of course, the battery in the battery assembly 80 may also be charged by wired charging. For example, a power connector (not shown in the figure) is provided at one end of the pen body 20 close to the back cover 30, and the power connector is connected to the battery assembly 80. The back cover 30 may shield the power connector.

[0054] When the stylus 100 is an active capacitive stylus, refer to Figure 2C , after the electronic device 200 and the stylus 100 are wirelessly connected, the electronic device 200 can send an uplink signal to the stylus 100 through the electrode array integrated on the touch screen 201. The stylus 100 can receive the uplink signal through the receiving electrode, and the stylus 100 can transmit the downlink signal through the transmitting electrode (for example, the first transmitting electrode 41 and the second transmitting electrode 42). The downlink signal includes the above-mentioned first signal and the second signal. When the tip 10 of the stylus 100 contacts the touch screen 201, the capacitance value at the corresponding position of the touch screen 201 will change, and the electronic device 200 can determine the position of the tip 10 of the stylus 100 on the touch screen 201 based on the capacitance value on the touch screen 201. In one embodiment, the uplink signal and the downlink signal can be square wave signals.

[0055] The following is a schematic diagram of the hardware structure of a stylus pen 100 provided in an embodiment of the present application.

[0056] Please refer to Figure 3 , Figure 3 A schematic diagram of the hardware structure of a stylus provided in an embodiment of the present application. The stylus 100 may include a processor 110, a pressure sensor 120, an inertial sensor 130, a status indicator 140, a button 150, electrodes 160, a sensing circuit 170, a Bluetooth module 180, and a charging module 190.

[0057] Among other things, the processor 110 may include storage and processing circuitry for supporting the operation of the stylus 100. The storage and processing circuitry may include storage devices such as non-volatile memory (e.g., flash memory or other electrically programmable read-only memory configured as a solid-state drive), volatile memory (e.g., static or dynamic random access memory), and the like. The processing circuitry in the processor 110 may be used to control the operation of the stylus 100. The processing circuitry may be based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio chips, application-specific integrated circuits, and the like. The processor 110 may be used to run software on the stylus 100 that controls the operation of the stylus 100. During operation of the stylus 100, the software running on the processor 110 may process sensor inputs, button inputs, and inputs from other devices to monitor movement of the stylus 100 and other user inputs. The software running on the processor 110 may detect user commands and may communicate with the electronic device 200.

[0058] The stylus pen 100 may include one or more sensors. For example, the sensor may include a pressure sensor 120. The pressure sensor 120 may be provided at the writing end 11 (e.g., Figure 2B As shown). Of course, the pressure sensor 120 can also be disposed within the pen holder 20 of the stylus 100. In this way, when force is applied to one end of the tip 10 of the stylus 100, the other end of the tip 10 moves to apply the force to the pressure sensor 120. In one embodiment, the processor 110 can adjust the thickness of the line drawn by the tip 10 of the stylus 100 based on the pressure detected by the pressure sensor 120.

[0059] The sensor may also include an inertial sensor 130. The inertial sensor 130 may include a three-axis accelerometer and a three-axis gyroscope, and / or other components for measuring the motion of the stylus 100. For example, a three-axis magnetometer may be included in the sensor in a nine-axis inertial sensor configuration. The sensor may also include additional sensors such as a temperature sensor, an ambient light sensor, a light-based proximity sensor, a contact sensor, a magnetic sensor, a pressure sensor, and / or other sensors.

[0060] The stylus 100 may include a status indicator 140 such as a light-emitting diode and a button 150. The status indicator 140 is used to inform the user of the status of the stylus 100. The button 150 may include a mechanical button or a non-mechanical button, and the button 150 may be used to collect button press information from the user.

[0061] In the embodiment of the present application, the stylus pen 100 may include one or more electrodes 160 (for details, please refer to Figure 2B ), one of the electrodes 160 may be located at the writing end of the stylus 100, and one of the electrodes 160 may be located within the pen tip 10, and reference may be made to the above-mentioned related descriptions.

[0062] Stylus 100 may include sensing circuitry 170. Sensing circuitry 170 can sense the capacitive coupling between electrode 160 and the drive lines of a capacitive touch sensor panel interacting with stylus 100. Sensing circuitry 170 may include an amplifier for receiving capacitance readings from the capacitive touch sensor panel, a clock for generating a demodulation signal, a phase shifter for generating a phase-shifted demodulation signal, a mixer for demodulating the capacitance readings using an in-phase demodulation frequency component, and a mixer for demodulating the capacitance readings using a quadrature demodulation frequency component. The demodulation result of the mixer can be used to determine an amplitude proportional to the capacitance, allowing stylus 100 to sense contact with the capacitive touch sensor panel.

[0063] It is understood that, depending on actual needs, the stylus 100 may include a microphone, a speaker, an audio generator, a vibrator, a camera, a data port, and other devices. A user can use these devices to provide commands to control the operation of the stylus 100 and the electronic device 200 interacting with the stylus 100, and receive status information and other outputs.

[0064] In order to support wireless communication between the stylus pen 100 and the electronic device 200 , the stylus pen 100 may include a wireless module. Figure 4 In the description, the wireless module is taken as the Bluetooth module 180 as an example. The wireless module can also be a wireless local area network (WLAN) module such as a wireless fidelity (Wi-Fi) network hotspot module, a WI-FI point-to-point module, etc. The Bluetooth module 180 may include a radio frequency transceiver, such as a transceiver. The Bluetooth module 180 may also include one or more antennas. The transceiver can use the antenna to transmit and / or receive wireless signals. The wireless signals can be Bluetooth signals, wireless local area network signals, long-range signals such as cellular phone signals, near-field communication signals, or other wireless signals based on the type of wireless module.

[0065] The stylus pen 100 may further include a charging module 190 . The charging module 190 may support charging of the stylus pen 100 and provide power for the stylus pen 100 .

[0066] The following describes the hardware structure of an electronic device 200 provided in an embodiment of the present application.

[0067] Please refer to Figure 4 , Figure 4 A schematic diagram of the hardware structure of an electronic device 200 is exemplarily shown.

[0068] like Figure 4 As shown, electronic device 200 may include multiple subsystems that cooperate to perform, coordinate, or monitor one or more operations or functions of electronic device 200. Electronic device 200 includes processor 210, input surface 220, coordination engine 230, power subsystem 240, power connector 250, wireless interface 260, and display 270.

[0069] Among them, the coordination engine 230 can be used to communicate and / or process data with other subsystems of the electronic device 200; communicate and / or trade data with the stylus 100; measure and / or obtain the output of one or more analog or digital sensors (such as touch sensors); measure and / or obtain the output of one or more sensor nodes of a sensor node array (such as an array of capacitive sensing nodes); receive and locate the tip signal and ring signal from the stylus 100; locate the stylus 100 based on the position of the tip signal intersection area and the ring signal intersection area, etc.

[0070] The coordination engine 230 of the electronic device 200 includes or is otherwise communicatively coupled to a sensor layer located beneath or integrated with the input surface 220. The coordination engine 230 utilizes the sensor layer to locate the stylus 100 on the input surface 220 and uses the techniques described herein to estimate the angular position of the stylus 100 relative to the plane of the input surface 220. In one embodiment, the input surface 220 may be referred to as a touch screen 201.

[0071] For example, the sensor layer of coordination engine 230 of electronic device 200 is a grid of capacitive sensing nodes arranged in columns and rows. More specifically, the column trace array is arranged perpendicular to the row trace array. The sensor layer can be separate from other layers of the electronic device, or the sensor layer can be directly disposed on another layer, such as, but not limited to, a display stack layer, a force sensor layer, a digitizer layer, a polarizer layer, a battery layer, a structural or decorative housing layer, etc.

[0072] The sensor layer can operate in multiple modes. If operating in mutual capacitance mode, the column traces and row traces form a single capacitive sensing node at each point of overlap (e.g., "vertical" mutual capacitance). If operating in self-capacitance mode, the column traces and row traces form two (vertically aligned) capacitive sensing nodes at each point of overlap. In another embodiment, if operating in mutual capacitance mode, adjacent column traces and / or adjacent row traces can each form a single capacitive sensing node (e.g., "horizontal" mutual capacitance). As described above, the sensor layer can detect the presence of the tip 10 of the stylus 100 and / or the touch of the user's finger by monitoring the changes in capacitance (e.g., mutual capacitance or self-capacitance) presented at each capacitive sensing node. In many cases, the coordination engine 230 can be configured to detect the tip signal and the ring signal received from the stylus 100 through the sensor layer via capacitive coupling.

[0073] The tip signal and / or ring signal may include specific information and / or data that can be configured to allow the electronic device 200 to identify the stylus 100. Such information is generally referred to herein as "stylus identity" information. This information and / or data may be received by the sensor layer and interpreted, decoded, and / or demodulated by the coordination engine 230.

[0074] Processor 210 can use the stylus identity information to simultaneously receive input from more than one stylus. Specifically, coordination engine 230 can be configured to transmit the position and / or angular position of each of the plurality of styluses detected by coordination engine 230 to processor 210. In other cases, coordination engine 230 can also transmit information related to the relative positions and / or relative angular positions of the plurality of styluses detected by coordination engine 230 to processor 210. For example, coordination engine 230 can notify processor 210 that a first stylus detected is located at a distance from a second stylus detected.

[0075] In other cases, the end signal and / or the ring signal may also include specific information and / or data for identifying a specific user by the electronic device 200. Such information is generally referred to herein as "user identity" information.

[0076] Coordination engine 230 may forward user identity information (if detected and / or recoverable) to processor 210. If the user identity information cannot be recovered from the tip signal and / or the ring signal, coordination engine 230 may optionally indicate to processor 210 that the user identity information is unavailable. Processor 210 may utilize the user identity information (or its absence) in any suitable manner, including but not limited to accepting or rejecting input from a particular user, allowing or denying access to a particular function of the electronic device, etc. Processor 210 may use the user identity information to receive input from more than one user simultaneously.

[0077] In still other cases, the tip signal and / or ring signal may include specific information and / or data that can be configured to allow the electronic device 200 to identify settings or preferences of the user or stylus 100. Such information is generally referred to herein as "stylus settings" information.

[0078] The coordination engine 230 may forward the stylus settings information (if detected and / or recoverable) to the processor 210. If the stylus settings information cannot be recovered from the tip signal and / or the ring signal, the coordination engine 230 may optionally indicate to the processor 210 that the stylus settings information is unavailable. The electronic device 200 may utilize the stylus settings information (or the absence of such information) in any suitable manner, including but not limited to: applying the settings to the electronic device, applying the settings to a program running on the electronic device, changing the line thickness, color, or pattern rendered by a graphics program of the electronic device, changing the settings of a video game played on the electronic device, etc.

[0079] Generally speaking, the processor 210 may be configured to execute, coordinate, and / or manage the functions of the electronic device 200. Such functions may include, but are not limited to, communicating and / or transacting data with other subsystems of the electronic device 200, communicating and / or transacting data with the stylus 100, communicating and / or transacting data via a wireless interface, communicating and / or transacting data via a wired interface, facilitating power exchange via a wireless (e.g., inductive, resonant, etc.) or wired interface, receiving the position and angular position of one or more styluses, and the like.

[0080] The processor 210 can be implemented as any electronic device capable of processing, receiving, or sending data or instructions. For example, the processor can be a microprocessor, a central processing unit, an application-specific integrated circuit, a field programmable gate array, a digital signal processor, an analog circuit, a digital circuit, or a combination of these devices. The processor can be a single-threaded or multi-threaded processor. The processor can be a single-core or multi-core processor.

[0081] During use, the processor 210 may be configured to access a memory storing instructions that may be configured to cause the processor to perform, coordinate, or monitor one or more operations or functions of the electronic device 200 .

[0082] The instructions stored in the memory may be configured to control or coordinate the operation of other components of the electronic device 200, such as, but not limited to: another processor, analog or digital circuitry, volatile or non-volatile memory modules, displays, speakers, microphones, rotary input devices, buttons or other physical input devices, biometric authentication sensors and / or systems, force or touch input / output components, communication modules (such as wireless interfaces and / or power connectors), and / or tactile feedback devices.

[0083] The memory can also store electronic data that can be used by the stylus or the processor. For example, the memory can store electronic data or content (such as media files, documents, and applications), device settings and preferences, timing signals and control signals, or data, data structures, or databases for various modules, files or configurations related to detecting tip signals and / or ring signals, and the like. The memory can be configured as any type of memory. For example, the memory can be implemented as random access memory, read-only memory, flash memory, removable memory, other types of storage elements, or a combination of such devices.

[0084] The electronic device 200 also includes a power subsystem 240. The power subsystem 240 may include a battery or other power source. The power subsystem 240 may be configured to provide power to the electronic device 200. The power subsystem 240 may also be coupled to a power connector 250. The power connector 250 may be any suitable connector or port that may be configured to receive power from an external power source and / or configured to provide power to an external load. For example, in some embodiments, the power connector 250 may be used to recharge a battery within the power subsystem 240. In another embodiment, the power connector 250 may be used to transfer power stored in the power subsystem 240 to the stylus 100.

[0085] The electronic device 200 also includes a wireless interface 260 to facilitate electronic communication between the electronic device 200 and the stylus 100. In one embodiment, the electronic device 200 can be configured to communicate with the stylus 100 via a low-energy Bluetooth communication interface or a near-field communication interface. In other examples, the communication interface facilitates electronic communication between the electronic device 200 and an external communication network, device, or platform.

[0086] The wireless interface 260 (whether it is a communication interface between the electronic device 200 and the stylus 100 or another communication interface) can be implemented as one or more wireless interfaces, Bluetooth interfaces, near-field communication interfaces, magnetic interfaces, universal serial bus interfaces, inductive interfaces, resonant interfaces, capacitive coupling interfaces, Wi-Fi interfaces, TCP / IP interfaces, network communication interfaces, optical interfaces, acoustic interfaces or any traditional communication interfaces.

[0087] Electronic device 200 also includes a display 270. Display 270 can be located behind input surface 220 or can be integrated therewith. Display 270 can be communicatively coupled to processor 210. Processor 210 can use display 270 to present information to a user. In many cases, processor 210 uses display 270 to present an interface with which a user can interact. In many cases, the user manipulates stylus 100 to interact with the interface.

[0088] It will be apparent to those skilled in the art that some of the specific details presented above regarding the electronic device 200 may not be necessary for practicing a particular embodiment or its equivalent. Similarly, other electronic devices may include a greater number of subsystems, modules, components, etc. Where appropriate, some submodules may be implemented as software or hardware. Therefore, it should be understood that the above description is not intended to be exhaustive or to limit the present disclosure to the precise form described herein. On the contrary, it will be apparent to those skilled in the art that, based on the above teachings, many modifications and variations are possible.

[0089] Currently, when a user uses a stylus pen 100 to perform operations such as tapping, writing, and erasing on the touch screen of an electronic device 200, the tip of the stylus pen 100 inevitably wears out over time. If the user fails to replace the stylus pen 100 tip in a timely manner when the tip wears out to a certain extent, continued use of the stylus pen 100 with a worn tip will not only reduce the performance and efficiency of the stylus pen 100 but also accelerate damage to the touch screen of the electronic device 200.

[0090] Therefore, the present application provides a stylus pen tip detection method for detecting the degree of wear of the stylus pen 100 tip and promptly reminding the user to replace the stylus pen 100 tip.

[0091] When a user uses the stylus 100 to touch, write, and erase on the touch screen of the electronic device 200, friction is generated between the stylus 100 and the touch screen of the electronic device 200, causing the tip of the stylus 100 to wear. The magnitude of this friction can be calculated using the following formula 1:

[0092] F1=μ×F2

[0093] Here, F1 represents the frictional force generated between the stylus 100 and the touch screen of the electronic device 200 when in use; μ represents the coefficient of friction between the stylus 100 and the touch screen of the electronic device 200; and F2 represents the pressure generated between the stylus 100 and the touch screen of the electronic device 200 when in use. As can be seen from Formula 1 above, the magnitude of the frictional force generated between the stylus 100 and the touch screen of the electronic device 200 when in use is related to the coefficient of friction and the magnitude of the pressure generated therebetween. The frictional coefficient and pressure values ​​are directly proportional to the frictional force. That is, the greater the coefficient of friction between the stylus 100 and the touch screen of the electronic device 200 and / or the greater the pressure generated therebetween, the greater the frictional force experienced by the stylus 100 during use, the greater the wear on the stylus 100, and the shorter the usable time of the stylus 100.

[0094] Therefore, in the stylus tip detection method provided in the embodiments of the present application, the electronic device 200 can determine the degree of wear of the stylus tip of the stylus 100 based on the friction coefficient between the stylus 100 and the touch screen of the electronic device 200, the pressure value detected by the stylus 100, and the total usage time of the stylus 100. When the electronic device 200 detects that the total usage time of the stylus 100 is greater than or equal to the allowed usage time of the stylus 100 set by the electronic device 200 (referred to as the wear time threshold in subsequent embodiments), the electronic device 200 determines that the wear of the stylus tip of the stylus 100 has reached a level that requires replacement. The electronic device 200 can then display a prompt message 1 to prompt the user to replace the stylus tip of the stylus 100. Specifically, the electronic device 200 can determine the allowed usage time of the stylus 100 based on the friction coefficient; and the electronic device 200 can determine the total usage time of the stylus 100 based on one or more pressure values ​​detected by the stylus 100 and the usage time corresponding to each pressure value. The specific implementation will be described in detail in the subsequent embodiments and will not be repeated here.

[0095] It can be seen from the above process that by implementing the stylus pen tip detection method provided in the present application, when the stylus pen 100 tip is worn during use, the electronic device 200 can promptly prompt the user to replace the stylus pen 100 tip, thereby improving the performance and efficiency of the stylus pen 100 and reducing the degree of damage to the touch screen on the electronic device 200.

[0096] Next, a method for detecting the tip of the stylus pen 100 provided in an embodiment of the present application is introduced.

[0097] Please refer to Figure 5 , Figure 5The specific process of the stylus pen 100 tip detection method provided in the embodiment of the present application is exemplified. Figure 5 As shown, the embodiment of the present application takes an active capacitive stylus as an example, and the specific process of the method may include:

[0098] S501 . The stylus pen 100 and the electronic device 200 establish a wireless communication connection.

[0099] Specifically, the embodiment of the present application takes Bluetooth connection as an example. The electronic device 200 can transmit a signal through the Bluetooth module to detect or scan the stylus 100, establish a wireless communication connection with the stylus 100, and transmit data. The Bluetooth module can provide a solution for Bluetooth communication including one or more of classic Bluetooth (basic rate / enhanced data rate, BR / EDR) or Bluetooth low energy (Bluetooth low energy, BLE).

[0100] In some embodiments, the electronic device 200 may also detect or scan the stylus 100 by transmitting a signal through a WLAN module, establish a wireless communication connection with the stylus 100, and transmit data. The WLAN module may provide a solution for one or more WLAN communications including Wi-Fi direct, Wi-Fi LAN, or Wi-Fi softAP. In other embodiments, the stylus 100 may also establish a wireless communication connection with the electronic device 200 through frequency modulation (FM), near field communication (NFC), or infrared technology (IR) to transmit wireless communication data, and this application does not limit this.

[0101] S502: The stylus pen 100 detects real-time pressure information when the stylus pen 100 is in use. The pressure information may include one or more pressure values ​​(eg, pressure value 1).

[0102] Specifically, regarding the method for the stylus pen 100 to detect the real-time pressure information when the stylus pen 100 is used, reference can be made to the aforementioned Figure 2A-2B The description in the embodiment will not be repeated here. For example, the embodiment of the present application can detect real-time pressure information when the stylus 100 is used based on the pressure sensor configured on the stylus 100. The pressure information can include one or more pressure values, and the one or more pressure values ​​can include pressure value 1.

[0103] For example, the stylus 100 can draw a line segment on the touch screen of the electronic device 200. Figure 6As shown, the line segment may be a line segment 601 displayed on the touch screen of the electronic device 200. The line segment 601 may be divided into three parts: a line segment a, a line segment b, and a line segment c. The above different line segment parts correspond to different pressure values. The stylus 100 may detect pressure information of the stylus 100 when drawing the line segment 601 based on a pressure sensor configured on the stylus 100. The pressure information may include multiple pressure values: a pressure value of 500 (also referred to as a pressure value 1) when the stylus 100 draws the line segment a, a pressure value of 1500 when the stylus 100 draws the line segment b, and a pressure value of 3500 when the stylus 100 draws the line segment c.

[0104] S503 . The stylus pen 100 sends the detected pressure information to the electronic device 200 in real time.

[0105] Specifically, the stylus 100 can transmit the detected pressure information to the electronic device 200 in real time based on the wireless communication connection established in step S501. For example, if the stylus 100 and the electronic device 200 establish a Bluetooth communication connection via a Bluetooth module in step S501, the stylus 100 can transmit the detected pressure information to the electronic device 200 in real time based on the Bluetooth signal. The electronic device 200 can record the usage duration of each pressure value in the pressure information.

[0106] In one possible implementation, if the stylus 100 and the electronic device 200 establish a WLAN communication connection based on the WLAN module in step S501, the stylus 100 can send the detected pressure information to the electronic device 200 in real time based on the WLAN signal. In another possible implementation, the stylus 100 can also send the detected pressure information to the electronic device 200 in real time based on a wireless communication method such as FM, NFC, or IR. In another possible implementation, the stylus 100 can also send the detected pressure information to the electronic device 200 in real time based on an electrode signal. In other words, this application does not limit the method for sending pressure information.

[0107] S504. When the electronic device 200 detects that the stylus pen 100 touches the touch screen of the electronic device 200 for a first duration, the electronic device 200 determines a pressure value range to which each pressure value included in the pressure information within the first duration belongs.

[0108] Specifically, the electronic device 200 can detect the length of time that the stylus 100 touches the touch screen on the electronic device 200 by detecting the coordinate information of the stylus pen 100 contacting the touch screen on the electronic device 200. Specifically, one or more electrodes can be set in the stylus pen 100 (for example, in the pen tip), and the stylus pen 100 can transmit signals through the electrodes. A capacitive electrode array can be integrated on the touch screen of the electronic device 200 that interacts with the stylus pen 100. When the electronic device 200 receives a signal transmitted from the stylus pen 100, the coordinate information of the stylus pen 100 on the touch screen of the electronic device 200 can be determined based on the change in the capacitance value on the touch screen of the electronic device 200 caused by the received signal. When the electronic device 200 detects the coordinate information of the pen tip of the stylus 100 contacting the touch screen of the electronic device 200 within the first time period, the electronic device 200 can determine that the stylus 100 is used based on the touch screen on the electronic device 200 within the first time period. Therefore, the pressure information within the first time period is the pressure information exerted by the stylus 100 on the touch screen of the electronic device 200 when in use. The electronic device 200 can execute subsequent steps based on the pressure information within the first time period.

[0109] The following describes in detail a method by which the electronic device 200 determines the pressure value range to which each pressure value belongs based on the pressure information within the first time period.

[0110] Currently, the pressure accuracy level of the stylus 100 can be 256, 1024, or 4096. That is, when the pressure accuracy level of the stylus 100 is 256, the stylus 100 can detect 256 different pressure values. The electronic device 200 can receive the pressure values ​​detected by the stylus 100. In response to the different pressure values, the electronic device 200 can display handwriting of varying thickness and density on the touch screen. When the pressure accuracy level of the stylus 100 is 1024, the stylus 100 can detect 1024 different pressure values. The electronic device 200 can receive the pressure values ​​detected by the stylus 100. In response to the different pressure values, the electronic device 200 can display handwriting of varying thickness and density on the touch screen. When the pressure accuracy level of the stylus 100 is 4096, the stylus 100 can detect 4096 different pressure values. The electronic device 200 can receive the pressure values ​​detected by the stylus 100. In response to different pressure values, the electronic device 200 can display handwriting of different thicknesses and shades on the touch screen.

[0111] The electronic device 200 can preset multiple (e.g., 2, 3, or 4) pressure value ranges based on the pressure accuracy level of the stylus 100, with the different pressure value ranges not overlapping. The electronic device 200 can also preset corresponding allowed times based on different pressure value ranges. That is, when the stylus 100 is used at a pressure value within a certain pressure value range, the duration that the stylus 100 can be used is the allowed time corresponding to that pressure value range. If the stylus 100 is used for a duration greater than or equal to the allowed time, the electronic device 200 prompts the user to replace the stylus 100's nib. For example, pressure value range 1 corresponds to allowed time 1. When the stylus 100 is used at a pressure value within pressure value range 1, the duration that the stylus 100 can be used is allowed time 1. If the stylus 100 is used for a duration greater than or equal to the allowed time 1, the electronic device 200 prompts the user to replace the stylus 100's nib. As can be seen from Formula 1, pressure and friction are positively correlated. The greater the pressure, the greater the wear on the stylus 100. Therefore, the higher the upper limit of the pressure range, the shorter the corresponding allowable time. The allowable time corresponding to the above pressure range can be obtained through actual testing.

[0112] In an embodiment of the present application, the above-mentioned multiple pressure value ranges may include pressure value range 1 and pressure value range 2. Pressure value range 1 corresponds to allowed time 1 (also referred to as the first allowed duration), and pressure value range 2 corresponds to allowed time 2 (also referred to as the second allowed duration). If the upper limit value in pressure value range 1 is < the upper limit value in pressure value range 2, then allowed time 1 is > allowed time 2; if the upper limit value in pressure value range 1 is > the upper limit value in pressure value range 2, then allowed time 1 is < allowed time 2. The electronic device 200 can obtain the pressure information sent by the stylus 100, and the pressure information includes one or more pressure values. Based on the above-mentioned preset pressure value ranges, the electronic device 200 can determine the pressure value range to which each pressure value belongs. Among them, pressure value range 1 can be referred to as the first pressure value range, and pressure value range 2 can be referred to as the second pressure value range.

[0113] For example, Figure 6Taking the illustrated embodiment and the stylus 100 having a pressure accuracy level of 4096 as an example, the electronic device 200 can preset three pressure value ranges based on the pressure accuracy level of the stylus 100 as follows: a first level of 1 to 800 (also referred to as pressure value range 1), a second level of 801 to 3000 (also referred to as pressure value range 2), and a third level of 3001 to 4096. The upper limit of the first level is 800, the upper limit of the second level is 3000, and the upper limit of the third level is 4096. Therefore, the allowed time for the first level is less than the allowed time for the second level, and less than the allowed time for the third level. Therefore, based on the above pressure value ranges, the electronic device 200 can preset corresponding allowed times as follows: the allowed time for the first level (also referred to as allowed time 1) is 1800 hours, the allowed time for the second level (also referred to as allowed time 2) is 1000 hours, and the allowed time for the third level is 800 hours.

[0114] The electronic device 200 may receive the information that the stylus 100 draws the following image in the first time period in the aforementioned steps: Figure 6 The three pressure values ​​detected when the line segment 601 is shown are: 500 (also referred to as pressure value 1), 1500, and 3500. The electronic device 200 can determine that the pressure value 500 belongs to the first pressure value range of 1 to 800, the pressure value 1500 belongs to the second pressure value range of 801 to 3000, and the pressure value 3500 belongs to the third pressure value range of 3001 to 4096.

[0115] S505 . The electronic device 200 records the duration of use of the stylus pen 100 based on each pressure value range.

[0116] Specifically, when the electronic device 200 receives the pressure information sent by the stylus 100, it can obtain the usage time corresponding to each pressure value in the pressure information. The electronic device 200 records the usage time of the stylus 100 based on each pressure value range. That is, after the electronic device 200 determines the pressure value range to which each pressure value belongs, the electronic device 200 determines the sum of the usage time corresponding to each pressure value belonging to the same pressure value range as the usage time of the stylus 100 based on its corresponding pressure value range (also referred to as the usage time corresponding to the pressure value range). The electronic device 200 can record the usage time of the stylus 100 based on each pressure value range.

[0117] For example, in the embodiment of the present application, the usage duration corresponding to the pressure value 1 obtained by the electronic device 200 is usage duration 1. If the electronic device 200 determines that the pressure value 1 belongs to the pressure value range 1, and the pressure value range 1 only includes the pressure value 1, the duration of the use of the stylus pen 100 based on the pressure value range 1 is usage duration 1.

[0118] For example, the aforementioned Figure 6 Taking the illustrated embodiment as an example, and continuing with the example in the aforementioned steps, the electronic device 200 can obtain that the usage time corresponding to a pressure value of 500 is 1 hour, the usage time corresponding to a pressure value of 1500 is 2 hours, and the usage time corresponding to a pressure value of 3500 is 3 hours. The pressure value of 500 belongs to the first level of pressure value range of 1 to 800, the pressure value of 1500 belongs to the second level of pressure value range of 801 to 3000, and the pressure value of 3500 belongs to the third level of pressure value range of 3001 to 4096.

[0119] Therefore, the electronic device 200 may record that the stylus pen 100 is used for 1 hour based on the first level 1-800, is used for 2 hours based on the second level 801-3000, and is used for 3 hours based on the third level 3001-4096.

[0120] For example, if the electronic device 200 has three preset pressure value ranges as follows: a first level of 1 to 800 (also referred to as pressure value range 1), a second level of 801 to 3000 (also referred to as pressure value range 2), and a third level of 3001 to 4096, and the electronic device 200 obtains a usage time of 1 hour corresponding to a pressure value of 400, a usage time of 2 hours corresponding to a pressure value of 500, and a usage time of 3 hours corresponding to a pressure value of 600, and the electronic device 200 determines that the pressure values ​​400, 500, and 600 belong to the first level 1 to 800, the electronic device 200 can record the usage time of the stylus 100 based on the first level 1 to 800 as the sum of the usage time corresponding to the pressure values ​​400, 500, and 600, that is, 1+2+3=6 hours.

[0121] S506. The electronic device 200 normalizes the usage time corresponding to each pressure value range.

[0122] Specifically, the electronic device 200 can perform normalized calculation on the usage time corresponding to each pressure value range, obtain the normalized usage time of each pressure value range, and then calculate the sum of each normalized usage time, so as to determine the total usage time of the stylus 100. Among them, the normalized calculation (that is, normalization processing) in the embodiment of the present application refers to mapping the usage time corresponding to each pressure value range to a specified pressure value range to obtain a new usage time, and the new usage time can be called the normalized usage time corresponding to each pressure value range. For example, pressure value range 1 corresponds to usage time 1 (which can be called the first usage time). After normalization processing, pressure value range 1 corresponds to normalized usage time 1; pressure value range 2 corresponds to usage time 2 (which can be called the second usage time). After normalization processing, pressure value range 2 corresponds to normalized usage time 2.

[0123] The following describes in detail the method by which the electronic device 200 determines the normalized usage time corresponding to each pressure value range.

[0124] In the above steps, the electronic device 200 records each pressure value range and the corresponding usage time. Taking pressure value range 1 and corresponding usage time 1 as an example, the steps for the electronic device 200 to perform normalization processing to determine the normalized usage time 1 corresponding to pressure value range 1 can be as follows:

[0125] a) The electronic device 200 determines the standard pressure value range and the corresponding allowable time in the normalization process.

[0126] Among them, the standard pressure value range in the normalization process can mean that the usage time corresponding to the pressure value range is the same as the normalized usage time corresponding to the pressure value range. The standard pressure value range is the specified pressure value range mentioned above. The usage time corresponding to other non-standard pressure value ranges needs to be normalized to be mapped to the standard pressure value range. Therefore, the usage time corresponding to the non-standard pressure value range is different from the normalized usage time corresponding to the pressure value range.

[0127] Taking the aforementioned embodiment as an example, in which the multiple pressure value ranges include pressure value range 1 and pressure value range 2, and pressure value range 1 corresponds to allowed time 1, and pressure value range 2 corresponds to allowed time 2, the present embodiment uses pressure value range 2 and its corresponding allowed time 2 as the standard pressure value range and corresponding allowed time in the normalization process.

[0128] b) The electronic device 200 determines the normalization coefficient corresponding to each pressure value range.

[0129] Specifically, the allowable time of each pressure value range divided by the allowable time of the standard pressure value range is the normalization coefficient corresponding to each pressure value range.

[0130] The normalization coefficient of the standard pressure value range is 1. Therefore, the usage time corresponding to the pressure value range is the same as the normalized usage time corresponding to the pressure value range.

[0131] For example, in the aforementioned embodiment, multiple pressure value ranges include pressure value range 1 and pressure value range 2, and pressure value range 1 corresponds to allowed time 1, while pressure value range 2 corresponds to allowed time 2. In the embodiment of the present application, pressure value range 2 and its corresponding allowed time 2 are used as the standard pressure value range and the corresponding allowed time in the normalization process. The normalization coefficient corresponding to pressure value range 2 is 1; the normalization coefficient corresponding to pressure value range 1 is the value calculated by dividing allowed time 1 by allowed time 2. The normalization coefficient corresponding to pressure value range 1 can also be referred to as the first coefficient.

[0132] c) The electronic device 200 determines the normalized usage time corresponding to each pressure value range based on the normalization coefficient corresponding to each pressure value range.

[0133] Specifically, the electronic device 200 may divide the usage time corresponding to each pressure value by a normalization coefficient corresponding to each pressure value range to determine the normalized usage time corresponding to each pressure value.

[0134] For example, in the aforementioned embodiment, the multiple pressure value ranges include pressure value range 1 and pressure value range 2. The electronic device 200 has recorded pressure value range 1 and the corresponding usage duration 1. The normalized usage duration 1 corresponding to pressure value range 1 is the value obtained by multiplying usage duration 1 by the normalization coefficient corresponding to pressure value range 1.

[0135] For example, Figure 6 Taking the illustrated embodiment as an example, in the aforementioned steps, the electronic device 200 determines the second level and its allowable time as the standard pressure value range and corresponding allowable time in the normalization process. The normalization coefficient for the first level is: 1800 ÷ 1000 = 1.8; the normalization coefficient for the second level is 1; and the normalization coefficient for the third level is: 800 ÷ 1000 = 0.8.

[0136] In the above steps, the electronic device 200 has recorded that the usage time corresponding to the first level 1-800 is 1 hour, the usage time corresponding to the second level 801-3000 is 2 hours, and the usage time corresponding to the third level 3001-4096 is 3 hours. Therefore, the normalized usage time corresponding to the first level 1-800 (also referred to as normalized usage time 1) is 1 ÷ 1.8 = 0.55 hours; the normalized usage time corresponding to the second level 801-3000 is 2 hours; and the normalized usage time corresponding to the third level 3001-4096 is 3 ÷ 0.8 = 3.75 hours.

[0137] S507 . The electronic device 200 calculates the total usage time of the stylus pen 100 based on the normalized usage time corresponding to each pressure value range.

[0138] Specifically, the electronic device 200 may determine the total usage time of the stylus pen 100 based on the usage of the stylus pen 100. The usage of the stylus pen 100 may be divided into: first use and non-first use.

[0139] 1) When the stylus pen 100 is used for the first time, the total usage time of the stylus pen 100 is the sum of the normalized usage time corresponding to each pressure value range determined by the electronic device 200 based on the current use of the stylus pen 100.

[0140] For example, Figure 6 Take the embodiment shown as an example. Figure 6 When the stylus pen 100 in the illustrated embodiment is used for the first time, the total usage time of the stylus pen 100 is the sum of the normalized usage time corresponding to the first level 1-800, the normalized usage time corresponding to the second level 801-3000, and the normalized usage time corresponding to the third level 3001-4096, determined by the electronic device 200 based on the current use of the stylus pen 100, that is, 0.55+2+3.75=6.3 hours.

[0141] 2) If this is not the first time the stylus 100 is used, that is, the electronic device 200 has stored in its historical records the usage durations of the stylus 100 used in various pressure ranges before this time (i.e., during its historical usage), the total usage duration of the stylus 100 is the sum of the normalized usage durations corresponding to each pressure range in the historical records and the normalized usage durations corresponding to each pressure range recorded by the electronic device 200 during the current use.

[0142] For example, Figure 6 Take the embodiment shown as an example. Figure 6 In the illustrated embodiment, when the stylus 100 is not being used for the first time, the history of the electronic device 200 stores the usage duration of the stylus 100 based on various pressure value ranges used prior to this use (i.e., during its historical usage): the first level 1-800 corresponds to a usage duration of 200 hours, and the second level 801-3000 corresponds to a usage duration of 500 hours. Therefore, the normalized usage duration corresponding to the first level 1-800 is 200 ÷ 1.8 = 111 hours; the normalized usage duration corresponding to the second level 801-3000 is 500 hours. Therefore, the total usage duration of the stylus 100 is: 0.55 + 2 + 3.75 + 111 + 500 = 617.3 hours.

[0143] In one possible implementation, the history records of the electronic device 200 may also store the usage time before this time (that is, the usage time of the stylus pen 100 in the past). In this case, the total usage time of the stylus pen 100 is the sum of the usage time of the stylus pen 100 in the history records and the normalized usage time corresponding to each pressure value range received by the electronic device 200 during the current use.

[0144] For example, the above Figure 6 Taking the embodiment shown as an example where the stylus pen 100 is not being used for the first time, if the history of the electronic device 200 stores 611 hours of usage prior to this time (i.e., during the history of the stylus pen 100), the total usage time of the stylus pen 100 is: 0.55 + 2 + 3.75 + 611 = 617.3 hours.

[0145] S508 . The electronic device 200 determines a wear time threshold of the stylus pen 100 based on the friction coefficient.

[0146] Specifically, it can be seen from the aforementioned formula 1 that the friction coefficient between the stylus 100 and the touch screen of the electronic device 200 is positively correlated with the friction force between the two. Therefore, the friction coefficient is also related to the service life of the stylus pen 100 tip. Therefore, the electronic device 200 can determine the allowable time corresponding to the standard pressure value range in the aforementioned normalization process as the initial wear time threshold. For example, in the aforementioned step, the electronic device 200 uses the pressure value range 2 as the standard pressure value range in the normalization process, and the corresponding allowable time 2 is the initial wear time threshold. The electronic device 200 can adjust the initial wear time threshold based on the friction coefficient to characterize the relationship between the service life of the stylus pen 100 tip and the friction coefficient.

[0147] In some application scenarios, the change in the coefficient of friction between the stylus 100 and the touch screen of the electronic device 200 is usually caused by the protective film affixed to the touch screen. Therefore, the wear time thresholds of the touch screen of the electronic device 200 with and without a protective film are different; when different protective films are affixed to the touch screen of the electronic device 200, the corresponding wear time thresholds are also different. The greater the friction coefficient of the protective film, the shorter the wear time threshold. For example, when the touch screen of the electronic device 200 is not affixed to the protective film, the corresponding wear time threshold is the first value; when the touch screen of the electronic device 200 is affixed to the first protective film, the corresponding wear time threshold is the second value; when the touch screen of the electronic device 200 is affixed to the second protective film, the corresponding wear time threshold is the third value. Among them, the friction coefficient of the second protective film is greater than that of the first protective film, then the first value> the second value> the third value.

[0148] However, the electronic device 200 cannot quantitatively detect the friction coefficient of the protective film. At the same time, since the protective film increases the gap between the stylus 100 and the touch screen of the electronic device 200 and reduces the capacitive coupling, the signal detected by the electronic device 200 will be attenuated. Figure 7A As shown, actual testing has shown that protective films with different friction coefficients cause different signal attenuation. Protective films with greater friction coefficients cause greater signal attenuation. Therefore, the magnitude of the friction coefficient can be characterized by the magnitude of the signal sent by stylus 100 to electronic device 200, as detected by electronic device 200.

[0149] The electronic device 200 determines the wear time threshold of the stylus pen 100 based on the friction coefficient. That is, the electronic device 200 adjusts the initial wear time threshold of the stylus pen 100 based on the detected signal amount.

[0150] like Figure 7BAs shown, the specific process of this adjustment method can be as follows:

[0151] a), During the use of the stylus 100, the electronic device 200 detects multiple signal amounts corresponding to multiple different positions of the stylus 100 on the touch screen of the electronic device 200. Among them, position 1 (which can also be called the first position) corresponds to signal amount 1, and position 2 corresponds to signal amount 2 (which can also be called the second position). Position 1 and position 2 are different.

[0152] b), Based on the above multiple signal amounts and the value of the signal amount when the touch screen is not pasted with a film being S0, the electronic device 200 determines whether the touch screen on the electronic device 200 is pasted with a film.

[0153] Among them, the electronic device 200 can store the value S0 of the signal amount when the protective film is not pasted. Before the stylus 100 and the electronic device 200 leave the factory, that is, when the user has not used the electronic device 200 and the stylus 100, the touch screen of the electronic device 200 is not pasted with a protective film. When the electronic device 200 detects that the stylus 100 operates at one or more positions on the touch screen (for example, click, writing, etc.), the value S0 of the signal amount of the stylus 100. Specifically, the electronic device 200 can detect multiple signal amounts corresponding to multiple different positions. Among them, position 1 corresponds to signal amount 1, and position 2 corresponds to signal amount 2. Position 1 and position 2 are different, and the value of signal amount 2 and the value of signal amount 1 are both S0, then the electronic device 200 determines that the touch screen is not pasted with a protective film, and the value of the signal amount of the stylus 100 is S0. The electronic device 200 can store the value S0 of this signal amount. Among them, the signal amount of the stylus 100 when the touch screen of the electronic device 200 is not pasted with a protective film can be called the first signal amount.

[0154] Then, during the process of the user using the electronic device 200 and the stylus 100, when the electronic device 200 detects that the values of multiple signal amounts (for example, signal amount 1 and signal amount 2) are the same, being S1 (which can also be called the fifth value), and S1 < S0, and the difference between the two is greater than or equal to the first threshold (for example, 0.85, 0.9, etc.), the electronic device 200 can determine that the touch screen is pasted with a protective film.

[0155] c), When the electronic device 200 determines that the touch screen is pasted with a protective film, adjust the initial wear duration threshold of the stylus 100.

[0156] Specifically, the adjusted wear duration threshold = the initial wear duration threshold × (S1 ÷ S0). Since S1 < S0, the value obtained by S1 ÷ S0 is less than 1, and the adjusted wear duration threshold < the initial wear duration threshold, shortening the service life of the stylus 100. This adjustment method can reflect the influence of the friction coefficient on the service life of the stylus 100. Among them, the electronic device 200 can set the initial wear duration threshold as the wear duration threshold corresponding to when the touch screen on the electronic device 200 has no protective film attached.

[0157] In some embodiments, when the electronic device 200 detects that the values of multiple semaphores (for example, semaphore 1 and semaphore 2) are the same, being S2 (which can also be referred to as the fourth value), and the difference between S2 and S0 is less than the first threshold (for example, 0.85, 0.9, etc.), the electronic device 200 can determine that the touch screen has no protective film attached, and then the electronic device 200 does not need to adjust the initial wear threshold. That is to say, the electronic device 200 determines the allowable time 2 as the wear duration threshold when the touch screen of the electronic device 200 has no protective film attached (that is, the initial wear duration threshold). The electronic device 200 can perform subsequent steps based on the initial wear duration threshold.

[0158] It should be specifically noted that when different protective films are attached to the touch screen of the electronic device 200, the corresponding wear duration thresholds are different. For example, based on Figure 7B the adjusted wear duration threshold after the process adjustment is the second value, Figure 7B During the process, the film attached to the touch screen of the electronic device 200 is the first protective film. The wear duration threshold corresponding to when the touch screen of the electronic device 200 has no protective film attached is the first value. Then, if during the use of the stylus 100, the electronic device 200 detects multiple semaphores corresponding to multiple different positions on the touch screen of the electronic device 200 by the stylus 100 (for example, semaphore 1 corresponding to position 1, semaphore 2 corresponding to position 2), and the values of the multiple semaphores (for example, semaphore 1 and semaphore 2) are the same, being S3 (which can also be referred to as the sixth value), S3 < S1 < S0, and the difference between S3 and S0 is greater than or equal to the first threshold (for example, 0.85, 0.9, etc.), then the film attached to the touch screen of the electronic device 200 is the second protective film. The friction coefficient of the second protective film is greater than that of the first protective film. Then, when the second protective film is attached to the touch screen of the electronic device 200, the adjusted wear duration threshold is the third value, and this third value = the initial wear duration threshold × (S3 ÷ S0). This third value is less than the second value. Among them, the method for the electronic device 200 to detect that the second protective film is attached to the touch screen and adjust the wear duration threshold can refer to Figure 7B the process, which will not be elaborated here.

[0159] S509 . The electronic device 200 determines whether the total usage time of the stylus pen 100 is greater than or equal to a wear time threshold.

[0160] Specifically, after the electronic device 200 executes steps S501 to S508, the electronic device 200 may determine the total usage time and the wear time threshold of the stylus 100. The electronic device 200 may make a judgment based on the determined total usage time and the wear time threshold.

[0161] For example, Figure 6 Taking the illustrated embodiment as an example, in the aforementioned steps, the electronic device 200 uses the second level 801 to 3000 as the standard pressure value range in the normalization process, and the corresponding allowed time of 1000 hours is the initial wear time threshold; if the electronic device 200 detects in the aforementioned steps that the touch screen has a film, and the value of S1÷S0 is 0.9, the adjusted wear time threshold is 1000×0.9=900 hours, and the electronic device 200 can use the wear time threshold of 900 hours to perform this step; if the electronic device 200 detects in the aforementioned steps that the touch screen has no film, the electronic device 200 uses the initial wear time threshold of 1000 hours to perform this step.

[0162] It can be seen from the above process that the electronic device 200 converts the usage time of each pressure value into the usage time of the pressure value range to which each pressure value belongs, and normalizes the usage time of each pressure value range before making a judgment. This can reduce the amount of data stored in the electronic device 200, improve the efficiency of duration judgment, and also improve the accuracy of the electronic device 200 in detecting the degree of wear of the stylus pen 100 tip.

[0163] S510. When the electronic device 200 determines that the total usage time of the stylus pen 100 is greater than or equal to the wear time threshold, the electronic device 200 displays prompt information 1 (also referred to as first prompt information). Prompt information 1 is used to prompt the user to replace the stylus pen 100 nib.

[0164] For example, Figure 8As shown, the electronic device 200 can display a user interface 800. The user interface 800 may include one or more application icons (for example, a weather application icon, a stock application icon, a calculator application icon, a settings application icon, etc.). A page indicator may also be displayed below the one or more application icons to indicate the positional relationship between the currently displayed page and other pages. When the electronic device 200 determines that the total usage time of the stylus 100 is greater than the wear time threshold, the electronic device 200 may display a window 801 on the user interface 800. The window 801 may include prompt information 1, which may be a text message "Please replace the stylus pen tip in time!" to prompt the user to replace the stylus pen 100 tip. The window 801 may also include a control 802, which may receive a touch operation (for example, a click) performed by the user. In response to the touch operation, the electronic device 200 may no longer display the window 801.

[0165] In some embodiments, when the electronic device 200 determines that the total usage time of the stylus 100 is less than the wear time threshold, the electronic device 200 does not display the prompt message 1. Then, the electronic device 200 can receive pressure information of a second time length. The electronic device 200 can calculate the total usage time of the stylus 100 based on the pressure information of the second time length and the pressure information of the first time length. The electronic device 200 can determine the size of the total usage time of the stylus 100 and the wear time threshold. If the total usage time of the stylus 100 is greater than or equal to the wear time threshold, the electronic device 200 displays the prompt message 1. Otherwise, the prompt message 1 is not displayed. For specific implementation methods, please refer to Figure 5 The description of the process shown is not repeated here. The time point of the second duration is after the time point of the first duration.

[0166] In some embodiments, step S501 and step S508 may be optional steps.

[0167] In some embodiments, the electronic device 200 and the stylus 100 may also execute this solution based on three pressure value ranges. The three pressure value ranges may be a first pressure value range, a second pressure value range, and a third pressure value range. The first pressure value range corresponds to a first usage time, a first allowed time, and a first coefficient; the second pressure value range corresponds to a second usage time and a second allowed time; and the third pressure value range corresponds to a third usage time, a third allowed time, and a third coefficient. For specific embodiments, please refer to Figure 5 The process shown will not be repeated here.

[0168] In other embodiments, the electronic device 200 and the stylus pen 100 may also execute this solution based on four or more pressure value ranges. Figure 5 The process shown is not described in detail here. In other words, the embodiment of the present application does not limit the number of pressure value range divisions.

[0169] Next, a software module interaction method applied to the communication system 10 provided in an embodiment of the present application is introduced.

[0170] Please refer to Figure 9 , Figure 9 The following is an exemplary diagram of software module interaction applied to a communication system 10 provided in an embodiment of the present application. It is understandable that, Figure 9 The software module interaction method shown is only used to exemplify the present application and does not constitute any limitation to the present application.

[0171] like Figure 9 As shown, the stylus pen 100 may include a pressure sensing module and a signal sending module. The electronic device 200 may include a parsing module and a storage module.

[0172] The pressure sensing module in the stylus 100 can be used to detect real-time pressure information when the stylus 100 is in use. The signal sending module in the stylus 100 can be used to: receive the pressure information detected by the pressure sensing module in real time, and then send the pressure information to the analysis module of the electronic device 200 in real time; send the electrode signal to the analysis module in the electronic device 200, so that the electronic device 200 can detect the signal amount and coordinate information of the stylus 100. For relevant specific embodiments, please refer to the aforementioned Figure 5 The process shown will not be repeated here.

[0173] The parsing module in the electronic device 200 can be used to: determine the coordinate position of the stylus 100 based on the electrode signal sent by the stylus 100; receive the pressure information sent by the stylus 100, record the usage time corresponding to different pressure value ranges based on the pressure information and perform normalization processing to determine the total usage time of the stylus 100; detect the signal amount of the stylus 100 and determine whether the touch screen is covered with a film based on the signal amount to determine the wear time threshold of the stylus 100; determine whether the total usage time of the stylus 100 is greater than or equal to the wear time threshold, etc. For relevant specific embodiments, please refer to the aforementioned Figure 5 The process shown will not be repeated here.

[0174] The storage module in electronic device 200 can be used to store the wear time threshold of stylus 100, multiple pressure value ranges, and the signal strength of stylus 100 when the touch screen is not covered with a film. Based on the data in the storage module, the analysis module in electronic device 200 can determine whether to display prompt message 1 to prompt the user to replace the pen tip of stylus 100.

[0175] As used in the above embodiments, the term “when…” may be interpreted to mean “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (stated condition or event) is detected” may be interpreted to mean “if determining…” or “in response to determining…” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0176] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).

[0177] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for detecting a stylus pen tip, characterized in that: include: The electronic device receives pressure information sent in real time by the stylus; When the electronic device detects that the stylus pen touches the touch screen of the electronic device for a first duration, the electronic device determines, based on pressure information within the first duration, a first usage duration corresponding to a first pressure value range and a second usage duration corresponding to a second pressure value range; wherein the pressure information within the first duration includes pressure values ​​within the first pressure value range and pressure values ​​within the second pressure value range; The electronic device normalizes the first usage time to determine a normalized usage time corresponding to the first pressure value range; The electronic device determines a total usage time of the stylus based on the second usage time and a normalized usage time corresponding to the first pressure value range; The electronic device determines a wear duration threshold based on a signal amount of the stylus touching a screen on the electronic device; wherein the wear duration threshold is associated with the signal amount; When the electronic device determines that the total usage time of the stylus is greater than or equal to the wear time threshold, the electronic device displays a first prompt message; wherein the first prompt message is used to prompt the user to replace the pen tip of the stylus.

2. The method according to claim 1, characterized in that The electronic device determines, based on the pressure information within the first time period, a first usage time period corresponding to a first pressure value range and a second usage time period corresponding to a second pressure value range, specifically including: The electronic device determines the sum of usage durations of pressure values ​​within the first pressure value range as the first usage duration; The electronic device determines the sum of the usage durations of the pressure values ​​within the second pressure value range as the second usage duration.

3. The method according to claim 1, characterized in that The first pressure value range corresponds to a preset first allowed time, and the second pressure value range corresponds to a preset second allowed time; and the electronic device normalizing the first usage time to determine the normalized usage time corresponding to the first pressure value range specifically includes: The electronic device determines a first coefficient of the first pressure value range based on the first allowed time and the second allowed time; The electronic device determines a normalized usage time corresponding to the first pressure value range based on the first coefficient and the first usage time.

4. The method according to claim 1, wherein The electronic device determines a wear time threshold based on a signal amount of the stylus touching a screen on the electronic device, including: When the electronic device determines that no protective film is applied to the touch screen of the electronic device based on the amount of signal generated by the stylus pen touching the touch screen of the electronic device, the electronic device determines that the wear time threshold is a first value; When the electronic device determines that a first protective film is affixed to the touch screen of the electronic device based on the signal amount of the touch screen of the electronic device by the stylus, the electronic device determines that the wear time threshold is a second value; wherein the second value is smaller than the first value.

5. The method according to claim 4, characterized in that The method further comprises: When the electronic device determines that a second protective film is affixed to the touch screen of the electronic device based on the signal amount of the touch screen of the electronic device by the stylus, the electronic device determines that the wear time threshold is a third value; wherein the second value is greater than the third value.

6. The method according to claim 4, characterized in that The second pressure value range corresponds to a preset second allowed time; when the electronic device determines, based on the signal amount of the stylus touching the screen of the electronic device, that the touch screen of the electronic device is not affixed with a protective film, the electronic device determines that the wear time threshold is the first value, specifically including: The electronic device determines that the value of the signal amount of the touch screen of the electronic device caused by the stylus is a fourth value; When the electronic device determines that a difference obtained by subtracting the fourth value from the value of the first signal amount is less than a first threshold, the electronic device determines that no protective film is affixed to the touch screen of the electronic device; wherein the first signal amount is a signal amount of the stylus when the touch screen is not affixed to the protective film, which is stored by the electronic device; The electronic device determines the second allowed time as the first value.

7. The method according to claim 5, characterized in that When the electronic device determines that the touch screen of the electronic device is affixed with a first protective film based on the amount of signal generated by the stylus pen touching the touch screen of the electronic device, the electronic device determines that the wear time threshold is a second value, specifically including: The electronic device determines that the value of the signal amount of the touch screen of the electronic device caused by the stylus is a fifth value; When the electronic device determines that the difference between the value of the first signal amount and the fifth value is greater than or equal to the first threshold, the electronic device determines that a first protective film is affixed to the touch screen of the electronic device; wherein the first signal amount is the signal amount of the stylus when the touch screen is not affixed with a protective film, which is stored by the electronic device; When the electronic device determines that the first protective film is attached to the touch screen of the electronic device, the electronic device determines the second value based on the fifth value, the value of the first signal quantity, and the first value.

8. The method according to claim 7, characterized in that When the electronic device determines that the touch screen of the electronic device is affixed with a second protective film based on the amount of signal generated by the stylus pen touching the touch screen of the electronic device, the electronic device determines that the wear time threshold is a third value, specifically including: The electronic device determines that the value of the signal amount of the touch screen of the electronic device by the stylus is a sixth value; When the electronic device determines that the difference between the value of the first signal amount and the sixth value is greater than or equal to the first threshold, the electronic device determines that a second protective film is affixed to the touch screen of the electronic device; wherein the first signal amount is a signal amount of the stylus when the touch screen is not affixed with a protective film, as stored by the electronic device; and the sixth value is less than the fifth value; When the electronic device determines that the second protective film is affixed to the touch screen of the electronic device, the electronic device determines the third value based on the sixth value, the value of the first signal quantity and the first value; wherein the third value is smaller than the second value.

9. The method according to claim 6, characterized in that The electronic device determines that the value of the signal amount of the touch screen of the electronic device caused by the stylus is a fourth value, specifically including: The electronic device receives a signal amount of a first position and a signal amount of a second position of the stylus on the touch screen of the electronic device; wherein the first position and the second position are different; When the electronic device determines that the signal amount at the first position and the signal amount at the second position are both the fourth value, the electronic device determines that the value of the signal amount when the stylus touches the screen of the electronic device is the fourth value.

10. The method according to claim 7, characterized in that The electronic device determines that the value of the signal amount of the touch screen of the electronic device caused by the stylus is a fifth value, specifically including: The electronic device receives a signal amount of a first position and a signal amount of a second position of the stylus on the touch screen of the electronic device; wherein the first position and the second position are different; When the electronic device determines that the signal amount at the first position and the signal amount at the second position are both the fifth value, the electronic device determines that the value of the signal amount when the stylus touches the screen of the electronic device is the fifth value.

11. The method according to claim 8, characterized in that The electronic device determines that the value of the signal amount of the touch screen of the electronic device caused by the stylus is a sixth value, specifically including: The electronic device receives a signal amount of a first position and a signal amount of a second position of the stylus on the touch screen of the electronic device; wherein the first position and the second position are different; When the electronic device determines that the signal amount at the first position and the signal amount at the second position are both the sixth value, the electronic device determines that the value of the signal amount when the stylus touches the screen of the electronic device is the sixth value.

12. The method according to claim 1, characterized in that The first duration includes: The electronic device detects the time period from the start coordinate information of the touch pen touching the screen on the electronic device to the end coordinate information of the touch pen touching the screen on the electronic device.

13. The method according to any one of claims 1 to 12, characterized in that The pressure information within the first duration includes a pressure value within a third pressure value range; when the electronic device determines that the total usage time of the stylus is greater than or equal to a wear time threshold, before the electronic device displays the first prompt information, the method further includes: The electronic device determines, based on the pressure information within the first time period, a third usage time period corresponding to the third pressure value range; The electronic device normalizes the third usage time to determine a normalized usage time corresponding to the third pressure value range; The electronic device determines the total usage time of the stylus based on the second usage time and the normalized usage time corresponding to the first pressure value range, specifically including: The electronic device determines a total usage time of the stylus based on the second usage time, the normalized usage time corresponding to the first pressure value range, and the normalized usage time corresponding to the third pressure value range.

14. A communication system, characterized in that: Comprising: a stylus and an electronic device; wherein, The stylus is used to detect pressure information when the stylus is in use in real time; The stylus is further configured to send pressure information to the electronic device in real time; The electronic device is configured to detect a first duration of time during which the stylus touches the touch screen of the electronic device; The electronic device is further configured to determine, based on the pressure information within the first duration, a first usage duration corresponding to a first pressure value range and a second usage duration corresponding to a second pressure value range; wherein the pressure information within the first duration includes pressure values ​​within the first pressure value range and pressure values ​​within the second pressure value range; The electronic device is further configured to normalize the first usage time and determine a normalized usage time corresponding to the first pressure value range; The electronic device is further configured to determine a total usage time of the stylus pen based on the second usage time and a normalized usage time corresponding to the first pressure value range; The electronic device is further configured to determine a wear duration threshold based on a signal amount of the stylus touching a screen on the electronic device; wherein the wear duration threshold is associated with the signal amount; The electronic device is further configured to determine whether the total usage time of the stylus is greater than or equal to a wear time threshold; When it is determined that the total usage time of the stylus is greater than or equal to the wear time threshold, the electronic device is further configured to display a first prompt message; wherein the first prompt message is configured to prompt the user to replace the stylus pen tip.

15. An electronic device, characterized in that: The electronic device includes a display screen, one or more processors and one or more memories; wherein 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, and the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method as described in any one of claims 1-13.

16. A computer-readable storage medium, characterized in that The computer storage medium stores a computer program, wherein the computer program includes executable instructions. When the executable instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 13.

17. A chip or a chip system, characterized in that: The method comprises a processing circuit and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit the code instructions to the processing circuit, and the processing circuit is used to run the code instructions to perform the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Protection film detecting method and device and storage medium

    CN108279805A

  • Method and device for replacing stylus tip

    US9244543B1