Electronic pen automatic calibration method and system, electronic pen and storage medium

By detecting the pairing type in the electronic pen and matching it, only the zero-point calibration of the pen end output signal is performed under the matching conditions, the problem of low automatic calibration accuracy caused by signal instability in the prior art is solved, and the service life and writing quality of the electronic pen are improved.

CN119718095APending Publication Date: 2025-03-28SHENZHEN XINWEI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411719884.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing electronic pen output signal calibration method is carried out when the writing module is working, resulting in unstable signal and difficult to accurately perform automatic calibration, which affects service life and writing quality.

Method used

By detecting the pairing type of the electronic pen and matching the first pairing type and the target pairing type, the pen tail output signal is only calibrated when the matching is done, thereby reducing the impact of the pen tail on the automatic calibration process.

Benefits of technology

It improves the accuracy of automatic calibration of output signals, ensures the accuracy and stability of the output signal at the end of the pen, thereby extending the service life of the electronic pen and improving writing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718095A_ABST
    Figure CN119718095A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an automatic calibration method and system for an electronic pen, the electronic pen and a storage medium, and belongs to the technical field of touch control. According to the method, the pairing type of the electronic pen is detected to obtain a first pairing type, then first matching is carried out on the first pairing type and a target pairing type to obtain first matching information, and zero calibration is carried out on a pen tail output signal of the electronic pen under the condition that the first matching information shows that the first pairing type is matched with the target pairing type. Therefore, according to the automatic calibration method for the electronic pen, zero calibration is performed on the pen tail output signal of the electronic pen only when the first matching information represents that the first pairing type of the electronic pen is matched with the target pairing type, and the pen tail is not in the working state at the moment, so that the influence of the pen tail on the automatic calibration process is reduced; and the accuracy of automatic calibration of the output signal is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of touch control technology, and in particular to an electronic pen automatic calibration method and system, an electronic pen and a storage medium. Background Art

[0002] At present, the load pressure collected by the electronic pen will be affected by factors such as changes in ambient temperature, changes in the pressure of the writing module in contact with the screen, or slight changes in the internal structure, resulting in changes in the relationship between the output signal of the electronic pen and the load pressure. Therefore, it is necessary to automatically calibrate the output signal of the writing module. However, the existing output signal calibration method is usually performed when the writing module is working. At this time, the output signal of the writing module is unstable and difficult to accurately perform automatic calibration, which will result in low accuracy and stability of the actual output signal of the writing module. In addition, if the output signal value of the writing module is in an abnormal state for a long time, the unstable output signal may cause excessive wear of the writing module, or failure of the ink supply system, ultimately affecting the overall service life and writing quality of the electronic pen. Therefore, how to improve the accuracy of automatic calibration of the output signal has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to provide an electronic pen automatic calibration method and system, an electronic pen and a storage medium, aiming to improve the accuracy of automatic calibration of output signals.

[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application provides an automatic calibration method for an electronic pen, the method being applied to an electronic pen, the method comprising:

[0005] Detecting the pairing type of the electronic pen to obtain a first pairing type;

[0006] Performing a first match between the first pairing type and the target pairing type to obtain first matching information;

[0007] When the first matching information indicates that the first pairing type matches the target pairing type, a zero-point calibration is performed on the pen end output signal of the electronic pen.

[0008] In some embodiments, before performing zero-point calibration on the pen tail output signal of the electronic pen, the method further includes:

[0009] Get the acquisition time information of the basic pen tail no-load value;

[0010] Selecting a target pen tail no-load value from the basic pen tail no-load values ​​according to the acquisition time information; wherein the target pen tail no-load value includes the basic pen tail no-load value corresponding to the latest acquisition time information when the acquisition time information is obtained;

[0011] According to the target pen tail no-load value, it is determined whether to perform a calibration operation or a detection operation on the pen tail of the electronic pen; wherein the calibration operation is performed to perform a zero-point calibration on the pen tail output signal of the electronic pen; and the detection operation is performed to detect the pairing type of the electronic pen.

[0012] In some embodiments, determining to perform a calibration operation or a detection operation on the pen tail of the electronic pen according to the target pen tail no-load value includes:

[0013] Calculate the standard deviation of each of the target pen tail no-load values ​​to obtain a first standard deviation;

[0014] Obtaining standard deviation comparison information by comparing the first standard deviation with a preset standard deviation threshold;

[0015] If the standard deviation comparison information indicates that the first standard deviation is greater than the standard deviation threshold, determining to perform the detection operation;

[0016] If the standard deviation comparison information indicates that the first standard deviation is less than or equal to the standard deviation threshold, it is determined to perform the calibration operation on the pen end of the electronic pen.

[0017] In some embodiments, before obtaining the acquisition time information of the basic pen tail no-load value, the method further includes:

[0018] Compare the total number of the basic pen tail no-load values ​​with a preset number threshold to obtain total number comparison information;

[0019] If the total number comparison information indicates that the total number is less than the quantity threshold, determining to perform a detection operation, so as to perform the detection operation;

[0020] If the total number comparison information indicates that the total number is greater than or equal to the quantity threshold, it is determined to perform an acquisition operation; wherein the acquisition operation is performed to obtain the acquisition time information of the basic pen tail no-load value.

[0021] In some embodiments, the step of performing zero point calibration on the pen tail output signal of the electronic pen includes:

[0022] Calculate the average value of each target pen tail no-load value;

[0023] Calculate a difference value based on the average value and the factory zero calibration value of the pen end;

[0024] Comparing the difference with a preset calibration difference threshold to obtain calibration value difference information;

[0025] If the calibration value difference information indicates that the difference is smaller than the calibration difference threshold, the average value is set as the pen tail zero point calibration value, so as to perform zero point calibration on the pen tail output signal of the electronic pen according to the pen tail zero point calibration value.

[0026] In some embodiments, after obtaining calibration value difference information by comparing the difference value with a preset calibration difference threshold, the method further includes:

[0027] If the calibration value difference information indicates that the difference is greater than or equal to the calibration difference threshold, generating abnormal prompt information;

[0028] The electronic pen is converted from a working mode to a sleeping mode according to the abnormal prompt information.

[0029] In some embodiments, when the first matching information indicates that the first pairing type matches the target pairing type, after performing zero point calibration on the pen end output signal of the electronic pen, the method further includes:

[0030] Detecting the pairing type of the electronic pen to obtain a second pairing type;

[0031] Performing a second match between the second pairing type and the selected pairing type to obtain second matching information;

[0032] When the second matching information indicates that the second pairing type matches the selected pairing type, a zero-point calibration is performed on the pen tip output signal of the electronic pen.

[0033] In some embodiments, after determining to perform the detection operation if the standard deviation comparison information indicates that the first standard deviation is greater than the standard deviation threshold, the method further includes:

[0034] Filtering updated pen tail no-load values ​​from the basic pen tail no-load values ​​according to the target pen tail no-load value, the average value and the standard deviation threshold; wherein the standard deviation of each updated pen tail no-load value is less than or equal to the standard deviation threshold, and the updated pen tail no-load value includes at least one of the target pen tail no-load values;

[0035] At least one continuous pen tail idle group is constructed according to the updated pen tail idle value and the acquisition time information; wherein, in each of the continuous pen tail idle groups, the acquisition time information corresponding to each of the updated pen tail idle values ​​is continuous;

[0036] Calculate the interval time between any two adjacent consecutive pen tail empty groups;

[0037] Select a target pen tail idle group from each of the continuous pen tail idle groups according to the interval time; wherein the interval time between the target pen tail idle group and the previous continuous pen tail idle group of the target pen tail idle group is the longest;

[0038] According to the acquisition time information, a selected pen tail idle value is selected from the target pen tail idle group; wherein the selected pen tail idle value is the updated pen tail idle value with the earliest acquisition time information in the target pen tail idle group;

[0039] The basic pen tail no-load value is updated according to the selected pen tail no-load value to determine the execution of a total number comparison operation according to the updated basic pen tail no-load value; wherein the total number comparison operation is executed to compare the total number of the basic pen tail no-load values ​​with the quantity threshold.

[0040] To achieve the above objective, a second aspect of an embodiment of the present application proposes an electronic pen, which includes a memory and a processor. The memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.

[0041] To achieve the above-mentioned purpose, a third aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0042] The electronic pen automatic calibration method and system, electronic pen and storage medium proposed in the present application detect the first pairing type of the electronic pen and perform a first match between the first pairing type and the target pairing type to obtain first matching information. Only when the first matching information indicates that the first pairing type of the electronic pen matches the target pairing type, the output signal of the pen tail of the electronic pen is zero-calibrated. At this time, the pen tail is not in a working state, which can reduce the influence of the pen tail on the automatic calibration process, thereby improving the accuracy of the automatic calibration of the output signal. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 This is an optional flow chart of the electronic pen automatic calibration method provided in the embodiment of the present application;

