Touch pen identification method and device, driving chip and electronic equipment
By scanning the pen twice during each touch detection period of the touch screen and matching the identity information, the problem of high resource utilization of active stylus recognition is solved, accurate identification and resource savings are achieved, and equipment costs are reduced.
Patent Information
- Application Number
- CN202411275584.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-01-03
AI Technical Summary
The identification of existing active stylus occupies a lot of storage resources and computing resources, resulting in high equipment costs and limited functions, and is wasted resources when touched by mistake.
By performing two pen scans during each touch detection period of the touch screen, the first identity identification information of the stylus is determined and matched during continuous detection to set the stylus mode, reducing analog-to-digital conversion channels and operations The use of resources is to quickly identify IDs using non-volatile memory to avoid loss of identity information.
It realizes accurate identification of active pen, reduces resource use, avoids mis-switching of modes, reduces equipment costs, and optimizes the identification steps.
Smart Images

Figure CN119248122A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of touch technology, and in particular to a stylus recognition method and device, a driver chip, and an electronic device. Background Art
[0002] With the development of technology, touch technology is increasingly used in various fields. There are many ways of touch, human touch and stylus touch are widely used touch methods, the working principle is that the coupling capacitance on the electrode changes by touching the electrode on the screen with the human body (such as a finger) or a stylus, and the position of the finger touch can be detected by detecting this change.
[0003] Currently, the stylus pens on the market are mainly divided into passive pens and active pens. Passive pens imitate the touch effect of fingers. The pen tip is made of conductive material. As long as the pen tip is strong enough to affect the change of capacitance, the passive pen tip is thicker. The pen body of the active pen is a circuit board that can absorb and transform current. It works by changing the current through contact with the screen. Therefore, the pen tip can be designed to be thinner and the touch accuracy is higher.
[0004] Active pens are being used more and more widely due to their high touch accuracy. However, the recognition of active pens currently occupies a lot of storage resources and computing resources. Summary of the invention
[0005] According to one aspect of the present disclosure, a stylus recognition method is provided, the method being applied to a touch screen, the touch screen working in a stylus mode or a hand mode, the hand mode being used to perform touch detection on a finger touch, the stylus mode being used to perform touch detection on a stylus, wherein the method comprises:
[0006] When the touch screen operates in the hand mode, two pen scans are performed during each touch detection period, wherein the target analog-to-digital conversion channel where the stylus is located is determined during the first pen scan period, and the first identity information of the stylus is collected from the target analog-to-digital conversion channel during the second pen scan period, wherein the sum of the durations of the two pen scans is less than the duration of the touch detection period, and the first identity information is a part of the complete identity information of the stylus;
[0007] If the first identity identification information obtained during a plurality of consecutive touch detections matches, the touch screen is set to operate in the stylus mode.
[0008] In a possible implementation, the method further includes:
[0009] If the first K bits of the identifiers of each first identity information obtained during multiple consecutive touch detections are the same, it is determined that the first identity information obtained during multiple consecutive touch detections matches, where 1<K≤M, and K and M are both integers, and M is the total number of bits of the first identity information.
[0010] In a possible implementation, the method further includes:
[0011] Using the matched first identity information as a quick identification ID of the stylus;
[0012] The quick identification ID is stored in non-volatile memory.
[0013] In a possible implementation, the method further includes:
[0014] When the touch screen operates in the hand mode, two pen scans are performed during each touch detection period, wherein a target analog-to-digital conversion channel where the stylus is located is determined during a first pen scan period, and second identity information of the stylus is obtained from the target analog-to-digital conversion channel during a second pen scan period;
[0015] If the second identity information of the stylus matches the quick identification ID in the non-volatile memory, the touch screen is set to operate in the stylus mode.
[0016] In a possible implementation, the touch detection period includes multiple working time slots, each working time slot has an interval of preset time length, any two consecutive working time slots among the multiple working time slots are configured to perform pen scanning, and the remaining working time slots are configured to perform at least one of uplink information sending, finger scanning, and noise detection, and the duration of each working time slot is less than the preset duration.
[0017] In a possible implementation, the touch detection period includes 21 working slots, wherein the first working slot is configured for uplink information sending, the second working slot and the third working slot are configured for pen scanning, the fourth working slot to the eleventh working slot and the fourteenth working slot to the twenty-first working slot are configured for finger scanning, and the twelfth working slot and the thirteenth working slot are configured for noise detection.
[0018] In a possible implementation, the touch screen includes any one of a liquid crystal display panel, an organic light emitting diode display panel, a quantum dot light emitting diode display panel, a mini light emitting diode display panel and a micro light emitting diode display panel.
[0019] According to one aspect of the present disclosure, a stylus recognition device is provided, the device is applied to a touch screen, the touch screen works in a stylus mode or a hand mode, the hand mode is used to perform touch detection on a finger touch, and the stylus mode is used to perform touch detection on a stylus, wherein the device comprises:
[0020] a scanning module, configured to perform two pen scans during each touch detection period when the touch screen operates in the hand mode, wherein a target analog-to-digital conversion channel where the stylus is located is determined during a first pen scan period, and first identity information of the stylus is collected from the target analog-to-digital conversion channel during a second pen scan period, wherein a sum of durations of the two pen scans is less than a duration of the touch detection period, and the first identity information is a part of the complete identity information of the stylus;
[0021] The mode setting module is connected to the scanning module and is used to set the touch screen to work in the stylus mode if the first identity identification information obtained during a plurality of consecutive touch detections matches.
[0022] According to one aspect of the present disclosure, a driving chip is provided, wherein the chip includes the stylus recognition device.
[0023] According to one aspect of the present disclosure, an electronic device is provided. The electronic device includes the driving chip and a touch screen.
[0024] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
[0025] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.
[0026] In the stylus recognition method of the disclosed embodiment, when the touch screen operates in the hand mode, two pen scans are performed during each touch detection period, the target analog-to-digital conversion channel where the stylus is located is determined during the first pen scan, and the first identity information of the stylus is collected from the target analog-to-digital conversion channel during the second pen scan. If the first identity information obtained during multiple consecutive touch detection periods matches, the touch screen is set to operate in the stylus mode. Since the sum of the durations of the two pen scans is less than the duration of the touch detection period, the first identity information is a part of the complete identity information of the stylus. Compared with the related art of identifying the active pen using the complete identity information, the use of analog-to-digital conversion channels can be reduced, the use of computing resources and storage resources can be reduced, and the active pen can be accurately identified.
[0027] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit the present disclosure. Other features and aspects of the present disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0029] Figure 1 A flow chart of a stylus recognition method according to an embodiment of the present disclosure is shown.
[0030] Figure 2 FIG. 4 shows a schematic diagram of a frame structure during a touch detection period in a hand mode according to an embodiment of the present disclosure. Figure 3 A schematic diagram of a frame structure during a touch detection period in a stylus mode according to an embodiment of the present disclosure is shown.
[0031] Figure 4 A flow chart of a stylus recognition method according to an embodiment of the present disclosure is shown.
[0032] Figure 5 A block diagram of a stylus pen recognition device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0033] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0034] In the description of the present disclosure, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present disclosure.
[0035] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0036] In the present disclosure, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances.
[0037] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0038] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0039] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0040] See also Figure 1, Figure 1 A flow chart of a stylus recognition method according to an embodiment of the present disclosure is shown.
[0041] The method is applied to a touch screen, the touch screen works in a stylus mode or a hand mode, the hand mode is used to perform touch detection on a finger touch, and the stylus mode is used to perform touch detection on a stylus, wherein, Figure 1 As shown, the method includes:
[0042] Step S11, when the touch screen operates in the hand mode, two pen scans are performed during each touch detection period, wherein during the first pen scan period, a target analog-to-digital conversion channel where the stylus is located is determined, and during the second pen scan period, first identity information of the stylus is collected from the target analog-to-digital conversion channel, wherein the sum of the durations of the two pen scans is less than the duration of the touch detection period, and the first identity information is a part of the complete identity information of the stylus;
[0043] Step S12: if the first identity identification information obtained during a plurality of consecutive touch detections matches, setting the touch screen to operate in the stylus mode.
[0044] The stylus recognition method of the embodiment of the present disclosure is as follows: when the touch screen operates in the hand mode, two pen scans are performed during each touch detection period, the target analog-to-digital conversion channel where the stylus is located is determined during the first pen scan, and the first identity information of the stylus is collected from the target analog-to-digital conversion channel during the second pen scan. If the first identity information obtained during multiple consecutive touch detection periods matches, the touch screen is set to operate in the stylus mode. The touch detection period refers to the duration of one (or one frame) touch detection. Since the sum of the durations of the two pen scans is less than the duration of the touch detection period, the first identity information is a part of the complete identity information of the stylus. Compared with the method of identifying the active pen using the complete identity information in the related art, the embodiment of the present disclosure can reduce the use of analog-to-digital conversion channels, reduce the use of computing resources and storage resources, and can accurately realize the identification of the active pen.
[0045] The disclosed embodiment does not limit the specific form of the complete identity information (ID) of the stylus pen, and those skilled in the art may set it according to actual conditions and needs. For example, the complete identity information of the stylus pen may include multiple consecutive characters.
[0046] The related technology usually uses a complete active pen ID to determine the arrival of the active pen during a touch detection period, so multiple analog-to-digital conversion channels are required for multi-channel or even full-channel acquisition. Although the related technology can realize the rapid identification of the active pen during a touch detection period, it occupies more analog-to-digital conversion resources, data storage resources (such as cache resources), and computing resources (such as computing resources of processing components), resulting in limited use of other functions of the touch screen. In order to ensure that all functions can be used normally, it is necessary to increase analog-to-digital conversion channels, increase data storage resources, and increase computing resources, which will increase costs and increase chip area, thereby increasing the size of the device and causing the device to be bloated. In addition, consider a scenario where the active pen just accidentally touches the touch screen and the user is not actually going to use the active pen. In this case, the related technology will waste a lot of resources to determine the arrival of the active pen and switch the working mode of the touch screen from hand mode to active pen mode.
[0047] However, the embodiment of the present disclosure identifies the active pen through a part of the complete identity information, namely the first identity information. It only needs to obtain the first identity information during multiple consecutive touch detections. As long as it is determined that the first identity information obtained during multiple consecutive touch detections matches, the active pen can be identified. There is no need to increase the analog-to-digital conversion channel, increase data storage resources, and computing resources, and normal use of other functions can also be achieved. Therefore, the embodiment of the present disclosure achieves a balance between cost and recognition accuracy. In addition, the embodiment of the present disclosure needs to obtain the first identity information during multiple consecutive touch detections to determine whether the active pen has arrived stably, which further reduces the use of resources compared to the related technology and avoids the incorrect switching of modes.
[0048] In some possible implementations, the method can be implemented by a processing component calling a computer-readable instruction stored in a memory. In one example, the processing component includes but is not limited to a separate processor, or a discrete component, or a combination of a processor and a discrete component. The processor may include a controller having an execution instruction function in an electronic device, and the processor may be implemented in any appropriate manner, for example, by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components. Inside the processor, the executable instructions may be executed by hardware circuits such as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers.
[0049] The embodiments of the present disclosure do not limit the specific type of the touch screen. In one possible implementation, the touch screen may include a display panel and a touch module. The touch module is used to implement touch scanning detection of fingers and active pens. The display panel may include any one of a liquid crystal display panel, an organic light emitting diode display panel, a quantum dot light emitting diode display panel, a mini light emitting diode display panel and a micro light emitting diode display panel. Of course, the embodiments of the present disclosure do not limit the specific type and implementation method of the touch module. Those skilled in the art may adopt relevant technologies to implement it according to actual conditions and needs.
[0050] The embodiments of the present disclosure do not limit the specific duration of the touch detection period and the pen scanning period. Those skilled in the art may set them according to actual conditions and needs. The duration of a pen scanning period may be less than 1 / 30 of the duration of the touch detection period. By way of example, the duration of the touch detection period may be in the millisecond level, such as 16 milliseconds. Accordingly, the duration of a pen scanning period may be less than 16 / 30 milliseconds.
[0051] When the touch screen operates in the hand mode, the two pen scans performed during each touch detection period may be continuous.
[0052] In a possible implementation, the touch detection period may include multiple working time slots, each working time slot has an interval of preset time length, any two consecutive working time slots among the multiple working time slots are configured to perform pen scanning, and the remaining working time slots are configured to perform at least one of uplink information sending, finger scanning, and noise detection, and the duration of each working time slot is less than the preset duration.
[0053] See also Figure 2 , Figure 3 , Figure 2 FIG. 4 shows a schematic diagram of a frame structure during a touch detection period in a hand mode according to an embodiment of the present disclosure. Figure 3 A schematic diagram of a frame structure during a touch detection period in a stylus mode according to an embodiment of the present disclosure is shown.
[0054] In a possible implementation, Figure 2 As shown, the touch detection period in the hand mode may include 21 working slots, wherein the first working slot is configured to send uplink information, the second working slot (horizontal axis number 1) and the third working slot (horizontal axis number 2) are configured to perform pen scanning, the fourth working slot (horizontal axis number 3) to the eleventh working slot (horizontal axis number 10), the fourteenth working slot (horizontal axis number 13) to the twenty-first working slot (horizontal axis number 20) are configured to perform finger scanning, and the twelfth working slot (horizontal axis number 11) and the thirteenth working slot (horizontal axis number 12) are configured to perform noise detection. Figure 2 In the figure, U (the first red working time slot) indicates uplink information transmission, which is the signal sent by the touch screen to the active pen; F indicates hand scanning; NF indicates hand noise detection; T1 indicates the duration of uplink to the first pen scan, T2 indicates the time interval between working time slots, and T3 indicates the duration of the pen scan working time slot (such as Figure 3 ), T5 represents the duration of the hand scanning working time slot, and T4 represents the distance from the last working time slot to the next uplink.
[0055] For example, Figure 3 As shown, the touch detection period of the stylus mode may include 21 working time slots, wherein the first working time slot is configured to send uplink information, the second working time slot (horizontal axis number 1) to the seventh working time slot (horizontal axis number 6), the tenth working time slot (horizontal axis number 9) and the eleventh working time slot (horizontal axis number 10), the fifteenth working time slot (horizontal axis number 14) and the sixteenth working time slot (horizontal axis number 15), the twentieth working time slot (horizontal axis number 19) and the twenty-first working time slot (horizontal axis number 20) are configured to perform pen scanning, and the remaining working time slots may be configured to perform finger scanning or other operations.
[0056] Of course, the above introduction to the frame structure during touch detection in the hand mode and during touch detection in the stylus mode is exemplary and should not be regarded as a limitation on the embodiments of the present disclosure. Those skilled in the art can set the frame structure during touch detection in the hand mode and during touch detection in the stylus mode according to actual conditions and needs.
[0057] The disclosed embodiment does not limit the specific number of touch detection periods used to determine the first identity identification information. Exemplarily, the specific number of touch detection periods may be 2 or 3 or more. Preferably, the disclosed embodiment may set the specific number of touch detection periods to 2 or 3. Thus, if the first identity identification information obtained during 2 or 3 consecutive touch detection periods matches, the touch screen is set to operate in the stylus mode to reduce the recognition time while ensuring accurate recognition of the active pen.
[0058] The embodiments of the present disclosure do not limit the specific method of determining the target analog-to-digital conversion channel where the stylus is located during the first pen scan. Those skilled in the art may implement the method using relevant technologies according to actual conditions and needs. For example, the data of the channel where the stylus is located may be significantly higher than that of other channels, and the embodiments of the present disclosure may determine the channel accordingly. Of course, all channels where the stylus is located may also be set to specific preset channels, and the target analog-to-digital conversion channel where the stylus is located may be determined by detecting the preset channel.
[0059] The embodiments of the present disclosure do not limit the specific method for determining the match of the first identity identification information obtained during a plurality of consecutive touch detections, and those skilled in the art may implement the method in a suitable manner according to actual conditions and needs.
[0060] See also Figure 4 , Figure 4 A flow chart of a stylus recognition method according to an embodiment of the present disclosure is shown.
[0061] In a possible implementation, Figure 4 As shown, the method may also include:
[0062] Step S21, if the first K bits of the identifiers of each first identity identification information obtained during multiple consecutive touch detections are the same, it is determined that the first identity identification information obtained during multiple consecutive touch detections matches, wherein 1<K≤M, and K and M are both integers, M is the total number of bits of the first identity identification information, and each bit corresponds to a character.
[0063] In this way, the embodiment of the present disclosure compares the first K bits of identifiers of each first identity identification information. If the first K bits of identifiers of each first identity identification information are the same, it is determined that the first identity identification information obtained during multiple consecutive touch detections matches; otherwise, it is determined that the first identity identification information obtained during multiple consecutive touch detections does not match. If it is determined that the first identity identification information obtained during multiple consecutive touch detections does not match, the touch screen remains in hand mode.
[0064] The presently disclosed embodiment does not limit the specific size of K, and those skilled in the art may set it according to actual conditions and needs. For example, K may be less than or equal to the maximum number of characters that can be collected by the target analog-to-digital conversion channel during a pen scan (that is, the total number of characters M of the first identity information). Preferably, K is set to the maximum number of characters M that can be collected by the target analog-to-digital conversion channel during the pen scan.
[0065] Of course, those skilled in the art may adopt other methods to determine whether the first identity identification information obtained during multiple consecutive touch detections matches according to actual conditions and needs. For example, the similarity of the first identity identification information obtained during multiple consecutive touch detections may be determined (such as Gaussian distance, etc.). When the similarity is greater than a preset similarity, it is determined that the first identity identification information obtained during multiple consecutive touch detections matches.
[0066] When the touch screen works in the stylus mode, the user operates the touch screen through the active pen. The current related technology stores the identity information of the stylus in a volatile memory (such as memory). The related technology has the problem that the cached active pen identity information is lost after the device or touch module loses power. In this case, if the active pen comes again after power-on, according to the related technology, it is still necessary to identify the active pen according to the usual active pen identification method, which further causes a waste of resources.
[0067] In a possible implementation, Figure 4 As shown, the method may also include:
[0068] Step S22, using the matched first identity information as a quick identification ID of the stylus;
[0069] Step S23: storing the quick identification ID in a non-volatile memory.
[0070] On the one hand, the embodiment of the present disclosure identifies the active pen through a part of the complete identity information, namely the first identity information. It only needs to obtain the first identity information during multiple consecutive touch detections. As long as it is determined that the first identity information obtained during multiple consecutive touch detections matches, the use of analog-to-digital conversion channels can be reduced, and the use of computing resources and storage resources can be reduced. On the other hand, by using the matched first identity information as the quick identification ID of the stylus, the quick identification ID is stored in a non-volatile memory to avoid the loss of the identity information of the active pen after power failure, the use of resources can be reduced when the active pen comes again, thereby optimizing the identification step.
[0071] In a possible implementation, the method may further include:
[0072] When the touch screen operates in the hand mode, two pen scans are performed during each touch detection period, wherein a target analog-to-digital conversion channel where the stylus is located is determined during a first pen scan period, and second identity information of the stylus is obtained from the target analog-to-digital conversion channel during a second pen scan period;
[0073] If the second identity information of the stylus matches the quick identification ID in the non-volatile memory, the touch screen is set to operate in the stylus mode.
[0074] The disclosed embodiment uses the matched first identity information as the quick identification ID of the stylus and stores the quick identification ID in a non-volatile memory. Even if the device or the touch module loses power, the quick identification ID is stored in the non-volatile memory and thus will not be lost due to power failure. When the device or the touch module is powered on and the active pen comes again, the disclosed embodiment can perform two pen scans during each touch detection period, wherein the target analog-to-digital conversion channel where the stylus is located is determined during the first pen scan, and the second identity information of the stylus is obtained from the target analog-to-digital conversion channel during the second pen scan, and the second identity information of the stylus is retrieved and matched in the non-volatile memory. If the second identity information of the stylus matches the quick identification ID in the non-volatile memory, the touch screen is set to work in the stylus mode, so that the active pen can be quickly identified in only one touch scan period.
[0075] The disclosed embodiments do not limit the specific method of storing the quick identification ID. For example, the quick identification ID can be transmitted to the whole machine driver through SPI / IIC communication or other communication protocols. The driver stores the quick identification ID in the non-volatile memory of the whole machine to prevent the touch chip from losing power. When the same active pen comes again, the pen mode can be quickly switched and the point can be reported.
[0076] The embodiments of the present disclosure do not limit the specific types of non-volatile memory, and those skilled in the art may set them according to actual conditions and needs. For example, they may include ROM (Read-only memory), PROM (Programmable read-only memory), EAROM (Electrically alterable read only memory), EPROM (Erasable programmable read only memory), EEPROM (Electrically erasable programmable read only memory), Flash memory, etc.
[0077] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.
[0078] See also Figure 5 , Figure 5 A block diagram of a stylus pen recognition device according to an embodiment of the present disclosure is shown.
[0079] The device is applied to a touch screen, and the touch screen works in a stylus mode or a hand mode. The hand mode is used to detect touches of fingers, and the stylus mode is used to detect touches of a stylus. Figure 5 As shown, the device comprises:
[0080] A scanning module 10, configured to perform two pen scans during each touch detection period when the touch screen operates in the hand mode, wherein a target analog-to-digital conversion channel where the stylus is located is determined during a first pen scan period, and first identity information of the stylus is collected from the target analog-to-digital conversion channel during a second pen scan period, wherein a sum of durations of the two pen scans is less than a duration of the touch detection period, and the first identity information is a part of the complete identity information of the stylus;
[0081] The mode setting module 20 is connected to the scanning module 10 and is used to set the touch screen to work in the stylus mode if the first identity identification information obtained during a plurality of consecutive touch detections matches.
[0082] In the stylus recognition device of the disclosed embodiment, when the touch screen operates in the hand mode, two pen scans are performed during each touch detection period, the target analog-to-digital conversion channel where the stylus is located is determined during the first pen scan, and the first identity information of the stylus is collected from the target analog-to-digital conversion channel during the second pen scan. If the first identity information obtained during multiple consecutive touch detection periods matches, the touch screen is set to operate in the stylus mode. Since the sum of the durations of the two pen scans is less than the duration of the touch detection period, the first identity information is a part of the complete identity information of the stylus. Compared with the method of identifying the active pen using the complete identity information in the related art, the use of analog-to-digital conversion channels can be reduced, the use of computing resources and storage resources can be reduced, and the active pen can be accurately identified.
[0083] In a possible implementation, the device further includes:
[0084] The first determination module is used to determine that the first identity information obtained during multiple consecutive touch detection periods matches if the first K bits of the identifiers of each first identity information obtained during multiple consecutive touch detection periods are the same, wherein 1<K≤M, and K and M are both integers, and M is the total number of bits of the first identity information.
[0085] In a possible implementation manner, the device further includes a configuration module, configured to:
[0086] Using the matched first identity information as a quick identification ID of the stylus;
[0087] The quick identification ID is stored in non-volatile memory.
[0088] In a possible implementation, the scanning module is further configured to: when the touch screen operates in the hand mode, perform two pen scans during each touch detection period, wherein during the first pen scan period, determine the target analog-to-digital conversion channel where the stylus is located, and during the second pen scan period, obtain the second identity information of the stylus from the target analog-to-digital conversion channel;
[0089] In a possible implementation manner, the mode setting module is further configured to: if the second identity identification information of the stylus matches the quick identification ID in the non-volatile memory, set the touch screen to operate in the stylus mode.
[0090] In a possible implementation, the touch detection period includes multiple working time slots, each working time slot has an interval of preset time length, any two consecutive working time slots among the multiple working time slots are configured to perform pen scanning, and the remaining working time slots are configured to perform at least one of uplink information sending, finger scanning, and noise detection, and the duration of each working time slot is less than the preset duration.
[0091] In a possible implementation, the touch detection period includes 21 working slots, wherein the first working slot is configured for uplink information sending, the second working slot and the third working slot are configured for pen scanning, the fourth working slot to the eleventh working slot and the fourteenth working slot to the twenty-first working slot are configured for finger scanning, and the twelfth working slot and the thirteenth working slot are configured for noise detection.
[0092] In a possible implementation, the touch screen includes any one of a liquid crystal display panel, an organic light emitting diode display panel, a quantum dot light emitting diode display panel, a mini light emitting diode display panel and a micro light emitting diode display panel.
[0093] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0094] The embodiment of the present disclosure also provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0095] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
[0096] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0097] According to one aspect of the present disclosure, a driving chip is provided, wherein the chip includes the stylus recognition device.
[0098] According to one aspect of the present disclosure, an electronic device is provided. The electronic device includes the driving chip and a touch screen.
[0099] The electronic device may include a terminal device, wherein the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a handheld device, a computing device or a vehicle-mounted device, etc. For example, some examples of terminals are: a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile Internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control (Industrial Control), a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid (Smart Grid), a wireless terminal in transportation safety (Transportation Safety), a wireless terminal in smart city (Smart City), a wireless terminal in smart home (Smart Home), a wireless terminal in Internet of Vehicles, etc. For example, the server may be a local server or a cloud server.
[0100] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A stylus recognition method, characterized in that: The method is applied to a touch screen, the touch screen works in a stylus mode or a hand mode, the hand mode is used to perform touch detection on a finger touch, and the stylus mode is used to perform touch detection on a stylus, wherein the method comprises: When the touch screen operates in the hand mode, two pen scans are performed during each touch detection period, wherein the target analog-to-digital conversion channel where the stylus is located is determined during the first pen scan period, and the first identity information of the stylus is collected from the target analog-to-digital conversion channel during the second pen scan period, wherein the sum of the durations of the two pen scans is less than the duration of the touch detection period, and the first identity information is a part of the complete identity information of the stylus; If the first identity identification information obtained during a plurality of consecutive touch detections matches, the touch screen is set to operate in the stylus mode.
2. The method according to claim 1, characterized in that The method further comprises: If the first K bits of the identifiers of each first identity information obtained during multiple consecutive touch detections are the same, it is determined that the first identity information obtained during multiple consecutive touch detections matches, where 1<K≤M, and K and M are both integers, and M is the total number of bits of the first identity information.
3. The method according to claim 1, characterized in that The method further comprises: Using the matched first identity information as a quick identification ID of the stylus; The quick identification ID is stored in non-volatile memory.
4. The method according to claim 3, characterized in that The method further comprises: When the touch screen operates in the hand mode, two pen scans are performed during each touch detection period, wherein a target analog-to-digital conversion channel where the stylus is located is determined during a first pen scan period, and second identity information of the stylus is obtained from the target analog-to-digital conversion channel during a second pen scan period; If the second identity information of the stylus matches the quick identification ID in the non-volatile memory, the touch screen is set to operate in the stylus mode.
5. The method according to claim 3, characterized in that: The touch detection period includes multiple working time slots, each working time slot has an interval of preset time length, any two consecutive working time slots among the multiple working time slots are configured to perform pen scanning, and the remaining working time slots are configured to perform at least one of uplink information sending, finger scanning, and noise detection, and the duration of each working time slot is less than the preset duration.
6. The method according to claim 5, characterized in that The touch detection period includes 21 working slots, wherein the first working slot is configured for uplink information sending, the second working slot and the third working slot are configured for pen scanning, the fourth working slot to the eleventh working slot and the fourteenth working slot to the twenty-first working slot are configured for finger scanning, and the twelfth working slot and the thirteenth working slot are configured for noise detection.
7. The method according to claim 1, characterized in that The touch screen includes any one of a liquid crystal display panel, an organic light emitting diode display panel, a quantum dot light emitting diode display panel, a mini light emitting diode display panel and a micro light emitting diode display panel.
8. A stylus recognition device, characterized in that: The device is applied to a touch screen, the touch screen works in a stylus mode or a hand mode, the hand mode is used to perform touch detection on a finger touch, and the stylus mode is used to perform touch detection on a stylus, wherein the device comprises: a scanning module, configured to perform two pen scans during each touch detection period when the touch screen operates in the hand mode, wherein a target analog-to-digital conversion channel where the stylus is located is determined during a first pen scan period, and first identity information of the stylus is collected from the target analog-to-digital conversion channel during a second pen scan period, wherein a sum of durations of the two pen scans is less than a duration of the touch detection period, and the first identity information is a part of the complete identity information of the stylus; The mode setting module is connected to the scanning module and is used to set the touch screen to work in the stylus mode if the first identity identification information obtained during a plurality of consecutive touch detections matches.
9. A driver chip, characterized in that: The chip includes the stylus recognition device as claimed in claim 8.
10. An electronic device, characterized in that: The electronic device comprises the driving chip and the touch screen as claimed in claim 9.
