Touch response method, apparatus and electronic device
Patent Information
- Application Number
- CN202510471645.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2026-10-23
AI Technical Summary
该方式存在的问题是,只能对触摸操作进行响应,无法针对执行触摸操作的输入装置进行响应
Smart Images

Figure CN122963382A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and more specifically, to a touch response method, apparatus, and electronic device. Background Technology
[0002] When an electronic device integrates a capacitive touch-sensitive surface, the device can receive and respond to various touch operations through the capacitive touch-sensitive surface to realize command input, making it convenient for users to control the electronic device.
[0003] Currently, the response process for touch operations involves the electronic device first determining touch parameters such as the touch position and number of touch points on the capacitive touch-sensitive surface, then converting these parameters into corresponding instructions and executing them to respond to the touch operation. The problem with this approach is that it can only respond to touch operations themselves, and cannot respond to the input device performing the touch operation. Summary of the Invention
[0004] This application provides a touch response method, apparatus, and electronic device. The method enables capacitive touch-sensitive surfaces to respond to input devices, thereby expanding the application scenarios of capacitive touch-sensitive surfaces.
[0005] In a first aspect, a touch response method is provided, the method comprising: when determining that an input device forms multiple touch points on a capacitive touch-sensitive surface, determining whether the multiple touch points include N first touch points; N is a preset integer greater than 2, the N first touch points constitute a preset non-rotationally symmetric figure, and the relative distance between any two first touch points is consistent with a preset distance;
[0006] If the N first touch points are included, then a target coordinate system is constructed based on the N first touch points;
[0007] Based on the target coordinate system, the target code of the input device is obtained by decoding other touch points; the other touch points are the touch points other than the N first touch points among the plurality of touch points;
[0008] Execute the instructions corresponding to the target encoding.
[0009] In this embodiment, during the touch response process, when it is determined that the input device forms multiple touch points on the capacitive touch-sensitive surface, it is determined whether the multiple touch points include N first touch points that constitute a preset non-rotationally symmetric pattern. If N first touch points are included, a target coordinate system is constructed based on the N first touch points. The target code of the input device is obtained by decoding the other touch points based on the target coordinate system. The other touch points are the touch points other than the N first touch points among the multiple touch points. The instruction corresponding to the target code is executed. This not only enables the capacitive touch-sensitive surface to respond to the input device, but also allows the corresponding instruction to be set for the code according to the requirements (which can be a complex instruction or a simple instruction). This allows the user to perform simple touch operations on the capacitive touch-sensitive surface through the input device to input simple or complex instructions to the capacitive touch-sensitive surface, which can simplify user operations and thus expand the application scenarios of the capacitive touch-sensitive surface to meet the needs of users in some specific scenarios.
[0010] Optionally, the step of decoding other touch points based on the target coordinate system to obtain the target code of the input device includes: determining multiple decoding regions from the target coordinate system based on multiple preset coordinates; the multiple decoding regions correspond one-to-one with multiple bits of code in the target code; for each decoding region, determining the code corresponding to the decoding region based on the pixel value of the pixel in the decoding region; the pixel in the decoding region is the pixel in the capacitance image of the decoding region on the capacitive touch-sensitive surface; and combining the code corresponding to the multiple decoding regions respectively to obtain the target code.
[0011] In this embodiment, multiple decoding regions are first determined from the target coordinate system, and then the code elements corresponding to the decoding regions are determined based on the pixel values of the pixels in the decoding regions. The code elements corresponding to the multiple decoding regions are combined to obtain the target code, which can quickly and accurately determine the target code of the input device.
[0012] Optionally, determining the code symbol corresponding to the decoding region based on the pixel value of the pixel within the decoding region includes: determining a target pixel value interval from multiple pixel value intervals where the pixel value of the pixel within the decoding region is located; wherein the multiple pixel value intervals correspond to different code symbols; and determining the code symbol corresponding to the decoding region based on the code symbol corresponding to the target pixel value interval.
[0013] In this embodiment, different pixel value ranges are set, and different code elements are set for different pixel value ranges. The code element corresponding to the decoding area is determined according to the target pixel value region where the pixel value of the pixel in the decoding area is located, which can quickly and accurately determine the code element corresponding to the decoding area.
[0014] Optionally, the step of decoding other touch points to obtain the target code of the input device based on the target coordinate system includes: determining M second touch points from the other touch points; M is an integer greater than or equal to 0, and the M second touch points are located within a target area in the target coordinate system; for each second touch point, determining the bit index corresponding to the second touch point according to the coordinates of the second touch point in the target coordinate system; for each second touch point, determining the code element in the target code corresponding to the second touch point according to the pixel value of the second touch point; wherein, the pixel value of the second touch point is the pixel value of the second touch point in the capacitance image of the capacitive touch-sensitive surface; and determining the target code based on the bit index and code element corresponding to the M second touch points respectively.
[0015] In this embodiment of the application, after constructing the target coordinate system, the second touch point is determined, and the target code is determined according to the bit index and code element corresponding to the second touch point. Only the second touch point needs to be processed, which can reduce the amount of data processing and improve the efficiency of determining the target code.
[0016] Optionally, determining M second touch points from the other touch points includes: for each of the other touch points, if the coordinates of the other touch point in the target coordinate system correspond to one of the preset coordinates, then the other touch point is determined as the second touch point.
[0017] Optionally, the step of decoding other touch points to obtain the target code of the input device based on the target coordinate system includes: for each other touch point, if the coordinates of the other touch point in the target coordinate system correspond to one of the preset coordinates, then determining a code element in the target code corresponding to the other touch point based on the pixel value of the other touch point; wherein the pixel value of the other touch point is the pixel value of the other touch point in the capacitance image of the capacitive touch-sensitive surface; and determining the bit index of the code element corresponding to the other touch point in the target code based on one of the preset coordinates corresponding to the other touch point; and determining the target code based on all the determined code elements and the corresponding bit indices.
[0018] In this embodiment, after constructing the target coordinate system, other touch points besides the first touch point are determined, and the code elements in the target code are determined according to the relationship between the other touch points and the preset coordinates. This allows processing only a small number of touch points, reducing the amount of data processing and improving the efficiency of determining the target code.
[0019] Optionally, constructing a target coordinate system based on the N first touch points includes: determining a first target touch point, a second target touch point, and a third target touch point from the N first touch points; the relative distance between each pair of the first target touch point, the second target touch point, and the third target touch point is a preset distance; and constructing the target coordinate system by taking the first target touch point as the origin of the rectangular coordinate system, taking the direction from the first target touch point to the second target touch point as the X-axis direction of the rectangular coordinate system, and taking the direction from the first target touch point to the third target touch point as the Y-axis direction of the rectangular coordinate system.
[0020] Optionally, executing the instruction corresponding to the target code includes: determining the reference coordinates of the reference point of the input device on the capacitive touch-sensitive surface based on the N first touch points, and / or determining the rotation angle of the input device on the capacitive touch-sensitive surface; and executing the instruction corresponding to the target code based on the reference coordinates and / or the rotation angle.
[0021] In this embodiment, based on the reference coordinates and / or rotation angle of the reference point of the input device on the capacitive touch-sensitive surface, the instruction corresponding to the target code is executed, which can make the executed instruction match the position and angle of the input device on the capacitive touch-sensitive surface.
[0022] Optionally, determining the rotation angle of the input device on the capacitive touch-sensitive surface includes: determining two fourth target touch points from the N first touch points; and determining the rotation angle based on the angle between a first reference line formed by the two fourth target touch points and a second reference line of the capacitive touch-sensitive surface.
[0023] Optionally, the target code includes a data code and an error correction code, and the step of executing the instruction corresponding to the target code includes: correcting the data code based on the error correction code to obtain the corrected data code; and executing the instruction corresponding to the corrected data code.
[0024] In this embodiment, a data code and an error correction code are set in the target code. When executing the instruction, the data code is corrected based on the error correction code to obtain an accurate data code, which can reduce the error rate of the data code and thus improve the accuracy of the instruction.
[0025] Secondly, a touch-responsive device is provided, comprising:
[0026] A construction module is used to determine whether N first touch points are included among the multiple touch points when the input device forms multiple touch points on the capacitive touch-sensitive surface; N is a preset integer greater than 2, the N first touch points form a preset non-rotationally symmetric figure, and the relative distance between any two first touch points matches the preset distance; if the N first touch points are included, a target coordinate system is constructed based on the N first touch points.
[0027] A decoding module is used to decode other touch points based on the target coordinate system to obtain the target code of the input device; the other touch points are touch points other than the N first touch points among the plurality of touch points;
[0028] The execution module is used to execute the instructions corresponding to the target encoding.
[0029] Thirdly, an electronic device is provided, including a memory and a processor, wherein the memory is used to store executable program code; and the processor is used to call and run the executable program code from the memory, causing the electronic device to execute the touch response method in any possible implementation of the first aspect.
[0030] Fourthly, a storage medium is provided that stores executable program code, which, when run on an electronic device, causes the electronic device to execute the touch response method in any possible implementation of the first aspect.
[0031] Fifthly, an executable program code product is provided, comprising: executable program code that, when executed on an electronic device, causes the electronic device to execute the touch response method in any possible implementation of the first aspect. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of a capacitor electrode array provided in an embodiment of this application;
[0033] Figure 2 This is an exemplary schematic diagram of a touch response system provided in an embodiment of this application;
[0034] Figure 3 This is an exemplary cross-sectional view of an input device provided in an embodiment of this application;
[0035] Figure 4 This is an exemplary encoding diagram of an input device provided in an embodiment of this application;
[0036] Figure 5 This is an exemplary encoding diagram of another input device provided in the embodiments of this application;
[0037] Figure 6 This is a flowchart illustrating the steps of a touch response method provided in an embodiment of this application;
[0038] Figure 7 Through Figure 4 A schematic diagram of a local capacitance image when the input device performs a touch operation;
[0039] Figure 8 This illustration shows a decoding schematic diagram provided by an embodiment of this application;
[0040] Figure 9 A schematic diagram illustrating the construction of a coordinate system provided in an embodiment of this application is shown;
[0041] Figure 10 This is a schematic diagram of the structure of a touch response device provided in an embodiment of this application;
[0042] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0043] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0044] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0045] Currently, some electronic devices integrate capacitive touch-sensitive surfaces, allowing users to perform touch operations. These surfaces sense and respond to user touch inputs. The capacitive touch-sensitive surface integrates a capacitive electrode array, which can be either self-capacitive or mutual-capacitive. In the self-capacitive type, each electrode forms a capacitance with ground; in the mutual-capacitive type, capacitance is formed at the intersection of two sets of electrodes.
[0046] For example, the capacitive touch-sensitive surface can be a capacitive screen with an integrated transparent array of capacitive electrodes (also known as an electrode pattern). See also Figure 1 , Figure 1 This is a schematic diagram of a capacitor electrode array provided in an embodiment of this application. The capacitor electrode array 10 is generally located under the glass cover of the capacitive screen and includes an X-axis electrode arranged along the lateral direction of the capacitive screen. Figure 1 The symbols T1, T2, and T3 represent the Y-axis electrode, which is positioned along the longitudinal direction of the capacitive screen. Figure 1 Represented by the symbols R1, R2, and R3, each intersection of the X-axis electrode and the Y-axis electrode (generally called a capacitor node) constitutes a capacitor, and each capacitor node corresponds to a coordinate on the capacitor screen.
[0047] In a capacitive touchscreen, the intersection of each X-axis and Y-axis capacitive electrode (generally called a capacitance node) constitutes a capacitor. Taking an 86-inch capacitive touchscreen as an example, the number of X-axis capacitive electrodes is typically 160, and the number of Y-axis electrodes is typically 284. The pitch of each capacitance node is 6.7mm. Each capacitance node corresponds to a coordinate on the capacitive touchscreen. The capacitive touchscreen also includes a microcontroller unit (MCU), drive circuitry, sensing circuitry, and a signal processing chip. The drive circuitry is connected to the X-axis capacitive electrodes and can apply excitation signals to them. The sensing circuitry is connected to the Y-axis capacitive electrodes and can detect signal changes (i.e., capacitance changes) at each capacitance node. The signal processing chip is connected to both the sensing circuitry and the MCU. It amplifies, filters, and digitizes the signals detected by the sensing circuitry to obtain the processing results, which are then sent to the MCU. The MCU processes the processing results sent by the signal processing chip to obtain a capacitance image.
[0048] A capacitance image is an image constructed based on the capacitance change at each capacitance node in a capacitance electrode array. A capacitance image is typically a grayscale image, where each pixel corresponds to a capacitance node, and the pixel value (grayscale value) of each pixel corresponds to the magnitude of the capacitance change at that node. Furthermore, since each capacitance node corresponds to a coordinate on the capacitive touch-sensitive surface, the position of each pixel in the capacitance image is the same as the position of its corresponding capacitance node on the capacitive touch-sensitive surface.
[0049] When an input device (such as a finger) touches a capacitive screen and a touch operation is performed, the capacitance of the capacitive nodes at the touch location changes. The MCU can determine the number and corresponding coordinates of these capacitive nodes based on the capacitance image, and thus determine touch parameters such as the user's touch position and number of touch points on the capacitive touch-sensitive surface. Electronic devices also include a System-on-Chip (SOC), where the MCU can send touch parameters to the SOC, which can then convert these parameters into corresponding instructions and execute them.
[0050] The above description of the working principle of capacitive touch surface is only an example of mutual capacitive electrode. It should be understood that the capacitor electrode array in the capacitive touch surface can also be a self-capacitive electrode array. When it is a self-capacitive electrode array, it can also achieve similar functions. This embodiment will not elaborate on this.
[0051] When an input device (such as a finger) touches a capacitive screen, the capacitance of the capacitive nodes at the touch location changes. Based on the number of these capacitive nodes and their corresponding coordinates, touch parameters such as the touch position and number of touch points on the capacitive screen can be determined. These touch parameters can then be converted into corresponding instructions and executed to respond to touch operations.
[0052] The problem with the above method is that it can only respond to touch operations, not to the input device performing the touch operation. Furthermore, users can typically only input simple commands through touch, not complex ones, which limits the application of capacitive touch-sensitive surfaces and makes it difficult to meet user needs in certain scenarios. For example, in teaching scenarios using interactive whiteboards, some teaching aids need to display corresponding data on the whiteboard, but users cannot trigger the whiteboard to display the data using the teaching aids. It should be understood that an input device refers to an object that can perform touch operations on a capacitive touch-sensitive surface, causing a change in the capacitance of the capacitive nodes on the surface, and may include, but is not limited to, fingers.
[0053] To address the aforementioned technical problems, this application provides a touch response method based on the principle of capacitive touch-sensitive surfaces. Multiple conductive elements are disposed on the input device, and the input device is encoded through these conductive elements. When a user performs a touch operation through the input device, multiple conductive elements (each conductive element equivalent to a finger) can form multiple touch points on the capacitive touch-sensitive surface, with each touch point corresponding one-to-one with a different conductive element.
[0054] During touch response, electronic devices can decode the input device's code based on multiple touch points formed by multiple conductive components and execute the corresponding instructions. This not only enables the capacitive touch-sensitive surface to respond to the input device, but also allows the encoding of the input device to be set with corresponding instructions (which can be complex or simple) as needed. Users can input simple or complex instructions to the capacitive touch-sensitive surface by performing simple touch operations on the surface, which simplifies user operation and expands the application scenarios of capacitive touch-sensitive surfaces to meet user needs in certain specific scenarios.
[0055] See Figure 2 , Figure 2This is an exemplary schematic diagram of a touch response system provided in an embodiment of this application. The system includes an electronic device 21 and an input device 22. The electronic device 21 integrates a capacitive touch-sensitive surface, capable of receiving and responding to touch operations. The input device 22 may be provided with at least one set of conductive elements, each set including multiple conductive elements 221. These multiple conductive elements 221 can not only be encoded to form a code for the input device, but also enable the input device 22 to perform touch operations, forming multiple touch points on the capacitive touch-sensitive surface. The electronic device 21 can decode the multiple touch points to obtain a code for the input device 22, and execute the instruction corresponding to the code to achieve a response to the input device 22.
[0056] The input device can be equipped with one or more sets of conductive elements, and each set of conductive elements can be encoded to form a code for the input device. For example, when the input device is... Figure 2 When the cube shape is shown, a set of conductive elements can be set on each face of the cube, for a total of 6 sets of conductive elements. The 6 sets of conductive elements correspond one-to-one with 6 codes, and the 6 codes correspond to 6 different instructions, so that the user can input 6 different instructions to the capacitive touch-sensitive surface through the input device.
[0057] It should be noted that the electronic device used to execute the touch response method can be an interactive whiteboard, mobile phone, computer, tablet computer, etc., but is not limited to these. The input device can be a teaching aid used in a teaching scenario, or an item in other scenarios. This embodiment does not limit the specific type of electronic device executing the touch response method or the input device.
[0058] See Figure 3 , Figure 3 This is an exemplary cross-sectional view of an input device provided in an embodiment of this application. The outer contour of the input device can be a cube or cuboid, or other shapes; this embodiment does not limit this. The input device 30 has a touch end 31 and a grip end 32. A set of conductive elements 33 are provided on the input device 30, and each conductive element 33 has a portion protruding from the touch end 31. When the touch end 31 abuts against the capacitive touch-sensitive surface, each conductive element 33 can contact the capacitive touch-sensitive surface. The input device 30 also has a connecting part 34 inside. One end of the connecting part 34 is connected to each conductive element 33, and the other end is exposed from the grip end 32, so that the user's hand can contact the connecting part 34 when holding the input device 30.
[0059] Combination Figure 2As shown, both the conductive element 33 and the connecting part 34 are made of conductive materials. When the user indirectly performs a touch operation through the input device 30, the hand remains in contact with the connecting part 34 while holding the input device. The connecting part 34 short-circuits the hand and each conductive element 33. At this time, each conductive element 33 is similar to a finger of the user. When the touch end 31 abuts against the capacitive touch-sensitive surface, each conductive element 33 can cause a change in the capacitance of the corresponding capacitor node on the capacitive touch-sensitive surface, forming a touch point on the capacitive touch-sensitive surface.
[0060] It should be understood that Figure 3 These are merely illustrative examples. In actual applications, the implementation principle of the input device may include, but is not limited to, the examples above. As long as the input device can be encoded and multiple touch points are formed on the capacitive touch-sensitive surface, it is acceptable.
[0061] In one implementation, each group of conductive elements may include multiple first conductive elements. Based on these multiple first conductive elements, multiple coding regions are divided on the input device, and each coding region corresponds one-to-one with multiple code elements in the encoding of the input device. For each code element, the specific value of the code element is characterized by the capacitance change caused by a second conductive element set in the corresponding coding region.
[0062] See Figure 4 , Figure 4 This is an exemplary encoding diagram of an input device provided in an embodiment of this application. (In conjunction with...) Figure 3 As shown, each input device 30 has one or more touch terminals 31. Each touch terminal 31 is provided with a conductive element arrangement surface 311. Each conductive element arrangement surface 311 is provided with N first conductive elements 331 (N is an integer greater than 2, such as 3) and M second conductive elements 332 (M is an integer greater than or equal to 0). The multiple first conductive elements 331 form a preset non-rotationally symmetric pattern, which is used to identify the input device as a recognizable input device. The M second conductive elements 332 are used to encode the input device.
[0063] like Figure 4 As shown, N is 3, and the non-rotationally symmetric figure formed by the three first conductive elements 331 is "L"-shaped. A Cartesian coordinate system is constructed based on the three first conductive elements, and multiple coding regions are divided within the Cartesian coordinate system. Second conductive elements 332 are placed within the coding regions. Specifically, a Cartesian coordinate system is constructed with the center point of one of the first conductive elements as the origin of the coordinate system, and the two directions pointing from the center point of the first conductive element to the center points of the other two first conductive elements are the horizontal and vertical axes of the Cartesian coordinate system. Multiple adjacent coding regions are divided within the coordinate system.
[0064] In practical applications, the shape and size of each conductive element (including the first and second conductive elements) can be designed so that the size of the touch point formed by each conductive element on the capacitive touch-sensitive surface is less than or equal to K. Based on the size of the touch point, the conductive element arrangement surface 311 is divided as follows: Figure 4 The diagram shows 15 identical square regions, each with a side length of H, where H is greater than or equal to K. The relative distance between the center points of any two adjacent regions is H. Figure 4 The number in the upper left corner of each region is the region number. Regions 1, 4 and 13 are reference regions. The reference regions are used to set the first conductive elements so that the three first conductive elements form a non-rotationally symmetric "L" shape.
[0065] When placing conductive components within each region, the center point of the conductive component coincides with the center point of the region. The center point of the first conductive component in region 1 can be set as the origin of a Cartesian coordinate system. The direction from the center point of region 1 to the center point of the first conductive component in region 4 is the positive (or negative) direction of the X-axis (horizontal axis) in the Cartesian coordinate system. The direction from the center point of region 1 to the center point of the first conductive component in region 13 is the negative (or positive) direction of the Y-axis (vertical axis) in the Cartesian coordinate system. Figure 4 In the constructed rectangular coordinate system, the symbol X2 represents the X-axis and the symbol Y2 represents the Y-axis.
[0066] Among them, regions 2 and 3, regions 5-12, and regions 14 and 15 are coding regions. Each coding region corresponds to a symbol in the encoding of the input device. The number in the lower right corner of each coding region is the region number of the coding region. The region number also represents the bit index of the coding region. The bit index is the position of the symbol in the encoding.
[0067] When the conductive element arrangement surface 311 abuts against the capacitive touch-sensitive surface, both the first conductive element 331 and the second conductive element 332 can contact the capacitive touch-sensitive surface and form touch points on the capacitive touch-sensitive surface respectively. To avoid confusion, the touch point formed by the first conductive element 331 is referred to as the first touch point, and the touch point formed by the second conductive element 332 is referred to as the second touch point.
[0068] like Figure 4As shown, when a touch operation is performed via the input device, each region in the conductive element arrangement surface 311 is opposite to a region in the capacitive touch-sensitive surface. The region in the capacitive touch-sensitive surface corresponding to the reference region (hereinafter referred to as the positioning region) has a first touch point formed by the first conductive element, and the center point of the first touch point is located at the center point of the positioning region. When a second conductive element is provided in the encoding region, the region in the capacitive touch-sensitive surface corresponding to the encoding region (hereinafter referred to as the decoding region) has a second touch point formed by the second conductive element, and the center point of the second touch point is located at the center of the decoding region. When no second conductive element is provided in the encoding region, there is no second touch point formed by the second conductive element in the decoding region corresponding to the encoding region.
[0069] Based on the above examples, the coordinates of the encoded region in this rectangular coordinate system can be represented by the coordinates of the center point of the encoded region in the rectangular coordinate system. The coordinates of the encoded region in this rectangular coordinate system can be called the preset coordinates. Since the relative positional relationship between the encoded region and the reference region is fixed and known, the relative positional relationship between each decoded region and the positioning region is also fixed and known.
[0070] Furthermore, when the input device forms multiple touch points on the capacitive touch-sensitive surface, the relative distance between any two first touch points matches a preset distance, and the included angle between any two sides matches a preset angle. One endpoint of each side is the center point of a first touch point, and the other endpoint is another first touch point. For example... Figure 4 As shown, since the distance between the center point of region 1 and the center point of region 4 is fixed, the distance between the first touch point formed by the first conductive element in region 1 and the first touch point formed by the first conductive element in region 4 is a preset distance 3H. Furthermore, the angle between a side formed by the first touch point formed by the first conductive element in region 1 and the first touch point formed by the first conductive element in region 4 as two endpoints, and another side formed by the first touch point formed by the first conductive element in region 1 and the first touch point formed by the first conductive element in region 13 as two endpoints, is equal to a preset angle of 90 degrees.
[0071] For example, the encoding of the input device can be a binary number. When the encoding area has a second conductive element, the corresponding code element of the encoding area is 1; when the encoding area does not have a second conductive element, the corresponding code element of the encoding area is 0. The decoding area corresponds one-to-one with the encoding area. Therefore, for each encoding area, when a second touch point formed by the second conductive element exists within the decoding area, the corresponding code element of the decoding area is 1; when no second touch point formed by the second conductive element exists within the decoding area, the corresponding code element of the decoding area is 0. Furthermore, since the relative positional relationship between the decoding area and the first touch point is the same as the relative positional relationship between the corresponding encoding area and the first conductive element, the decoding area and the corresponding encoding area correspond to the same bit index.
[0072] like Figure 4 As shown, the conductive component arrangement surface 311 has a total of 12 coding areas. Therefore, the code of the input device is a 12-bit binary number. There is no second conductive component in coding area 1, so the first bit of the binary number is 0. There is a second conductive component in coding area 2, so the second bit of the binary number is 1, and so on. Figure 4 The input device shown is coded as “010111101010”. It can be understood that when no second conductive element is provided in any of the coded areas, the input device is coded as “000000000000”, while when a second conductive element is provided in all coded areas, the input device is coded as “111111111111”.
[0073] Each input device may have one or more conductive element arrangement surfaces 311. A group of conductive elements on each conductive element arrangement surface 311 can encode the input device into a 12-bit binary number (i.e., an encoding). For each code element in the binary number, the corresponding encoding region is determined from 12 encoding regions according to the bit index of the code element in the binary number. When the code element is 1, a second conductive element is set in the corresponding encoding region; when the code element is 0, no second conductive element is set in the corresponding encoding region.
[0074] Of course, the encoding of the input device can also be a non-binary number; for example, the encoding of the input device can be a decimal number. In this case, the second conductive element can be designed so that it can cause different levels of capacitance change on the capacitive touch surface. For example, if the second conductive element can cause three levels of capacitance change, then when the second conductive element is not set in the encoding area, the corresponding code element of the encoding area is 0; when the second conductive element is set in the encoding area, and the capacitance change caused by the second conductive element is the first level out of three, the corresponding code element of the encoding area is 1; when the second conductive element is set in the encoding area, and the capacitance change caused by the second conductive element is the second level out of three, the corresponding code element of the encoding area is 2; when the second conductive element is set in the encoding area, and the capacitance change caused by the second conductive element is the third level out of three, the corresponding code element of the encoding area is 3. Thus, each code element can be one of 0, 1, 2, and 3.
[0075] like Figure 4 As shown, the conductive component arrangement surface 311 has a total of 12 coding areas. Therefore, when the code is a decimal number, if there is no second conductive component in coding area 1, the first digit of the decimal number is 0. If there is a second conductive component in coding area 2, and the capacitance change caused by this second conductive component is at the second level, the second digit of the decimal number is 2. Similarly, based on the code elements in the input device's encoding, corresponding second conductive components can be set in the corresponding coding areas.
[0076] See Figure 5 , Figure 5 This is an exemplary encoding diagram of another input device provided in an embodiment of this application. Figure 4 Similarly, during the encoding process, the dimensions of each conductive element are designed so that the size of the touch point formed by each conductive element on the capacitive touch-sensitive surface is less than or equal to K. Based on the size of the touch point, the conductive element arrangement surface 311 is divided into 7 square regions of the same size. The side length of each square region is H, where H is greater than or equal to K, and the relative distance between the center points of two adjacent square regions is H. The number in the upper left corner of each region is the region number. Regions 1, 6, and 7 are reference regions. The first conductive element is set in each reference region. At the same time, multiple encoding regions are set between regions 1 and 6, namely encoding region 1, encoding region 2, encoding region 3, and encoding region 4.
[0077] The center point of the first conductive component in region 1 can be set as the origin of the rectangular coordinate system. The direction from the center point of region 1 to the center point of the first conductive component in region 6 is the positive direction of the X-axis in the rectangular coordinate system, and the direction from the center point of region 1 to the center point of the first conductive component in region 7 is the negative direction of the Y-axis in the rectangular coordinate system. Figure 4In the constructed rectangular coordinate system, the symbol X2 represents the X-axis and the symbol Y2 represents the Y-axis.
[0078] exist Figure 5 In the encoding method shown, the input device can be encoded as a binary number. When a second conductive element is provided in the encoding area, the corresponding code element of the encoding area is 1; when no second conductive element is provided in the encoding area, the corresponding code element of the encoding area is 0. The conductive element arrangement surface 311 has a total of 4 encoding areas, therefore the input device encoding is a 4-bit binary number. Encoding areas 1, 2, and 4 do not have a second conductive element, so the first, second, and fourth code elements in the encoding are all 0. Encoding area 3 has a second conductive element, so the third code element in the encoding is 1. Therefore, the input device encoding is "0010". Similarly, the input device encoding can also be a decimal number, which will not be elaborated upon in this embodiment.
[0079] like Figure 4 and Figure 5 As shown, the non-rotationally symmetric shape formed by multiple first conductive elements 331 is "L"-shaped, and the relative distance between any two first conductive elements 331 is a preset distance (hereinafter referred to as the preset distance). Based on this, when a touch operation is performed through an input device and multiple touch points are formed on the capacitive touch-sensitive surface, each first touch point is located within the positioning area corresponding to the reference area. The electronic device can identify each first touch point from multiple touch points based on the relative positional relationship between the various touch points.
[0080] Simultaneously, each second touch point is located within the decoding area corresponding to the encoding area. The electronic device can determine the bit index corresponding to the decoding area based on the relative positional relationship between the decoding area and multiple first touch points (i.e., positioning areas), and determine whether there is a second touch point within the decoding area. When there is a second touch point, the corresponding code element is determined based on the pixel value of the second touch point. When there is no second touch point (i.e., no second conductive element is provided), the code element can be determined as the default code element 0. In this way, each code element in the encoding can be determined. The encoding of the input device can be obtained by combining all the code elements and the bit index corresponding to each decoding area.
[0081] In practical applications, by properly setting the size of each conductive component, the size of the touch point formed when the conductive component comes into contact with the capacitive touch surface can be controlled, and the touch points formed by each conductive component on the capacitive touch surface can be made independent of each other, so that each touch point can be clearly identified and distinguished by the electronic device.
[0082] Optionally, in order to improve the accuracy of the decoding process, when using... Figure 4 and Figure 5When encoding using the method shown, one or more error correction codes can be set in the encoding of the input device. These error correction codes can be Reed-Solomon error correction codes, Hamming codes, turbine codes, polar codes, etc. For example, for... Figure 4 The encoding method shown allows the 10th and 12th bits of the encoding to be set as error correction codes.
[0083] It should be understood that the above are merely illustrative examples, and the encoding methods for input devices may include, but are not limited to, the examples described above. In practical applications, the input device can be encoded using any encoding method through conductive components on the input device, as long as a unique code can be achieved and it can be recognized by the capacitive touch-sensitive surface.
[0084] See Figure 6 , Figure 6 This is a flowchart illustrating the steps of a touch response method provided in an embodiment of this application. This method can be executed by the electronic device described in the above examples, such as... Figure 6 As shown, the method includes the following steps:
[0085] Step 601: When it is determined that the input device forms multiple touch points on the capacitive touch-sensitive surface, determine whether the multiple touch points include N first touch points.
[0086] Wherein, N is a preset integer greater than 2, the N first touch points form a preset non-rotationally symmetric shape, and the relative distance between any two first touch points matches the preset distance.
[0087] In this embodiment, during operation, the electronic device can periodically scan the capacitive electrode array on the capacitive touch-sensitive surface. During each scan, the capacitance change at each capacitor node in the array can be acquired, and a capacitance image is drawn based on the capacitance change at each node. After acquiring each capacitance image, it can be determined whether multiple touch points exist within the image.
[0088] In this context, a capacitance image refers to an image constructed based on the capacitance change at each capacitance node in a capacitance electrode array. A capacitance image is typically a grayscale image, where each pixel corresponds to a capacitance node, and the pixel value (grayscale value) of each pixel corresponds to the magnitude of the capacitance change at that node. Furthermore, since each capacitance node corresponds to a coordinate on the capacitive touch-sensitive surface, the position of each pixel in the capacitance image is the same as the position of its corresponding capacitance node on the capacitive touch-sensitive surface.
[0089] See Figure 7 , Figure 7 Through Figure 4The diagram shows a partial capacitance image of the input device during a touch operation. In this capacitance image 70, the pixel value of each pixel represents the capacitance change at the corresponding capacitor node. A larger pixel value indicates a larger capacitance change at the corresponding capacitor node, and consequently, a higher pixel brightness. (Combined with...) Figure 4 As shown, when passing through Figure 4 When the input device shown performs a touch operation, each conductive element in the conductive element arrangement surface 311 is in contact with the capacitive touch-sensitive surface. Each conductive element can cause a change in the capacitance at the capacitor node at the contact position. Each first conductive element 331 can form a first touch point 71 in the capacitance image 70, and each second conductive element 332 can form a second touch point 72 in the capacitance image 70.
[0090] When the capacitance image includes Figure 7 When multiple touch points are shown, due to Figure 7 The multiple touch points shown are Figure 4 The multiple conductive components shown correspond one-to-one, through Figure 7 Multiple touch points can be determined Figure 4 The target code of the input device is formed by encoding multiple conductive components.
[0091] It should be understood that the touch point in the capacitive image is the touch point on the capacitive touch-sensitive surface. The touch point is also called the touch area. The touch area is usually composed of one or more pixels with a pixel value greater than a preset threshold. A pixel value greater than the preset threshold indicates that the capacitance at the corresponding capacitive node has changed significantly due to the presence of the input device. Under normal circumstances, the pixel located at the center of the touch area (hereinafter referred to as the center pixel) has the largest pixel value, and the coordinates of the center pixel are usually the coordinates of the touch point on the capacitive touch-sensitive surface.
[0092] It should be understood that when an electronic device periodically scans the array of capacitive electrodes in a capacitive touch-sensitive surface to acquire a capacitance image, if it does not pass through... Figure 4 When the input device shown performs a touch operation, the capacitance image acquired by the electronic device generally does not contain [the following]. Figure 7 The touch point shown.
[0093] Combination Figure 4 and Figure 5As shown, when encoding the input device, the size of each conductive element can be reasonably set so that the size of the touch point formed by each conductive element is less than or equal to K, for example, 3 pixels. After acquiring the capacitance image, the electronic device can find each pixel in the capacitance image whose pixel value is greater than a preset threshold. For each pixel whose pixel value is greater than the preset threshold, the pixel values of other pixels within a square area with a side length of 3 pixels (the size of both the first and second touch points is less than or equal to 3 pixels) centered on that pixel are determined. If the pixel values of other pixels are all greater than the preset threshold and less than the pixel value of that pixel, then the square area is determined to be either the first touch point or the second touch point.
[0094] Next, for each pixel within the square region, the product of the pixel value and its X-axis coordinate in the original coordinate system of the capacitive image is calculated, yielding a first product result. The product of the pixel value and its Y-axis coordinate in the original coordinate system of the capacitive image is then calculated, yielding a second product result. For all pixels within the square region, all first product results are summed to obtain a first summation result, and the pixel values of all pixels within the square region are summed to obtain a second summation result. Dividing the first summation result by the second summation result yields the X-axis coordinate of the center of the square region. Similarly, summing all second product results yields a third summation result, and dividing the third summation result by the second summation result yields the Y-axis coordinate of the center of the square region. This provides the center coordinates of the square region, which are the center coordinates of the touch point in the original coordinate system of the capacitive image. Therefore, all touch points in the capacitive image and the center coordinates of each touch point can be determined.
[0095] Step 602: If there are N first touch points, then construct a target coordinate system based on the N first touch points.
[0096] In this embodiment, after determining that multiple touch points exist in the capacitive image, it can be further determined whether the multiple touch points include N first touch points. If N first touch points are included, a target coordinate system is constructed based on the N first touch points. Otherwise, if N first touch points are not included, the input device is determined to be a normal input device, and the touch operation is processed according to the conventional procedure.
[0097] Optionally, constructing a target coordinate system based on N first touch points may include:
[0098] From N first touch points, determine a first target touch point, a second target touch point, and a third target touch point; the relative distance between each pair of the first target touch point, the second target touch point, and the third target touch point is a preset distance;
[0099] A target coordinate system is constructed by taking the first target touch point as the origin of the rectangular coordinate system, the direction from the first target touch point to the second target touch point as the X-axis direction of the rectangular coordinate system, and the direction from the first target touch point to the third target touch point as the Y-axis direction of the rectangular coordinate system.
[0100] like Figure 4 As shown, during the setting of the encoding area, a Cartesian coordinate system is constructed based on three first conductive elements. The center point of the first conductive element in region 1 is the origin. The direction from the center point of the first conductive element in region 1 to the center point of the first conductive element in region 4 is the positive direction of the X-axis in the coordinate system, and the direction from the center point of the first conductive element in region 1 to the center point of the first conductive element in region 13 is the negative direction of the Y-axis in the coordinate system. Furthermore, based on the relative distances between the regions, it can be determined that the relative distance between the first touch point corresponding to region 1 and the first touch point corresponding to region 4 is approximately equal to or close to a preset distance 3H; the relative distance between the first touch point corresponding to region 1 and the first touch point corresponding to region 13 is approximately equal to or close to a preset distance 3H; and the relative distance between the first touch point corresponding to region 4 and the first touch point corresponding to region 13 is approximately equal to or close to a preset distance 3H. The touch point corresponding to the area refers to the touch point formed by the conductive parts within the area, and the relative distance between two touch points is specified as the distance between the center coordinates of the two touch points.
[0101] After determining the presence of multiple touch points in the capacitive image using the above method, the relative distance between each pair of touch points is calculated. If the relative distance between two touch points is... These two touch points are then identified as the two first touch points corresponding to regions 4 and 13, respectively. If the relative distance between one of the touch points and both of these first touch points is a preset distance of 3H, then the touch point can be identified as the first touch point corresponding to region 1, and this first touch point is the first target touch point.
[0102] See Figure 8 , Figure 8 This illustration shows a schematic diagram of the construction of a coordinate system provided in an embodiment of this application. Figure 8 In the capacitance image 80 shown, each dashed box represents a decoding region. The number in the lower right corner of the decoding region is the region number, which is consistent with the bit index of the corresponding decoding region. Touch point 801 is the first touch point corresponding to the first conductive element in region 1, touch point 802 is the first touch point corresponding to the first conductive element in region 4, and touch point 803 is the first touch point corresponding to the first conductive element in region 13.
[0103] After determining that touch point 801 is the first touch point (i.e., the first target touch point) corresponding to region 1 using the above method, the center point of touch point 801 can be used as the origin of the target coordinate system. For touch points 802 and 803, a first vector 804 pointing from the center of touch point 801 to the center of touch point 802 is determined, as well as a second vector 805 pointing from the center of touch point 801 to the center of touch point 803. If the cross product between the first vector 804 and the second vector 805 is negative, then the first vector 804 is located on the X2 axis of the target coordinate system, and the second vector 805 is located on the Y2 axis of the coordinate system. Therefore, touch point 802 can be determined as the first touch point (i.e., the second target touch point) corresponding to region 4, and touch point 803 as the first touch point (i.e., the third target touch point) corresponding to region 13.
[0104] Next, the direction from the center point of touch point 801 to the center point of touch point 802 can be determined as the positive direction of the X2 axis in the target coordinate system, and the direction from the center point of touch point 801 to the center point of touch point 803 can be determined as the negative direction of the Y2 axis in the coordinate system. This allows the construction of a target coordinate system composed of the X2 and Y2 axes. Simultaneously, the angle β between the X1 and X2 axes in the original coordinate system of the capacitance image can be calculated and determined.
[0105] It can be understood that after determining the first vector 804 and the second vector 805, if the cross product between the first vector 804 and the second vector 805 is determined to be positive, then the first vector 804 can be determined to be located on the Y2 axis of the coordinate system, and the second vector 805 can be determined to be located on the X2 axis of the coordinate system. Therefore, touch point 802 can be determined to be the first touch point (i.e., the third target touch point) corresponding to region 13, and touch point 803 can be determined to be the first touch point (i.e., the second target touch point) corresponding to region 4. Subsequently, the direction from the center point of touch point 801 to the center point of touch point 803 can be determined to be the X2 axis direction of the coordinate system, and the direction from the center point of touch point 801 to the center point of touch point 802 can be determined to be the Y2 axis direction of the coordinate system.
[0106] like Figure 5As shown, during the setting of the encoding area, a coordinate system is constructed based on three first conductive elements. The center point of the first conductive element in region 1 is the origin. The direction from the center point of the first conductive element in region 1 to the center point of the first conductive element in region 6 is the positive direction of the X-axis in the coordinate system, and the direction from the center point of the first conductive element in region 1 to the center point of the first conductive element in region 7 is the negative direction of the Y-axis in the coordinate system. Furthermore, based on the relative distances between the regions, it can be determined that the relative distance between the first touch point corresponding to region 1 and the first touch point corresponding to region 6 is approximately equal to or close to a preset distance 5H, the relative distance between the first touch point corresponding to region 1 and the first touch point corresponding to region 7 is approximately equal to or close to a preset distance H, and the relative distance between the first touch point corresponding to region 6 and the first touch point corresponding to region 7 is approximately equal to or close to a preset distance H.
[0107] After determining that multiple touch points exist in the capacitive image using the above method, the relative distance between every two touch points is calculated. If the relative distance between two touch points is a preset distance... These two touch points are then identified as the two first touch points corresponding to regions 6 and 7, respectively. Next, for these two touch points, if the relative distance between a touch point and one of the first touch points is a preset distance of 5H, and the distance between the touch point and the other first touch point is 1H, then this touch point can be identified as the first touch point corresponding to region 1 (i.e., the first target touch point). Furthermore, for the two first touch points corresponding to regions 6 and 7, the touch point whose distance from the first touch point corresponding to region 1 is a preset distance of 6H is the first touch point corresponding to region 6 (i.e., the second target touch point), and the touch point whose distance from the first touch point corresponding to region 1 is 1H is the first touch point corresponding to region 7 (i.e., the third target touch point).
[0108] See Figure 9 , Figure 9 A schematic diagram of the construction of a coordinate system provided in an embodiment of this application is shown. Figure 9 In the capacitance image 90 shown, each dashed box represents a decoding region. The number in the lower right corner of the decoding region is the region number, which is consistent with the bit index of the encoding region. In the capacitance image 90, touch point 901 is the first touch point corresponding to the first conductive element in region 1, touch point 902 is the first touch point corresponding to the first conductive element in region 6, and touch point 903 is the first touch point corresponding to the first conductive element in region 7.
[0109] After determining that touch point 901 is the first touch point corresponding to region 1, the center point of touch point 901 can be used as the origin of the coordinate system. At this time, the direction from the center point of touch point 901 to the center point of touch point 902 can be directly determined as the positive direction of the X2 axis in the coordinate system, and the direction from the center point of touch point 901 to the center point of touch point 903 can be determined as the negative direction of the Y2 axis in the coordinate system. In this way, a target coordinate system composed of the X2 axis and the Y2 axis can be constructed.
[0110] Step 603: Based on the target coordinate system, decode other touch points to obtain the target code of the input device.
[0111] Among them, other touch points are touch points other than the N first touch points among multiple touch points.
[0112] In this embodiment, after the target coordinate system is constructed, other touch points in the capacitive image besides the first touch point can be decoded based on the target coordinate system to obtain the target code of the input device.
[0113] Optionally, step 603 may include:
[0114] Based on multiple preset coordinates, multiple decoding regions are determined from the target coordinate system; each of the multiple decoding regions corresponds one-to-one with a multiple bit symbol in the target encoding.
[0115] For each decoding region, the corresponding code element of the decoding region is determined based on the pixel value of the pixel in the decoding region; the pixel in the decoding region is the pixel in the capacitance image of the decoding region on the capacitive touch-sensitive surface;
[0116] The target code is obtained by combining the code elements corresponding to multiple decoding regions.
[0117] like Figure 4 and Figure 5 As shown, multiple preset coordinates represent the coordinates of the center points of multiple encoding regions in the coordinate system. These preset coordinates correspond one-to-one with the multiple encoding regions and are consistent with the bit index of each encoding region. Similarly, the multiple encoding regions correspond one-to-one with the multiple decoding regions; therefore, the multiple preset coordinates also correspond one-to-one with the multiple decoding regions and the multiple bit indices.
[0118] For example, with Figure 8Taking decoding region 1 as an example, after the target coordinate system is constructed, the preset coordinates of the pre-stored encoding region 1 can be obtained. These preset coordinates correspond to decoding region 1 and are associated with the bit index of decoding region 1. Based on these preset coordinates, the position of the center point of the corresponding decoding region 1 is determined from the target coordinate system. Then, a square region with a side length of H centered on the center point is determined as decoding region 1. The angle between the two opposite sides of the square region and the X1 axis is angle β, and the other two sides are perpendicular to the line segment between touch point 801 and touch point 803. Similarly, each other decoding region can be determined.
[0119] When encoded as binary data, for decoding region 1, it is determined whether there are any touch points (i.e., other touch points) within decoding region 1. If other touch points exist, the code element corresponding to decoding region 1 is set to 1; if no other touch points exist, the code element corresponding to decoding region 1 is set to 0 (i.e., the default code element). This process is repeated to determine the code element corresponding to each decoding region. Then, based on the code element and bit index corresponding to each decoding region, all code elements are combined to obtain the target code for the input device.
[0120] Optionally, the code symbol corresponding to the decoding region is determined based on the pixel value of the pixel within the decoding region, including:
[0121] From multiple pixel value intervals, determine the target pixel value interval in which the pixel value of a pixel in the decoding area is located; where each of the multiple pixel value intervals corresponds to a different code element;
[0122] Determine the code corresponding to the decoding region based on the code corresponding to the target pixel value range.
[0123] like Figure 4 and Figure 8 As shown, when the input device's encoding is a binary number, the pixel value range can be divided into two: a first pixel value range (where the pixel value is less than a preset threshold) and a second pixel value range (where the pixel value is greater than or equal to the preset threshold). The code element corresponding to the first pixel value range is 0, and the code element corresponding to the second pixel value range is 1. After determining multiple decoding regions from the capacitive image, for each decoding region, if the pixel value of each pixel within the decoding region is less than the preset threshold, it can be determined that there is no second touch point within the decoding region, and the code element corresponding to the decoding region is the code element 0 corresponding to the second pixel value range. If there are pixels within the decoding region whose pixel value is greater than or equal to the preset threshold, it can be determined that there is a second touch point within the decoding region, and the code element corresponding to the decoding region is the code element 1 corresponding to the second pixel value range.
[0124] For example, when the input device encoding is a decimal number, multiple pixel value ranges can be set, each corresponding to a different level of capacitance change. As previously illustrated, the second conductive element can cause three levels of capacitance change, allowing for four pixel value ranges. The first pixel value range has a lower limit of 0 and an upper limit of a preset threshold, corresponding to code 0. The second pixel value range has a lower limit greater than the preset threshold and an upper limit less than the first pixel value corresponding to the first level of capacitance change, corresponding to code 1. The third pixel value range has a lower limit greater than the first pixel value and an upper limit less than the second pixel value corresponding to the second level of capacitance change, corresponding to code 2. The third pixel value range has a lower limit greater than the second pixel value and an upper limit less than the third pixel value corresponding to the third level of capacitance change, corresponding to code 3. The first pixel value is greater than the preset threshold and less than the second pixel value, and the second pixel value is less than the third pixel value.
[0125] For each decoding region, the maximum pixel value of all pixels within that region can be determined. From multiple pixel value intervals, the target pixel value interval containing the maximum pixel value is identified, and the code corresponding to this target pixel value interval is used as the code corresponding to the decoding region. Then, based on the bit index of each decoding region, the code corresponding to all decoding regions is combined to obtain the target encoding for the input device.
[0126] In this embodiment, multiple decoding regions are first determined from the target coordinate system, and then the code elements corresponding to the decoding regions are determined based on the pixel values of the pixels in the decoding regions. The code elements corresponding to the multiple decoding regions are combined to obtain the target code, which can quickly and accurately determine the target code of the input device.
[0127] In this embodiment, different pixel value ranges are set, and different code elements are set for different pixel value ranges. The code element corresponding to the decoding area is determined according to the target pixel value region where the pixel value of the pixel in the decoding area is located, which can quickly and accurately determine the code element corresponding to the decoding area.
[0128] Optionally, step 603 may include:
[0129] Determine M second touch points from other touch points; M is an integer greater than or equal to 0, and the M second touch points are located within the target area in the target coordinate system;
[0130] For each second touch point, determine the bit index corresponding to the second touch point based on its coordinates in the target coordinate system;
[0131] For each second touch point, the code element in the target code corresponding to the second touch point is determined based on the pixel value of the second touch point; wherein, the pixel value of the second touch point is the pixel value of the second touch point in the capacitance image of the capacitive touch-sensitive surface;
[0132] The target encoding is determined based on the bit indices and code elements corresponding to the M second touch points.
[0133] In one implementation, after constructing the target coordinate system, it can be determined from among the touch points other than the first touch point whether a second touch point corresponding to the second conductive element exists. For example... Figure 4 As shown, the X-axis coordinate of the center point of each second conductive element is not less than the X-axis coordinate of the center point of the first conductive element in region 1 (which is 0), and not greater than the X-axis coordinate of the center point of the first conductive element in region 4 (3H). The Y-axis coordinate of the center point of each second conductive element is not greater than the Y-axis coordinate of the center point of the first conductive element in region 1 (which is 0), and not less than the Y-axis coordinate of the center point of the first conductive element in region 13 (which is -3H). That is, all the second conductive elements are located within a rectangular area of the coordinate system. The coordinates of the upper left corner of this rectangular area are (0, 0), and the coordinates of the lower right corner are (3H, -3H).
[0134] Correspondingly, such as Figure 8 As shown, in the target coordinate system, the X-axis coordinate of the center point of each second touch point is not less than the X-axis coordinate of touch point 801 (0) and not greater than the X-axis coordinate of touch point 802 (3H). The Y-axis coordinate of each second touch point is not greater than the Y-axis coordinate of touch point 801 (0) and not less than the Y-axis coordinate of touch point 803 (-3H). That is, all second touch points are located within a rectangular target area in the target coordinate system. The coordinates of the upper left corner of the target area are (0, 0) and the coordinates of the lower right corner are (3H, -3H).
[0135] After constructing the target coordinate system, when determining that the capacitance image also includes other touch points, if the other touch points are located within the target area, that is, the X-axis coordinate of the touch point is greater than or equal to 0 and less than or equal to 3H, and the Y-axis coordinate is less than or equal to 0 and greater than or equal to -3H, then the touch point is determined to be the second touch point. Otherwise, the touch point is determined not to be the second touch point.
[0136] When the capacitive image includes a second touch point, the coordinates of the second touch point in the target coordinate system are determined. If the coordinates are one of the preset coordinates, or the distance between the coordinates and a preset coordinate is less than or equal to 3 pixels, then the bit index corresponding to the second touch point is determined to be the bit index corresponding to the decoding area corresponding to the preset coordinates.
[0137] When the input device's encoding is binary data, for each second touch point, the encoding corresponding to the second touch point can be directly determined to be 1.
[0138] When the input device encodes data in decimal format, multiple pixel value ranges can be set. These ranges correspond one-to-one with different levels of capacitance change, with each range representing a code element. For each second touch point, the target pixel value range containing the center pixel of that second touch point can be determined, and the code element corresponding to that target range is used as the code element for the second touch point.
[0139] For example, when through Figure 5 When the input device performs a touch operation, there is only one second touch point in the target area. The bit index corresponding to this second touch point can be determined to be 3. When the input device's encoding is binary data, the third bit in the target encoding can be determined to be 1. Since there are no other second touch points in the capacitive image, the other code elements in the target encoding can be determined to be the default code element 0, i.e., the first, second, and fourth bits of the target encoding are all 0. This allows us to determine each code element in the target encoding. By combining all code elements according to their corresponding bit indices, the target encoding can be determined to be 0010.
[0140] Similarly, when through Figure 4 When the input device shown performs a touch operation, there will be 7 second touch points in the target area. The bit index and code element corresponding to each second touch point can be determined. At the same time, the code element corresponding to other bit indices in the target code can be determined as the default code element 0. All code elements can be combined based on the bit index corresponding to each code element, and thus the target code can be determined as 010111101010.
[0141] It should be noted that after constructing the coordinate system, if it is determined that there are no other touch points in the capacitance image, it can be determined that each symbol in the target encoding is a default symbol.
[0142] In this embodiment of the application, after constructing the target coordinate system, the second touch point is determined, and the target code is determined according to the bit index and code element corresponding to the second touch point. Only the second touch point needs to be processed, which can reduce the amount of data processing and improve the efficiency of determining the target code.
[0143] Optionally, in the process of determining the second touch point, for each other touch point, if the coordinates of the other touch point in the target coordinate system correspond to one of the preset coordinates, then the other touch point is determined as the second touch point.
[0144] Combination Figure 4 and Figure 5As shown, after constructing the target coordinate system, for each other touch point present in the capacitive image, the coordinates of the other touch points in the target coordinate system can be determined. If the coordinates of another touch point in the target coordinate system overlap with a certain preset coordinate or the distance between the other touch point and the preset coordinate is less than or equal to a preset distance threshold (i.e., close to overlap), then the other touch point can be determined as the second touch point. Conversely, if an other touch point does not overlap with any of the preset coordinates and the distance between the other touch point and each of the preset coordinates is greater than the preset distance threshold, then the other touch point is determined not to be the second touch point.
[0145] Optionally, step 603 may include:
[0146] For each other touch point, if the coordinates of the other touch point in the target coordinate system correspond to one of the preset coordinates, then a code element in the target code corresponding to the other touch point is determined based on the pixel value of the other touch point; wherein, the pixel value of the other touch point is the pixel value of the other touch point in the capacitance image of the capacitive touch-sensitive surface;
[0147] In addition, based on a preset coordinate corresponding to other touch points, the bit index of the code element corresponding to other touch points in the target encoding is determined;
[0148] The target code is determined based on all the identified code elements and their corresponding bit indices.
[0149] The coordinates of other touch points in the target coordinate system correspond to one of the preset coordinates. This means that the coordinates of other touch points overlap with the preset coordinates, or the distance between the coordinates of other touch points and a certain preset coordinate is less than or equal to a preset distance threshold, and they almost overlap with the preset coordinates.
[0150] For example, after constructing the target coordinate system, if it is determined that the capacitive image also includes other touch points, the coordinates of these other touch points in the target coordinate system can be directly determined. If the coordinates of these other touch points in the target coordinate system overlap with a preset coordinate, then these other touch points can be determined as the second touch point corresponding to the preset coordinate. Alternatively, if the distance between these other touch points and a certain touch point is less than a preset distance threshold (e.g., 3 pixels), then these other touch points can be determined as almost overlapping with the second touch point corresponding to the preset coordinate, and these other touch points are the second touch point.
[0151] At this point, a symbol in the target code corresponding to the other touch points can be determined based on the pixel values of the other touch points. For example, when the input device's code is binary data, the symbol corresponding to the other touch point (i.e., the second touch point) can be directly determined to be 1. When the input device's code is decimal data, the target pixel value range in which the pixel value of the other touch point (i.e., the second touch point) is located can be determined, and the symbol corresponding to the target pixel value range can be used as the symbol corresponding to the other touch point.
[0152] Simultaneously, the bit index corresponding to the preset coordinates of other touch points can be determined as the bit index of the code element corresponding to the other touch point in the target encoding. For example... Figure 9 As shown, when passing through Figure 5 When the input device shown performs a touch operation, there is only one touch point 904 (i.e., other touch points) on the capacitive touch-sensitive surface. At this time, the code corresponding to touch point 904 can be determined to be 1, with a bit index of 3. Similarly, for the other codes in the target encoding of the input device, it can be determined that all other codes are default 0. Then, by combining all codes according to the bit index of each code, the target encoding of the target input device can be obtained.
[0153] In this embodiment, after constructing the target coordinate system, other touch points besides the first touch point are determined, and the code elements in the target code are determined according to the relationship between the other touch points and the preset coordinates. This allows processing only a small number of touch points, reducing the amount of data processing and improving the efficiency of determining the target code.
[0154] In practical applications, the input device can be Figure 4 or Figure 5 The input device is shown. After acquiring the capacitance image, the electronic device determines the distance between two touch points out of all touch points. The input device can be determined to be... Figure 5 The input device shown, the electronic device determines the distance between two touch points out of all touch points as follows: The input device can be determined to be... Figure 4 The input device shown.
[0155] Step 604: Execute the instruction corresponding to the target code.
[0156] In one embodiment, a corresponding instruction can be pre-set for the target code of each input device. After determining the target code of the input device, the corresponding instruction can be determined and executed based on the target code to achieve a response to the input device. For example, if it is necessary to open the camera in the electronic device through the input device, the instruction corresponding to the target code of the input device can be set to open the camera. After decoding the target code of the input device, the instruction corresponding to the target code can be determined to be open the camera, and the camera of the electronic device can be opened directly to achieve a response to the input device.
[0157] It should be understood that the above are merely illustrative examples, and the instructions set for the input device could also be to open an application on the electronic device. When the capacitive touch-sensitive surface is a capacitive screen, specific data can be displayed on the capacitive screen, including but not limited to the examples above.
[0158] In this embodiment, during the touch response process, when it is determined that the input device forms multiple touch points on the capacitive touch-sensitive surface, it is determined whether the multiple touch points include N first touch points that constitute a preset non-rotationally symmetric pattern. If N first touch points are included, a target coordinate system is constructed based on the N first touch points. The target code of the input device is obtained by decoding the other touch points based on the target coordinate system. The other touch points are the touch points other than the N first touch points among the multiple touch points. The instruction corresponding to the target code is executed. This not only enables the capacitive touch-sensitive surface to respond to the input device, but also allows the corresponding instruction to be set for the code according to the requirements (which can be a complex instruction or a simple instruction). This allows the user to perform simple touch operations on the capacitive touch-sensitive surface through the input device to input simple or complex instructions to the capacitive touch-sensitive surface, which can simplify user operations and thus expand the application scenarios of the capacitive touch-sensitive surface to meet the needs of users in some specific scenarios.
[0159] Optionally, step 604 may include:
[0160] Based on N first touch points, determine the reference coordinates of the reference point of the input device on the capacitive touch surface, and / or determine the rotation angle of the input device in the capacitive touch surface;
[0161] Based on the reference coordinates and / or rotation angle, execute the instructions corresponding to the target code.
[0162] The rotation angle of the input device on the capacitive touch-sensitive surface can be the deflection angle of the first reference line of the input device relative to the second reference line of the capacitive touch-sensitive surface.
[0163] For example, when using Figure 4 When encoding the input device using the encoding method shown, the first reference line of the input device can be the straight line where the X2 axis of the constructed coordinate system is located, and the second reference line of the capacitive touch surface can be the horizontal line of the capacitive touch surface (i.e., the straight line where the X1 axis of the original coordinate system of the capacitive touch surface is located). Then the rotation angle is the deflection angle between the X2 axis and the X1 axis.
[0164] Optionally, in determining the rotation angle of the input device on the capacitive touch-sensitive surface, two fourth target touch points can first be determined from multiple touch points; the rotation angle is determined based on the angle between the first reference line formed by the two fourth target touch points and the second reference line of the capacitive touch-sensitive surface.
[0165] like Figure 8As shown, when the first reference line of the input device is the straight line containing the X2 axis, the two fourth target touch points are touch point 801 and touch point 802. After acquiring the capacitive image, the touch point coordinates of each touch point can be determined from the capacitive image. Simultaneously, N first touch points can be determined from multiple touch points, and a target coordinate system is constructed in the capacitive image based on these N first touch points. At this point, the angle β between the X2 axis (i.e., the first reference line) containing the two fourth target touch points and the X1 axis (i.e., the second reference line) in the original coordinate system of the capacitive image can be determined, and this angle β is defined as the rotation angle of the input device on the capacitive touch-sensitive surface. It should be understood that the first reference line can also be other types of reference lines; this embodiment does not limit the specific setting method of the reference line.
[0166] For example, when through Figure 4 When encoding the input device using the shown encoding method, the reference point of the input device can be the center point of the conductive element arrangement surface 311, and the reference coordinates are the coordinates of the center point of the conductive element arrangement surface 311 on the capacitive touch-sensitive surface (i.e., the capacitive image). Of course, the reference point can also be located at other positions on the input device. After acquiring the capacitive image, N first touch points can be determined from the capacitive image using the aforementioned method, and a coordinate system can be constructed based on the N first touch points.
[0167] like Figure 8 As shown, after constructing the target coordinate system, the center point C can be determined from the target coordinate system. The coordinates of the center point C in the target coordinate system are preset (1.5H, -1.5H). The coordinates (1.5H, -1.5H) are the coordinates of the center point of the conductive component arrangement surface 311 in the coordinate system formed by the X2 axis and the Y2 axis. Then, the coordinates of the center point C in the original coordinate system of the capacitance image can be determined, which are the reference coordinates. It should be understood that the reference point of the input device may include, but is not limited to, the center point of the conductive component arrangement surface.
[0168] During the execution of the instructions corresponding to the target code, instructions can be executed based on reference coordinates, rotation angles, or both.
[0169] In this embodiment, based on the reference coordinates and / or rotation angle of the reference point of the input device on the capacitive touch-sensitive surface, the instruction corresponding to the target code is executed, which can make the executed instruction match the position and angle of the input device on the capacitive touch-sensitive surface.
[0170] Optionally, when the capacitive touch-sensitive surface is a capacitive screen, instructions corresponding to the target code are executed based on reference coordinates and / or rotation angle, including: displaying the object to be displayed corresponding to the input device on the capacitive screen based on the reference coordinates; or, displaying the object to be displayed on the capacitive screen with a rotation angle based on the reference coordinates.
[0171] For example, the instruction corresponding to the target encoding can be the object to be displayed on the display input device. The object to be displayed can be a picture, symbol, or analog image of the input device, but is not limited to this.
[0172] like Figure 8 As shown, the object to be displayed 806 can be a simulated image of the input device. When the instruction corresponding to the target code is to display the object to be displayed 806 corresponding to the input device, the object to be displayed 806 can be displayed at the reference coordinates or near the reference coordinates. The rotation angle of the object to be displayed 806 in the capacitive image 80 is the same as the rotation angle of the total touch area in the capacitive image, or the rotation angle of the object to be displayed 806 in the capacitive image 80 can be different from the rotation angle of the total touch area in the capacitive image. This embodiment does not limit this.
[0173] In this embodiment of the application, the object to be displayed corresponding to the input device is displayed based on the reference coordinates and rotation angle of the input device, which can make the position and angle of the object to be displayed match the position and angle of the input device.
[0174] Optionally, the target code includes data code and error correction code, and the instructions corresponding to the target code are executed, including:
[0175] The data code is corrected based on the error correction code to obtain the corrected data code;
[0176] Execute the instructions corresponding to the corrected data code.
[0177] Based on the examples above, regarding Figure 4 The encoding method shown allows setting bits 10 and 12 of the encoding as error correction codes, while bits 1-9 and 11 become data codes. When setting the corresponding instructions for the encoding, corresponding instructions can be set for the data codes. After obtaining the target encoding through a capacitance image, error correction can be performed on the target encoding based on bits 10 and 12. Then, bits 1-9 and 11 are obtained from the corrected target encoding to obtain the data codes, and the instructions corresponding to the data codes are executed.
[0178] In this embodiment, a data code and an error correction code are set in the target code. When executing the instruction, the data code is corrected based on the error correction code to obtain an accurate data code, which can reduce the error rate of the data code and thus improve the accuracy of the instruction.
[0179] The above text combined Figures 1 to 9 The touch response method provided in the embodiments of this application has been described in detail; the following will be combined with Figure 10 and Figure 11The apparatus embodiments of this application are described in detail below. It should be understood that the apparatus in the embodiments of this application can perform the various methods described in the foregoing embodiments of this application, that is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.
[0180] Figure 10 This is a schematic diagram of the structure of a touch response device provided in an embodiment of this application. For example, as shown... Figure 10 As shown, the touch response device 10 is disposed in the control chip of the electronic device, and the touch response device includes:
[0181] The construction module 101 is used to determine whether N first touch points are included among the multiple touch points when the input device forms multiple touch points on the capacitive touch-sensitive surface; N is a preset integer greater than 2, the N first touch points form a preset non-rotationally symmetric figure, and the relative distance between any two first touch points matches the preset distance; if the N first touch points are included, a target coordinate system is constructed based on the N first touch points;
[0182] The decoding module 102 is used to decode other touch points based on the target coordinate system to obtain the target code of the input device; the other touch points are touch points other than the N first touch points among the plurality of touch points;
[0183] The execution module 103 is used to execute the instructions corresponding to the target code.
[0184] Optionally, the decoding module 102 is specifically used to determine multiple decoding regions from the target coordinate system based on multiple preset coordinates; the multiple decoding regions correspond one-to-one with multiple bits of code in the target code; for each decoding region, the code corresponding to the decoding region is determined according to the pixel value of the pixel in the decoding region; the pixel in the decoding region is the pixel in the capacitance image of the decoding region on the capacitive touch-sensitive surface; the code corresponding to the multiple decoding regions is combined to obtain the target code.
[0185] Optionally, the decoding module 102 is specifically used to determine the target pixel value interval in which the pixel value of the pixel in the decoding region is located from multiple pixel value intervals; wherein, the multiple pixel value intervals correspond to different code symbols; and determine the code symbol corresponding to the decoding region based on the code symbol corresponding to the target pixel value interval.
[0186] Optionally, the decoding module 102 is specifically configured to determine M second touch points from the other touch points; M is an integer greater than or equal to 0, and the M second touch points are located within a target area in the target coordinate system; for each second touch point, the bit index corresponding to the second touch point is determined according to the coordinates of the second touch point in the target coordinate system; for each second touch point, the code element in the target encoding corresponding to the second touch point is determined according to the pixel value of the second touch point; wherein, the pixel value of the second touch point is the pixel value of the second touch point in the capacitance image of the capacitive touch-sensitive surface; and the target encoding is determined based on the bit index and code element corresponding to the M second touch points respectively.
[0187] Optionally, the decoding module 102 is specifically used to determine the other touch point as the second touch point if the coordinates of the other touch point in the target coordinate system correspond to one of the preset coordinates for each of the other touch points.
[0188] Optionally, the decoding module 102 is specifically configured to, for each of the other touch points, if the coordinates of the other touch point in the target coordinate system correspond to one of the preset coordinates, determine a code element in the target encoding corresponding to the other touch point based on the pixel value of the other touch point; wherein the pixel value of the other touch point is the pixel value of the other touch point in the capacitance image of the capacitive touch-sensitive surface; and, based on one of the preset coordinates corresponding to the other touch point, determine the bit index of the code element corresponding to the other touch point in the target encoding; and determine the target encoding based on all determined code elements and corresponding bit indices.
[0189] Optionally, the construction module 101 is specifically used to determine a first target touch point, a second target touch point, and a third target touch point from the N first touch points; the relative distance between each pair of the first target touch point, the second target touch point, and the third target touch point is a preset distance; the target coordinate system is constructed by taking the first target touch point as the origin of the rectangular coordinate system, taking the direction from the first target touch point to the second target touch point as the X-axis direction of the rectangular coordinate system, and taking the direction from the first target touch point to the third target touch point as the Y-axis direction of the rectangular coordinate system.
[0190] Optionally, the execution module 103 is specifically configured to determine the reference coordinates of the reference point of the input device on the capacitive touch-sensitive surface based on the N first touch points, and / or determine the rotation angle of the input device on the capacitive touch-sensitive surface; and execute the instruction corresponding to the target code based on the reference coordinates and / or the rotation angle.
[0191] Optionally, the execution module 103 is specifically used to determine two fourth target touch points from the N first touch points; and to determine the rotation angle based on the angle between the first reference line formed by the two fourth target touch points and the second reference line of the capacitive touch-sensitive surface.
[0192] Optionally, the execution module 103 is specifically used to correct the data code based on the error correction code to obtain the corrected data code; and to execute the instruction corresponding to the corrected data code.
[0193] It should be noted that the aforementioned touch response device 10 is embodied in the form of a functional unit. The term "module" here can be implemented in software and / or hardware, without specific limitations.
[0194] For example, a "module" can be a software program, hardware circuit, or a combination of both that implements the above functions. Hardware circuits may include application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or group processors) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functions.
[0195] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of electronic device software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0196] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0197] It should be understood that the device provided in this embodiment is used to execute the above-described touch response method, and therefore can achieve the same effect as the above-described implementation method.
[0198] When using integrated units, the device may include a processing module and a storage module. The processing module may be a processor or a control chip that can implement or execute various exemplary logic blocks, modules, and circuits shown in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0199] In addition, the device provided in this application embodiment may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store a first control signal. When the processor calls and executes the first control signal, the chip can execute a touch response method provided in the above embodiment.
[0200] This application also provides a storage medium storing executable program code. When the executable program code is run on an electronic device, the electronic device executes the above-described related method steps to implement a touch response method provided in the above embodiments. The electronic device readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, Digital Video Discs (DVDs), Compact Disc Read-Only Memory (CD-ROMs), microdrives, and magneto-optical disks, read-only memory (ROMs), random access memory (RAMs), erasable programmable read-only memory (EPROMs), electrically erasable programmable read-only memory (EEPROMs), dynamic random access memory (DRAMs), video random access memory (VRAMs), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing first control signals and / or data.
[0201] This application also provides an executable program code product that, when run on an electronic device, causes the electronic device to perform the aforementioned related steps to implement a touch response method provided in the above embodiments.
[0202] In this application, the storage medium, executable program code product, or chip provided are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0203] See Figure 11 , Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device is, for example, the computer mentioned above.
[0204] For example, such as Figure 11 As shown, the electronic device 11 includes a memory 111 and a processor 112, wherein the memory 111 stores executable program code 113, and the processor 112 is used to call and execute the executable program code 113 to perform a touch response method.
[0205] For example, memory 111 can be used to store related programs of the touch response method provided in the embodiments of this application; processor 112 can call the related programs of the touch response method stored in memory 111 to execute the touch response method of the embodiments of this application.
[0206] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0207] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0208] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A touch response method, characterized in that, The method includes: When it is determined that the input device forms multiple touch points on the capacitive touch-sensitive surface, it is determined whether the multiple touch points include N first touch points; N is a preset integer greater than 2, the N first touch points form a preset non-rotationally symmetric pattern, and the relative distance between any two first touch points matches the preset distance; If the N first touch points are included, then a target coordinate system is constructed based on the N first touch points; Based on the target coordinate system, the target code of the input device is obtained by decoding other touch points; the other touch points are the touch points other than the N first touch points among the plurality of touch points; Execute the instructions corresponding to the target encoding.
2. The method as described in claim 1, characterized in that, The step of decoding other touch points based on the target coordinate system to obtain the target code of the input device includes: Based on multiple preset coordinates, multiple decoding regions are determined from the target coordinate system; each of the multiple decoding regions corresponds one-to-one with a multiple bit symbol in the target encoding. For each of the decoding regions, the corresponding code element of the decoding region is determined based on the pixel value of the pixel in the decoding region; the pixel in the decoding region is the pixel in the capacitance image of the decoding region on the capacitive touch-sensitive surface; The target code is obtained by combining the code elements corresponding to the multiple decoding regions.
3. The method as described in claim 2, characterized in that, Determining the code element corresponding to the decoding region based on the pixel values of the pixels within the decoding region includes: From multiple pixel value intervals, determine the target pixel value interval in which the pixel value of the pixel in the decoding area is located; wherein, the multiple pixel value intervals correspond to different code elements; The code corresponding to the decoding region is determined based on the code corresponding to the target pixel value range.
4. The method as described in claim 1, characterized in that, The step of decoding other touch points based on the target coordinate system to obtain the target code of the input device includes: M second touch points are determined from the other touch points; M is an integer greater than or equal to 0, and the M second touch points are located within the target area in the target coordinate system; For each second touch point, the bit index corresponding to the second touch point is determined based on the coordinates of the second touch point in the target coordinate system; For each second touch point, the code element in the target code corresponding to the second touch point is determined based on the pixel value of the second touch point; wherein, the pixel value of the second touch point is the pixel value of the second touch point in the capacitance image of the capacitive touch-sensitive surface; The target encoding is determined based on the bit index and code element corresponding to the M second touch points respectively.
5. The method as described in claim 4, characterized in that, The step of determining M second touch points from the other touch points includes: For each of the other touch points, if the coordinates of the other touch point in the target coordinate system correspond to one of the preset coordinates, then the other touch point is determined to be the second touch point.
6. The method as described in claim 1, characterized in that, The step of decoding other touch points based on the target coordinate system to obtain the target code of the input device includes: For each of the other touch points, if the coordinates of the other touch point in the target coordinate system correspond to one of the preset coordinates, then a code element in the target code corresponding to the other touch point is determined according to the pixel value of the other touch point; wherein, the pixel value of the other touch point is the pixel value of the other touch point in the capacitance image of the capacitive touch-sensitive surface; And, based on a preset coordinate corresponding to the other touch points, determine the bit index of the code element corresponding to the other touch points in the target encoding; The target code is determined based on all the identified code elements and their corresponding bit indices.
7. The method as described in claim 1, characterized in that, The construction of the target coordinate system based on the N first touch points includes: A first target touch point, a second target touch point, and a third target touch point are determined from the N first touch points; the relative distance between each pair of the first target touch point, the second target touch point, and the third target touch point is a preset distance; The target coordinate system is constructed by taking the first target touch point as the origin of the rectangular coordinate system, the direction from the first target touch point to the second target touch point as the X-axis direction of the rectangular coordinate system, and the direction from the first target touch point to the third target touch point as the Y-axis direction of the rectangular coordinate system.
8. The method as described in claim 1, characterized in that, The instructions for executing the target encoding include: Based on the N first touch points, determine the reference coordinates of the reference point of the input device on the capacitive touch-sensitive surface, and / or determine the rotation angle of the input device on the capacitive touch-sensitive surface; Based on the reference coordinates and / or the rotation angle, execute the instruction corresponding to the target code.
9. The method as described in claim 8, characterized in that, Determining the rotation angle of the input device on the capacitive touch-sensitive surface includes: Two fourth target touch points are determined from the N first touch points; The rotation angle is determined based on the angle between the first baseline formed by the two fourth target touch points and the second baseline of the capacitive touch-sensitive surface.
10. The method according to any one of claims 1-9, characterized in that, The target code includes data code and error correction code, and the instruction corresponding to the target code includes: The data code is corrected based on the error correction code to obtain the corrected data code; Execute the instruction corresponding to the data code after error correction.
11. A touch-responsive device, characterized in that, include: The construction module is used to determine whether N first touch points are included among the multiple touch points when it is determined that the input device forms multiple touch points on the capacitive touch-sensitive surface; N is a preset integer greater than 2. The N first touch points form a preset non-rotationally symmetric shape, and the relative distance between any two first touch points matches the preset distance. If the N first touch points are included, a target coordinate system is constructed based on the N first touch points. A decoding module is used to decode other touch points based on the target coordinate system to obtain the target code of the input device; The other touch points are the touch points other than the N first touch points among the plurality of touch points; The execution module is used to execute the instructions corresponding to the target encoding.
12. An electronic device, characterized in that, include: A memory and a processor, wherein the memory is used to store executable program code; The processor is configured to call and run the executable program code from the memory, causing the electronic device to perform the touch response method as described in any one of claims 1-10.
13. A storage medium, characterized in that, The storage medium stores executable program code, which, when run on an electronic device, causes the electronic device to perform the touch response method as described in any one of claims 1-10.