[0044] Figure 2 yes Figure 1 Flow chart of step S103 in FIG.

[0045] Figure 3 yes Figure 2 Flow chart of step S203 in FIG.

[0046] Figure 4 is another optional flow chart of the electronic pen automatic calibration method provided in the embodiment of the present application;

[0047] Figure 5 is another optional flow chart of the electronic pen automatic calibration method provided in the embodiment of the present application;

[0048] Figure 6 yes Figure 1 Another optional flowchart of step S103 in;

[0049] Figure 7 is another optional flow chart of the electronic pen automatic calibration method provided in the embodiment of the present application;

[0050] Figure 8 is another optional flow chart of the electronic pen automatic calibration method provided in the embodiment of the present application;

[0051] Fig. 9 is another optional flow chart of the electronic pen automatic calibration method provided in the embodiment of the present application;

[0052] Fig.10 yes Figure 1 Another optional flowchart of step S103 in;

[0053] Fig.11 is a schematic diagram of the structure of the electronic pen automatic calibration system provided in an embodiment of the present application;

[0054] Fig.12 This is a schematic diagram of an optional hardware structure of the electronic pen provided in the embodiment of the present application;

[0055] Fig.13 This is another optional hardware structure diagram of the electronic pen provided in the embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0059] During the use of an electronic pen, the output signal of the electronic pen is crucial to the writing experience. However, the accuracy and stability of the output signal of the electronic pen are easily affected by many factors, such as changes in ambient temperature, changes in the pressure of the pen tip in contact with the screen of the writable device, and slight changes in the internal structure. In order to solve this problem, during the use of the electronic pen, it is usually necessary to calibrate the output signal of the electronic pen. However, the existing electronic pen output signal calibration method is usually performed when the writing module is working. At this time, the output signal of the writing module is unstable and difficult to calibrate accurately, which will result in low accuracy and stability of the actual output signal value of the writing module. In addition, if the output signal value of the writing module is in an abnormal state for a long time, an excessively large output signal may cause excessive wear of the pen tip or failure of the ink supply system, ultimately affecting the overall service life and writing quality of the electronic pen.

[0060] Based on this, the embodiments of the present application provide an electronic pen automatic calibration method and system, an electronic pen and a storage medium, aiming to improve the accuracy of automatic calibration of the output signal of the electronic pen writing module.

[0061] The electronic pen automatic calibration method and system, electronic pen and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the electronic pen automatic calibration method in the embodiments of the present application is described.

[0062] Figure 1 is an optional flow chart of the electronic pen automatic calibration method provided in the embodiment of the present application. Figure 1 The method is applied to an electronic pen, and the method may include but is not limited to steps S101 to S103.

[0063] Step S101, detecting the pairing type of the electronic pen to obtain a first pairing type;

[0064] Step S102, performing a first match between the first pairing type and the target pairing type to obtain first matching information;

[0065] Step S103: When the first matching information indicates that the first pairing type matches the target pairing type, a zero point calibration is performed on the pen end output signal of the electronic pen.

[0066] In the steps S101 to S103 shown in the embodiment of the present application, the first pairing type is obtained by detecting the pairing type of the electronic pen, and the first pairing type is matched with the target pairing type to obtain the first matching information. Only when the first matching information indicates that the first pairing type of the electronic pen matches the target pairing type, the output signal of the pen tail of the electronic pen is zero-calibrated. At this time, the pen tail is not in a working state, which can reduce the influence of the pen tail on the automatic calibration process, thereby improving the accuracy of the automatic calibration of the output signal.

[0067] In step S101 of some embodiments, the electronic pen includes: a working mode and a sleep mode. When the displacement sensor of the electronic pen detects that the electronic pen has moved, the electronic pen enters the working mode. When the electronic pen is in the working mode, the pairing type of the electronic pen will be periodically detected, and the specific detection period can be any value within 0-16ms. When the displacement signal detected by the displacement sensor within the preset mode switching duration indicates that the electronic pen has no displacement, the electronic pen enters the sleep mode. The mode switching duration can be 30 seconds, or it can be other specific durations set by technicians in this field according to actual needs.

[0068] In step S102 of some embodiments, when the pairing type of the electronic pen is the pen tail, the pen tail will send an output signal to the writable device to perform operations such as erasing notes. At this time, if the output signal of the pen tail is zero-calibrated, the pen tail itself will affect the zero point of the output signal. Therefore, the electronic pen automatic calibration method shown in the embodiment of the present application needs to perform zero-point calibration on the output signal of the pen tail of the electronic pen when the pairing type of the electronic pen is not the pen tail. Therefore, it is necessary to perform a first match between the first pairing type and the target pairing type to obtain the first matching information. Among them, the first matching information is used to describe whether the first pairing type and the target pairing type match or do not match. The target pairing type is used to describe all electronic pen pairing types except the pen tail. For example, if the pairing types of the electronic pen include: pen tip or pen tail, the first pairing type is the pen tip or pen tail, and the target pairing type is the pen tip; if the pairing types of the electronic pen include: unpaired, pen tip or pen tail, the first pairing type is any one of the following: unpaired, pen tip or pen tail, and the target pairing types include: pen tip or unpaired; if the pairing types of the electronic pen include: unpaired, shortcut key, pen tip or pen tail, the first pairing type is any one of the following: unpaired, shortcut key, pen tip or pen tail, and the target pairing types include: pen tip, shortcut key or unpaired.

[0069] In step S103 of some embodiments, since the target pairing type may include more than one pairing type of electronic pens, the first pairing type may be matched with the pairing type of each electronic pen in the target pairing type one by one. As long as the first pairing type matches the pairing type of any electronic pen in the target pairing type, the first matching information indicates that the first pairing type matches the target pairing type. If the first pairing type does not match the pairing type of each electronic pen in the target pairing type, the first matching information indicates that the first pairing type does not match the target pairing type.

[0070] See also Figure 2 In some embodiments, step S103 may include but is not limited to steps S201 to S203:

[0071] Step S201, obtaining the acquisition time information of the basic pen tail no-load value;

[0072] Step S202, selecting a target pen tail no-load value from the basic pen tail no-load values ​​according to the acquisition time information; wherein the target pen tail no-load value includes the basic pen tail no-load value corresponding to the latest acquisition time information when the acquisition time information is obtained;

