Touch screen response method and device, computer equipment, readable storage medium and program product
By recognizing and responding to the operations of electronic pens and passive pens in electronic devices, the problem of poor operation compatibility in existing technologies is solved, and the efficiency of touch screen usage is improved.
Patent Information
- Application Number
- CN202411133384.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2026-03-03
AI Technical Summary
Existing technologies are difficult to make compatible with electronic pens and passive pens, resulting in low user efficiency.
By setting preset labels in electronic devices, and by comparing electronic pen labels with preset labels and analyzing historical labels, the system can identify and respond to the operations of electronic pens and passive pens, thereby achieving automatic matching and recognition of handwriting colors.
It achieves compatibility between electronic pen and passive pen operation, reduces the number of interaction steps for users on the touch screen, and improves operating efficiency.
Smart Images

Figure CN121597098A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human-computer interaction technology, and in particular to a touch screen response method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] With the improvement of technology and quality of life, more and more smart devices are appearing in people's daily work and life, and touch devices are one of them, such as interactive intelligent panels (IIPs). People can operate directly on the display screen of touch devices without the need for a mouse or other wired or wireless devices, which is convenient and fast. At the same time, writing devices that allow writing on touch devices have also emerged. People can write freely on touch devices just like using a pen. They can also choose the color or type of pen stroke according to their own needs.
[0003] Traditional solutions typically require users to select an input mode from a menu on the tablet before inputting touch commands, such as passive pen input mode or electronic pen input mode. In application scenarios where users need to switch input modes repeatedly, this greatly increases the amount of work required by the user, resulting in low user efficiency.
[0004] Current electronic devices are incompatible with both electronic pen and passive pen operation, which affects the user's operating efficiency. Summary of the Invention
[0005] Therefore, it is necessary to provide a touch screen response method, device, computer equipment, computer-readable storage medium, and computer program product that is compatible with both electronic pen operation and passive pen operation, in order to address the aforementioned technical problems.
[0006] In a first aspect, this application provides a touchscreen response method, applied to an electronic device equipped with a touchscreen, the electronic device being equipped with at least one electronic pen; the method includes:
[0007] If the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period, the electronic pen identifier is compared with a preset identifier; the preset identifier is determined based on at least one electronic pen equipped with the electronic device.
[0008] If the similarity between the electronic pen identifier and the preset identifier is not greater than the similarity threshold, the target historical identifier is determined from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device in response to the contact operation of the electronic pen.
[0009] Based on the electronic handwriting characteristics corresponding to the target historical identifier, the first handwriting corresponding to the touch coordinates is displayed; the electronic handwriting characteristics include handwriting color.
[0010] In one embodiment, the method further includes:
[0011] If the similarity between the electronic pen icon and the preset icon is greater than the similarity threshold, the second handwriting corresponding to the touch coordinates is displayed based on the electronic pen handwriting characteristics corresponding to the preset icon.
[0012] Record the electronic pen identifier as a historical identifier, record the recording duration of the corresponding historical identifier, and record the handwriting coordinates of the second handwriting as the handwriting coordinates of the corresponding historical identifier.
[0013] In one embodiment, determining a target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier includes:
[0014] If a unique historical identifier exists, the unique historical identifier will be used as the target historical identifier.
[0015] In the presence of multiple historical identifiers, the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each historical identifier is obtained. The target handwriting coordinates are determined based on the shortest distance, and the historical identifier corresponding to the target handwriting coordinates is used as the target historical identifier.
[0016] In one embodiment, the method further includes:
[0017] In the case of multiple historical identifiers, obtain the recording duration of each historical identifier;
[0018] Historical records with a duration shorter than the duration threshold will be used as alternative historical records.
[0019] Obtain the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each candidate history identifier. Determine the target handwriting coordinates based on the shortest distance, and use the candidate history identifier corresponding to the target handwriting coordinates as the target history identifier.
[0020] In one embodiment, the method further includes:
[0021] If the touch coordinates are obtained and no electronic pen icon is obtained within a preset time period, the touch area corresponding to the touch coordinates is obtained.
[0022] If the touch area is not greater than the area threshold, perform the step of determining the target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier.
[0023] In one embodiment, the method further includes:
[0024] If the touch area is greater than the area threshold, the currently enabled finger operation function is identified; the finger operation function includes passive pen function and operation menu function.
[0025] When the currently enabled finger operation function is the passive pen function, a third handwriting corresponding to the touch coordinates is displayed based on the first passive handwriting feature preset by the passive pen function; the first passive handwriting feature includes handwriting color.
[0026] In one embodiment, the method further includes:
[0027] When the currently enabled finger operation function is the menu function, it responds to finger touch operations based on the touch coordinates and the currently displayed menu interface.
[0028] In one embodiment, if the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period, the electronic pen identifier is compared with a preset identifier, including:
[0029] Once the touch coordinates are obtained, the currently enabled pen operation function is identified; the pen operation function includes passive pen function and electronic pen function.
[0030] If the currently enabled pen operation function is the electronic pen function, start the timer;
[0031] If the electronic pen identifier is obtained within a preset time period, the electronic pen identifier is compared with the preset identifier.
[0032] In one embodiment, the method further includes:
[0033] When the currently enabled pen operation function is the passive pen function, a fourth handwriting corresponding to the touch coordinates is displayed based on the second passive handwriting feature preset by the passive pen function; the second passive handwriting feature includes handwriting color.
[0034] Secondly, this application also provides a touchscreen response device for use in an electronic device equipped with a touchscreen, the electronic device being equipped with at least one electronic pen; the device includes:
[0035] The determination module is used to compare the electronic pen identifier with a preset identifier when the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period; the preset identifier is determined based on at least one electronic pen equipped with the electronic device.
[0036] The determination module is used to determine the target historical identifier from at least one historical identifier, based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier, when the similarity between the electronic pen identifier and the preset identifier is not greater than a similarity threshold; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device in response to the contact operation of the electronic pen.
[0037] The response module is used to display the first handwriting corresponding to the touch coordinates based on the electronic handwriting features corresponding to the target historical identifier; the electronic handwriting features include handwriting color.
[0038] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0039] If the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period, the electronic pen identifier is compared with a preset identifier; the preset identifier is determined based on at least one electronic pen equipped with the electronic device.
[0040] If the similarity between the electronic pen identifier and the preset identifier is not greater than the similarity threshold, the target historical identifier is determined from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device in response to the contact operation of the electronic pen.
[0041] Based on the electronic handwriting characteristics corresponding to the target historical identifier, the first handwriting corresponding to the touch coordinates is displayed; the electronic handwriting characteristics include handwriting color.
[0042] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0043] If the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period, the electronic pen identifier is compared with a preset identifier; the preset identifier is determined based on at least one electronic pen equipped with the electronic device.
[0044] If the similarity between the electronic pen identifier and the preset identifier is not greater than the similarity threshold, the target historical identifier is determined from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device in response to the contact operation of the electronic pen.
[0045] Based on the electronic handwriting characteristics corresponding to the target historical identifier, the first handwriting corresponding to the touch coordinates is displayed; the electronic handwriting characteristics include handwriting color.
[0046] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0047] If the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period, the electronic pen identifier is compared with a preset identifier; the preset identifier is determined based on at least one electronic pen equipped with the electronic device.
[0048] If the similarity between the electronic pen identifier and the preset identifier is not greater than the similarity threshold, the target historical identifier is determined from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device in response to the contact operation of the electronic pen.
[0049] Based on the electronic handwriting characteristics corresponding to the target historical identifier, the first handwriting corresponding to the touch coordinates is displayed; the electronic handwriting characteristics include handwriting color.
[0050] The aforementioned touchscreen response method, apparatus, computer equipment, computer-readable storage medium, and computer program product are applied to electronic devices equipped with touchscreens, which also include at least one electronic pen. When the electronic device acquires touch coordinates and obtains an electronic pen identifier within a preset time period, it compares the electronic pen identifier with a preset identifier. If the similarity between the electronic pen identifier and the preset identifier is not greater than a similarity threshold, it determines a target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier. Based on the electronic handwriting characteristics corresponding to the target historical identifier, it displays the first handwriting corresponding to the touch coordinates. The electronic device can recognize electronic pen, passive pen, and finger touch operations within the same time window. It can respond to electronic pen writing operations based on the handwriting settings of the electronic pen, and it can also respond to passive pen writing operations based on the response history of the electronic pen. Users can directly perform active or passive pen writing on the touchscreen, achieving compatibility between electronic pen and passive pen operations, reducing human-computer interaction steps, and thus improving the operational efficiency of the touchscreen. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is an application environment diagram of a touch screen response method in one embodiment;
[0053] Figure 2 This is a flowchart illustrating a touchscreen response method in one embodiment;
[0054] Figure 3 This is a schematic diagram of a function menu in one embodiment;
[0055] Figure 4 This is a logic flowchart of a touchscreen response method in one embodiment;
[0056] Figure 5 This is a structural block diagram of a touchscreen response device in one embodiment;
[0057] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0059] Interactive intelligent panels (IIPs) include conference panels used in meeting scenarios and educational panels used in educational scenarios. For touch-enabled devices such as conference panels and educational panels, an infrared electronic pen is typically included. When the electronic pen touches the screen, the pen tip generates an interrupt signal. The microprocessor in the pen sends an ID signal via an infrared LED in the pen. The touch system receives the ID signal and detects the pen's coordinates. It then binds the ID information with the pen's coordinates and displays the corresponding color on the screen. In other words, the binding of the electronic pen's ID information and coordinates is determined through a time window. If one electronic pen and one ordinary passive pen are writing simultaneously, because the passive pen does not emit an ID signal, if the touch system receives two coordinates and one ID within the time window, it will be unable to match the coordinates and ID; that is, this type of electronic pen is incompatible with passive pens. When presenting PowerPoint, users often need to add annotations of different colors to the content. Every time a user needs to change a color, they need to change a digital pen or set the color of the digital pen, which is a very cumbersome process. Users often forget to do this and just pick up the pen to annotate directly. After discovering that the annotation color is wrong, they have to do undo and reselect, which affects the user's operating efficiency and user experience.
[0060] If the entire system can recognize electronic pen, passive pen, and finger touch operations separately, it can respond to electronic pen writing operations based on the pen's set handwriting, passive pen writing operations based on the electronic pen's response history, and finger touch operations, responding independently to finger touch operations. Users can directly perform active pen writing, passive pen writing, or finger touch on the touchscreen, achieving compatibility between electronic pen, passive pen, and finger operations. Multiple operation methods are compatible, eliminating the need for mode selection and improving the overall efficiency of touch operations. The touchscreen response method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, electronic device 102 communicates with electronic pen 104 via a data cable or network. Electronic device 102 has a touchscreen, such as an infrared touchscreen. Electronic pen 104 has at least one color setting, allowing it to switch colors. Internally, electronic pen 104 has a microprocessor that sends the electronic pen ID carrying the color to electronic device 102. Electronic device 102 can be, but is not limited to, various interactive smart tablets, personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc.
[0061] In one exemplary embodiment, such as Figure 2 As shown, a touchscreen response method is provided, which is applied to... Figure 1 Taking electronic device 102 as an example, the explanation includes the following steps 202 to 206. Wherein:
[0062] Step 202: If the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period, the electronic pen identifier is compared with a preset identifier; the preset identifier is determined based on at least one electronic pen equipped with the electronic device.
[0063] The preset duration is typically measured in milliseconds (ms), and can be set to, but is not limited to, 10ms. The electronic pen identifier, also known as the electronic pen ID, is coded information carrying the characteristics of the electronic pen's handwriting, sent by the electronic pen to the electronic device. Typically, the handwriting characteristic is the pen color; one color corresponds to one electronic pen identifier. That is, an electronic pen capable of displaying n colors can send n different electronic pen identifiers. The electronic pen can be, but is not limited to, an infrared electronic pen, a Bluetooth electronic pen, and a 2.4G electronic pen, transmitting the electronic pen identifier to the electronic device via infrared, Bluetooth, or 2.4G signals. In this embodiment, the electronic pen identifier is transmitted to the electronic device via infrared signals; therefore, the electronic pen has an infrared transmitting module, and the electronic device has a corresponding infrared receiving module.
[0064] Optionally, all the electronic pen identifiers of the accompanying electronic pen can be stored locally in the electronic device as preset identifiers. When the touch screen of the electronic device is touched by a pen tip or finger (for example, when the infrared touch screen's infrared touch grid is touched by a pen tip or finger), touch coordinates are generated. If the electronic pen is writing at this time, the electronic pen will send the electronic pen identifier IDx to the electronic device. As long as the electronic device receives the electronic pen identifier IDx within a preset time period after obtaining the touch coordinates, it will compare IDx with the preset identifiers stored locally.
[0065] Step 204: If the similarity between the electronic pen identifier and the preset identifier is not greater than the similarity threshold, determine the target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device in response to the contact operation of the electronic pen.
[0066] The similarity threshold can be, but is not limited to, 70%. The purpose of setting a similarity threshold is that signal quality can sometimes degrade during transmission, causing electronic devices to not decode the signal correctly with 100% accuracy, especially noticeable with infrared signals. The history identifier is the electronic pen identifier stored by the electronic device after the user correctly completes a writing operation on the touchscreen using the electronic pen. The handwriting coordinates are the writing position of the electronic pen on the touchscreen stored by the electronic device after the user correctly completes a writing operation using the electronic pen.
[0067] Optionally, if the similarity between the electronic pen identifier IDx and any preset identifier stored locally in the electronic device is not greater than 70%, the electronic device determines that the current user is using an incorrect electronic pen or that the electronic pen is faulty. Based on the historical identifiers stored locally and the touch coordinates obtained this time, the correlation between the current writing operation and the historical writing operation is predicted, and the historical writing operation with the strongest correlation is found, thereby determining the corresponding target historical identifier.
[0068] Step 206: Based on the electronic handwriting features corresponding to the target historical identifier, display the first handwriting corresponding to the touch coordinates; the electronic handwriting features include handwriting color.
[0069] Optionally, the electronic device responds to the current touch operation based on the electronic handwriting characteristics corresponding to the target historical identifier. Taking the handwriting characteristics as the handwriting color as an example, the electronic device uses the note color of the target historical identifier as the color of the current writing and displays the writing handwriting of the corresponding color at the touch coordinates.
[0070] The aforementioned touchscreen response method is applied to an electronic device equipped with a touchscreen and at least one electronic pen. When the electronic device acquires touch coordinates and obtains an electronic pen identifier within a preset time period, it compares the electronic pen identifier with a preset identifier. If the similarity between the electronic pen identifier and the preset identifier is no greater than a similarity threshold, a target historical identifier is determined from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier. Based on the electronic handwriting characteristics corresponding to the target historical identifier, the first handwriting corresponding to the touch coordinates is displayed. The electronic device can recognize electronic pen, passive pen, and finger touch operations within the same time window. It can respond to electronic pen writing operations based on the handwriting settings of the electronic pen, and also respond to passive pen writing operations based on the response history of the electronic pen. Users can directly perform active or passive pen writing on the touchscreen, achieving compatibility between electronic pen and passive pen operations, reducing human-computer interaction steps, and thus improving the operational efficiency of the touchscreen.
[0071] In one embodiment, the method further includes: when the similarity between the electronic pen identifier and the preset identifier is greater than a similarity threshold, displaying a second handwriting corresponding to the touch coordinates based on the electronic handwriting features corresponding to the preset identifier; recording the electronic pen identifier as a historical identifier and recording the recording duration of the corresponding historical identifier; and recording the handwriting coordinates of the second handwriting as the handwriting coordinates of the corresponding historical identifier.
[0072] Optionally, if the similarity between the electronic pen identifier IDx and any preset identifier stored locally in the electronic device is greater than 70%, the electronic device determines that the current user is using the correct electronic pen, directly displays the writing handwriting of the color corresponding to the preset identifier, and records the touch coordinates and the electronic pen identifier IDx as a historical identifier and the handwriting coordinates of the historical identifier, while also recording the recording duration of each historical identifier.
[0073] In one feasible implementation, the corresponding historical identifier of the record can be deleted after the handwriting coordinates are deleted by the user, or the historical identifier and the corresponding handwriting coordinates can be deleted after the historical identifier has been recorded for a preset recording time, and the corresponding recording time can be deleted at the same time.
[0074] In this embodiment, the electronic device can recognize electronic pen, passive pen, and finger touch operations within the same time window. It can respond to electronic pen writing operations based on the handwriting set by the electronic pen, and also respond to passive pen writing operations based on the response history of the electronic pen. Users can directly perform active pen writing or passive pen writing on the touch screen, achieving compatibility between electronic pen and passive pen operations, reducing human-computer interaction steps, and thus improving the operation efficiency of the touch screen.
[0075] In one embodiment, determining a target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier includes: if there is a unique historical identifier, using the unique historical identifier as the target historical identifier; if there are multiple historical identifiers, obtaining the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each historical identifier, determining the target handwriting coordinates based on the shortest distance, and using the historical identifier corresponding to the target handwriting coordinates as the target historical identifier.
[0076] Optionally, the historical identifier stored locally on the electronic device falls into two categories: First, if there is only one electronic pen usage record, only one historical identifier and its corresponding handwriting coordinates are stored locally. Second, if there are multiple electronic pen usage records, multiple historical identifiers and their corresponding handwriting coordinates are stored locally. In the first case, the uniquely stored historical identifier can be directly used as the target historical identifier. In the second case, the distance between the touch coordinates and each handwriting coordinate needs to be calculated separately. The handwriting coordinate with the shortest distance to the touch coordinate is then used as the target handwriting coordinate, and the historical identifier corresponding to the target handwriting coordinate is used as the target historical identifier.
[0077] Since handwriting coordinates may include multiple coordinate points, the coordinate point closest to the touch coordinate can be found, and the distance between that coordinate point and the touch coordinate can be used as the distance between the touch coordinate and the handwriting coordinate.
[0078] Specifically, taking the example of an electronic device locally storing one or two historical identifiers, the electronic device checks whether historical identifier ID① and historical identifier ID② are recorded simultaneously. If not, it continues to check whether historical identifier ID① or historical identifier ID② is recorded. If ID① is recorded, ID① is used as the target historical identifier, and its color is used. Similarly, if ID② is recorded, ID② is used as the target historical identifier, and its color is used. If both historical identifier ID① and historical identifier ID② are recorded, the distance between the current touch coordinates and the handwriting coordinates of historical identifier ID① and historical identifier ID② is calculated respectively. If ID① is the closest, ID① is used as the target historical identifier, and its color is used. Similarly, if ID② is the closest, ID② is used as the target historical identifier, and its color is used.
[0079] In one feasible implementation, when multiple historical identifiers exist, the recording duration of each historical identifier is obtained; historical identifiers with a recording duration less than a duration threshold are used as candidate historical identifiers; the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each candidate historical identifier is obtained; the target handwriting coordinates are determined based on the shortest distance; and the candidate historical identifiers corresponding to the target handwriting coordinates are used as the target historical identifiers.
[0080] For example, the duration threshold can be set to 1 second. In the case of multiple historical identifiers, it is necessary to first filter the historical identifiers with a recording duration of less than 1 second from the multiple historical identifiers as candidate historical identifiers. Then, the handwriting coordinates of the candidate historical identifiers are used as candidate handwriting coordinates. The distance between the touch coordinates and each candidate handwriting coordinate is calculated. The candidate handwriting coordinate with the shortest distance to the touch coordinates is found as the target handwriting coordinate. The candidate historical identifier corresponding to the target handwriting coordinate is used as the target historical identifier.
[0081] In this embodiment, the electronic device can recognize electronic pen, passive pen, and finger touch operations within the same time window. It can respond to electronic pen writing operations based on the handwriting set by the electronic pen, and also respond to passive pen writing operations based on the response history of the electronic pen. Users can directly perform active pen writing or passive pen writing on the touch screen, achieving compatibility between electronic pen and passive pen operations, reducing human-computer interaction steps, and thus improving the operation efficiency of the touch screen.
[0082] In one embodiment, the touchscreen of the electronic device has three touch functions:
[0083] Electronic pen: Used for writing on the entire device and menu operation. The infrared electronic pen comes with multiple colors. When writing, the pen touches the screen, sending a color identifier to the device, which then recognizes and displays the color. The electronic pen can switch colors using a toggle switch on the pen body.
[0084] Passive pen: Used for writing on the entire device and for menu operation. The pen itself cannot change colors; colors can be selected through the device's color palette interface.
[0085] Fingers: The touch area diameter of fingers is larger than that of electronic pens. They are passive pens with two usage scenarios and functions: for writing on the entire device and menu operation, with the same function as passive pens; or to disable the hand writing function and use it only for menu operation.
[0086] Therefore, it is possible to configure such on electronic devices Figure 3The function menu shown allows users to set the currently enabled touch functions. The first-level menu "Touch" contains the second-level menus "Finger" and "Pen". The second-level menu "Finger" contains the third-level menus "Passive Pen" and "Menu Only". The "Passive Pen" function allows the finger to write and operate touch functions such as menus like a passive pen; the "Menu Only" function means the finger cannot write and can only operate the function menu. The second-level menu "Pen" contains the third-level menus "Passive Pen" and "Electronic Pen". The "Passive Pen" function indicates that the current mode is passive pen; if the user writes with an electronic pen in this mode, the effect is the same as passive pen writing. The "Electronic Pen" function indicates that the current mode is electronic pen; if the user writes with a passive pen in this mode, the pen color is the same as the preset electronic pen color recorded by the electronic device.
[0087] Within the two third-level menus, "Passive Pen," you can set the pen color separately.
[0088] In one embodiment, the method further includes: if the touch coordinates are obtained and no electronic pen identifier is obtained within a preset time period, obtaining the touch area corresponding to the touch coordinates.
[0089] If the touch area is not greater than the area threshold, perform the step of determining the target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier.
[0090] If the touch area is greater than the area threshold, the currently enabled finger operation function is identified; the finger operation function includes passive pen function and operation menu function.
[0091] When the currently enabled finger operation function is the passive pen function, a third handwriting corresponding to the touch coordinates is displayed based on the first passive handwriting feature preset by the passive pen function; the first passive handwriting feature includes handwriting color.
[0092] When the currently enabled finger operation function is the menu operation function, the system responds to finger touch operations based on the touch coordinates and the currently displayed menu interface.
[0093] Optionally, when the touchscreen of an electronic device is touched by a pen tip or finger, touch coordinates are generated. If a finger or passive pen is writing at this time, and no electronic pen sends an electronic pen identifier, the electronic device does not receive the electronic pen identifier. After waiting for more than a preset time, it will call an infrared frame to identify the touch area of the touched object based on the touch coordinates. If the touch area is greater than the area threshold, the electronic device determines that it is a large-area contact, identifies the current touched object as a finger, and recognizes the finger operation function currently enabled on the electronic device.
[0094] like Figure 3As shown, if the "Touch-Finger-Passive Pen" function is currently enabled, the writing strokes corresponding to the touch coordinates will be displayed according to the preset pen color of the passive pen function.
[0095] If the "Touch-Finger-Only Menu" function is currently enabled, it responds to finger touch operations based on the touch coordinates and the currently displayed menu interface.
[0096] In this embodiment, the electronic device recognizes electronic pen, passive pen, and finger touch operations respectively. It can respond to electronic pen writing operations based on the handwriting set by the electronic pen, respond to passive pen writing operations based on the response history of the electronic pen, and also recognize finger touch operations and respond to finger touch operations independently. Users can directly perform active pen writing, passive pen writing, or finger touch on the touch screen, realizing the compatibility of electronic pen, passive pen, and finger operations, reducing human-computer interaction steps, and thus improving the operation efficiency of the touch screen.
[0097] In one embodiment, when touch coordinates are obtained and an electronic pen identifier is obtained within a preset time period, the electronic pen identifier is compared with a preset identifier, including: when touch coordinates are obtained, identifying the currently enabled pen operation function; the pen operation function includes a passive pen function and an electronic pen function; when the currently enabled pen operation function is the electronic pen function, starting a timer; when the electronic pen identifier is obtained within the preset time period, comparing the electronic pen identifier with the preset identifier.
[0098] When the currently enabled pen operation function is the passive pen function, a fourth handwriting corresponding to the touch coordinates is displayed based on the second passive handwriting feature preset by the passive pen function; the second passive handwriting feature includes handwriting color.
[0099] Optionally, when the touchscreen of an electronic device is touched by a pen tip or finger, touch coordinates are generated. At this time, the electronic device also needs to recognize the pen operation function currently enabled on the electronic device.
[0100] like Figure 3 As shown, if the "touch-pen-passive pen" function is currently enabled, the electronic device will treat all electronic pens as passive pens, will not receive the electronic pen identifier sent by the electronic pen, and will display the writing handwriting corresponding to the touch coordinates according to the handwriting color preset by the passive pen function.
[0101] If the "touch-pen-active pen" function is currently enabled, start timing. If the electronic pen identifier is obtained within the preset time, compare the electronic pen identifier with the preset identifier and continue to execute the subsequent steps.
[0102] In this embodiment, the electronic device recognizes both electronic pen and passive pen operations. It can respond to electronic pen writing operations based on the pen's set handwriting or passive pen writing operations based on the electronic pen's response history. Users can directly perform active or passive pen writing on the touch screen, achieving compatibility between electronic pen and passive pen operations, reducing human-computer interaction steps, and thus improving the efficiency of touch screen operation.
[0103] In one exemplary embodiment, a touchscreen response method is provided, such as... Figure 4 As shown, it includes:
[0104] Once the touch coordinates are obtained, the currently enabled pen operation function is identified; the pen operation function includes passive pen function and electronic pen function.
[0105] When the currently enabled pen operation function is the passive pen function, a fourth handwriting corresponding to the touch coordinates is displayed based on the second passive handwriting feature preset by the passive pen function; the second passive handwriting feature includes handwriting color.
[0106] If the currently enabled pen operation function is the electronic pen function, start timing; if the electronic pen identifier is obtained within the preset time, compare the electronic pen identifier with the preset identifier; the preset identifier is determined based on at least one electronic pen equipped with the electronic device.
[0107] If the similarity between the electronic pen identifier and the preset identifier is greater than the similarity threshold, the second handwriting corresponding to the touch coordinates is displayed based on the electronic pen handwriting characteristics corresponding to the preset identifier; the electronic pen identifier is recorded as a historical identifier, and the handwriting coordinates of the second handwriting are recorded as the handwriting coordinates of the corresponding historical identifier.
[0108] If the similarity between the electronic pen identifier and a preset identifier is no greater than a similarity threshold, and a unique historical identifier exists, that unique historical identifier is used as the target historical identifier. If multiple historical identifiers exist, the recording duration of each historical identifier is obtained. Historical identifiers with a recording duration less than a duration threshold are used as candidate historical identifiers. The shortest distance between the touch coordinates and the handwriting coordinates corresponding to each candidate historical identifier is obtained. The target handwriting coordinates are determined based on the shortest distance, and the candidate historical identifier corresponding to the target handwriting coordinates is used as the target historical identifier. Based on the electronic handwriting features corresponding to the target historical identifier, the first handwriting corresponding to the touch coordinates is displayed. The electronic handwriting features include handwriting color.
[0109] If the touch coordinates are obtained and no electronic pen icon is obtained within a preset time period, the touch area corresponding to the touch coordinates is obtained.
[0110] If the touch area is no larger than the area threshold, and a unique historical identifier exists, that unique historical identifier is used as the target historical identifier. If multiple historical identifiers exist, the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each historical identifier is obtained. The target handwriting coordinates are determined based on the shortest distance, and the historical identifier corresponding to the target handwriting coordinates is used as the target historical identifier. Based on the electronic handwriting features corresponding to the target historical identifier, the first handwriting corresponding to the touch coordinates is displayed; the electronic handwriting features include handwriting color.
[0111] If the touch area is greater than the area threshold, the currently enabled finger operation function is identified; the finger operation function includes passive pen function and operation menu function.
[0112] When the currently enabled finger operation function is the passive pen function, a third handwriting corresponding to the touch coordinates is displayed based on the first passive handwriting feature preset by the passive pen function; the first passive handwriting feature includes handwriting color.
[0113] When the currently enabled finger operation function is the menu operation function, the system responds to finger touch operations based on the touch coordinates and the currently displayed menu interface.
[0114] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0115] Based on the same inventive concept, this application also provides a touch screen response device for implementing the touch screen response method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more touch screen response device embodiments provided below can be found in the limitations of the touch screen response method described above, and will not be repeated here.
[0116] In one exemplary embodiment, such as Figure 5 As shown, a touchscreen response device 500 is provided, including: a determination module 501, a determination module 502, and a response module 503, wherein:
[0117] The determination module 501 is used to compare the electronic pen identifier with a preset identifier when the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period; the preset identifier is determined based on at least one electronic pen equipped with the electronic device.
[0118] The determining module 502 is used to determine the target historical identifier from at least one historical identifier, based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier, when the similarity between the electronic pen identifier and the preset identifier is not greater than a similarity threshold; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device in response to the contact operation of the electronic pen.
[0119] The response module 503 is used to display the first handwriting corresponding to the touch coordinates based on the electronic handwriting features corresponding to the target historical identifier; the electronic handwriting features include handwriting color.
[0120] In one embodiment, the response module 503 is further configured to, when the similarity between the electronic pen identifier and the preset identifier is greater than a similarity threshold, display a second handwriting corresponding to the touch coordinates based on the electronic handwriting characteristics corresponding to the preset identifier; record the electronic pen identifier as a historical identifier and record the recording duration of the corresponding historical identifier; and record the handwriting coordinates of the second handwriting as the handwriting coordinates of the corresponding historical identifier.
[0121] In one embodiment, the determining module 502 is further configured to, if a unique historical identifier exists, use the unique historical identifier as the target historical identifier; if multiple historical identifiers exist, obtain the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each historical identifier, determine the target handwriting coordinates based on the shortest distance, and use the historical identifier corresponding to the target handwriting coordinates as the target historical identifier.
[0122] In one embodiment, the determining module 502 is further configured to, when multiple historical identifiers exist, obtain the recording duration of each historical identifier; use historical identifiers with a recording duration less than a duration threshold as candidate historical identifiers; obtain the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each candidate historical identifier; determine the target handwriting coordinates based on the shortest distance; and use the candidate historical identifiers corresponding to the target handwriting coordinates as the target historical identifiers.
[0123] In one embodiment, the determination module 501 is further configured to, when the touch coordinates are obtained and no electronic pen identifier is obtained within a preset time period, obtain the touch area corresponding to the touch coordinates; and when the touch area is not greater than the area threshold, perform the step of determining the target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier.
[0124] In one embodiment, the response module 503 is further configured to identify the currently enabled finger operation function when the touch area is greater than an area threshold; the finger operation function includes a passive pen function and an operation menu function; when the currently enabled finger operation function is the passive pen function, a third handwriting corresponding to the touch coordinate is displayed according to the first passive handwriting feature preset by the passive pen function; the first passive handwriting feature includes handwriting color.
[0125] In one embodiment, the response module 503 is further configured to respond to finger touch operations based on touch coordinates and the currently displayed menu interface when the currently enabled finger operation function is the operation menu function.
[0126] In one embodiment, the determination module 501 is further configured to identify the currently enabled pen operation function when the touch coordinates are obtained; the pen operation function includes a passive pen function and an electronic pen function; when the currently enabled pen operation function is an electronic pen function, start timing; and when an electronic pen identifier is obtained within a preset time, compare the electronic pen identifier with a preset identifier.
[0127] In one embodiment, the response module 503 is further configured to, when the currently enabled pen operation function is the passive pen function, display a fourth handwriting corresponding to the touch coordinates according to the second passive handwriting feature preset by the passive pen function; the second passive handwriting feature includes handwriting color.
[0128] Each module in the aforementioned touchscreen response device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0129] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores electronic pen identification data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a touchscreen response method.
[0130] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0131] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: when touch coordinates are obtained and an electronic pen identifier is obtained within a preset time period, the electronic pen identifier is compared with a preset identifier; the preset identifier is determined based on at least one electronic pen equipped with the electronic device; if the similarity between the electronic pen identifier and the preset identifier is not greater than a similarity threshold, a target historical identifier is determined from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device in response to the touch operation of the electronic pen; and a first handwriting corresponding to the touch coordinates is displayed based on the electronic handwriting features corresponding to the target historical identifier; the electronic handwriting features include handwriting color.
[0132] In one embodiment, when the processor executes the computer program, it further performs the following steps: if the similarity between the electronic pen identifier and the preset identifier is greater than a similarity threshold, it displays a second handwriting corresponding to the touch coordinates based on the electronic pen handwriting features corresponding to the preset identifier; it records the electronic pen identifier as a historical identifier and records the recording duration of the corresponding historical identifier, and records the handwriting coordinates of the second handwriting as the handwriting coordinates of the corresponding historical identifier.
[0133] In one embodiment, when the processor executes the computer program, it further performs the following steps: if a unique historical identifier exists, the unique historical identifier is used as the target historical identifier; if multiple historical identifiers exist, the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each historical identifier is obtained, the target handwriting coordinates are determined based on the shortest distance, and the historical identifier corresponding to the target handwriting coordinates is used as the target historical identifier.
[0134] In one embodiment, when the processor executes the computer program, it further performs the following steps: when multiple historical identifiers exist, obtain the recording duration of each historical identifier; use historical identifiers with a recording duration less than a duration threshold as candidate historical identifiers; obtain the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each candidate historical identifier, determine the target handwriting coordinates based on the shortest distance, and use the candidate historical identifier corresponding to the target handwriting coordinates as the target historical identifier.
[0135] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the touch coordinates are obtained and no electronic pen identifier is obtained within a preset time period, the touch area corresponding to the touch coordinates is obtained; if the touch area is not greater than the area threshold, the step of determining the target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier is executed.
[0136] In one embodiment, when the processor executes the computer program, it further performs the following steps: when the touch area is greater than an area threshold, it identifies the currently enabled finger operation function; the finger operation function includes a passive pen function and an operation menu function; when the currently enabled finger operation function is the passive pen function, it displays a third handwriting corresponding to the touch coordinates according to a first passive handwriting feature preset by the passive pen function; the first passive handwriting feature includes handwriting color.
[0137] In one embodiment, when the processor executes the computer program, it further performs the following steps: when the currently enabled finger operation function is the menu operation function, responding to the finger touch operation based on the touch coordinates and the currently displayed menu interface.
[0138] In one embodiment, when the processor executes the computer program, it further performs the following steps: when the touch coordinates are obtained, it identifies the currently enabled pen operation function; the pen operation function includes a passive pen function and an electronic pen function; when the currently enabled pen operation function is an electronic pen function, it starts timing; when an electronic pen identifier is obtained within a preset time period, it compares the electronic pen identifier with a preset identifier.
[0139] In one embodiment, when the processor executes the computer program, it further performs the following steps: when the currently enabled pen operation function is a passive pen function, it displays a fourth handwriting corresponding to the touch coordinates according to a second passive handwriting feature preset by the passive pen function; the second passive handwriting feature includes handwriting color.
[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: upon obtaining touch coordinates and acquiring an electronic pen identifier within a preset time period, comparing the electronic pen identifier with a preset identifier; the preset identifier is determined based on at least one electronic pen equipped with the electronic device; if the identifier similarity between the electronic pen identifier and the preset identifier is not greater than a similarity threshold, determining a target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device in response to a touch operation of the electronic pen; and displaying a first handwriting corresponding to the touch coordinates based on the electronic handwriting features corresponding to the target historical identifier; the electronic handwriting features include handwriting color.
[0141] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the similarity between the electronic pen identifier and the preset identifier is greater than a similarity threshold, displaying a second handwriting corresponding to the touch coordinates based on the electronic handwriting features corresponding to the preset identifier; recording the electronic pen identifier as a historical identifier and recording the recording duration of the corresponding historical identifier, and recording the handwriting coordinates of the second handwriting as the handwriting coordinates of the corresponding historical identifier.
[0142] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if a unique historical identifier exists, the unique historical identifier is used as the target historical identifier; if multiple historical identifiers exist, the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each historical identifier is obtained, the target handwriting coordinates are determined based on the shortest distance, and the historical identifier corresponding to the target handwriting coordinates is used as the target historical identifier.
[0143] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when multiple historical identifiers exist, obtain the recording duration of each historical identifier; use historical identifiers with a recording duration less than a duration threshold as candidate historical identifiers; obtain the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each candidate historical identifier, determine the target handwriting coordinates based on the shortest distance, and use the candidate historical identifier corresponding to the target handwriting coordinates as the target historical identifier.
[0144] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the touch coordinates are obtained and no electronic pen identifier is obtained within a preset time period, the touch area corresponding to the touch coordinates is obtained; if the touch area is not greater than the area threshold, the step of determining the target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier is executed.
[0145] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when the touch area is greater than an area threshold, it identifies the currently enabled finger operation function; the finger operation function includes a passive pen function and an operation menu function; when the currently enabled finger operation function is the passive pen function, it displays a third handwriting corresponding to the touch coordinates according to a first passive handwriting feature preset by the passive pen function; the first passive handwriting feature includes handwriting color.
[0146] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when the currently enabled finger operation function is the menu operation function, responding to the finger touch operation based on the touch coordinates and the currently displayed menu interface.
[0147] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: upon obtaining touch coordinates, identifying the currently enabled pen operation function; the pen operation function includes a passive pen function and an electronic pen function; if the currently enabled pen operation function is an electronic pen function, starting a timer; and if an electronic pen identifier is obtained within a preset time period, comparing the electronic pen identifier with a preset identifier.
[0148] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when the currently enabled pen operation function is a passive pen function, it displays a fourth handwriting corresponding to the touch coordinates according to a second passive handwriting feature preset by the passive pen function; the second passive handwriting feature includes handwriting color.
[0149] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: upon obtaining touch coordinates and acquiring an electronic pen identifier within a preset time period, comparing the electronic pen identifier with a preset identifier; the preset identifier is determined based on at least one electronic pen equipped with the electronic device; if the identifier similarity between the electronic pen identifier and the preset identifier is not greater than a similarity threshold, determining a target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier; the historical identifiers and their corresponding handwriting coordinates are obtained by the electronic device in response to a touch operation of the electronic pen; and displaying a first handwriting corresponding to the touch coordinates based on the electronic handwriting features corresponding to the target historical identifier; the electronic handwriting features include handwriting color.
[0150] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the similarity between the electronic pen identifier and the preset identifier is greater than a similarity threshold, displaying a second handwriting corresponding to the touch coordinates based on the electronic handwriting features corresponding to the preset identifier; recording the electronic pen identifier as a historical identifier and recording the recording duration of the corresponding historical identifier, and recording the handwriting coordinates of the second handwriting as the handwriting coordinates of the corresponding historical identifier.
[0151] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if a unique historical identifier exists, the unique historical identifier is used as the target historical identifier; if multiple historical identifiers exist, the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each historical identifier is obtained, the target handwriting coordinates are determined based on the shortest distance, and the historical identifier corresponding to the target handwriting coordinates is used as the target historical identifier.
[0152] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when multiple historical identifiers exist, obtain the recording duration of each historical identifier; use historical identifiers with a recording duration less than a duration threshold as candidate historical identifiers; obtain the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each candidate historical identifier, determine the target handwriting coordinates based on the shortest distance, and use the candidate historical identifier corresponding to the target handwriting coordinates as the target historical identifier.
[0153] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the touch coordinates are obtained and no electronic pen identifier is obtained within a preset time period, the touch area corresponding to the touch coordinates is obtained; if the touch area is not greater than the area threshold, the step of determining the target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier is executed.
[0154] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when the touch area is greater than an area threshold, it identifies the currently enabled finger operation function; the finger operation function includes a passive pen function and an operation menu function; when the currently enabled finger operation function is the passive pen function, it displays a third handwriting corresponding to the touch coordinates according to a first passive handwriting feature preset by the passive pen function; the first passive handwriting feature includes handwriting color.
[0155] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when the currently enabled finger operation function is the menu operation function, responding to the finger touch operation based on the touch coordinates and the currently displayed menu interface.
[0156] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: upon obtaining touch coordinates, identifying the currently enabled pen operation function; the pen operation function includes a passive pen function and an electronic pen function; if the currently enabled pen operation function is an electronic pen function, starting a timer; and if an electronic pen identifier is obtained within a preset time period, comparing the electronic pen identifier with a preset identifier.
[0157] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when the currently enabled pen operation function is a passive pen function, it displays a fourth handwriting corresponding to the touch coordinates according to a second passive handwriting feature preset by the passive pen function; the second passive handwriting feature includes handwriting color.
[0158] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0159] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0160] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0161] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A touchscreen response method, characterized in that, The method is applied to an electronic device equipped with a touchscreen, the electronic device being equipped with at least one electronic pen; the method includes: If the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period, the electronic pen identifier is compared with a preset identifier; the preset identifier is determined based on at least one electronic pen equipped with the electronic device. If the similarity between the electronic pen identifier and the preset identifier is not greater than a similarity threshold, the target historical identifier is determined from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device after responding to the contact operation of the electronic pen. Based on the electronic handwriting features corresponding to the target historical identifier, a first handwriting feature corresponding to the touch coordinates is displayed; the electronic handwriting features include handwriting color.
2. The method according to claim 1, characterized in that, The method further includes: If the similarity between the electronic pen identifier and the preset identifier is greater than a similarity threshold, a second handwriting corresponding to the touch coordinates is displayed based on the electronic pen handwriting features corresponding to the preset identifier. The electronic pen identifier is recorded as a historical identifier, and the recording duration of the corresponding historical identifier is recorded. The handwriting coordinates of the second handwriting are also recorded as the handwriting coordinates of the corresponding historical identifier.
3. The method according to claim 1, characterized in that, The step of determining the target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier includes: If a unique historical identifier exists, the unique historical identifier shall be used as the target historical identifier; In the presence of multiple historical identifiers, the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each historical identifier is obtained. The target handwriting coordinates are determined based on the shortest distance, and the historical identifier corresponding to the target handwriting coordinates is taken as the target historical identifier.
4. The method according to claim 3, characterized in that, The method further includes: In the case of multiple historical identifiers, obtain the recording duration of each historical identifier; Historical records with a duration shorter than the duration threshold will be used as alternative historical records. Obtain the shortest distance between the touch coordinates and the handwriting coordinates corresponding to each candidate history identifier, determine the target handwriting coordinates based on the shortest distance, and use the candidate history identifier corresponding to the target handwriting coordinates as the target history identifier.
5. The method according to claim 1, characterized in that, The method further includes: If the touch coordinates are obtained and no electronic pen icon is obtained within a preset time period, the touch area corresponding to the touch coordinates is obtained. If the touch area is not greater than the area threshold, perform the step of determining the target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier.
6. The method according to claim 5, characterized in that, The method further includes: If the touch area is greater than an area threshold, the currently enabled finger operation function is identified; the finger operation function includes passive pen function and operation menu function; When the currently enabled finger operation function is the passive pen function, a third handwriting corresponding to the touch coordinates is displayed according to the first passive handwriting feature preset by the passive pen function; the first passive handwriting feature includes handwriting color.
7. The method according to claim 6, characterized in that, The method further includes: When the currently enabled finger operation function is the menu operation function, the system responds to finger touch operations based on the touch coordinates and the currently displayed menu interface.
8. The method according to claim 1, characterized in that, The step of comparing the electronic pen identifier with a preset identifier when the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period includes: Upon obtaining the touch coordinates, identify the currently enabled pen operation function; the pen operation function includes passive pen function and electronic pen function; If the currently enabled pen operation function is the electronic pen function, start the timer; If the electronic pen identifier is obtained within the preset time period, the electronic pen identifier is compared with the preset identifier.
9. The method according to claim 8, characterized in that, The method further includes: When the currently enabled pen operation function is the passive pen function, a fourth handwriting corresponding to the touch coordinates is displayed according to the second passive handwriting feature preset by the passive pen function; the second passive handwriting feature includes handwriting color.
10. A touchscreen response device, characterized in that, A device for use in electronic devices equipped with a touchscreen, the electronic devices being equipped with at least one electronic pen; the device includes: The determination module is used to compare the electronic pen identifier with a preset identifier when the touch coordinates are obtained and the electronic pen identifier is obtained within a preset time period; the preset identifier is determined based on at least one electronic pen equipped with the electronic device. The determination module is used to determine a target historical identifier from at least one historical identifier based on the number of historical identifiers or the handwriting coordinates corresponding to each historical identifier, when the similarity between the electronic pen identifier and the preset identifier is not greater than a similarity threshold; the historical identifier and the corresponding handwriting coordinates are obtained by the electronic device after responding to the contact operation of the electronic pen. The response module is used to display a first handwriting corresponding to the touch coordinates based on the electronic handwriting features corresponding to the target historical identifier; the electronic handwriting features include handwriting color.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.