[0073] Step S203, determining whether to perform a calibration operation or a detection operation on the pen tail of the electronic pen according to the target pen tail no-load value; wherein the calibration operation is performed to perform a zero-point calibration on the pen tail output signal of the electronic pen; and the detection operation is performed to detect the pairing type of the electronic pen.

[0074] In step S201 of some embodiments, when the first matching information indicates that the first pairing type matches the target pairing type, the electronic pen will continue to collect the pen end idle pressure, convert the pen end idle pressure into a basic pen end idle value, and store the basic pen end idle value and its collection time information in the storage space of the electronic pen. Therefore, the collection time information of the basic pen end idle value can be obtained from the storage space of the electronic pen.

[0075] In step S202 of some embodiments, a target pen tail no-load value can be selected from the basic pen tail no-load value according to the acquisition time information. Specifically, after acquiring the acquisition time information of the basic pen tail no-load value from the storage space of the electronic pen, the acquisition time information is first sorted from early to late to obtain an acquisition time sequence, and then the basic pen tail no-load value corresponding to the latest acquisition time information is obtained from the acquisition time sequence as the first target pen tail no-load value, and then based on the first target pen tail no-load value, other target pen tail no-load values ​​are selected according to the acquisition time information. Among them, there is a specific target screening relationship between the acquisition time information of each target pen tail no-load value, and the target screening relationship may include but is not limited to any of the following: there is a fixed difference between the acquisition time information, and the difference between the acquisition time information is calculated according to a specific formula or determined according to a specific algorithm. In addition, the specific number of selected target pen tail no-load values ​​can be set according to the needs of those skilled in the art, and this application does not make specific restrictions. For example, 100 basic pen tail no-load values ​​can be taken forward from the last collected basic pen tail no-load value as the target pen tail no-load value, and the difference in the collection time information of each adjacent target pen tail no-load value is equal to the collection interval of the basic pen tail no-load value, so that when judging whether the pen tail can be automatically calibrated, the consistency and continuity of the data can be considered at the same time. Alternatively, 150 basic pen tail no-load values ​​can be taken forward from the last collected basic pen tail no-load value as the target pen tail no-load value, and the difference in the collection time information of each adjacent target pen tail no-load value gradually increases, so that when judging the automatic calibration of the pen tail, the long-term trend and short-term fluctuation of the basic pen tail no-load value can be considered at the same time.

[0076] In the steps S201 to S203 shown in the embodiment of the present application, first, the acquisition time information of the basic pen tail no-load value is obtained, and the target pen tail no-load value is selected from the basic pen tail no-load value according to the acquisition time information; wherein, the target pen tail no-load value includes the basic pen tail no-load value corresponding to the latest acquisition time information. Finally, according to the target pen tail no-load value, it is determined whether to perform a calibration operation or a detection operation on the pen tail of the electronic pen; wherein, the calibration operation is performed to perform zero-point calibration on the pen tail output signal of the electronic pen; and the detection operation is performed to detect the pairing type of the electronic pen. Therefore, the electronic pen automatic calibration method shown in the embodiment of the present application ensures that the selected target pen tail no-load value can reflect the real change of the basic pen tail no-load value, so as to determine whether it is necessary to re-perform zero-point calibration on the output signal of the pen tail according to the actual situation, and avoid zero-point calibration on the output signal of the pen tail when the pen tail of the electronic pen is paired with a writable device, thereby obtaining a stable output signal no-load value, thereby improving the accuracy of the pen tail output signal and the adaptability to the environment.

[0077] See also Figure 3In some embodiments, step S203 may include but is not limited to steps S301 to S304:

[0078] Step S301, calculating the standard deviation of each target pen end no-load value to obtain a first standard deviation;

[0079] Step S302, comparing the first standard deviation with a preset standard deviation threshold to obtain standard deviation comparison information;

[0080] Step S303, if the standard deviation comparison information indicates that the first standard deviation is greater than the standard deviation threshold, determining to perform a detection operation;

[0081] Step S304: if the standard deviation comparison information indicates that the first standard deviation is less than or equal to the standard deviation threshold, it is determined to perform a calibration operation on the pen end of the electronic pen.

[0082] In step S302 of some embodiments, the standard deviation threshold is used to describe whether the stability of the target pen tail no-load value meets the requirements of zero-point calibration of the pen tail output signal. The standard deviation threshold can be a specific value set by technical personnel in this field before leaving the factory according to actual needs, or it can be a value calculated in real time by a specific algorithm based on data such as the performance, usage conditions and environmental changes of the electronic pen. This application does not impose any specific restrictions.

[0083] In step S303 of some embodiments, if the first standard deviation is greater than the standard deviation threshold, it means that the target pen tail no-load value is unstable. If the target pen tail no-load value is used to perform automatic pen tail calibration, it will cause the relationship between the output signal after the pen tail zero-point calibration and the pressure detected by the pen tail to be difficult to match the actual writing situation, so that the pen tail of the electronic pen needs to receive excessive pressure during the writing process to send a smaller output signal to the writable device, or only receives a smaller pressure to send a larger output signal to the writable device, which reduces the reliability of the writing function and the comfort of the user using the electronic pen to write. Therefore, when the first standard deviation is greater than the standard deviation threshold, the pen tail output signal of the electronic pen cannot be zero-calibrated. At this time, it should be determined to re-execute the detection operation to detect the pairing type of the electronic pen, and when the pairing type of the electronic pen is not the pen tail, it is determined again whether the pen tail output signal can be zero-calibrated according to the re-acquired target pen tail no-load value.

[0084] In step S304 of some embodiments, if the first standard deviation is less than or equal to the standard deviation threshold, it means that the target pen tail no-load value is stable. At this time, the pen tail output signal zero point calibration is performed using the target pen tail no-load value. The output signal of the pen tail is accurate and can provide the user with a stable and accurate writing experience.

[0085] Steps S301 to S304 shown in the embodiment of the present application accurately calculate the standard deviation of the target pen tail no-load value to obtain the first standard deviation, and use the first standard deviation to determine whether automatic calibration can be performed. This can make the output signal of the electronic pen tail more stable and reliable, avoid the relationship between the output signal of the pen tail and the pressure detected at the pen tail being difficult to match the actual writing situation, thereby enhancing the overall reliability of the electronic pen and user experience.

[0086] See also Figure 4 In some embodiments, before step S201, the electronic pen automatic calibration method may also include but is not limited to steps S401 to S403:

[0087] Step S401, comparing the total number of no-load values ​​at the basic pen tail with a preset number threshold to obtain total number comparison information;

[0088] Step S402, if the total number comparison information indicates that the total number is less than the quantity threshold, determining to perform a detection operation, so as to perform the detection operation;

[0089] Step S403, if the total number comparison information indicates that the total number is greater than or equal to the quantity threshold, it is determined to perform an acquisition operation; wherein the acquisition operation is performed to obtain the acquisition time information of the basic pen tail no-load value.

[0090] In step S401 of some embodiments, the quantity threshold is used to ensure that the number of basic pen tail no-load values ​​is sufficient to screen the target pen tail no-load value, so as to ensure that a reliable pen tail zero point calibration value can be obtained according to the target pen tail no-load value, and then an effective pen tail output signal zero point calibration is performed. The specific value of the quantity threshold can be set according to the actual needs of those skilled in the art, but must be greater than the number of target pen tail no-load values.

[0091] In step S402 of some embodiments, if the total number of basic pen tail no-load values ​​is less than the quantity threshold, it means that the electronic pen has not collected enough basic pen tail no-load values, and the basic pen tail no-load values ​​at this time are not enough to reliably and accurately calibrate the output signal of the pen tail. Therefore, the detection operation is returned to re-detect the pairing type of the electronic pen and re-count the basic pen tail no-load values ​​until the total number of basic pen tail no-load values ​​is greater than or equal to the quantity threshold.

[0092] In step S403 of some embodiments, if the total number of basic pen end no-load values ​​is greater than or equal to the quantity threshold, it means that the electronic pen has collected enough basic pen end no-load values, and the target pen end no-load value can be selected from the basic pen end no-load values ​​to evaluate the stability of the target pen end no-load value. Therefore, the acquisition step can be performed to obtain the acquisition time information of the basic pen end no-load value.

[0093] Steps S401 to S403 shown in the embodiment of the present application compare the total number of basic pen tail no-load values ​​with a preset quantity threshold, and determine whether the acquisition time information of the basic pen tail no-load value can be obtained based on the total number comparison information, so as to ensure that sufficient target pen tail no-load values ​​can be selected according to the acquisition time information in subsequent steps, and then the output signal of the electronic pen tail is effectively calibrated according to the target pen tail no-load value, thereby improving the accuracy of automatic calibration of the output signal of the electronic pen tail.

[0094] See also Figure 5 In some embodiments, before step S401, the electronic pen automatic calibration method may also include but is not limited to steps S501 to S502:

[0095] Step S501, when the first matching information indicates that the first pairing type matches the target pairing type, collecting the no-load pressure of the pen end to obtain the no-load pressure of the pen end;

[0096] Step S502, converting the no-load pressure at the end of the pen into a basic no-load value at the end of the pen.

[0097] In step S501 of some embodiments, when the first matching information indicates that the first pairing type matches the target pairing type, the end of the electronic pen is not paired with the writable device, and the user cannot perform an erasing operation through the end of the pen. On this basis, the user usually does not use the end of the electronic pen. Therefore, when the first pairing type is not the end of the pen, the end of the pen pressure collected by the electronic pen is the end of the pen no-load pressure, and the end of the pen no-load pressure can be used for zero point calibration of the end of the pen output signal. In addition, when the first matching information indicates that the first pairing type matches the target pairing type, the end of the pen no-load pressure will continue to be collected at a specific time interval until the first matching information indicates that the first pairing type does not match the target pairing type, or the electronic pen is converted from the working mode to the sleep mode. Those skilled in the art can set the specific time interval for collecting the no-load pressure according to actual needs.

[0098] In step S502 of some embodiments, the no-load pressure at the end of the pen is converted into a basic no-load value at the end of the pen, so that the no-load pressure value at the end of the pen can be standardized so that it can be used in the zero point calibration process of the output signal at the end of the pen, thereby avoiding the problem that the original unit of the no-load pressure at the end of the pen may not be directly used for the automatic calibration algorithm.

[0099] In the steps S501 to S502 shown in the embodiment of the present application, when the first matching information indicates that the first pairing type matches the target pairing type, the no-load pressure of the pen tail is collected to obtain the no-load pressure of the pen tail, and the no-load pressure of the pen tail is converted into a basic no-load value of the pen tail, so that the electronic pen can continuously obtain a new basic no-load value of the pen tail according to factors such as actual usage scenarios or hardware changes, so as to update the target no-load value of the pen tail in subsequent steps, thereby performing zero-point calibration on the output signal of the electronic pen tail according to the target no-load value of the pen tail, thereby improving the adaptability of the output signal of the electronic pen tail to changes in the electronic pen's own hardware and the outside world. In addition, when the first matching information indicates that the first pairing type is not the pen tail, collecting the no-load pressure of the pen tail can also avoid using the unstable pressure of the pen tail as the no-load pressure when the pen tail of the electronic pen is in a working state, thereby obtaining a stable no-load value of the output signal.

[0100] See also Figure 6 In some embodiments, step S103 may also include but is not limited to steps S601 to S604:

[0101] Step S601, calculating the average value of each target pen end no-load value;

[0102] Step S602, calculating the difference value based on the average value and the factory zero calibration value of the pen end;

[0103] Step S603, comparing the difference value with a preset calibration difference threshold to obtain calibration value difference information;

[0104] Step S604: if the calibration value difference information indicates that the difference is less than the calibration difference threshold, the average value is set as the pen tail zero point calibration value, so as to perform zero point calibration on the pen tail output signal of the electronic pen according to the pen tail zero point calibration value.

[0105] In S602 of some embodiments, the factory zero calibration value of the pen end is set when the electronic pen is manufactured, and the present application does not limit the specific value of the factory zero calibration value.

[0106] In step S603 of some embodiments, the calibration difference threshold is used to describe whether the pen tail pressure corresponding to the output signal of the electronic pen tail is within the working range that the electronic pen hardware can withstand after the pen tail output signal of the electronic pen is automatically calibrated according to the average value of the target pen tail no-load value. If the difference between the average value and the factory zero calibration value exceeds the calibration difference threshold, it means that the hardware of the electronic pen may be damaged due to the pen tail pressure borne by the electronic pen tail. The calibration difference threshold can be selected according to the actual needs of those skilled in the art, and this application does not impose any specific restrictions.

[0107] In step S603 of some other embodiments, the calibration difference threshold may also be set as a threshold describing the comfortable range of the user using the electronic pen to write or erase notes. If the difference between the average value and the factory zero calibration value exceeds the comfortable range defined by the calibration difference threshold, after the output signal of the pen end of the electronic pen is zero-calibrated according to the average value of the target pen end no-load value, the user needs to use too much or too little force to write or erase notes, which will make it difficult for the pen end of the electronic pen to perform accurate erasing operations and easily cause fatigue problems in the user's hands; if the difference between the average value and the factory zero calibration value is within the comfortable range defined by the calibration difference threshold, the force required by the user to use the pen end of the electronic pen to perform an erasing operation is appropriate, which improves the writing comfort and accuracy of the pen end of the electronic pen.

[0108] In step S604 of some embodiments, if the difference between the average value and the factory zero-point calibration value is smaller than the calibration difference threshold, it means that after the output signal of the pen tail of the electronic pen is automatically calibrated according to the average value, the hardware of the electronic pen can still work normally. Therefore, the average value can be set as the pen tail zero-point calibration value to perform zero-point calibration on the output signal of the pen tail of the electronic pen according to the pen tail zero-point calibration value.

[0109] In some embodiments, when the zero point of the output signal of the tail of the electronic pen changes, there is a different relationship between the output signal of the tail of the electronic pen and the collected tail pressure of the pen. Therefore, it is necessary to perform zero point calibration on the output signal of the tail of the electronic pen according to the zero point calibration value of the tail of the pen, so as to match the corresponding tail pressure-tail output signal relationship in the preset tail pressure-tail output signal relationship table. Therefore, when the tail of the electronic pen is working, the tail output signal is sent to the writable device according to the tail pressure-tail output signal relationship and the collected tail pressure of the pen, thereby improving the accuracy of the output signal of the tail of the electronic pen.

[0110] In the steps S601 to S604 shown in the embodiment of the present application, the average value of each target pen tail no-load value is first calculated, and the difference is calculated based on the average value and the preset factory zero calibration value. Then, the calibration value difference information is obtained by comparing the difference with the preset calibration difference threshold. If the calibration value difference information indicates that the difference is less than the calibration difference threshold, the average value is set as the pen tail zero calibration value, so as to perform zero-point calibration on the pen tail output signal of the electronic pen according to the pen tail zero calibration value. Therefore, the electronic pen automatic calibration method shown in the embodiment of the present application can limit the pen tail zero calibration value of the electronic pen according to the preset calibration difference threshold, so as to ensure the accuracy of the electronic pen tail output signal and the comfort of the user when using the electronic pen.

[0111] See also Figure 7 In some embodiments, after step S303, the electronic pen automatic calibration method may also include but is not limited to steps S701 to S706:

[0112] Step S701, filtering updated pen tail no-load values ​​from basic pen tail no-load values ​​according to target pen tail no-load values, average values ​​and standard deviation thresholds; wherein the standard deviation of each updated pen tail no-load value is less than or equal to the standard deviation threshold, and the updated pen tail no-load values ​​include at least one target pen tail no-load value;

[0113] Step S702, constructing at least one continuous pen tail idle group according to the updated pen tail idle value and the acquisition time information; wherein, in each continuous pen tail idle group, the acquisition time information corresponding to each updated pen tail idle value is continuous;

[0114] Step S703, calculating the interval between any two adjacent continuous pen tail idle groups;

[0115] Step S704, selecting a target pen tail idle group from each continuous pen tail idle group according to the interval time; wherein the interval time between the target pen tail idle group and the previous continuous pen tail idle group of the target pen tail idle group is the longest;

[0116] Step S705, selecting a pen tail idle value from the target pen tail idle group according to the acquisition time information; wherein the selected pen tail idle value is the updated pen tail idle value with the earliest acquisition time information in the target pen tail idle group;

[0117] Step S706, update the basic pen tail no-load value according to the selected pen tail no-load value, so as to determine to perform a total number comparison operation according to the updated basic pen tail no-load value; wherein, the total number comparison operation is performed to compare the total number of basic pen tail no-load values ​​with the quantity threshold.

[0118] In step S701 of some embodiments, the pen tail no-load value can be screened and updated from the basic pen tail no-load value according to the target pen tail no-load value, the average value and the standard deviation threshold. Specifically, the target pen tail no-load value with the largest difference from the average value is first selected as the first pen tail no-load value, and all target pen tail no-load values ​​other than the first pen tail no-load value are selected as the second pen tail no-load value. Then, the target pen tail no-load value with the earliest acquisition time information is selected as the third pen tail no-load value, and the basic pen tail no-load value adjacent to the third pen tail no-load value is selected as the fourth pen tail no-load value according to the acquisition time information; wherein the acquisition time information of the fourth pen tail no-load value is earlier than the acquisition time information of the third pen tail no-load value. Finally, the intermediate pen tail no-load value is constructed according to the second pen tail no-load value and the fourth pen tail no-load value, and the standard deviation of the intermediate pen tail no-load value is calculated to obtain the second standard deviation, so as to compare the second standard deviation with the standard deviation threshold. If the second standard deviation is greater than the standard deviation threshold, the average value is updated according to each intermediate pen tail no-load value, and the intermediate pen tail no-load value is iteratively updated with the updated average value until the second standard deviation is less than or equal to the standard deviation threshold, or the updated pen tail no-load value only includes one target pen tail no-load value. When the second standard deviation is less than or equal to the standard deviation threshold, the intermediate pen tail no-load value obtained in the last iteration is used as the updated pen tail no-load value. For example, in each process of iteratively updating the intermediate pen tail no-load value, the average value is first updated according to each intermediate pen tail no-load value, and the intermediate pen tail no-load value with the largest difference from the average value is selected as the first pen tail no-load value. Then, all the intermediate pen tail no-load values ​​other than the first pen tail no-load value are selected as the second pen tail no-load value, the intermediate pen tail no-load value with the earliest acquisition time information is selected as the third pen tail no-load value, and the basic pen tail no-load value adjacent to the third pen tail no-load value is selected as the fourth pen tail no-load value according to the acquisition time information; wherein, the acquisition time information of the fourth pen tail no-load value is earlier than the acquisition time information of the third pen tail no-load value. Finally, the intermediate pen tail no-load value is reconstructed according to the second pen tail no-load value and the fourth pen tail no-load value, the second standard deviation is updated according to each reconstructed intermediate pen tail no-load value, and the second standard deviation is compared with the standard deviation threshold again. If the iterative update to the intermediate pen tail no-load value contains the basic pen tail no-load value with the earliest collection time information, and the second standard deviation is still greater than the standard deviation threshold, the intermediate pen tail no-load value is used as the updated pen tail no-load value, and the iterative update is stopped.

[0119] In step S702 of some embodiments, at least one continuous pen tail idle group can be constructed according to the updated pen tail idle value and the acquisition time information; wherein, in each continuous pen tail idle group, the acquisition time information corresponding to each updated pen tail idle value is continuous. Specifically, the continuous distribution information of every two adjacent updated pen tail idle values ​​is determined according to the acquisition time information, and when the continuous distribution information indicates that the acquisition time information of two adjacent updated pen tail idle values ​​is continuous, the two adjacent updated pen tail idle values ​​are classified into the same continuous pen tail idle group.

[0120] In step S706 of some embodiments, the basic end-of-pen-load value may be updated according to the selected end-of-pen-load value, so as to determine to perform a total number comparison operation according to the updated basic end-of-pen-load value; wherein the total number comparison operation is performed to compare the total number of basic end-of-pen-load values ​​with a quantity threshold. Specifically, the step of updating the basic end-of-pen-load value according to the selected end-of-pen-load value may include but is not limited to: using the acquisition time information of the selected end-of-pen-load value as the selected time information, deleting the basic end-of-pen-load value whose acquisition time information is earlier than the selected time information, and retaining the basic end-of-pen-load value whose acquisition time information is later than the selected time information. Then, the comparison is performed according to the total number of the retained basic end-of-pen-load values ​​and the quantity threshold.

[0121] Steps S701 to S706 shown in the embodiment of the present application first select the updated pen tail no-load value from the basic pen tail no-load value according to the target pen tail no-load value, the average value and the standard deviation threshold; wherein the standard deviation of each updated pen tail no-load value is less than or equal to the standard deviation threshold. Then, at least one continuous pen tail no-load group is constructed according to the updated pen tail no-load value and the acquisition time information; wherein, in each continuous pen tail no-load group, the acquisition time information corresponding to each updated pen tail no-load value is continuous. Next, the interval duration between any two adjacent continuous pen tail no-load groups is calculated, and the target pen tail no-load group is selected from each continuous pen tail no-load group according to the interval duration; wherein the interval duration between the target pen tail no-load group and the previous continuous pen tail no-load group of the target pen tail no-load group is the longest. Thereafter, the selected pen tail no-load value is selected from the target pen tail no-load group according to the acquisition time information; wherein the selected pen tail no-load value is the updated pen tail no-load value with the earliest acquisition time information in the target pen tail no-load group. Finally, the basic tail no-load value is updated according to the selected tail no-load value, so as to determine the execution of the total number comparison operation according to the updated basic tail no-load value; wherein the execution of the total number comparison operation is to compare the total number of the basic tail no-load values ​​with the quantity threshold. Therefore, the electronic pen automatic calibration method shown in the embodiment of the present application determines the continuous tail no-load group according to the updated tail no-load value, and determines the unstable period of the basic tail no-load value by the interval length between adjacent continuous tail no-load groups, and then selects the longest unstable period from the unstable period of the basic tail no-load value, and deletes the longest unstable period and the basic tail no-load value before it, so that before the next zero point calibration of the tail output signal of the electronic pen, a more stable target tail no-load value can be selected from the basic tail no-load value, thereby ensuring the accuracy and reliability of the zero point calibration of the tail output signal of the electronic pen.

[0122] See also Figure 8 In some embodiments, after step S603, the electronic pen automatic calibration method may also include but is not limited to steps S801 to S802:

[0123] Step S801, if the calibration value difference information represents a difference greater than or equal to a calibration difference threshold, generating abnormal prompt information;

[0124] Step S802: converting the electronic pen from the working mode to the sleeping mode according to the abnormal prompt information.

[0125] In step S801 of some embodiments, the abnormal prompt information is used to describe that the hardware inside the electronic pen or the external environment may be abnormal. After generating the abnormal prompt information, the electronic pen can transmit the abnormal prompt information to a writable device paired with the electronic pen, so that the writable device can remind the user according to the abnormal prompt information. The specific reminder method may include but is not limited to at least one of the following: screen display, sound prompt or vibration feedback, so as to ensure that the user can be aware of the abnormal state of the electronic pen in time.

[0126] In step S802 of some embodiments, since the electronic pen's continued operation in an abnormal state may cause damage to the electronic pen's hardware structure, the electronic pen can be forcibly switched from the working mode to the sleep mode according to the abnormal prompt information to prevent the electronic pen from causing further damage or a poor user experience during use.

[0127] In steps S801 to S802 shown in the embodiment of the present application, if the calibration value difference information represents that the difference is greater than or equal to the calibration difference threshold, an abnormal prompt information is generated, and the electronic pen is converted from the working mode to the sleep mode according to the abnormal prompt information, so that protective measures can be taken to protect the electronic pen hardware before the problem of the electronic pen hardware or the external environment further deteriorates.

[0128] See also Fig. 9 In some embodiments, after step S103, the electronic pen automatic calibration method may also include but is not limited to steps S901 to S903:

[0129] Step S901, detecting the pairing type of the electronic pen to obtain a second pairing type;

[0130] Step S902, performing a second match between the second pairing type and the selected pairing type to obtain second matching information;

[0131] Step S903: When the second matching information indicates that the second pairing type matches the selected pairing type, a zero point calibration is performed on the pen tip output signal of the electronic pen.

[0132] In step S902 of some embodiments, the second matching information is used to describe whether the second pairing type matches or does not match the selected pairing type. The selected pairing type includes all electronic pen pairing types except the pen tip. In the case where the second pairing type matches any electronic pen pairing type in the selected pairing type, the second matching information indicates that the second pairing type matches the selected pairing type; in the case where the second pairing type does not match all electronic pen pairing types in the selected pairing type, the second matching information indicates that the second pairing type does not match the selected pairing type. The specific selected pairing type is similar to the specific embodiment of the target pairing type described above, except that the pen tip in the target pairing type only needs to be replaced with the pen tail, which will not be described in detail here.

[0133] In step S903 of some embodiments, if the pen tip is subjected to zero-point calibration of the output signal, it is very likely that the pen tip itself is working and thus affects the zero-point calibration of the output signal of the pen tip, resulting in low reliability of the zero-point calibration of the output signal of the pen tip. Therefore, it is necessary to perform zero-point calibration on the output signal of the pen tip of the electronic pen when the second pairing type of the electronic pen is not the pen tip, so as to ensure that the zero-point calibration operation of the output signal of the pen tip will neither be affected by the writing operation of the pen tip nor interfere with the writing or handwriting erasing operation performed by the user. Therefore, when the second matching information indicates that the second pairing type matches the selected pairing type, the output signal of the pen tip of the electronic pen is subjected to zero-point calibration.

[0134] It should be noted that, when the second pairing type matches the selected pairing type, the specific implementation method of zero-point calibration of the pen tip output signal of the electronic pen is basically the same as the specific implementation example of automatic calibration of the pen tail mentioned above, and the only difference is in the expression. It is necessary to replace the expressions such as pen tip no-load pressure, basic pen tip no-load value, target pen tip no-load value, pen tip output signal, pen tip zero-point calibration value with pen tip no-load pressure, basic pen tip no-load value, target pen tip no-load value, pen tip output signal, pen tip zero-point calibration value, etc., which will not be repeated. In addition, in the process of automatic calibration of the pen tip and pen tail, the specific values ​​of the standard deviation threshold, quantity threshold, calibration difference threshold and factory zero-point calibration value can be the same or different, and this application does not limit it.

[0135] It should be noted that when the electronic pen enters the working mode from the sleep mode, the pairing type of the electronic pen is automatically set to the pen tip. At this time, for the pen tip of the electronic pen, the output signal zero point calibration of the pen tip can be performed according to the last pen tip zero point calibration value stored in the electronic pen, or the output signal zero point calibration can be performed according to other zero point calibration methods that can be directly obtained by those skilled in the art.

[0136] In steps S901 to S903 shown in the embodiment of the present application, the pairing type of the electronic pen is first detected to obtain a second pairing type, and a second match is performed on the second pairing type and the selected pairing type to obtain second matching information. Then, when the second matching information indicates that the second pairing type and the selected pairing type match, a zero-point calibration is performed on the output signal of the pen tip of the electronic pen. Therefore, the electronic pen automatic calibration method shown in the embodiment of the present application can perform a zero-point calibration on the output signal of the pen tip of the electronic pen when the second pairing type is not the pen tip. Since the pen tip is not in a working state at this time, the influence of the pen tip itself on the automatic calibration process can be reduced, thereby improving the accuracy of the automatic calibration of the output signal.

[0137] See also Fig.10 In some embodiments, step S103 may include but is not limited to steps S1001 to S1002:

[0138] Step S1001, when the first matching information indicates that the first pairing type matches the target pairing type, a third matching is performed on the first pairing type and the pen tip to obtain third matching information;

[0139] Step S1002: When the third matching information indicates that the first pairing type is the pen tip, a zero point calibration is performed on the output signal of the pen tip of the electronic pen.

[0140] In step S1002 of some embodiments, the third matching information is used to describe whether the first pairing type of the electronic pen is the pen tip. In some electronic pens, the pairing type of the electronic pen may include other pairing types in addition to the pen tip and the pen tail. For example, when the pairing type of the electronic pen is unpaired or a shortcut key, the pen tip and the pen tail of the electronic pen are not paired with a writable device. At this time, the user does not use the pen tip or the pen tail to perform writing operations. The position change and change speed of the electronic pen are unstable, and the collected pen tail pressure is easily affected, resulting in unreliable no-load value of the pen tail, which in turn affects the zero-point calibration of the output signal of the pen tail of the electronic pen. Therefore, it is necessary to perform a third matching of the first pairing type and the pen tip to obtain the third matching information to determine whether the pairing type of the electronic pen is the pen tip, and when it is determined that the pairing type of the electronic pen is the pen tip, the output signal of the pen tail of the electronic pen is zero-calibrated.

[0141] In the steps S1001 to S1002 shown in the embodiment of the present application, when the first matching information indicates that the first pairing type matches the target pairing type, the first pairing type and the pen tip are matched for the third time to obtain the third matching information, and when the third matching information indicates that the first pairing type is the pen tip, the output signal of the pen tail of the electronic pen is zero-calibrated, so that when the first pairing type is the pen tip, the output signal of the pen tail of the electronic pen is zero-calibrated to obtain a relatively stable pen tail pressure collection environment, and the accuracy of the zero-point calibration of the pen tail output signal is improved by converting the relatively stable pen tail pressure into the basic pen tail no-load value. At the same time, when the first pairing type is the pen tip, the output signal of the pen tail of the electronic pen is zero-calibrated, and when the user needs to quickly switch from the pen tip to the pen tail to perform a handwriting erasing operation, the electronic pen can quickly respond to this switching demand, so that the user can immediately use the pen tail of the electronic pen to perform a handwriting erasing operation. In addition, continuously performing zero-point calibration on the output signal of the pen tail only when the pairing type of the electronic pen is the pen tip can also reduce power consumption caused by long-term zero-point calibration of the output signal of the pen tail, thereby extending the battery life of the electronic pen.

[0142] In some embodiments, the specific implementation steps of the electronic pen automatic calibration method provided in the embodiments of the present application include: firstly, detecting the pairing type of the electronic pen to obtain a first pairing type, and performing a first match between the first pairing type and the target pairing type to obtain first matching information. Then, when the first matching information indicates that the first pairing type and the target pairing type match, collecting the no-load pressure of the pen tail to obtain the no-load pressure of the pen tail, and converting the no-load pressure of the pen tail into a basic no-load value of the pen tail. Thereafter, comparing the total number of the basic no-load values ​​of the pen tail with a preset quantity threshold to obtain total number comparison information, if the total number comparison information indicates that the total number is less than the quantity threshold, then determining to perform a detection operation to detect the pairing type of the electronic pen. If the total number comparison information indicates that the total number is greater than or equal to the quantity threshold, then obtaining the acquisition time information of the basic no-load value of the pen tail, and selecting the target no-load value of the pen tail from the basic no-load value of the pen tail according to the acquisition time information, and then calculating the standard deviation of the target no-load value of the pen tail to obtain the first standard deviation. Next, the first standard deviation is compared with a preset standard deviation threshold to obtain standard deviation comparison information. If the standard deviation comparison information indicates that the first standard deviation is greater than the standard deviation threshold, it is determined to perform a detection operation; if the standard deviation comparison information indicates that the first standard deviation is less than or equal to the standard deviation threshold, it is determined to perform a calibration operation on the end of the electronic pen. In the process of performing zero-point calibration on the end-of-pen output signal of the electronic pen, the average value of the target end-of-pen no-load value is first calculated, and the difference is calculated based on the average value and the preset factory zero-point calibration value, and then the calibration value difference information is obtained by comparing the difference with the preset calibration difference threshold. If the calibration value difference information indicates that the difference is less than the calibration difference threshold, the average value is set as the end-of-pen zero-point calibration value, so as to perform zero-point calibration on the end-of-pen output signal of the electronic pen according to the end-of-pen zero-point calibration value; if the calibration value difference information indicates that the difference is greater than or equal to the calibration difference threshold, abnormal prompt information is generated, and the electronic pen is converted from the working mode to the sleep mode according to the abnormal prompt information.

[0143] In other embodiments, the electronic pen automatic calibration method provided in the embodiments of the present application includes the following specific implementation steps: first, detecting the pairing type of the electronic pen to obtain a first pairing type, and performing a first match between the first pairing type and the target pairing type to obtain first matching information. Then, when the first matching information indicates that the first pairing type and the target pairing type match, performing a third match between the first pairing type and the pen tip to obtain third matching information. Thereafter, when the third matching information indicates that the first pairing type is the pen tip, collecting the no-load pressure of the pen tail to obtain the no-load pressure of the pen tail, and converting the no-load pressure of the pen tail into a basic no-load value of the pen tail. Thereafter, comparing the total number of the basic no-load values ​​of the pen tail with a preset quantity threshold to obtain total number comparison information, if the total number comparison information indicates that the total number is less than the quantity threshold, determining to perform a detection operation to detect the pairing type of the electronic pen. If the total number comparison information indicates that the total number is greater than or equal to the quantity threshold, obtaining the acquisition time information of the basic no-load value of the pen tail, selecting the target no-load value of the pen tail from the basic no-load value of the pen tail according to the acquisition time information, and then calculating the standard deviation of the target no-load value of the pen tail to obtain a first standard deviation. Next, the first standard deviation is compared with a preset standard deviation threshold to obtain standard deviation comparison information. If the standard deviation comparison information indicates that the first standard deviation is greater than the standard deviation threshold, it is determined to perform a detection operation; if the standard deviation comparison information indicates that the first standard deviation is less than or equal to the standard deviation threshold, it is determined to perform a calibration operation on the end of the electronic pen. In the process of performing zero-point calibration on the end-of-pen output signal of the electronic pen, the average value of the target end-of-pen no-load value is first calculated, and the difference is calculated based on the average value and the preset factory zero-point calibration value, and then the calibration value difference information is obtained by comparing the difference with the preset calibration difference threshold. If the calibration value difference information indicates that the difference is less than the calibration difference threshold, the average value is set as the end-of-pen zero-point calibration value, so as to perform zero-point calibration on the end-of-pen output signal of the electronic pen according to the end-of-pen zero-point calibration value; if the calibration value difference information indicates that the difference is greater than or equal to the calibration difference threshold, abnormal prompt information is generated, and the electronic pen is converted from the working mode to the sleep mode according to the abnormal prompt information. After the pen tail output signal of the electronic pen is zero-calibrated according to the pen tail zero-calibration value, the pairing type of the electronic pen is detected to obtain a second pairing type, and the second pairing type is second-matched with the selected pairing type to obtain second matching information. Finally, when the second matching information indicates that the second pairing type matches the selected pairing type, the pen tip output signal of the electronic pen is zero-calibrated.

[0144] See also Fig.11 The embodiment of the present application further provides an electronic pen automatic calibration system, which can implement the above electronic pen automatic calibration method, and the system includes:

[0145] The type detection module 1101 is used to detect the pairing type of the electronic pen and obtain a first pairing type;

[0146] A type matching module 1102 is used to perform a first match between the first pairing type and the target matching type to obtain first matching information;

[0147] The automatic calibration module 1103 is configured to perform zero-point calibration on the pen end output signal of the electronic pen when the first matching information indicates that the first pairing type matches the target pairing type.

[0148] The specific implementation of the electronic pen automatic calibration system is substantially the same as the specific implementation of the electronic pen automatic calibration method described above, and will not be described in detail herein.

[0149] An embodiment of the present application further provides an electronic pen, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above-mentioned electronic pen automatic calibration method when executing the computer program.

[0150] See also Fig.12 , Fig.12 The hardware structure of an electronic pen of another embodiment is shown, and the electronic pen includes:

[0151] The processor 1201 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0152] The memory 1202 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1202 may store an operating system and other application programs. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1202, and the processor 1201 calls and executes the electronic pen automatic calibration method of the embodiment of the present application; the memory 1202 may also store the electronic pen first pairing type information and the second pairing type information, so that the processor 1201 can call these electronic pen first pairing type information and the second pairing type information when executing the electronic pen automatic calibration method of the embodiment of the present application;

[0153] Input / output interface 1203, used to implement information input and output;

[0154] The communication interface 1204 is used to realize the communication interaction between the electronic pen and other devices. The communication can be realized through a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WI FI, Bluetooth, etc.);

[0155] The gravity sensing module 1205 is arranged at the end of the electronic pen, and is used to collect the no-load pressure of the end of the electronic pen to obtain the no-load pressure of the end of the electronic pen when the first pairing type of the electronic pen is not the end of the pen;

[0156] The displacement sensing module 1206 is used to collect the displacement signal of the electronic pen and send it to the processor according to the displacement signal, so that the processor generates mode conversion information according to the displacement signal and the mode type information. If the mode type information indicates that the electronic pen is in the sleep mode, and the displacement signal indicates that the electronic pen has been displaced, then the mode conversion information is used to convert the electronic pen from the sleep mode to the working mode. If the mode type information indicates that the electronic pen is in the working mode, and the displacement signal indicates that the electronic pen has not been displaced within a preset working detection time, then the mode conversion information is used to convert the electronic pen from the working mode to the sleep mode, wherein the working detection time can be set to 30 seconds, or it can be set to other values ​​according to the actual needs of those skilled in the art, and this application does not impose any specific restrictions;

[0157] A bus 1207 , which transmits information between various components of the device (e.g., the processor 1201 , the memory 1202 , the input / output interface 1203 , the communication interface 1204 , and the gravity sensing module 1205 );

[0158] The processor 1201 , the memory 1202 , the input / output interface 1203 , the communication interface 1204 , the gravity sensing module 1205 and the displacement sensing module 1206 are connected to each other in communication within the device via a bus 1207 .

[0159] See also Fig.13 , Fig.13 The hardware structure of the electronic pen of another embodiment is illustrated. The gravity sensing module 1205 of the electronic pen is respectively arranged at the tip and the tail of the electronic pen, and is used to collect the no-load pressure of the tail of the electronic pen when the first pairing type of the electronic pen is not the tail of the pen to obtain the no-load pressure of the tail of the pen, and to collect the no-load pressure of the tip of the electronic pen when the second pairing type of the electronic pen is not the tip of the pen to obtain the no-load pressure of the tip of the pen.

[0160] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned electronic pen automatic calibration method is implemented.

[0161] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0162] The electronic pen automatic calibration method and system, the electronic pen and the storage medium provided in the embodiments of the present application detect the first pairing type of the electronic pen and perform a first match between the first pairing type and the target pairing type to obtain first matching information. Only when the first matching information indicates that the first pairing type of the electronic pen matches the target pairing type, the output signal of the pen tail of the electronic pen is zero-calibrated. At this time, the pen tail is not in a working state, which can reduce the influence of the pen tail on the automatic calibration process, thereby improving the accuracy of the automatic calibration of the output signal.

[0163] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0164] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0165] The device and system embodiments described above are merely illustrative, and the modules described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0166] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules in the devices disclosed above may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0167] The terms "first", "second", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices.

[0168] It should be understood that in the present application, "at least one (item)" means one or more, similarly, "at least two (items)" means two or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0169] In the several embodiments provided in the present application, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the device and system embodiments described above are merely schematic. For example, the division of the above modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device, system or module can be electrical, mechanical or other forms.

[0170] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0171] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0172] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0173] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. An electronic pen automatic calibration method, characterized in that: The method is applied to an electronic pen, and the method comprises: Detecting the pairing type of the electronic pen to obtain a first pairing type; Performing a first match between the first pairing type and the target pairing type to obtain first matching information; When the first matching information indicates that the first pairing type matches the target pairing type, a zero-point calibration is performed on the pen end output signal of the electronic pen.

2. The method according to claim 1, characterized in that Before performing zero point calibration on the pen tail output signal of the electronic pen, the method further comprises: Get the acquisition time information of the basic pen tail no-load value; Selecting a target pen tail no-load value from the basic pen tail no-load values ​​according to the acquisition time information; wherein the target pen tail no-load value includes the basic pen tail no-load value corresponding to the latest acquisition time information when the acquisition time information is obtained; According to the target pen tail no-load value, it is determined whether to perform a calibration operation or a detection operation on the pen tail of the electronic pen; wherein the calibration operation is performed to perform a zero-point calibration on the pen tail output signal of the electronic pen; and the detection operation is performed to detect the pairing type of the electronic pen.

3. The method according to claim 2, characterized in that The step of determining whether to perform a calibration operation or a detection operation on the pen tail of the electronic pen according to the target pen tail no-load value includes: Calculate the standard deviation of each of the target pen tail no-load values ​​to obtain a first standard deviation; Obtaining standard deviation comparison information by comparing the first standard deviation with a preset standard deviation threshold; If the standard deviation comparison information indicates that the first standard deviation is greater than the standard deviation threshold, determining to perform the detection operation; If the standard deviation comparison information indicates that the first standard deviation is less than or equal to the standard deviation threshold, it is determined to perform the calibration operation on the pen end of the electronic pen.

4. The method according to claim 3, characterized in that Before obtaining the acquisition time information of the basic pen tail no-load value, the method further includes: Comparing the total number of the basic pen tail no-load values ​​with a preset number threshold to obtain total number comparison information; If the total number comparison information indicates that the total number is less than the quantity threshold, determining to perform a detection operation, so as to perform the detection operation; If the total number comparison information indicates that the total number is greater than or equal to the quantity threshold, it is determined to perform an acquisition operation; wherein the acquisition operation is performed to obtain the acquisition time information of the basic pen tail no-load value.

5. The method according to claim 2, characterized in that: The zero point calibration of the pen tail output signal of the electronic pen comprises: Calculate the average value of each target pen tail no-load value; Calculate the difference based on the average value and the factory zero calibration value of the pen end; Comparing the difference with a preset calibration difference threshold to obtain calibration value difference information; If the calibration value difference information indicates that the difference is smaller than the calibration difference threshold, the average value is set as the pen tail zero point calibration value, so as to perform zero point calibration on the pen tail output signal of the electronic pen according to the pen tail zero point calibration value.

6. The method according to claim 5, characterized in that After obtaining calibration value difference information by comparing the difference value with a preset calibration difference threshold, the method further includes: If the calibration value difference information indicates that the difference is greater than or equal to the calibration difference threshold, generating abnormal prompt information; The electronic pen is converted from a working mode to a sleeping mode according to the abnormal prompt information.

7. The method according to claim 1, characterized in that In the case where the first matching information indicates that the first pairing type matches the target pairing type, after performing zero point calibration on the pen end output signal of the electronic pen, the method further includes: Detecting the pairing type of the electronic pen to obtain a second pairing type; Performing a second match between the second pairing type and the selected pairing type to obtain second matching information; When the second matching information indicates that the second pairing type matches the selected pairing type, a zero-point calibration is performed on the pen tip output signal of the electronic pen.

8. The method according to any one of claims 3 to 5, characterized in that: After determining to perform the detection operation if the standard deviation comparison information indicates that the first standard deviation is greater than the standard deviation threshold, the method further includes: Filtering updated pen tail no-load values ​​from the basic pen tail no-load values ​​according to the target pen tail no-load value, the average value and the standard deviation threshold; wherein the standard deviation of each updated pen tail no-load value is less than or equal to the standard deviation threshold, and the updated pen tail no-load value includes at least one of the target pen tail no-load values; At least one continuous pen tail idle group is constructed according to the updated pen tail idle value and the acquisition time information; wherein, in each of the continuous pen tail idle groups, the acquisition time information corresponding to each of the updated pen tail idle values ​​is continuous; Calculate the interval time between any two adjacent consecutive pen tail empty groups; Select a target pen tail idle group from each of the continuous pen tail idle groups according to the interval time; wherein the interval time between the target pen tail idle group and the previous continuous pen tail idle group of the target pen tail idle group is the longest; According to the acquisition time information, a selected pen tail idle value is selected from the target pen tail idle group; wherein the selected pen tail idle value is the updated pen tail idle value with the earliest acquisition time information in the target pen tail idle group; The basic pen tail no-load value is updated according to the selected pen tail no-load value to determine the execution of a total number comparison operation according to the updated basic pen tail no-load value; wherein the total number comparison operation is executed to compare the total number of the basic pen tail no-load values ​​with the quantity threshold.

9. An electronic pen, characterized in that: The electronic pen comprises a memory and a processor, the memory stores a computer program, and the processor implements the electronic pen automatic calibration method according to any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the electronic pen automatic calibration method according to any one of claims 1 to 8 is implemented.