CN114461091A - Touch data processing method, keyboard, equipment, chip and readable storage medium - Google Patents

Touch data processing method, keyboard, equipment, chip and readable storage medium Download PDF

Info

Publication number
CN114461091A
CN114461091A CN202110838379.3A CN202110838379A CN114461091A CN 114461091 A CN114461091 A CN 114461091A CN 202110838379 A CN202110838379 A CN 202110838379A CN 114461091 A CN114461091 A CN 114461091A
Authority
CN
China
Prior art keywords
touch
frame
abscissa
points
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110838379.3A
Other languages
Chinese (zh)
Other versions
CN114461091B (en
Inventor
刘耀冲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110838379.3A priority Critical patent/CN114461091B/en
Publication of CN114461091A publication Critical patent/CN114461091A/en
Application granted granted Critical
Publication of CN114461091B publication Critical patent/CN114461091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0414Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means using force sensing means to determine a position
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • G06F1/3271Power saving in keyboard
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
    • G06F3/0447Position sensing using the local deformation of sensor cells

Abstract

The embodiment of the application provides a touch data processing method, a keyboard, equipment, a chip and a readable storage medium, wherein the method comprises the following steps: acquiring coordinates of each frame of touch points according to a first preset frequency, wherein the coordinates of the touch points are used for representing the touched position in a touch area of the keyboard; and under the condition that the touch point is interrupted and the interruption time length does not exceed the preset waiting time length, determining the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption. The touch data processing method provided by the embodiment of the application can compensate the coordinates of the touch points missing from the vacant area, so that the coordinates of the touch points are continuous, the identified touch track is more accurate, and the integrity and the accuracy of the touch function of the keyboard are ensured.

Description

Touch data processing method, keyboard, equipment, chip and readable storage medium
Technical Field
The present application relates to the field of touch technologies, and in particular, to a touch data processing method, a keyboard, a device, a chip, and a readable storage medium.
Background
The touch keyboard refers to a keyboard with a touch function. Specifically, the touch keyboard includes a touch circuit for implementing touch detection and a key circuit for implementing key input. The touch circuit needs to avoid the key circuit for layout. Therefore, the processing of the touch data of the touch keyboard is different from the processing of the touch data of the touch display screen. If the touch data of the touch keyboard is processed according to the method for processing the touch data of the touch display screen, a touch track recognition error may be caused.
Disclosure of Invention
The application provides a touch data processing method, a keyboard, equipment, a chip and a readable storage medium, which can ensure that an identified touch track is not easy to make mistakes.
In a first aspect, an embodiment of the present application provides a touch data processing method, including:
acquiring coordinates of touch points of each frame according to a first preset frequency, wherein the coordinates of the touch points are used for representing the touched position in a touch area of the keyboard; and under the condition that the touch point is interrupted and the interruption time length does not exceed the preset waiting time length, determining the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption.
In the implementation mode, on one hand, when a finger passes through the key cap of the vacant area in the touch process, the coordinates of the touch points missing in the vacant area can be compensated, so that the coordinates of the touch points are continuous, the recognized touch track is not prone to error, and the integrity and accuracy of the touch function of the keyboard are guaranteed. On the other hand, when the touch points are lost due to the special conditions of inaccurate detection, incomplete finger contact and the like in the touch process, the coordinates of the touch points can be compensated in time, so that the coordinates of the touch points are continuous, the recognized touch track is further not easy to make mistakes, and the integrity and the accuracy of the touch function of the keyboard are ensured.
In a possible implementation manner, the coordinates of the touch point before interruption include coordinates of M frames of touch points, the coordinates of the interrupted touch point include coordinates of N frames of touch points, and the coordinates of the touch point after interruption include coordinates of a first frame of touch point after interruption, where M is an integer greater than or equal to 1, N is less than or equal to a preset waiting frame number, and the preset waiting frame number is a frame number corresponding to a preset waiting duration;
determining the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption, wherein the determining step comprises the following steps: and determining the coordinates of the N frames of touch points according to the coordinates of the M frames of touch points and/or the coordinates of the first frame of touch points after interruption.
In the implementation mode, the coordinates of the M frames of touch points before interruption can represent the trend of the finger before the interruption of the touch points, and the coordinates of the first frame of touch points after interruption can represent the position of the touch points after the interruption. Therefore, the coordinates of the N interrupted frames of touch points can be simply and quickly determined according to the coordinates of the M interrupted frames of touch points and/or the coordinates of the first interrupted frame of touch points. Compared with the method that the coordinates of the N frames of touch points after interruption are determined by adopting the coordinates of the multiple frames of touch points after interruption, the implementation mode can reduce the complexity of the anti-interruption algorithm and improve the calculation efficiency.
In a possible implementation manner, if M is greater than 1, determining coordinates of N frames of touch points according to the coordinates of M frames of touch points and/or the coordinates of the first frame of touch points after interruption includes:
acquiring a preset maximum estimated frame number X, wherein X is an integer greater than 1; if X is larger than or equal to N, estimating the coordinates of N frames of touch points according to the coordinates of M frames of touch points; if X is smaller than N, estimating the coordinates of the front X frame of touch points in the N frames of touch points according to the coordinates of the M frames of touch points, and determining the coordinates of the back N-X frame of touch points in the N frames of touch points according to the coordinates of the M + X frame of touch points and the coordinates of the first frame of touch points after interruption, wherein the M + X frame of touch points are the X frame of touch points in the front X frame of touch points.
In one possible implementation manner, estimating coordinates of a first X frame of touch points in N frames of touch points according to coordinates of M frames of touch points includes:
determining an abscissa pre-estimation increment according to the abscissas of the M frames of touch points, wherein the abscissa pre-estimation increment is used for representing the increment of the abscissas of the first frame of touch points in the previous X frames of touch points relative to the abscissas of the Mth frame of touch points in the M frames of touch points; determining a vertical coordinate estimated increment according to the vertical coordinate of the M frames of touch points, wherein the vertical coordinate estimated increment is used for representing the increment of the vertical coordinate of the first frame of touch point relative to the vertical coordinate of the M frame of touch point in the previous X frames of touch points; determining the abscissa of the first frame of touch points in the previous X frames of touch points according to the abscissa and the abscissa pre-estimation increment of the Mth frame of touch points; determining the ordinate of the first frame of touch points in the previous X frames of touch points according to the ordinate and the ordinate pre-estimated increment of the Mth frame of touch points; and taking the last M-1 frame of touch points in the M frames of touch points and the first frame of touch points in the front X frame of touch points as M frames of touch points, taking the first frame of touch points in the front X frame of touch points as M frames of touch points, returning to the execution step, and determining the estimated abscissa increment according to the coordinates of the M frames of touch points until the abscissa and the ordinate of the X frame of touch points in the front X frame of touch points are obtained.
In the implementation mode, the rolling cycle estimation method is adopted to carry out frame-by-frame estimation on the previous X frame of touch points, not only is the change trend of the coordinates of the M frame of touch points before interruption considered, but also the change trend of the coordinates of the predicted touch points is considered, and the coordinates of each frame of touch points can be estimated more accurately, so that the obtained touch track is more accurate.
In a possible implementation manner, if M is greater than 2, determining an estimated abscissa increment according to the abscissa of the M frames of touch points includes:
determining an abscissa increment variable quantity according to the abscissa of the M frames of touch points, wherein the abscissa increment variable quantity is used for representing the change trend of the abscissa increment of each frame of touch point in the M frames of touch points, and the abscissa increment refers to the increment of the abscissa of a certain frame of touch point relative to the abscissa of the previous frame of touch point; acquiring the abscissa increment of the touch point of the M frame; and determining the estimated abscissa increment according to the abscissa increment and the abscissa increment variation of the M-th frame of touch points.
In the implementation mode, the M frame of touch points is the frame of touch points closest to the touch points to be estimated, and the abscissa of the next frame of touch points can be accurately estimated by using the abscissa increment of the M frame of touch points. Meanwhile, the abscissa increment variation can represent the variation trend of the abscissa increment of each frame of touch points before interruption, so that the abscissa estimated increment determined according to the abscissa increment of the M-th frame of touch points and the abscissa increment variation fully considers the variation trend of the abscissa increment of each frame of touch points before interruption, the obtained abscissa estimated increment is more accurate, and the coordinates of the interrupted touch points can be estimated more accurately according to the abscissa estimated increment.
In one possible implementation manner, determining the abscissa increment variation according to the abscissa of the M frames of touch points includes:
determining the increment of the abscissa of the M-th frame of touch point relative to the abscissa of the M-1-th frame of touch point in the M-th frame of touch point to obtain the abscissa increment of the M-th frame of touch point; determining the increment of the abscissa of the M-1 frame of touch point relative to the abscissa of the M-2 frame of touch point in the M frame of touch point to obtain the abscissa increment of the M-1 frame of touch point; and determining the difference value obtained by subtracting the abscissa increment of the M-1 frame of touch point from the abscissa increment of the M-frame of touch point as the abscissa increment variation.
In one possible implementation manner, determining an abscissa estimated increment according to an abscissa increment and an abscissa increment variation of the mth frame of touch points includes:
and determining the sum of the abscissa increment and the abscissa increment variation of the M-th frame of touch points as the abscissa estimated increment.
In a possible implementation manner, if M is equal to 2, determining an estimated abscissa increment according to the abscissa of the M frames of touch points includes:
and determining the difference value between the abscissa of the M-th frame of touch points and the abscissa of the M-1-th frame of touch points in the M-th frame of touch points as the estimated abscissa increment.
In one possible implementation manner, determining coordinates of a last N-X frame touch point in the N frame touch points according to the coordinates of the M + X frame touch point and the coordinates of the first frame touch point after the interruption includes:
calculating a difference value between the abscissa of the first frame of touch points after interruption and the abscissa of the M + X frame of touch points to obtain a first abscissa total difference value; determining the abscissa of the touch points of the last N-X frames according to the first abscissa total difference value, wherein the abscissa of the touch point of the M + X frame, the abscissa of the touch point of the last N-X frame and the abscissa of the touch point of the first frame after interruption are an arithmetic progression; calculating a difference value between the ordinate of the first frame of touch points and the ordinate of the M + X frame of touch points after interruption to obtain a total difference value of the first ordinate; and determining the vertical coordinate of the last N-X frame of touch points according to the first vertical coordinate total difference, wherein the vertical coordinate of the M + X frame of touch points, the vertical coordinate of the last N-X frame of touch points and the vertical coordinate of the first frame of touch points after interruption are an arithmetic progression.
In the implementation mode, the abscissa of the N-X frames of touch points is determined according to the first abscissa total difference value by calculating the first abscissa total difference value and the first ordinate total difference value, making the abscissa of the M + X frame touch point, the abscissa of the last N-X frame touch point and the abscissa of the first frame touch point after interruption be an arithmetic progression, determining the vertical coordinate of the touch points of the last N-X frames according to the total difference value of the first vertical coordinate, so that the vertical coordinate of the touch point of the M + X frame, the vertical coordinate of the touch point of the last N-X frame and the vertical coordinate of the touch point of the first frame after interruption are in an arithmetic progression, thereby ensuring that the determined N-X frame touch control points are uniformly distributed between the first frame touch control point and the M + X frame touch control point after interruption, the touch track simulated according to the coordinates of the touch points is more accurate and closer to the actual finger sliding track.
In a possible implementation manner, determining the abscissa of the touch point of the last N-X frames according to the first abscissa total difference value includes:
according to the formula X (Sn) ═ XM+X+(XM+N+1-XM+X) Calculating the abscissa of the N-X frame of touch points after Sn/(N-X +1), wherein Sn represents the serial number of the touch points in the N-X frame of touch points after Sn, Sn is a positive integer less than or equal to N-X, X (Sn) represents the abscissa of the Sn-th frame of touch points in the N-X frame of touch points after Sn, and X (X) represents the abscissa of the Sn-th frame of touch points in the N-X frame of touch points after SnM+XAbscissa, X, representing touch point of M + X frameM+N+1Represents the abscissa, X, of the first frame of touch points after interruptionM+N+1-XM+XRepresenting the first abscissa total difference value.
In the implementation mode, the abscissa and the ordinate of the N-X frame touch point can be determined quickly and accurately through a formula, and the operation efficiency of the anti-touch algorithm is improved.
In one possible implementation manner, if M is equal to 1, determining coordinates of N frames of touch points according to coordinates of M frames of touch points and/or coordinates of a first frame of touch points after interruption includes:
calculating a difference value between the abscissa of the first frame of touch points after interruption and the abscissa of the Mth frame of touch points in the M frames of touch points to obtain a second abscissa total difference value; determining the abscissa of the N frames of touch points according to the second abscissa total difference value, wherein the abscissa of the M frame of touch points, the abscissa of the N frames of touch points and the abscissa of the first frame of touch points after interruption are an arithmetic progression; calculating a difference value between the ordinate of the first frame of touch points and the ordinate of the Mth frame of touch points after interruption to obtain a second ordinate total difference value; and determining the vertical coordinate of the N frames of touch points according to the second total vertical coordinate difference, wherein the vertical coordinate of the M frame of touch points, the vertical coordinate of the N frames of touch points and the vertical coordinate of the first frame of touch points after interruption are an arithmetic progression.
In the implementation mode, the abscissa of the N-frame touch points is determined according to the second abscissa total difference value by calculating the second abscissa total difference value and the second ordinate total difference value, so that the abscissa of the M-th frame touch point, the abscissa of the N-frame touch point and the abscissa of the first frame touch point after interruption are in an arithmetic progression, and the ordinate of the N-frame touch point is determined according to the second ordinate total difference value, so that the ordinate of the M-th frame touch point, the ordinate of the N-th frame touch point and the ordinate of the first frame touch point after interruption are in an arithmetic progression, so that the determined interrupted N-frame touch points are uniformly distributed between the first frame touch point after interruption and the M-th frame touch point, and the touch trajectory simulated according to the touch point coordinates is more accurate and closer to the actual finger sliding trajectory.
In a possible implementation manner, determining the abscissa of the N frames of touch points according to the second abscissa total difference value includes:
according to the formula X (Sn) ═ XM+(XM+N+1-XM) Calculating the abscissa of the N frames of touch points by Sn/(M +1), wherein Sn represents the serial number of the touch points in the N frames of touch points, Sn is a positive integer less than or equal to N, X (Sn) represents the abscissa of the Sn-th frame of touch points in the N frames of touch points, and X (Sn) represents the abscissa of the Sn-th frame of touch points in the N frames of touch pointsMAbscissa, X, representing touch point of M-th frameM+N+1Represents the abscissa, X, of the first frame of touch points after interruptionM+N+1-XMRepresenting the second abscissa total difference value.
In the implementation mode, the abscissa and the ordinate of the N interrupted frame touch points can be rapidly and accurately determined through a formula, and the operation efficiency of the anti-touch algorithm is improved.
In a possible implementation manner, the touch area includes at least one vacant area, the vacant area refers to an area in the touch area where the touch circuit is not disposed, and before determining the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption, the method further includes:
and determining that the coordinates of the last frame of touch points in the touch points before interruption are located in any first preset area, wherein the first preset area is an area in a first preset range around the vacant area.
In the implementation mode, the condition that the coordinates of the last frame of touch points in the touch points before interruption are located in any first preset area is determined as the starting condition of the anti-touch algorithm, the starting condition of the anti-touch algorithm can be adopted to avoid the false starting of the anti-touch algorithm, the false starting of the anti-touch algorithm can be avoided, the condition that the touch track is disordered due to the false starting of the anti-touch algorithm under some special conditions is prevented, and the accuracy of touch control is improved.
In a possible implementation manner, the acquiring a coordinate of each frame of touch point according to a first preset frequency includes:
acquiring touch data of a plurality of detection points in a target frame period to obtain touch data corresponding to a target frame touch point; the target frame period refers to any one of frame periods corresponding to the first preset frequency; determining a detection point corresponding to touch data meeting a preset touch condition in the touch data corresponding to the target frame touch point as an effective detection point; and determining the coordinates of the target frame touch points according to the coordinates of the effective detection points.
In a possible implementation manner, before obtaining the coordinates of the touch points of each frame according to the first preset frequency, the method further includes:
and determining that a preset touch mode starting condition is met, and entering a touch mode. In a touch mode, the execution step acquires the coordinates of each frame of touch points according to a first preset frequency; and under the condition that the touch point is interrupted and the interruption time length does not exceed the preset waiting time length, determining the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption.
In a possible implementation manner, the preset touch mode starting condition is: and detecting that a preset key of the keyboard is pressed for a preset time.
In a possible implementation manner, it is determined that a preset touch mode starting condition is satisfied, and before entering the touch mode, the method further includes:
acquiring coordinates of each frame of touch points in the touch area according to a second preset frequency to obtain coordinates of second touch points; wherein the second preset frequency is less than the first preset frequency; and determining a touch track according to the coordinates of the second touch point.
In the implementation mode, the keyboard is in a low power consumption mode, so that power consumption can be reduced, and energy consumption is reduced.
In a possible implementation manner, the preset touch mode starting condition is: the touch track is a track with a preset shape, and/or the coordinates of the second touch point are located in a second preset area in the touch area.
In this implementation manner, the touch trajectory is a trajectory of a preset shape, and/or the keyboard is switched from the touch low-power mode to the touch mode when the coordinates of the second touch point are located in a second preset area of the touch area. By setting the touch low-power mode, the touch mode is switched to the touch mode when needed, so that the power consumption of the keyboard can be reduced, and the energy consumption is reduced.
In one possible implementation, the method further includes:
and if the preset touch mode exit condition is met, exiting the touch mode.
In a possible implementation manner, the preset touch mode exit condition is: any key of the keyboard is detected to be pressed.
In the implementation mode, when any key of the keyboard is detected to be pressed, the touch mode is exited, and the operation of a user is facilitated.
In a second aspect, an embodiment of the present application provides a keyboard, including: a processor, a memory, and an interface; the processor, memory and interface cooperate to cause the keyboard to perform the method of the first aspect described above.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and an interface, the processor being in communication with the keyboard, the processor, the memory and the interface cooperating with each other such that the electronic device performs the method of the first aspect.
In a fourth aspect, an embodiment of the present application provides a chip, including: a processor for reading and executing a computer program stored in the memory to perform the method of the first aspect described above.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the processor is caused to execute the method of the first aspect.
It is understood that the keyboard, the electronic device, the chip, and the computer-readable storage medium provided in the second aspect, the third aspect, the fourth aspect, and the fifth aspect can execute the touch data processing method provided in the first aspect, and therefore, all the advantages of the touch data processing method provided in the first aspect are achieved, and are not described herein again.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device to which an example touch data processing method provided in the present embodiment is applied;
FIG. 2 is a schematic structural diagram of an example of a keyboard according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of an example of a keyboard circuit board according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of another keyboard provided in the embodiments of the present application;
fig. 5 is a schematic structural diagram of another keyboard circuit board provided in the embodiment of the present application;
FIG. 6 is a schematic structural diagram of a keyboard according to another embodiment of the present disclosure;
fig. 7 is a schematic view of an application scenario of an exemplary touch data processing method according to an embodiment of the present application;
fig. 8 is a schematic view of an application scenario of another touch data processing method provided in the embodiment of the present application;
FIG. 9 is a schematic diagram illustrating a position relationship between a portion of the touch circuit and a projection of a finger when the finger is located at the position shown in FIG. 7 according to an embodiment of the present disclosure;
FIG. 10 is a schematic diagram illustrating a position relationship between a portion of a touch circuit and a finger projection when the finger is located at the position shown in FIG. 8 according to an embodiment of the present disclosure;
fig. 11 is a flowchart illustrating an example of a touch data processing method according to an embodiment of the present disclosure;
fig. 12 is a schematic diagram of an example of a touch point provided in the present embodiment;
fig. 13 is a schematic view of another example of touch points provided in the present application;
fig. 14 is a schematic flowchart illustrating another touch data processing method according to an embodiment of the present disclosure;
fig. 15 is a schematic flowchart illustrating a touch data processing method according to another embodiment of the present application;
fig. 16 is a schematic diagram illustrating a positional relationship between a first preset region and a vacant region according to an embodiment of the present application;
fig. 17 is a schematic diagram illustrating an example of touch trajectory confusion caused by false activation of an anti-touch algorithm according to the embodiment of the present application;
fig. 18 is a schematic flowchart of another touch data processing method according to an embodiment of the present application;
FIG. 19 is a diagram illustrating exemplary detection points of a keyboard portion and corresponding background capacitance value data according to an embodiment of the present disclosure;
FIG. 20 is a schematic diagram of an example of keyboard portion detection points, corresponding capacitance value data and actual finger projection positions according to an embodiment of the present disclosure;
FIG. 21 is a schematic diagram of an example of keyboard portion detection points, corresponding capacitance value data, and calculated finger projection positions according to an embodiment of the present disclosure;
FIG. 22 is a schematic diagram of an exemplary keyboard segment detection point and corresponding touch data according to an embodiment of the present disclosure;
FIG. 23 is a schematic diagram of an exemplary empty area and corresponding reference detection points according to an embodiment of the present disclosure;
fig. 24 is a schematic flowchart illustrating a further touch data processing method according to an embodiment of the present application;
fig. 25 is a schematic structural diagram of an example of a touch data processing device according to an embodiment of the present disclosure;
fig. 26 is a schematic structural diagram of another example of a touch data processing device according to an embodiment of the present disclosure;
fig. 27 is a schematic structural diagram of an example of a master device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
In the following, the terms "first", "second" and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", "third" may explicitly or implicitly include one or more of the features.
Fig. 1 is a schematic structural diagram of an electronic device to which an example touch data processing method is applied according to an embodiment of the present disclosure. As shown in fig. 1, the electronic device includes a keyboard 10 and a main device 20. The electronic device may be a desktop computer including a keyboard, a notebook computer, a tablet computer (including a side-sliding full-keyboard tablet computer), and the like. The main device 20 refers to a device that realizes a main processing function of the electronic device except a keyboard, for example, the main device in a desktop computer may include a host, a display, and the like, the main device in a notebook computer may include a motherboard, a display, and the like, and the main device of a sideslip full-keyboard tablet computer may be a main body portion of the tablet computer except the sideslip full-keyboard. The present application does not make any limitation as to the type of electronic device and main device 20. The keyboard 10 is a touch keyboard. The touch keyboard is a keyboard with a touch function. Optionally, the keyboard 10 may be in communication connection with the main device 20 through a data interface or bluetooth, so as to input instructions or data to the main device 20 and implement control of a cursor or a control in a display interface of the electronic device. The touch data processing method provided by the embodiment of the application is used for processing the touch data of the keyboard 10.
In particular, the host device 20 may include a processor, a memory, and an interface, the processor being communicatively coupled to the keyboard 10. The keyboard 10 may include a touch processor, a key processor, a memory, and an interface. Optionally, the touch processor may be a touch chip, and the key processor may be a key chip. The touch processor and the key processor are communicatively coupled, and both the touch processor and the key processor are communicatively coupled to the processor of the master device 20.
The touch data processing method provided by the embodiment of the application can be applied to the keyboard 10 and also can be applied to the main device 20. Specifically, the touch data processing method provided in the embodiment of the present application may be implemented by executing a computer program by a processor of the host device 20, or may be implemented by executing a computer program by a touch processor of the keyboard 10, which is not limited in the present application. It should be noted that, when the touch data processing method provided in the embodiment of the present application is applied to the host device 20, the touch processor may send the collected touch data to the processor of the host device 20, and the processor of the host device 20 performs processing according to the method provided in the embodiment of the present application.
The structure of the keyboard 10 shown in fig. 1 will be described below. The keyboard 10 may be a mechanical keyboard, a membrane keyboard, a static capacitance keyboard, or the like. The keyboard 10 may be a keyboard of the main device 20 independent from the electronic device, or may be a keyboard component in the electronic device 20, for example, a keyboard component in a notebook computer or a side-sliding full-keyboard tablet computer. The keyboard 10 may also be a keyboard component in a holster keyboard or the like.
The keyboard 10 includes a touch circuit for realizing touch and a key circuit for realizing input of key information. The touch circuit avoids the key circuit for layout. Several examples of keyboards are provided below.
Fig. 2 is a schematic structural diagram of an example of a keyboard according to an embodiment of the present disclosure. The keyboard provided by the embodiment is a mechanical keyboard. As shown in fig. 2, the keyboard 10 includes a base 100, a keyboard circuit board 200, and an upper cover 300. Wherein, the keyboard circuit board 200 is disposed between the base 100 and the upper cover 300.
A plurality of key circuits (not shown in fig. 2) are provided on the keyboard circuit board 200. The upper cover 300 includes an upper cover substrate 301, a plurality of key caps 302, and a plurality of key switches 303. The plurality of keycaps 302 and the plurality of key switches 303 are disposed on the upper cover substrate 301 in a one-to-one correspondence, and the plurality of key switches 303 and the plurality of key circuits are disposed in a one-to-one correspondence. Specifically, the plurality of key switches 303 are respectively disposed through the upper cover substrate 301, and the key switches 303 can be pressed down. The plurality of key caps 302 are disposed on a side of the upper cover substrate 301 away from the keyboard circuit board 200, and the plurality of key caps 302 are in one-to-one correspondence mechanical connection with the plurality of key switches 303. Optionally, each key cap 302 is detachably connected to a corresponding key switch 303. The key switch 303 is also called a shaft, or a mechanical shaft. The key switch 303 functions as a switch. When a user presses a corresponding key switch 303 through a certain key cap 302, a key circuit corresponding to the key switch 303 is turned on, and input of corresponding information is realized.
It is understood that when keyboard 10 is a mechanical keyboard, keyboard Circuit Board 200 may be a Printed Circuit Board (PCB), also referred to as a PCB. Alternatively, the keyboard Circuit board 200 may be a rigid Printed Circuit board or a Flexible Printed Circuit (FPC), which is also called a Flexible Printed Circuit board.
For example, fig. 3 is a schematic structural diagram of an exemplary keyboard circuit board provided in the embodiment of the present application, and as shown in fig. 3, the keyboard circuit board 200 includes a substrate 210, a plurality of key circuits 220, a touch circuit 230, a touch chip 240, and a key chip 250. The key circuits 220, the touch circuit 230, the touch chip 240 and the key chip 250 are disposed on the substrate 210.
The substrate 210 includes a key region 211 and a touch region 212. The key region 211 and the touch region 212 are at least partially overlapped to form an overlapped region 213. In the embodiment of the present application, the sizes, specific setting positions, and the like of the touch area 212, the key area 211, and the overlapping area 213 are not limited, and may be designed according to actual use conditions.
The plurality of key circuits 220 are disposed in the key region 211. Specifically, the plurality of key circuits 220 are disposed apart from each other, that is, there is a space between two adjacent key circuits 220. At least one key circuit 220 is disposed in the overlapping area 213. The plurality of key circuits 220 are electrically connected to the key chip 250, respectively, to realize an information input function of each key. Optionally, the key chip 250 may be disposed at any position of the substrate 210, so as to facilitate routing and save space.
The touch circuit 230 is disposed in the touch area 212. At least a portion of the touch circuit 230 is located in the overlap region 213. The portion of the touch circuit 230 located in the overlapping area 213 is separated from the key circuit 220 located in the overlapping area 213, that is, the portion of the touch circuit 230 located in the overlapping area 213 has a distance from the key circuit 220 located in the overlapping area 213. In other words, at least one key circuit 220 and a part of the touch circuit 230 are disposed in the overlapping area 213, and the touch circuit 230 is disposed away from the key circuit 220. The touch circuit 230 is electrically connected to the touch chip 240 to implement a touch detection function. Optionally, the touch chip 240 may be disposed at any position of the substrate 210, so as to facilitate routing and save space.
Optionally, the touch circuit 230 may be a capacitive touch circuit. Specifically, the touch circuit 230 may be a self-capacitance touch circuit or a mutual capacitance touch circuit, that is, a sensor (sensor) in the touch circuit 230 for detecting a touch signal is a self-capacitance sensor or a mutual capacitance sensor. The sensors in the touch circuit 230 are generally arranged row by row and column by column to form a capacitor array.
When the touch circuit 230 is a self-capacitance touch circuit, the touch circuit 230 includes a plurality of self-capacitance sensors. For convenience of description, the sensor in the self-capacitance touch circuit will be referred to as a touch sensor hereinafter. The touch sensors are arranged row by row and column by column. It can be understood that the touch area includes a plurality of detection points, each touch sensor corresponds to one detection point on the keyboard, and the coordinate position of each detection point can be known in advance. The principle of the touch sensor and the touch chip 240 cooperating to realize touch input is as follows: firstly, under the condition of no touch input, the touch chip scans the touch sensor row by row and column by column respectively to obtain the background capacitance value of each detection point. And then, the touch chip continuously scans each touch sensor row by row and column by column according to a preset frequency. When a finger touches a keycap or an upper cover substrate corresponding to the touch area, the capacitance value of the detection point corresponding to the touch position changes compared with the background capacitance value, and the coordinate position of the detection point with the changed capacitance value is obtained. Then, the coordinates of the touch point of the finger may be determined according to the coordinate position of the detection point where the capacitance value changes, for example, the coordinates of the center point of the area formed by the detection point where the capacitance value changes may be determined as the coordinates of the touch point. And sending the coordinates of the touch points to a main device connected with the keyboard, and moving a cursor or a control in the display interface by the main device according to the coordinates of the touch points of each frame.
When the touch circuit 230 is a mutual capacitance touch circuit, the sensors of the touch circuit 230 include a receiving sensor and a driving sensor. The receiving sensors may be arranged in rows, the driving sensors may be arranged in columns, and a capacitance is formed between the receiving sensors and the driving sensors. It can be understood that the touch area includes a plurality of detection points, each capacitance formed between the receiving sensor and the driving sensor corresponds to one detection point on the keyboard, and the coordinate position of each detection point can be known in advance. The principle of the touch circuit 230 and the touch chip 240 cooperating to realize touch input is as follows: first, the touch chip sends a driving signal to the touch circuit 230 column by column (the touch chip is grounded when the driving signal is not sent). And then, the touch chip acquires signals of the receiving sensors line by line to obtain background capacitance values of the detection points. And then, the touch chip continuously scans the receiving sensors line by line according to a preset frequency, when a finger touches a keycap or an upper cover substrate corresponding to the touch area, the capacitance value of a detection point corresponding to the touch position changes compared with the background capacitance value, and the coordinate position of the detection point with the changed capacitance value is obtained. Next, the coordinates of the touch point of the finger may be determined according to the coordinate position of the detection point where the capacitance value changes, for example, the coordinates of the center point of the area formed by the detection point where the capacitance value changes may be determined as the coordinates of the touch point. And sending the coordinates of the touch points to a main device connected with the keyboard, and moving a cursor or a control in the display interface by the main device according to the coordinates of the touch points of each frame.
Optionally, the sensor in the touch circuit 230 may have various structures. For example, the structure may be a rectangular structure (or called a strip structure), a square structure, a diamond structure, a triangular structure, a caterpillar structure (or called a clip structure), a king-shaped structure, or the like. The specific structure of the sensor of the touch circuit 230 is not limited in this application, and can be selected according to actual situations.
The keyboard circuit board that this embodiment provided is provided with keying circuit and touch-control circuit, not only can realize the function of key input, can also realize touch-control function, and at least partial touch-control circuit and at least one keying circuit sharing coincidence region, has reduced the area that touch-control circuit occupies the base plate alone, under the unchangeable condition of keyboard size, can practice thrift more spaces and come the overall arrangement keying circuit for the key size of keyboard is great, is convenient for the user to use.
Fig. 4 is a schematic structural diagram of another example of a keyboard according to an embodiment of the present application. The keyboard provided by the embodiment of the application is a film keyboard. As shown in fig. 4, the keyboard 10 includes a base 100, a bottom key film circuit board 500, a separation film board 400, a keyboard circuit board 200, and an upper cover 300. The bottom key film circuit board 500 is disposed between the base 100 and the isolation film board 400, and the keyboard circuit board 200 is disposed between the isolation film board 400 and the upper cover 300. Meanwhile, the keypad 20 may further include a printed circuit board 800, and the printed circuit board 800 is disposed between the upper cover 300 and the base 100. The printed circuit board 800 is provided with a touch chip 240 and a key chip 250.
The keyboard circuit board 200 is provided with a plurality of key circuits each including a first key contact 223. The separation film plate 400 is provided with a plurality of separation columns 410 corresponding to the positions of the first key contacts 223 one by one. The bottom key thin film circuit board 500 is provided with second key contacts 510 corresponding to the positions of the isolation pillars 410. The upper cover 300 includes an upper cover substrate 301 and a plurality of key caps 302 disposed on the upper cover substrate 301. The plurality of key caps 302 are disposed in one-to-one correspondence with the plurality of first key contacts 223. Alternatively, the first and second key contacts 223 and 510 may be electrode contacts. The isolation column 410 is made of a deformable material. When the user does not press the key cap, the isolation column 410 is not pressed and deformed, the first key contact 223 and the second key contact 510 are isolated by the isolation column 410, and the circuit is not conducted. When a user presses a certain keycap 302, the isolating column 410 corresponding to the keycap 302 is pressed and deformed, and the first key contact 223 and the second key contact 510 corresponding to the keycap 302 are in contact conduction, so that the input of corresponding information is realized.
The keyboard circuit board provided in this embodiment has the same place as the keyboard circuit board shown in fig. 2 to 3, and also has different places, and the different places are mainly explained below, and the same places may refer to the description of the embodiment of fig. 2 to 3, and are not described again.
For example, fig. 5 is a schematic structural diagram of another keyboard circuit board provided in the embodiment of the present application, and as shown in fig. 5, the keyboard circuit board 200 includes a substrate 210, a plurality of key circuits 220, and a touch circuit 230. The substrate 210 includes a key region 211 and a touch region 212. The key region 211 and the touch region 212 are at least partially overlapped to form an overlapped region 213. The plurality of key circuits 220 are disposed apart from each other in the key region 211. At least one key circuit 220 is disposed in the overlapping area 213. The plurality of key circuits 220 are electrically connected to the key chip 250, respectively. The touch circuit 230 is disposed in the touch area 212. At least a portion of the touch circuit 230 is located in the overlapping area 213. The portion of the touch circuit 230 located in the overlapping area 213 is separated from the key circuit 220 located in the overlapping area 213.
It is understood that when the keyboard 10 is a membrane keyboard, the keyboard circuit board 200 may be a membrane circuit board, also referred to as a membrane flexible board. The material of the thin film circuit board is a thin film, and the traces cannot be arranged on the second surface (not shown in fig. 5) of the substrate 210 by forming metallized holes, so that the key circuit 220 and the touch circuit 230 are both arranged on the first surface 214 of the substrate 210. In addition, a superposed region 213 formed by superposing the key region 211 and the touch region 212 may be located in a region where a row or a column of key circuits near an edge of the key region 211 are located, so as to facilitate routing of the key circuits 220, as shown in fig. 5.
Optionally, in this embodiment, the key circuit 220 may include a first key contact 223 and a key trace 222, and the first key contact 223 is electrically connected to the key chip 250 on the printed circuit board 800 through the key trace 222. Optionally, the key circuit 220 may not include the key trace 222, the key trace 222 may be disposed on the bottom key film circuit board 500, and the second key contact 510 is electrically connected to the key chip 250 on the printed circuit board 800 through the key trace 222.
The keyboard provided by the embodiment is provided with the key circuit and the touch circuit, so that the key input function and the touch function can be realized. The principle of the keyboard provided in this embodiment for implementing touch detection is the same as that of the keyboard provided in the embodiments of fig. 2 to 3, and is not described herein again.
Fig. 6 is a schematic structural diagram of another keyboard provided in the embodiment of the present application. The keyboard provided by the embodiment of the application is a film keyboard. As shown in fig. 6, the keyboard 10 includes a base 100, a bottom key film circuit board 500, a separation film board 400, an upper key film circuit board 600, a touch film circuit board 700, and an upper cover 300. The bottom key thin film circuit board 500 is disposed between the base 100 and the isolation thin film board 400, the upper key thin film circuit board 600 is disposed between the isolation thin film board 400 and the touch thin film circuit board 700, and the touch thin film circuit board 700 is disposed between the upper key thin film circuit board 600 and the upper cover 300. Meanwhile, the keypad 30 may further include a printed circuit board 800, and the printed circuit board 800 is disposed between the upper cover 300 and the base 100. The printed circuit board 800 is provided with a touch chip 240 and a key chip 250.
The upper layer key film circuit board 600 is provided with a first key contact 223, and the isolating film board 400 is provided with a plurality of isolating columns 410 corresponding to the first key contact 223 in position. The bottom key thin film circuit board 500 is provided with second key contacts 510 corresponding to the positions of the isolation pillars 410.
The touch film circuit board 700 includes a touch area 212, and the touch area 212 is provided with a touch circuit. The structure of the touch circuit is described in the above embodiments, and is not described herein again.
The touch-sensing thin film circuit board 700 is provided with a plurality of openings 710, and the positions of the plurality of openings 710 correspond to the positions of the plurality of first key contacts 223 one to one.
The upper cover 300 includes an upper cover substrate 301 and a plurality of key caps 302 disposed on the upper cover substrate 301. The plurality of key caps 302 are disposed in one-to-one correspondence with the plurality of first key contacts 223, that is, the plurality of key caps 302 correspond to the plurality of openings 710 in one-to-one correspondence. Alternatively, each key cap 302 may include a key cap body and a pressing post, the pressing post being connected to the key cap body. The isolation pillars 410 are made of a force-variable material. When the user does not press the key cap, the isolation column 410 is not pressed and deformed, the first key contact 223 and the second key contact 510 are isolated by the isolation column 410, and the circuit is not conducted. When a user presses a certain keycap 302, the pressing column presses the isolation column 410 corresponding to the keycap 302, the isolation column 410 is pressed and deformed, and the first key contact 223 corresponding to the keycap 302 is in contact conduction with the second key contact 510, so that the input of corresponding information is realized.
Of course, the keyboard 10 may include other components, such as a pressing spring, etc., besides the above components, which is not limited in this application.
When a user touches the key cap 302 corresponding to the touch area, the touch chip 240 detects touch data through the touch circuit of the touch area 212, obtains coordinates of a touch point, and sends the coordinates to a host device connected to the keyboard.
Optionally, the size of each opening 720 is greater than or equal to the size of the pressing column of the corresponding key cap 302, so that when the key cap moves (when being pressed or rebounded), the pressing column can pass through the opening, the pressing column is prevented from extruding the touch film circuit board to cause deformation of the touch film circuit board, the influence on the touch data of the touch circuit is avoided, the touch circuit is convenient to debug, and the touch detection result is more accurate.
The keyboard provided by the embodiment can not only realize the function of key input, but also realize the touch function. The specific principle of the keyboard provided in this embodiment for implementing touch detection is the same as that of the above embodiments, and is not described herein again.
As described above, the touch circuits in the touch areas of the keyboard need to avoid the key circuits during the setting, that is, some areas in the touch areas are provided with the touch circuits, and some areas are not provided with the touch circuits. The touch control data cannot be acquired by the regional touch control chip without the touch control circuit. For convenience of description, a region in the touch region of the keyboard where the touch circuit is not disposed is referred to as a vacant region, and a region in the touch region where the touch circuit is disposed is referred to as a non-vacant region. Specifically, for the keyboards shown in the embodiments of fig. 2 to 5, the touch circuits in the overlapped area on the substrate are disposed around the key circuits in the overlapped area, and at least one vacant area is formed at the position where at least one key circuit in the overlapped area is located. For the keyboard shown in the embodiment of fig. 6, the touch film board is provided with openings to avoid the key circuits, the touch circuits on the touch film board are arranged around the openings, and vacant areas are formed at the openings.
The keyboard shown in the embodiment of fig. 2 to 5 is taken as an example for explanation. Fig. 7 to 8 are schematic application scenarios of an exemplary touch data processing method according to an embodiment of the present disclosure. When the user touches the key cap corresponding to the touch area, as shown in fig. 7, for example, the user's finger touches the key "F", and slides horizontally rightward (along the arrow direction in fig. 7) to the key "H", as shown in fig. 8.
For example, fig. 9 is a schematic diagram illustrating a positional relationship between a part of the touch circuit and a projection of the finger when the finger is located at the position shown in fig. 7 in one embodiment. Fig. 10 is a schematic diagram illustrating a positional relationship between a part of the touch circuit and a projection of the finger when the finger is located at the position shown in fig. 8 according to an embodiment. The finger projection refers to projection of a part of a finger contacting with the keycap on the substrate. In fig. 9 and 10, F denotes a vacant region formed by the touch circuit avoiding the key circuit corresponding to the key "F", G denotes a vacant region formed by the touch circuit avoiding the key circuit corresponding to the key "G", and H denotes a vacant region formed by the touch circuit avoiding the key circuit corresponding to the key "H".
As can be seen from fig. 9 and 10, in the process that the finger touches the key "F" and slides horizontally to the right to the key "H", the finger passes through the key "G", and the finger projection coincides with the vacant region G. Since the vacant region G is not provided with a touch circuit, the coordinates of the touch points cannot be detected, and therefore, discontinuity of the touch points occurs in the touch detection process. Therefore, the processing of the touch data of the keyboard according to the above embodiment is different from the processing of the touch data of a general touch display screen. If the touch data of the touch keyboard is processed according to a general method for processing touch data of the touch display screen, problems such as touch point interruption, touch track recognition error and the like are caused. The touch data processing method provided by the embodiment of the application aims to solve the problem.
In the following embodiments of the present application, a touch data processing method applied to a keyboard having a structure shown in fig. 2 to 3 is taken as an example, and the touch data processing method provided in the embodiments of the present application is specifically described with reference to the application scenarios shown in the accompanying drawings and fig. 7 to 8. Specifically, the executing main body of each step in the touch data processing method provided in the following embodiments may be a key chip or a touch chip.
For ease of understanding, the operating mode of the keyboard will first be described.
The keyboard provided by the embodiment of the application not only can realize a key input function, but also can realize a touch function, therefore, the keyboard provided by the embodiment of the application can have two working modes: a key input mode and a touch mode. Under the key input mode, the key chip is matched with the key circuit to realize the input function of each key information. Under the touch mode, the touch chip is matched with the touch circuit to realize the touch function. Specifically, in the touch mode, the touch chip acquires coordinates (or called as first touch point coordinates) of each frame of touch points according to a first preset frequency, and sends the first touch point coordinates to the processor of the host device, so that the host device controls a cursor or a control in the display interface. And/or the touch chip acquires the coordinates of the first touch point, determines a touch track according to the acquired coordinates of the first touch point, and sends the touch track to a processor of the main device, so that the main device controls a cursor or a control in the display interface.
Optionally, the control of the two operating modes of the keyboard can be divided into the following cases:
1) the keyboard only starts one of the key input mode and the touch mode at the same time, and the key input mode and the touch mode can be switched.
Specifically, the method comprises the following steps: a) under the key input mode, the key chip works, and the touch chip does not work. The key chip judges whether a preset touch mode starting condition is met, and if the preset touch mode starting condition is met, the key chip sends a touch starting signal to the touch chip. The touch chip receives the touch start signal and responds to the touch start signal to enter a touch mode. And simultaneously, the key chip stops working and exits from the key input mode. Therefore, the keyboard realizes the switching from the key input mode to the touch mode.
Optionally, the preset touch mode starting condition may be: the key chip detects that a first preset key of the keyboard is pressed for a first preset time. For example, the preset touch mode enabling conditions may be: the key "R" is pressed for more than 3 seconds. Then, when the key chip detects that the key "R" is pressed for more than 3 seconds, the key chip sends a touch start signal to the touch chip, and the keyboard is switched from the key input mode to the touch mode.
b) In the touch mode, the touch chip works and the key chip does not work. The touch control chip judges whether a preset key input mode starting condition is met, and if the preset key input mode starting condition is met, the touch control chip sends a key input starting signal to the key chip. The key chip receives the key input starting signal and responds to the key input starting signal to enter a key input mode. Meanwhile, the touch chip stops working and exits the touch mode. Therefore, the keyboard is switched from the touch mode to the key input mode.
Optionally, the preset key input mode starting condition may be: the touch control track determined by the touch control chip according to the first touch control coordinate is a track with a first preset shape. For example, the preset key input mode starting condition may be: and determining that the touch track is triangular according to the first touch coordinate. Then, when the touch track determined by the touch chip according to the first touch coordinate is triangular, the touch chip sends a key input start signal to the key chip, and the keyboard is switched from the touch mode to the key input mode.
In the implementation mode, the keyboard is only in one working mode at a certain moment, so that the power consumption can be reduced, and the energy consumption is reduced.
2) The keyboard continuously starts the key input mode and the touch mode at the same time, and the touch chip and the key chip continuously work at the same time.
In the implementation mode, the key input mode and the touch mode are kept continuously opened, so that key information and touch can be conveniently input at any time, and the use by a user is facilitated.
3) The keyboard continuously starts the key input mode, and the touch chip continuously works. Meanwhile, the keyboard can be further provided with a touch low-power-consumption mode, and the touch low-power-consumption mode and the touch mode can be switched.
In the touch low-power mode, the touch chip continuously works, coordinates of touch points of each frame (hereinafter referred to as second touch point coordinates) are obtained according to a second preset frequency, and a touch track is determined according to the second touch point coordinates. The second preset frequency is smaller than the first preset frequency.
Specifically, the keyboard continuously starts the key input mode and the touch low-power mode at the same time, and the touch low-power mode and the touch mode can be switched with each other. Specifically, the method comprises the following steps: a) and under the touch low-power mode, the touch chip judges whether a preset touch mode starting condition is met or not based on the touch track determined according to the second touch point coordinate, and if so, the keyboard is switched from the touch low-power mode to the touch mode.
Optionally, the preset touch mode enabling condition may be: the touch track determined according to the second touch point coordinate is a track with a second preset shape, and/or the second touch point coordinate is located in a second preset area of the keyboard. For example, the preset touch mode enabling conditions may be: and the pre-touch track determined according to the coordinates of the second touch point is circular. And when the touch track determined by the touch chip according to the coordinates of the second touch point is circular, the keyboard is switched from the touch low-power-consumption mode to the touch mode. Alternatively, the preset touch mode enabling condition may be: the coordinates of the second touch point are located in an area a of the keyboard, for example, the area a may be an area where a space bar of the keyboard is located. Then, when the touch chip detects that part or all of the second touch point coordinates are located in the area a, the keyboard is switched from the touch low-power-consumption mode to the touch mode. Or, the preset touch mode starting condition may be: the pre-touch track determined according to the second touch point coordinates is circular, and the second touch point coordinates are located in a B region of the keyboard, for example, the B region may be an inverted trapezoidal region surrounded by keys "T", "G", "B", "N", "M", "<", "", "L", and "P" in the keyboard. And when the touch chip detects that the second touch point coordinate is located in the area B and the touch track determined according to the second touch point coordinate located in the area B is circular, switching the keyboard from the touch low-power-consumption mode to the touch mode.
b) Under the touch mode, the touch chip judges whether a preset touch low-power-consumption mode starting condition is met, and if the preset touch low-power-consumption mode starting condition is met, the keyboard is switched from the touch mode to the touch low-power-consumption mode.
Optionally, the preset touch low power consumption mode starting condition may be: the touch control chip does not detect the touch control data within a second continuous preset time. For example, the second preset time period may be 10 s. If the touch control chip does not detect touch control data within 10s continuously, the keyboard is switched from the touch control mode to the touch control low power consumption mode, the touch control chip acquires second touch control point coordinates of each frame according to a second preset frequency, and a touch control track is determined according to the second touch control point coordinates.
In the implementation mode, the touch low-power-consumption mode is set and is switched to the touch mode when needed, so that the power consumption of the keyboard can be reduced, and the energy consumption is reduced.
4) The keyboard keeps the key input mode continuously opened, and the touch mode is selectively opened or exited according to the requirement.
Specifically, the key chip continuously works, the key chip judges whether a preset touch mode starting condition is met, and if the preset touch mode starting condition is met, the key chip sends a touch starting signal to the touch chip. The touch chip receives the touch start signal and responds to the touch start signal to enter a touch mode. In this case, the preset touch mode enabling condition may be the same as the touch mode enabling condition in 1), and details are not repeated here.
In the touch mode, whether a preset touch mode exit condition is met or not can be judged by the touch chip or the key chip, if so, the touch chip stops working, and the keyboard exits the touch mode.
Optionally, if the touch chip determines whether the preset touch mode exit condition is met, the preset touch mode exit condition may be: and the touch control track determined by the touch control chip according to the second touch control point coordinates is a track with a third preset shape. The specific conditions may be similar to the touch mode starting conditions in 3), and are not described herein again. Optionally, the preset touch mode exit condition may also be: the touch chip does not detect touch data within a third preset duration. The specific conditions may be similar to the start conditions of the touch low power consumption mode in 3), and are not described herein again.
Optionally, if the key chip determines whether a preset touch mode exit condition is met, the preset touch mode exit condition may be: the key chip detects that a second preset key of the keyboard is pressed for a fourth preset time. Optionally, the second preset key may be any key of the keyboard.
In the implementation mode, the key input mode is kept continuously started, so that key information can be conveniently input at any time, and the touch mode is selectively started or exited according to needs, so that the power consumption of the keyboard can be reduced, and the energy consumption is reduced.
In addition, in the above control modes, the keyboard may further include a key low power consumption mode, and in the key low power consumption mode, the key chip detects the input condition of each key according to a frequency lower than that in the key input mode. Alternatively, the key input mode may be entered when any key is pressed.
It should be noted that the above are only examples of the touch mode and the key mode control, and in other embodiments that are not shown, the touch mode and the key mode may be controlled by other manners. For example, a physical switch for controlling the entering of the touch mode and the key mode is respectively set, and the entering or exiting of the touch mode and the key mode is controlled through the physical switch. The embodiment of the present application is not limited to this.
The following describes in detail a process of processing touch data by the touch chip in the touch mode. The following examples relate specifically to: the touch control chip processes the coordinates of the touch control points by adopting an anti-touch-breaking algorithm, and makes up for the touch control points missing in the touch control process, so that the touch control points are continuous, and the identified touch control track is more accurate.
Fig. 11 is a flowchart illustrating an example of a touch data processing method according to an embodiment of the present application, and as shown in fig. 11, the touch data processing method includes:
s1101, obtaining coordinates of touch points of each frame (i.e. the coordinates of the first touch point) according to a first preset frequency, where the coordinates of the touch points are used to represent a touched position in a touch area of the keyboard.
As described above, the touch chip periodically scans each row and each column of sensors in the touch area according to a first preset frequency (also referred to as a refresh rate), and obtains a frame of touch data after each scan (i.e., the scan of all the sensors is completed). And the touch chip processes each frame of touch data to obtain the coordinates of the touch point corresponding to the frame of touch data. The coordinates of each frame of touch points are used for representing the position of the finger in the current frame period. Optionally, the coordinates of the touch point may be a center position of the touched area detected in the current frame period. For example, in a certain frame period, a finger touches a keycap corresponding to a certain part of the touch area, and the touch chip detects that the part of the finger contacting the keyboard is a circle through the scanning sensor, then the center of the circle can be determined as the frame touch point through calculation, and the coordinate of the center of the circle is determined as the coordinate of the frame touch point.
For convenience of description, the key cap corresponding to the touch area is simply referred to as a touch area key cap below.
S1102, whether the touch point is interrupted or not is judged, and whether the interruption duration does not exceed (i.e., is less than or equal to) the preset waiting duration or not is judged.
The interruption of the touch point refers to that in the process of acquiring the coordinates of the touch point according to the first preset frequency, if the coordinates of the touch point are not acquired in a certain frame or a certain number of frames, the touch point which does not acquire the coordinates is called an interrupted touch point. For example, according to a first preset frequency, when the touch point is not interrupted, the touch chip should acquire coordinates of the touch point at time a, time a + T, time a +2T, time a +3T, and time a +4T … …. If the touch chip acquires the coordinates of the touch point at the time a, the time a +3T, and the time a +4T … …, it is considered that the 2-frame touch point corresponding to the time a + T and the time a +2T is interrupted, and the interruption time is 2T.
It can be understood that when a finger leaves a key cap in the touch area (i.e., the finger is lifted), or when the finger is located at a key cap corresponding to the vacant area (hereinafter referred to as the vacant area key cap) described in the above embodiment, or when special conditions such as inaccurate detection and incomplete finger contact occur in the touch process, the touch chip cannot acquire coordinates of the touch point, and the touch point is interrupted. When the finger is lifted, the interruption time of the touch point is longer. When the finger is positioned at the key cap in the vacant area or the special condition occurs, the interruption time of the touch point is short. The finger can be lifted and distinguished from other two conditions by setting the preset waiting time.
The preset waiting time can be set according to actual requirements. Optionally, the preset waiting time period may be set in combination with the first preset frequency. For example, when the first preset frequency is 120Hz, the preset waiting time period may be 160ms to 240 ms.
Optionally, the touch chip acquires coordinates of the touch points of each frame by frame according to a first preset frequency, and if the coordinates of the touch points are not acquired in a certain frame, the touch points are considered to be interrupted. In addition, the touch chip can record the coordinate acquisition time of the touch point while acquiring the coordinate of the touch point. The coordinate acquisition time refers to a time point when the coordinates of a certain frame of touch point are acquired. At the moment of acquiring the coordinates of the interrupted touch point, the touch chip calculates the time difference between the moment of acquiring the coordinates of the last frame of touch point (namely, the last frame of touch point before interruption) before the moment and the moment. If the time difference is greater than the preset waiting time, the touch control chip confirms that the interruption time exceeds the preset waiting time. If the time difference is less than or equal to the preset waiting time, the touch chip continues to acquire the coordinates of the touch point of the next frame, and repeats the process until the coordinates of the touch point are acquired again within the preset waiting time, and it is determined that the touch point is interrupted, and the interruption time does not exceed the preset waiting time.
If the touch point is interrupted and the interruption duration exceeds (i.e., is greater than) the preset waiting duration, step S1103 is executed.
If the touch point is interrupted and the interruption duration does not exceed (i.e., is less than or equal to) the preset waiting duration, steps S1104 and S1105 are executed.
And S1103, sending finger lifting information to the master device.
And if the touch point is interrupted and the interruption time length exceeds the preset waiting time length, indicating that the finger is lifted. The touch control chip sends finger lifting information to the main control equipment, namely the touch control chip reports lifting to the main control equipment. The finger lifting information is used for representing that the finger leaves the key cap of the touch area.
S1104, determining coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption.
The touch point before the interruption refers to a touch point before the moment when the touch point generates the interruption. The interrupted touch point is a touch point after the moment when the touch point is interrupted. If the touch point is interrupted and the interruption time does not exceed the preset waiting time, the situation that the key cap passes through the vacant area in the finger touch process is indicated, or special situations such as inaccurate detection, incomplete finger contact and the like occur. In this regard, in the embodiment of the present application, the touch chip determines the coordinates of the interrupted touch point according to the coordinates of the touch point before the interruption of the touch point, or the touch chip determines the coordinates of the interrupted touch point according to the coordinates of the touch point after the interruption, or the touch chip determines the coordinates of the interrupted touch point according to the coordinates of the touch point before the interruption of the touch point and the coordinates of the touch point after the interruption.
And S1105, sending the coordinates of the touch point to the master device.
And the touch chip sends the acquired coordinates of the touch point before interruption, the acquired coordinates of the touch point after interruption and the determined coordinates of the touch point of the terminal to the main equipment. And the main equipment controls a cursor or a control in the display interface according to the coordinates of the touch points of each frame. Optionally, the master device may determine a touch trajectory according to the coordinates of each frame of touch points sent by the touch chip, and control a cursor or a control of the display interface according to the touch trajectory. Of course, the touch chip may also determine a touch trajectory according to the coordinates of each frame of touch points, and then send the touch trajectory to the host device, and the host device controls a cursor or a control of the display interface according to the touch trajectory.
In this embodiment, when the touch point is interrupted and the interruption duration does not exceed the preset waiting duration, the coordinates of the interrupted touch point are determined according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption. On the one hand, when a finger passes through the key cap of the vacant area in the touch process, the coordinates of the touch points missing from the vacant area can be compensated, so that the coordinates of the touch points are continuous, the recognized touch track is not prone to error, and the integrity and accuracy of the touch function of the keyboard are guaranteed. On the other hand, when the touch points are lost due to the special conditions of inaccurate detection, incomplete finger contact and the like in the touch process, the coordinates of the touch points can be compensated in time, so that the coordinates of the touch points are continuous, the recognized touch track is further not easy to make mistakes, and the integrity and the accuracy of the touch function of the keyboard are ensured.
The specific process of determining the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption in step S1104 will be described in detail below.
It is assumed that the number of touch points before interruption is M frames (1 st frame to M th frame), the number of touch points after interruption is N frames (M +1 st frame to M + N th frame), and the number of touch points after interruption is K frames (M + N +1 th frame to M + N + K frame). Wherein M is an integer greater than or equal to 1, N is an integer greater than or equal to 1, and K is an integer greater than or equal to 1. It should be noted that, in the embodiment of the present application, the order of the related touch points is sorted according to the order of the coordinate acquisition time of the touch points. For example, interrupting the first S frame of the M frames of touch points means sorting according to the order of the coordinate acquisition time of the touch points, and acquiring the touch points with the time order from the first 1 to S.
If the touch chip acquires the coordinates of the M frames of touch points and the coordinates of the touch points are not acquired within the preset waiting frame number after the coordinates of the M frames of touch points are acquired, executing step S1103;
if the touch chip acquires the coordinates of the M frames of touch points, and after acquiring the coordinates of the M frames of touch points, the coordinates of the touch points are not acquired in N consecutive frames, and after N frames, the coordinates of the touch points are acquired again, step S1104 is executed.
And N is less than or equal to a preset waiting frame number, wherein the preset waiting frame number is the frame number corresponding to the preset waiting time length under the first preset frequency. For example, when the first preset frequency is 120Hz, the preset waiting time is 160ms to 240ms, and correspondingly, the preset waiting frame number is 20 frames to 30 frames.
Specifically, in step S1104, determining the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption, includes: and determining the coordinates of the N interrupted frames of touch points according to the coordinates of the M interrupted frames of touch points and/or the coordinates of the K interrupted frames of touch points.
Wherein, the value of K can be selected according to actual conditions. Optionally, as a possible embodiment, K ═ 1, namely: the coordinates of the N interrupted frames of touch points can be determined according to the coordinates of the M interrupted frames of touch points and/or the coordinates of the first interrupted frame of touch points. The first frame of touch points after interruption refers to the first frame of touch points in the interrupted K frames of touch points, that is, the M + N +1 th frame of touch points.
In the implementation mode, the coordinates of the M frames of touch points before interruption can represent the trend of fingers before the interruption of the touch points, and the coordinates of the first frame of touch points after interruption can represent the position of the touch points after the interruption, so that the coordinates of the N frames of touch points after interruption can be simply and quickly determined according to the coordinates of the M frames of touch points before interruption and/or the coordinates of the first frame of touch points after interruption. Compared with the method that the coordinates of the N frames of touch points after interruption are determined by adopting the coordinates of the multiple frames of touch points after interruption, the implementation mode can reduce the complexity of the anti-interruption algorithm and improve the calculation efficiency.
The specific process of determining the coordinates of the N interrupted frames of touch points according to the coordinates of the M interrupted frames of touch points before interruption and/or the coordinates of the first interrupted frames of touch points in the above step will be described below with respect to the difference of M values.
1) M is greater than 1
When M is greater than 1, "determining coordinates of the interrupted N frames of touch points according to coordinates of M frames of touch points before interruption and/or coordinates of the first frame of touch points after interruption", includes: firstly, a preset maximum estimated frame number X is obtained, wherein X is an integer greater than 1, and X can be preset according to actual conditions. Then, performing pre-estimating step a): and estimating the coordinates of the touch points frame by frame according to the coordinates of M frames of touch points before interruption to obtain the coordinates of at least one frame and at most X frames of touch points.
In the estimation step, the specific frame number of the estimated touch point coordinates is determined according to the relation between the X value and the N value:
if X is larger than or equal to N, estimating the coordinates of N frames of touch points according to the coordinates of M frames of touch points before interruption, and obtaining the coordinates of N frames of touch points after interruption. That is to say, if the preset maximum estimated frame number X is greater than or equal to the frame number N of the interrupted touch point, the interrupted N-frame touch point can be obtained through the estimation step a) according to the coordinates of the M-frame touch point before interruption.
For example, fig. 12 is a schematic diagram of an example of a touch point provided in the embodiment of the present application. The embodiment takes as an example that the method is applied to compensate the coordinates of the touch points missing from the vacant area of the keyboard. In this embodiment, M is equal to 4, N is equal to 2, and X is equal to 2. In fig. 12, a1, a2, A3, and a4 denote touch points before interruption, B denotes a touch point of the first frame after interruption, and C1 and C2 denote touch points of interruption. And estimating the coordinates of the interrupted 2-frame touch points C1 and C2 according to the coordinates of the 4-frame touch points A1, A2, A3 and A4 before interruption, thereby realizing the compensation of the interrupted 2-frame touch points in the empty area. And determining a touch track according to the coordinates of the 4-frame touch points a1, a2, A3 and a4 before the interruption, the coordinates of the 2-frame touch points C1 and C2 after the interruption, and the coordinates of the first-frame touch point B after the interruption, as shown in fig. 12.
If X is smaller than N, estimating step A) specifically as follows: and estimating the coordinates of the first X frame of touch points (hereinafter referred to as the first X frame of touch points) in the N frames of touch points to be interrupted according to the coordinates of the M frames of touch points before interruption. In case X is smaller than N, after the step a) is estimated, the method further comprises a point-filling step B): determining the coordinates of the last N-X frame touch control points (hereinafter referred to as the last N-X frame touch control points) in the N frames of interrupted touch control points according to the coordinates of the M + X frame touch control points and the coordinates of the first frame touch control points after interruption; and the M + X frame touch point is the X frame touch point in the previous X frame touch points. That is, if X is smaller than N, the coordinates of the N interrupted frames of touch points are determined according to the coordinates of the M frames of touch points before interruption and the coordinates of the first frame of touch points after interruption.
For example, fig. 13 is a schematic view of another example of touch points provided in the embodiment of the present application. The embodiment takes as an example that the method is applied to compensate the coordinates of the touch points missing from the vacant area of the keyboard. In this embodiment, M is equal to 4, N is equal to 5, and X is equal to 2. In fig. 13, a1, a2, A3, and a4 represent touch points before interruption, B represents a first frame touch point after interruption, C1, C2 represent first 2 frame touch points among the interrupted 5 touch points, and D1, D2, and D3 represent last 3 frame touch points among the interrupted 5 frame touch points. According to the coordinates of the 4-frame touch points A1, A2, A3 and A4 before interruption, the coordinates of the first 2-frame touch points C1 and C2 in the interrupted 5-frame touch points are estimated, and according to the coordinates of the 6-th-frame touch point C2 and the coordinates of the first-frame touch point B after interruption, the coordinates of the last 3-frame touch points D1, D2 and D3 in the interrupted 5-frame touch points are determined, so that the coordinates of the interrupted 5-frame touch points in the vacant area are obtained. Further, a touch track can be determined according to the coordinates of the 4 frames of touch points a1, a2, A3 and a4 before the interruption, the coordinates of the 5 frames of touch points C1, C2, D1, D2 and D3 after the interruption, and the coordinates of the first frame of touch point B after the interruption, as shown in fig. 13.
Optionally, the estimating step a) and/or the point supplementing step B) may be executed after the first frame of touch points appears after the interruption, but not executed when the touch points appear during the interruption.
Optionally, the estimation step a may be executed after the touch point is interrupted, and if the touch point coordinates are obtained again in the execution process of the estimation step (i.e. the touch point of the first frame after interruption is obtained), the estimation is stopped. And if the first frame of touch points after the interruption is not obtained after the estimation step is finished, executing a point supplementing step B) after the first frame of touch points are obtained. That is, a part of the interrupted touch points can be estimated in the process of waiting for the first frame of touch points after interruption, and the occurrence of the first frame of touch points after interruption can be estimated while waiting. The calculation speed of the anti-broken touch algorithm can be increased, the coordinate acquisition time of each broken touch point determined in the way is different, and the touch track determined in the way is not smooth, so that the obtained touch track is more accurate and closer to the actual finger sliding track.
It can be understood that, in the case of waiting while estimating, if the coordinates of the touch points are not obtained again within the preset waiting time, the estimated coordinates of the touch points of the previous X frames may be processed according to the actual situation. Optionally, as a possible implementation manner, a specific area may be preset, if the estimated coordinates of the last frame of touch points in the previous X frame of touch points are located in the preset specific area, all or part of the estimated coordinates of the previous X frame of touch points are reported to the master device, otherwise, the estimated coordinates of the previous X frame of touch points are discarded. The preset specific area may be, for example: a preset range outside the touch area, and/or a vacant area. For example, the following steps are carried out: for example, an area within 50mm outside the touch area may be set as the preset specific area. If the estimated coordinates of the last frame of touch points in the previous X frames of touch points are located in the area, reporting all or part (specifically, the estimated coordinates can be set according to actual conditions) of the coordinates of the previous X frames of touch points to the master device. For another example, the preset specific regions may be respective vacant regions. And if the estimated coordinates of the last frame of touch points in the previous X frames of touch points are located in any vacant area, reporting all or part of the estimated coordinates of the previous X frames of touch points to the main equipment.
The following explains a specific procedure of the estimation step a).
For example, fig. 14 is a schematic flowchart of another touch data processing method provided in the embodiment of the present application. In this embodiment, taking X smaller than N as an example, an execution process of the estimating step a) is described, and when X is greater than or equal to N, the execution process of the estimating step a) is similar to the following process, and the difference is only that the number of estimated frames of the touch points is different, and is not described again.
As shown in fig. 14, the estimating step a) "estimating the coordinates of the touch points of the previous X frames according to the coordinates of the touch points of the M frames before the interruption", includes:
s1401, determining an abscissa estimation increment according to the abscissas of M frames of touch points before interruption; the abscissa estimated increment is used for representing the increment of the abscissa of the first frame of touch point in the X frames of touch points relative to the abscissa of the M frame of touch point in the M frames of touch points before interruption.
S1402, determining a vertical coordinate estimated increment according to the vertical coordinate of the M frames of touch points before interruption; the ordinate pre-estimated increment is used for representing the increment of the ordinate of the first frame of touch point in the previous X frames of touch points relative to the ordinate of the Mth frame of touch points.
And S1403, determining the abscissa of the first frame of touch point in the previous X frames of touch points according to the abscissa of the Mth frame of touch points and the estimated increment of the abscissa.
S1404, determining the ordinate of the first frame of touch point in the previous X frame of touch points according to the ordinate of the Mth frame of touch points and the ordinate pre-estimated increment.
S1405, judging whether the first frame touch point in the previous X frame touch points is the Xth frame touch point in the previous X frame touch points.
And if so, finishing the estimation of the previous X-frame touch point.
If not, go to step S1406.
S1406, using the M-1 frame touch point after the interruption and the first frame touch point in the X frame touch point as the M frame touch point before the interruption, and using the first frame touch point in the X frame touch point as the M frame touch point, and returning to the step S1401.
That is, firstly, the coordinates of the first frame of touch points (namely, the M +1 th frame of touch points) in the X frame of touch points before interruption are estimated according to the coordinates of the M frame of touch points before interruption; then, taking the last M-1 frame touch point (namely the 2 nd frame to the M-1 th frame touch point) and the estimated M +1 th frame touch point in the M frame touch points before interruption as the M frame touch points before interruption, and repeating the process to estimate the coordinate of the second frame touch point in the X frame touch points before interruption. By analogy, the coordinates of the touch points of the previous X frames are estimated through rolling circulation.
The estimation of points C1 and C2 in fig. 13 is taken as an example for explanation: firstly, determining the coordinates of a first frame touch point C1 in the interrupted touch points according to the coordinates of touch points A1, A2, A3 and A4 before interruption; then, the coordinates of the second frame touch point C2 of the interrupted touch points are determined according to the coordinates of the touch points a2, A3, a4 before interruption and the first frame touch point C1 of the interrupted touch points.
In the implementation mode, the rolling cycle estimation method is adopted to carry out frame-by-frame estimation on the previous X frame touch points, not only is the change trend of the coordinates of the M frame touch points before interruption considered, but also the predicted change trend of the coordinates of the touch points is considered, and the coordinates of each frame of touch points can be estimated more accurately, so that the obtained touch track is more accurate.
In the process, for the estimation of the coordinates of the first frame of touch points in the first X frame of touch points, the estimated abscissa increment and the estimated ordinate increment are respectively determined according to the abscissa and the ordinate of the M frame of touch points before interruption, and then the abscissa and the ordinate of the first frame of touch points in the first X frame of touch points are determined according to the abscissa and the ordinate of the M frame of touch points, the estimated abscissa and the estimated ordinate increment. Optionally, the abscissa and the abscissa of the mth frame of touch points may be predictedAnd determining the sum of the estimated increments as the abscissa of the M +1 th frame of touch point, and determining the sum of the ordinate of the M +1 th frame of touch point and the estimated increment of the ordinate as the ordinate of the M +1 th frame of touch point. For example, the coordinate of the touch point in the M-th frame is (X)M,YM) If the estimated abscissa increment is δ X and the estimated ordinate increment is δ y, the coordinate of the first frame of touch points in the previous X frames of touch points is (X)M+δx,YM+δy)。
The specific implementation methods of the above steps S1401 and S1402 may be various. Several possible implementations are separately described below in connection with different values of M.
Optionally, when M is equal to 2, as a possible implementation manner, S1401, determining an estimated abscissa increment according to the abscissa of the M frames of touch points before the interruption may include: and determining the difference value of the abscissa of the M-th frame (namely, the 2 nd frame) touch point in the M frames of touch points before interruption and the abscissa of the M-1 th frame (namely, the 1 st frame) touch point in the M frames of touch points before interruption as the estimated abscissa increment.
Similarly, S1402, determining the estimated vertical coordinate increment according to the vertical coordinate of the M frames of touch points before the interruption may include: and determining the difference value between the vertical coordinate of the M (2 nd) th frame of touch points in the M frames of touch points before interruption and the vertical coordinate of the M-1 (1 st) th frame of touch points before interruption as the estimated increment of the vertical coordinate.
For example, of the coordinates of the 2 frames of touch points before interruption, the coordinate of the 1 st frame of touch point is (X)1,Y1) The coordinate of the 2 nd frame touch point is (X)2,Y2) Then, the estimated increment of the abscissa is X2-X1The estimated longitudinal coordinate increment is Y2-Y1. Then, according to the above steps, the abscissa of the first frame (i.e. the 3 rd frame) touch point in the previous X frames of touch points can be estimated as X2+(X2-X1)=2X2-X1The ordinate of the 3 rd frame touch point is Y2+(Y2-Y1)=2Y2-Y1That is, the coordinate of the 3 rd frame touch point is (2 ×)2-X1,2Y2-Y1)。
Optionally, when M is greater than 2, as a possible implementation manner, S1401, determining an estimated abscissa increment according to the abscissa of the M frames of touch points before the interruption, may include: 1) determining the incremental variation of the abscissa according to the abscissa of the M frames of touch points before interruption; the abscissa increment variable quantity is used for representing the variation trend of the abscissa increment of each frame of touch points in the M frames of touch points before interruption; 2) acquiring the abscissa increment of the M frame of touch point, namely determining the increment of the abscissa of the M frame of touch point relative to the abscissa of the M-1 frame of touch point; 3) and determining the estimated abscissa increment according to the abscissa increment and the abscissa increment variation of the M-th frame of touch points.
The abscissa increment of a certain frame of touch points refers to the increment of the abscissa of the frame of touch points relative to the abscissa of the touch point in the previous frame of the frame. For example, the abscissa increment of the target frame touch point refers to an increment of the abscissa of the target frame touch point relative to the abscissa of the previous frame touch point of the target frame touch point, and the target frame touch point is any one of M frames of touch points before interruption.
Specifically, the 1) determining the abscissa increment variation according to the abscissa of the M frames of touch points before interruption can be implemented by the following processes: determining the increment of the abscissa of the M frame of touch point relative to the abscissa of the M-1 frame of touch point in the M frame of touch point before interruption to obtain the abscissa increment of the M frame of touch point; determining the increment of the abscissa of the M-1 frame of touch point relative to the abscissa of the M-2 frame of touch point in the M frame of touch point before interruption to obtain the abscissa increment of the M-1 frame of touch point; and determining the difference value obtained by subtracting the abscissa increment of the M-1 frame of touch point from the abscissa increment of the M-frame of touch point as the abscissa increment variation.
Specifically, the 3) determining the estimated abscissa increment according to the abscissa increment and the abscissa increment variation of the mth frame of touch point may be implemented through the following processes: and determining the sum of the abscissa increment and the abscissa increment variation of the M-th frame of touch points as the abscissa estimated increment.
For example, taking M as 3 as an example, let the coordinates of the 3 frames of touch points before the interruption be (X) in order1,Y1)、(X2,Y2) And (X)3,Y3). Determining the increment of the abscissa of the 3 rd frame touch point relative to the abscissa of the 2 nd frame touch point to obtain the abscissa increment of the 3 rd frame touch point as X3-X2. Determining the increment of the abscissa of the 2 nd frame touch point relative to the abscissa of the 1 st frame touch point, and obtaining the abscissa increment of the 2 nd frame touch point as X2-X1. Subtracting the abscissa increment of the 2 nd frame touch from the abscissa increment of the 3 rd frame touch point to obtain the abscissa increment variable quantity (X)3-X2)-(X2-X1)=X3-2X2+X1
Determining the increment of the abscissa of the 3 rd frame touch point relative to the abscissa of the 2 nd frame touch point to obtain the abscissa increment of the 3 rd frame touch point as X3-X2
Calculating the sum of the abscissa increment and the abscissa increment variation of the 3 rd frame touch point to obtain the estimated abscissa increment of (X)3-X2)+(X3-2X2+X1)=2X2-3X2+X1
Further, calculating the sum of the abscissa of the 3 rd frame of touch points and the estimated increment of the abscissa, and obtaining the abscissa of the first frame (namely, the 4 th frame of touch points) in the previous X frames of touch points as X3+(2X2-3X2+X1)=3X3-3X2+X1
In the process, the M frame of touch point is the closest frame of touch point to the touch point to be estimated, and the abscissa of the next frame of touch point can be accurately estimated by using the abscissa increment of the M frame of touch point. Meanwhile, the abscissa increment variation can represent the variation trend of the abscissa increment of each frame of touch points before interruption, so that the abscissa estimated increment determined according to the abscissa increment of the M-th frame of touch points and the abscissa increment variation fully considers the variation trend of the abscissa increment of each frame of touch points before interruption, the obtained abscissa estimated increment is more accurate, and the coordinates of the interrupted touch points can be estimated more accurately according to the abscissa estimated increment.
In the above, the calculation process of the abscissa increment variation, the abscissa estimated increment, and the abscissa of the M +1 th frame touch point is described by taking M ═ 3 as an example. Optionally, when M is greater than 3, as a possible implementation manner, the abscissa of the last 3 frames of touch points in the M frames of touch increments may be taken to perform the above calculation, and the abscissa increment variation is determined, so as to determine the abscissa estimated increment and the abscissa of the M +1 th frame of touch points.
Optionally, when M > 3, as another possible implementation, the abscissa increment variation may also be determined by:
firstly, determining the variation of the incremental variation of the abscissa according to the abscissa of M frames of touch points before interruption; and then determining the abscissa increment variation according to the abscissa increment variation and the abscissa increment variation of the last 3 frames of touch points in the M frames of touch points. The variation of the abscissa increment variation is used for representing the variation trend of the abscissa increment variation of each continuous 3 frames of touch points in the M frames of touch points.
Specifically, an example in which M is 4 is described: firstly, determining a first abscissa increment variable quantity according to the abscissa of the last 3 frames of touch points in the 4 frames of touch points before interruption; determining a second abscissa increment variable quantity according to the abscissa of the first 3 frames of touch points in the 4 frames of touch points before interruption; determining the variation of the incremental variation of the abscissa according to the difference obtained by subtracting the second incremental variation of the abscissa from the first incremental variation of the abscissa; the sum of the amount of change in the abscissa incremental change amount and the second abscissa incremental change amount is determined as the abscissa incremental change amount.
In the implementation mode, the variation of the abscissa increment variation is determined according to the abscissa of the M frames of touch points before interruption, then the abscissa increment variation is determined according to the abscissa increment variation of the last 3 frames of touch points in the M frames of touch points and the variation of the abscissa increment variation, and in the process of calculating the abscissa increment variation, the variation trend of the abscissa increment variation is fully considered, so that the obtained abscissa increment variation is more accurate, the abscissa pre-estimation increment and the abscissa of the M +1 th frame of touch points are more accurate, and the accuracy of touch reporting points is improved.
Step S1402, the specific process of determining the estimated longitudinal coordinate increment according to the longitudinal coordinate of the M frames of touch points before interruption is similar to step S1401, and is not described herein again.
The specific procedure of the point-adding step B) will be explained below.
For example, fig. 15 is a schematic flowchart of another touch data processing method provided in the embodiment of the present application. As shown in fig. 15, the point supplementing step B) determines coordinates of the N-X frame touch points according to the coordinates of the M + X frame touch points and the coordinates of the first frame touch points after the interruption, including:
s1501, calculating a difference value between the abscissa of the first frame of touch points after interruption and the abscissa of the M + X frame of touch points to obtain a first abscissa total difference value.
S1502, determining the abscissa of the touch point of the last N-X frame according to the first abscissa total difference, wherein the abscissa of the touch point of the M + X frame, the abscissa of the touch point of the last N-X frame and the abscissa of the touch point of the first frame after interruption are in an arithmetic progression.
S1503, calculating a difference value between the ordinate of the first frame of touch control point after interruption and the ordinate of the M + X frame of touch control point, and obtaining a total difference value of the first ordinate.
S1504, determining the vertical coordinate of the touch point of the last N-X frame according to the total difference value of the first vertical coordinate, wherein the vertical coordinate of the touch point of the M + X frame, the vertical coordinate of the touch point of the last N-X frame and the vertical coordinate of the touch point of the first frame after interruption are in an arithmetic progression.
In this embodiment, the coordinates of the touch point of the first frame after the interruption are known, and the coordinates of the touch point of the M + X th frame are estimated through the estimation step a). And determining the coordinates of the touch points of the later N-X frames according to the coordinates of the touch points of the first frame and the coordinates of the touch points of the M + X frame. The determined coordinates of each frame of touch points in the last N-X frames of touch points meet the following requirements: after the M + X frame touch control points, the last N-X frame touch control points and the first frame touch control points after interruption are sequenced according to the coordinate acquisition time sequence, the abscissa and the ordinate of each frame of touch control points respectively form an equal difference array, namely, the abscissa and the ordinate of each frame of touch control points are respectively and uniformly distributed in the abscissa direction and the ordinate direction. In other words, in the N-X +2 frames of touch points, the difference between the abscissa of two adjacent frames of touch points is equal, and the difference between the ordinate of two adjacent frames of touch points is equal.
In the implementation mode, the abscissa of the N-X frames of touch points is determined according to the first abscissa total difference value by calculating the first abscissa total difference value and the first ordinate total difference value, making the abscissa of the M + X frame touch point, the abscissa of the last N-X frame touch point and the abscissa of the first frame touch point after interruption be an arithmetic progression, determining the vertical coordinate of the touch points of the last N-X frames according to the total difference value of the first vertical coordinate, so that the vertical coordinate of the touch point of the M + X frame, the vertical coordinate of the touch point of the last N-X frame and the vertical coordinate of the touch point of the first frame after interruption are in an arithmetic progression, thereby ensuring that the determined N-X frame touch control points are uniformly distributed between the first frame touch control point and the M + X frame touch control point after interruption, the touch track simulated according to the coordinates of the touch points is more accurate and closer to the actual finger sliding track.
Optionally, as a possible implementation manner, in step S1502, determining the abscissa of the N-X frame touch point according to the first abscissa total difference value may be implemented in the following manner:
by the formula X (Sn) ═ XM+X+(XM+N+1-XM+X) And Sn/(N-X +1) calculating the abscissa of the N-X frame touch point. Wherein Sn represents the serial number of the touch points in the next N-X frame of touch points, Sn is a positive integer less than or equal to N-X, X (Sn) represents the abscissa of the Sn-th frame of touch points in the next N-X frame of touch points, and XM+XAbscissa, X, representing touch point of M + X frameM+N+1Represents the abscissa, X, of the first frame of touch points after interruptionM+N+1-XM+XRepresenting the first abscissa total difference value.
For example, if M is 4, N is 5, and X is 3, and the abscissa of the 2 nd frame touch point in the X frame after calculation, that is, Sn is 2, then:
X(Sn)=X7+(X10-X7)*2/(5-3+1)=X7+(X10-X7)*2/3。
similarly, in step S1504, determining the ordinate of the N-X frame touch point according to the first ordinate total difference value may be implemented by:
by the formula Y (Sn) ═ YM+X+(YM+N+1-YM+X) And calculating the ordinate of the N-X frame touch point after Sn/(N-X + 1). Wherein Sn represents the serial number of the touch points in the next N-X frame of touch points, Sn is a positive integer less than or equal to N-X, Y (Sn) represents the ordinate of the Sn-th frame of touch points in the next N-X frame of touch points, and YM+XRepresents the ordinate, Y, of the M + X frame touch pointM+N+1Represents the ordinate, Y, of the first frame of touch points after interruptionM+N+1-YM+XRepresenting the first ordinate total difference.
In the implementation mode, the abscissa and the ordinate of the N-X frame touch point can be determined quickly and accurately through the formula, and the operation efficiency of the anti-touch algorithm is improved.
2) M is equal to 1
And when M is equal to 1, determining the coordinates of the interrupted N frames of touch points in a point supplementing mode according to the coordinates of the M frame of touch points (namely the 1 st frame of touch points) and the coordinates of the interrupted first frame of touch points. Specifically, similar to the point supplementing step B) in the foregoing embodiment, in this embodiment, determining the coordinates of the interrupted N frames of touch points according to the coordinates of the M frames of touch points before interruption and the coordinates of the first frame of touch points after interruption includes:
calculating the difference value of the abscissa of the first frame of touch points after interruption and the abscissa of the Mth frame of touch points in the M frames of touch points to obtain a second abscissa total difference value;
determining the abscissa of the N frames of interrupted touch points according to the second abscissa total difference value, wherein the abscissa of the M frame of touch points, the abscissa of the N frames of interrupted touch points and the abscissa of the first frame of touch points after interruption are in an arithmetic progression;
calculating a difference value between the ordinate of the first frame of touch points and the ordinate of the Mth frame of touch points after interruption to obtain a second ordinate total difference value;
and determining the vertical coordinate of the N frames of interrupted touch points according to the second vertical coordinate total difference value, wherein the vertical coordinate of the M frame of touch points, the vertical coordinate of the N frames of interrupted touch points and the vertical coordinate of the first frame of touch points after interruption are in an arithmetic progression.
Alternatively, X may be calculated according to the formula X (sn) ═ XM+(XM+N+1-XM) And calculating the abscissa of the N frames of touch points by Sn/(M + 1). Wherein Sn represents the serial number of the touch points in the N frames of touch points, Sn is a positive integer less than or equal to N, X (Sn) represents the abscissa of the Sn frame touch point in the N frames of interrupted touch points, and X represents the abscissa of the Sn frame touch point in the N frames of interrupted touch pointsMAbscissa, X, representing touch point of M-th frameM+N+1Represents the abscissa, X, of the first frame of touch points after interruptionM+N+1-XMRepresenting the second abscissa total difference value.
Alternatively, Y may be given by the formula Y (sn) ═ YM+(YM+N+1-YM) And calculating the vertical coordinate of the N frames of touch points by Sn/(M + 1). Wherein Sn represents the serial number of the touch points in the N interrupted frames of touch points, Sn is a positive integer less than or equal to N, X (Sn) represents the ordinate of the Sn-th frame of touch points in the N interrupted frames of touch points, YMRepresents the ordinate, Y, of the M-th frame touch pointM+N+1Represents the ordinate, Y, of the first frame of touch points after interruptionM+N+1-YMRepresenting the second ordinate total difference.
In the implementation mode, the abscissa of the N-frame touch points is determined according to the second abscissa total difference value by calculating the second abscissa total difference value and the second ordinate total difference value, so that the abscissa of the M-th frame touch point, the abscissa of the N-frame touch point and the abscissa of the first frame touch point after interruption are in an arithmetic progression, and the ordinate of the N-frame touch point is determined according to the second ordinate total difference value, so that the ordinate of the M-th frame touch point, the ordinate of the N-th frame touch point and the ordinate of the first frame touch point after interruption are in an arithmetic progression, so that the determined interrupted N-frame touch points are uniformly distributed between the first frame touch point after interruption and the M-th frame touch point, and the touch trajectory simulated according to the touch point coordinates is more accurate and closer to the actual finger sliding trajectory.
In the above embodiments, the determining of the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption, and the determining of the coordinates of the touch point before interruption and the coordinates of the touch point after interruption are mainly included. With respect to determining the coordinates of the interrupted touch point from the coordinates of the touch point after interruption, it may be performed with reference to a reverse process of determining the coordinates of the interrupted touch point from the coordinates of the touch point before interruption. For example, coordinates of an interrupted touch point may be determined according to K frames of touch points after interruption, an abscissa difference value and an ordinate difference value of a first frame of touch points after interruption and an nth frame of touch points among N frames of touch points after interruption may be determined, and coordinates of an nth frame of touch points among N frames of touch points after interruption may be determined according to the abscissa difference value and the ordinate difference value and the abscissa and the ordinate of the first frame of touch points after interruption. For a specific process, reference may be made to the embodiment shown in fig. 14, which is not described herein again. Of course, the coordinates of the interrupted touch point may also be determined according to the coordinates of the interrupted touch point according to other possible implementation manners, which is not limited in this application.
In addition, as a possible implementation manner, for the above-mentioned anti-touch algorithm, some anti-touch start conditions may be preset, and if the touch point is interrupted and meets the preset anti-touch start conditions, the anti-touch algorithm is started, otherwise, the anti-touch algorithm is not started.
Optionally, as a possible implementation manner, if the touch point is interrupted, before performing step S1104 and determining the coordinate of the interrupted touch point according to the coordinate of the touch point before the interruption and/or the coordinate of the touch point after the interruption, the touch data method may further include:
acquiring position information of each vacant area; setting areas in a first preset range around each vacant area as first preset areas corresponding to the vacant areas according to the position information of each vacant area; judging whether the coordinates of the last frame of touch points (namely M-th frame of touch points) in the touch points before interruption are located in any first preset area; if yes, go to step S1104; if not, step S1104 is not executed.
The positions of the vacant areas are different according to different structures of the keyboard applied by the method. As described above, when the touch data method is applied to the keyboards shown in the embodiments of fig. 2 to 5, the vacant areas are the areas corresponding to the key circuits in the overlapped areas. The touch data method is applied to the keyboard shown in the embodiment of fig. 6, and the vacant areas are areas corresponding to the openings in the touch area. However, for a given configuration of keyboard, the location information of the vacant areas is known. The touch chip can acquire the position information of each vacant area, preset a first preset range, and determine a first preset area corresponding to each vacant area according to the first preset range and the position information of the vacant areas.
For example, fig. 16 is a schematic diagram illustrating a positional relationship between a first preset region and a vacant region according to an embodiment of the present application. As shown in fig. 16, when the last frame touch point a4 among the touch points before the interruption is located in the first preset area, the anti-touch algorithm is started. In this way, the last frame of touch point a4 in the touch points before interruption is located in the first preset area as the starting condition of the anti-touch algorithm, so that the false start of the anti-touch algorithm can be avoided, and the condition that the touch track is disordered due to the false start of the anti-touch algorithm under some special conditions is prevented.
For example, fig. 17 is a schematic diagram of a touch trajectory confusion caused by false activation of an example of the disconnection prevention algorithm according to the embodiment of the present application. As shown in fig. 17, it is assumed that the touch chip detects 2 frames of touch points a1 and a2, and then the touch points are interrupted. If the starting condition of the anti-touch algorithm is not set, and the anti-touch algorithm adopts the mode described in the embodiment, a part of the interrupted touch points is estimated in the process of waiting for the first frame of touch points after interruption. Then, the touch point is interrupted after a2, the touch chip starts the anti-touch algorithm, and the coordinates of the 2-frame touch points C1 and C2 are estimated according to the coordinates of the touch point a1 and the touch point a 2. However, in reality, the interruption of the touch point is due to the user's finger sliding too fast and the direction of the finger sliding changes to the right and upward, resulting in incomplete contact between the finger and the key cap of the touch area, and thus the absence of the touch points of T1 and T22 in fig. 17 occurs. Assuming that the touch chip detects the touch point B again after the 2-frame interrupt, the actual touch trajectory of the finger should be a1 → a2 → T1 → T2 → B (the actual touch trajectory shown in fig. 17). If the anti-touch-up starting condition is not set, the anti-touch-up algorithm is started up by mistake, and the touch track obtained according to the coordinates of the touch point estimated by the anti-touch-up algorithm started up by mistake is A1 → A2 → C1 → C2 → B (as shown in the touch track started up by mistake in FIG. 17). Therefore, the touch track has large-amplitude drift, and the error of the touch track is overlarge. If the anti-touch-down algorithm start condition is set, the anti-touch-down algorithm will not be started by mistake because the coordinate of the touch point a2 is not in the first preset area, and therefore the false start touch trajectory shown in fig. 17 will not occur. Therefore, the false start of the anti-touch algorithm can be avoided by adopting the starting condition of the anti-touch algorithm, the condition of disordered touch tracks caused by the false start of the anti-touch algorithm under some special conditions such as the above example is prevented, and the accuracy of touch control is improved.
In the above embodiment, the specific process of acquiring the coordinates of the touch points of each frame according to the first preset frequency in step S1101 will be described in detail below.
It can be understood that the touch area of the keyboard may be provided with a plurality of detection points according to a preset interval. Specifically, as described in the above embodiment, the touch area includes at least one vacant area and a non-vacant area. Optionally, the non-empty region includes a plurality of detection points, and each empty region also includes at least one detection point. And each capacitor formed by a sensor of the touch circuit corresponds to a detection point and is used for detecting touch data of the detection point. The touch data includes, but is not limited to, current data, voltage data, or capacitance data.
For example, fig. 18 is a flowchart illustrating a further touch data processing method provided in an embodiment of the present application, and as shown in fig. 18, the step S1101 of acquiring coordinates of touch points of each frame according to a first preset frequency includes:
s1801, acquiring touch data of a plurality of detection points in a target frame period to obtain touch data corresponding to a target frame touch point; the target frame period refers to any one of frame periods corresponding to the first preset frequency, and the target frame touch point is a touch point corresponding to the target frame period, that is, the target frame touch point is any one of the frame touch points.
S1802, determining a detection point corresponding to touch data meeting a preset touch condition in the touch data corresponding to the target frame touch point as an effective detection point;
and S1803, determining coordinates of the touch points of the target frame according to the coordinates of the effective detection points.
That is to say, for the acquisition of the coordinates of each frame of touch points, the touch data of each detection point is acquired, and the detection points meeting the preset touch condition are screened out according to the touch data of each detection point to obtain effective detection points, and then the coordinates of the frame of touch points are determined according to the coordinates of the effective detection points.
The touch circuit is taken as a capacitive touch circuit for explanation:
as described in the foregoing embodiment, no matter the self-capacitance touch circuit or the mutual-capacitance touch circuit, first, the background capacitance value of each detection point is obtained. Then, in a target frame period, the touch chip scans a sensor of the touch circuit to obtain capacitance values of all detection points, the detection points with the capacitance values changed relative to background capacitance values are determined as effective detection points, and coordinates of the target frame touch points are determined according to coordinates of the effective detection points.
Optionally, a detection point at which the variation of the capacitance value with respect to the background capacitance value is greater than a preset threshold may also be determined as an effective detection point, and the coordinate of the frame of touch point is determined according to the coordinate of the effective detection point. That is to say, the touch data is a capacitance value, and the preset touch condition is that the variation of the capacitance value compared with the background capacitance value is greater than the preset threshold value, so that the touch detection precision can be improved. As a possible implementation manner, when the background capacitance value data is about 60000, the preset threshold may be 2700-.
Because the vacant areas in the touch areas are not provided with the touch circuits, the detection points in the vacant areas have no touch data. For the capacitive touch control circuit, when the detection points are obtained, the detection points in the vacancy area have no background capacitance, and the scanning detection in each frame period also has no capacitance. In practical application, the touch data of each detection point in the vacant region may be set to a preset value to indicate that there is no touch data at the detection point, for example, the capacitance data of the detection point without touch data may be set to 0 to indicate that there is no touch data at the detection point. This will be described below as an example.
For example, fig. 19 shows an exemplary keyboard portion detection point and a corresponding background capacitance value data diagram provided in the embodiment of the present application. Specifically, fig. 19 shows background capacitance value data of the vacant region F and the surrounding detection points in fig. 9. As shown in fig. 19, each square indicates one detection point. The numbers in each square indicate the background capacitance value data for that detection point. The background capacitance value data of each detection point in the vacant region F is 0, and the background capacitance data of the non-vacant region is non-0.
It can be understood that, in the touch process, when the finger is close to the vacant region, one part of the projection of the finger is located in the non-vacant region, and the other part is located in the vacant region. Referring to fig. 9, when the finger is close to the vacant region F, the projection of the upper left side of the finger is located in the vacant region, and the projection of the rest of the finger is located in the non-vacant region. At this time, the capacitance values of the detection points and the actual positions of the finger projections obtained by the touch chip may be as shown in fig. 20. As shown in fig. 20, each square indicates one detection point. The number in each square indicates the capacitance value data scanned and acquired by the detection point in the current frame period, and the detection point corresponding to the capacitance value data with the bold font is the detection point which changes relative to the background capacitance value data. As can be seen from fig. 20, the capacitance data of the detection point at the portion overlapping with the finger projection in the touch area changes, and the capacitance data of the detection point at the portion overlapping with the finger projection in the vacant area F is still 0.
When the finger is located at the current position, the coordinates of the actual touch point should be the coordinates of point M1 in fig. 20. However, if the coordinates of the touch point are determined directly from the coordinates of the detection points whose capacitance values have changed with respect to the background capacitance, the two detection points on the right side in the vacant region F overlap with the finger projection, and the detected capacitance value is 0, so the coordinates of the determined touch point are the coordinates of point M2. The finger projection position corresponding to the M2 point is the position in fig. 21 where the finger is projected. It can be seen that the coordinates of touch point M2 in fig. 21 are shifted from the coordinates of touch point M1 in fig. 20, and the projected position of the finger corresponding to the coordinates of the touch point in fig. 21 is shifted from the actual position projected by the finger in fig. 20. Therefore, if the coordinates of the touch points are determined according to the touch detection method in the conventional technology, the coordinate drift of the touch points can be caused, and the coordinates of the touch points are inaccurate, that is, the touch points are inaccurate, so that the touch track formed according to the coordinates of the touch points is inaccurate.
In view of the above, an embodiment of the present application further provides a touch data compensation algorithm, which compensates touch data of detection points in an empty area, so that the obtained coordinates of the touch points are more accurate, and further, the identified touch trajectory is more accurate. The following embodiments take compensation of touch data corresponding to a target frame touch point as an example, and describe a touch data compensation algorithm in detail.
In an embodiment, in the step S1801, "obtaining touch data of a plurality of detection points to obtain touch detection data corresponding to a target frame touch point", includes:
acquiring touch data of each detection point in the non-vacant area to obtain touch detection data; compensating touch data of each detection point in each vacant area according to the touch detection data to obtain touch compensation data; and determining the touch detection data and the touch compensation data as touch data corresponding to the target frame touch point.
Specifically, in the target frame period, the touch chip detects touch data corresponding to each detection point through a touch circuit in the non-empty area, and the detected touch data of each detection point is collectively referred to as touch detection data. The touch control chip compensates the touch control data of all the detection points in each non-vacant area according to the touch control detection data, and the touch control data of each detection point obtained by compensation is collectively called touch control compensation data.
The touch data is taken as a capacitance value for explanation. For example, fig. 22 is a schematic diagram of an example of keyboard portion detection points and corresponding touch data (capacitance value data) provided in the embodiment of the present application. Referring to fig. 21 and fig. 22, the touch data compensation algorithm provided in this embodiment is used to compensate the capacitance values of the detection points in each empty area in fig. 21, so as to obtain the result shown in fig. 22. In fig. 22, underlined data indicates capacitance values obtained by compensation.
Meanwhile, it can be understood that before touch data corresponding to each frame of touch point is compensated, the touch chip can compensate the background capacitance value of each detection point in the vacant area in the process of obtaining the background capacitance value of each detection point. Optionally, the background capacitance value of each detection point in the vacant region may be set to a fixed value according to specific parameters of a sensor of the touch circuit, the background capacitance value of each detection point in the non-vacant region may be compensated for the background capacitance value in the vacant region, and the touch compensation data determined according to the above process may be determined as the background capacitance value under the condition that the finger is not touched. In addition, in practical application, the background capacitance value of each detection point may be a fixed value, or the background capacitance value may be periodically refreshed according to a preset frequency, for example, the background capacitance value of each detection point in the non-empty area may be adjusted and refreshed according to the acquired touch detection data corresponding to each frame of touch point. In this case, the background capacitance of each detection point in the vacancy area can be adjusted and refreshed according to the touch compensation data in each refreshing process. The method and the device for supplementing the background capacitance values of the detection points in the empty area are not limited at all and can be selected according to actual requirements.
The touch control chip compares capacitance values obtained by detecting each detection point in the non-vacant area and capacitance values obtained by compensating each detection point in the vacant area with corresponding background capacitance values respectively, and if the capacitance value variation exceeds a preset threshold value, the corresponding detection point is determined as an effective detection point. As shown in fig. 22, the determined valid detection points are detection points corresponding to the capacitance value data with the font being thickened. The coordinates of the target frame touch points determined according to the valid detection points are the coordinates of the point M1, and the corresponding finger projection positions are consistent with the actual finger projection positions in fig. 20.
In this embodiment, touch data of each detection point in the non-empty area is obtained to obtain touch detection data, touch data of each detection point in the empty area is compensated according to the touch detection data to obtain touch compensation data, and then coordinates of the target frame touch point are determined according to the touch detection data and the touch compensation data. According to the method provided by the embodiment, the touch data of each detection point in the vacant area is compensated according to the touch detection data, so that each detection point in the touch area has the touch data, the coordinate of the touch detection point cannot drift, and the accuracy of touch report is improved.
In addition, it can be understood that when the finger projection is large, the vacant area is small, and the finger projection can cover the vacant area, the touch data compensation is performed through the touch data compensation algorithm, and then the touch point reporting of the frame of touch points can be completed, and the missing touch points can not occur in the vacant area, so that the touch disconnection prevention algorithm does not need to be started, the operation of a touch chip is simplified, and the touch efficiency is improved.
The following describes a specific process of the touch data compensation algorithm in detail.
In an embodiment, the "compensating the touch data of each detection point in each vacant region according to the touch detection data to obtain touch compensation data" includes:
for a first vacant area, determining detection points located in a second preset range around the first vacant area among detection points in a non-vacant area as reference detection points, wherein the first vacant area is any one vacant area in at least one vacant area;
respectively compensating touch data of each detection point in the first vacancy area according to the touch data of the reference detection point;
and determining the touch data of all the detection points in the first vacancy area as touch compensation data.
Specifically, the touch chip performs touch data compensation on vacant areas in the touch area one by one. Taking the first vacant area as an example, a certain number of detection points may be selected as reference detection points according to specific positions, sizes, and the like of the first vacant area, and touch data of each detection point in the first vacant area is estimated according to touch data of the reference detection points. And repeating the process for each vacant area, thereby obtaining the touch data of each detection point of all the vacant areas and obtaining the touch compensation data.
Optionally, the first vacant region may be used as a reference, and the detection points in the second preset range around the first vacant region are selected as reference detection points. For example, first, the transverse dimension and the longitudinal dimension of the first vacant region may be determined separately; wherein the lateral dimension and the longitudinal dimension may be represented by the number of detection points comprised in that direction. The size of the matrix formed by the reference detection points and the detection points of the first vacant area is then determined based on the larger of the lateral dimension and the longitudinal dimension. And then, determining specific reference detection points according to the coordinates and the matrix size of the detection points in the first vacant area so as to enable the reference detection points to be located in a second preset range around the first vacant area. As an optional implementation manner, the number of the reference detection points is multiple, and an area formed by the multiple reference detection points surrounds the first vacant area, so that the reference detection points are arranged around the first vacant area, the compensation result of the touch data of the detection points in the first vacant area is more accurate, and the accuracy of the touch data compensation algorithm is further improved. The following examples are given.
For example, fig. 23 is a schematic diagram of an exemplary vacant area and corresponding reference detection points provided in the embodiment of the present application. In fig. 23, detection points C33, C34, C43, and C44 are included in the vacant region F. The transverse size and the longitudinal size of the vacant area F are 2 detection points, and a matrix formed by the reference detection points and all the detection points in the vacant area is determined to be a 5 x 5 matrix. Further, detection points C11 to C15, C21 to C25, C31, C32, C35, C41, C42, C45, and C51 to C55 are determined as reference detection points, so that a region formed by the reference detection points surrounds detection points C33, C34, C43, and C44 in the vacant region F. "x" in fig. 23 denotes detection points outside the second preset range, that is, detection points that are not determined as reference detection points.
For example, fig. 24 is a schematic flowchart of another touch data processing method provided in the embodiment of the present application. As shown in fig. 24, "respectively compensating touch data of each detection point in the first vacancy area according to touch data corresponding to the reference detection point" includes:
s2401, respectively determining initial estimation data of each detection point in a first vacant area according to touch data of reference detection points and a preset initial estimation algorithm;
selecting any detection point in the first vacant area as a first detection point, and executing the following compensation steps S2402 to S2405:
s2402, judging whether an uncompensated detection point exists in the first vacant region; wherein, the uncompensated detection points are detection points in the first vacancy area except the first detection point;
if not, go to step S2403;
if yes, executing steps S2404 to S2405;
s2403, calculating touch data of the first detection point according to the touch data of the reference detection point and a preset compensation algorithm;
s2404, calculating touch data of a first detection point according to a preset compensation algorithm according to the touch data of the reference detection point and the initial estimation data of the uncompensated detection point;
s2405, taking the first detection point and the reference detection point as new reference detection points, taking the second detection point as the first detection point, and returning to execute the step S2402 until no uncompensated detection point exists in the first vacant region; and the second detection point is any one of the uncompensated detection points.
That is to say, according to the touch data of the reference detection points and the initial estimation data of each detection point in the first vacant area, the touch data of each detection point in the first vacant area is compensated and calculated one by one according to a preset compensation algorithm. For each detection point in the first null region, there are 2 types of data coexisting: and primarily estimating data and compensating the obtained touch data. In particular, the detection point comprises only preliminary estimate data before performing the compensation step. After the compensation step is performed, the detection point includes initial estimation data and touch data obtained through compensation. And taking any one detection point in the first vacancy area as a first detection point for compensation calculation, and if other detection points used in the first vacancy area are uncompensated detection points (namely, detection points which do not execute a compensation step except the first detection point), using initial estimation data to participate in calculation. And if the other detection points in the first vacancy area are used for executing compensation calculation, obtaining touch data by using the compensation calculation to participate in calculation.
The compensation calculation for the detection points C33, C34, C43, and C44 in the hollow area F in fig. 23 is explained as an example:
1) respectively determining data of detection points C33, C34, C43 and C44 according to the touch data of the reference detection points and a preset initial estimation algorithm;
2) the detection point C33 is taken as the first detection point, and the detection points C34, C43, and C44 are uncompensated detection points. Calculating touch data of a detection point C33 according to the touch data of the reference detection point and the initial estimation data of the detection points C34, C43 and C44 and a preset compensation algorithm;
3) calculating to obtain touch data of a detection point C34 according to a preset compensation algorithm according to the touch data of the reference detection point, the touch data of the detection point C33 obtained in the step 2) and the initial estimation data of the detection points C43 and C44;
4) calculating touch data of a detection point C43 according to a preset compensation algorithm according to the touch data of the reference detection point, the touch data of the detection point C33 obtained in the step 2), the touch data of the detection point C33 obtained in the step 3) and the initial estimation data of the detection point C44;
5) calculating the touch data of the detection point C44 according to a preset compensation algorithm according to the touch data of the reference detection point, the touch data of the detection point C33 obtained in the step 2), the touch data of the detection point C33 obtained in the step 3) and the touch data of the detection point C43 obtained in the step 4).
Thus, touch data of all the detection points C33, C34, C43 and C44 in the vacant region F are obtained.
In this embodiment, data preliminary estimation is performed on each detection point in the first vacant region according to the touch data of the reference detection point, so as to obtain preliminary estimation data. In the compensation calculation process, the touch data of the first detection point is compensated based on the touch data of the reference detection point and the initial estimation data of the uncompensated detection point, so that the obtained touch data is more accurate. Meanwhile, after the compensation calculation is completed at the first detection point, the first detection point is taken as one of the reference detection points to participate in the compensation calculation of the second detection point, so that the touch data of the second touch detection point obtained through compensation is more accurate. In summary, the method provided by the embodiment improves the accuracy of touch data compensation calculation for each detection point in the first vacant area, thereby improving the accuracy of touch report.
Optionally, as a possible implementation manner, the step S2404 of calculating, according to a preset compensation algorithm, touch data of a first detection point according to touch data of a reference detection point and initial estimation data of an uncompensated detection point includes:
respectively determining first compensation coefficients corresponding to each reference detection point and each uncompensated detection point;
and calculating the touch data of the first detection point according to the touch data of each reference detection point, the initial estimation data of each uncompensated detection point and the corresponding first compensation coefficient.
Optionally, a plurality of initial compensation values may be obtained by respectively calculating touch data of each reference detection point and a product of initial estimation data of each uncompensated detection point and a corresponding first compensation coefficient; and determining touch data of the first detection point according to the sum of the plurality of initial compensation values. In the implementation mode, the corresponding first compensation coefficients are set for the reference detection points and the uncompensated detection points, the proportion or weight of data of different detection points in the calculation process is adjusted through the first compensation coefficients, different influence degrees of different detection points on touch data compensation of the first detection points are fully considered, and accuracy of touch data compensation is improved.
Optionally, the touch data of the first detection point may be obtained by calculating a sum of the plurality of initial compensation values and a preset correction value. The sum of the compensation values is further corrected through the preset correction value, and the accuracy of touch data compensation is further improved.
Alternatively, the respective first compensation coefficients may be determined based on distances between the respective detection points (i.e., the respective reference detection points and the respective uncompensated detection points) and the first detection points, respectively. For example, of the reference detection point and the uncompensated detection point, the first compensation coefficient of a detection point at a distance of 1 detection point from the first detection point is determined as X1, the first compensation coefficient of a detection point at a distance of 2 detection points from the first detection point is determined as X2, and so on. The values of X1 and X2 can be adjusted according to parameters of the touch circuit. In the implementation mode, the corresponding first compensation coefficient is determined according to the distance between the detection point and the first detection point, and different influence degrees of different detection points on touch data compensation of the first detection point are considered from the distance angle, so that the accuracy of touch data compensation is further improved.
The compensation calculation for detection point C33 in fig. 23 will be described as an example:
let the initial estimate data for detection points C34, C43, and C44 be: co34, Co43, and Co44, the touch data at each reference detection point is denoted as CXX, for example, the touch data at detection point C11 is denoted as C11.
The touch data at the detection point C33 can be calculated by the following formula:
C33=(C32+C23+Co34+Co43)*K1/N+(C22+C24+Co44+C42)*K2/N+(C31+C13+C35+C53)*K3/N+(C21+C25+C45+C41+C12+C14+C54+C52)*K4/N+(C11+C15+C55+C51)*K5/N+A
K1/N, K2/N, K3/N, K4/N and K5/N are first compensation coefficients respectively, and A is a preset correction value. Alternatively, N may be 5, and K1, K2, K3, K4, and K5 may each be a value greater than 0 and less than 1.
Optionally, a specific implementation process of step S2403, calculating the touch data of the first detection point according to the touch data of the reference detection point and the preset compensation algorithm may be similar to the specific process of step S2404, and is not described herein again.
Optionally, as a possible implementation manner, the step S2401 of determining, according to the touch data of the reference detection points and according to a preset initial estimation algorithm, initial estimation data of each detection point in the first vacant region respectively includes:
selecting detection points located in a preset direction of a target detection point and in a third preset range from reference detection points as initial estimation detection points, wherein the target detection point is any one detection point in a first vacancy area; determining initial estimation coefficients corresponding to the initial estimation detection points; and determining initial estimation data of the target detection points according to the touch data of each initial estimation detection point and the corresponding initial estimation coefficient.
The initial estimation calculation of the detection point C34 in fig. 23 is taken as an example for explanation:
for example, a reference detection point with a distance between the detection point C34 and C34 in four directions of up, down, left and right can be selected as an initial estimation detection point, that is, C14, C24, C54, C32 and C35 can be selected as an initial estimation detection point.
Alternatively, the initial estimation data of the detection point C34 may be obtained by initial estimation according to the following formula:
Co34=C14*N1/H+C24*N2/H+C54*N3/H+C32*N4/H+C32*N5/H+B
wherein, N1/H, N2/H, N3/H, N4/H and N5/H respectively represent initial estimation coefficients, and B represents a correction value. The values of N1/H, N2/H, N3/H, N4/H, N5/H and B can be adjusted according to parameters of the touch circuit and the like.
In the implementation mode, the detection points located in the preset direction of the target detection point and in the third preset range are selected from the reference detection points to serve as initial estimation detection points, initial estimation calculation is carried out on data of the target detection points according to the initial estimation detection points instead of carrying out initial estimation calculation by using all the reference detection points, so that the process of the initial estimation calculation can be simplified, the calculation amount of the initial estimation calculation is reduced, and the calculation efficiency of touch data compensation is improved. Meanwhile, the initial estimation coefficient corresponding to each initial estimation detection point is determined, the initial estimation data of the target detection point is determined according to the touch data of each initial estimation detection point and the corresponding initial estimation coefficient, different influence degrees of different detection points on the initial estimation data calculation of the target detection point are fully considered, and the accuracy of the initial estimation data calculation is improved.
Optionally, as another possible implementation manner, the step of "respectively compensating the touch data of each detection point in the first vacancy area according to the touch data corresponding to the reference detection point" may be implemented by the following processes: respectively determining initial estimation data of each detection point in the first vacant area according to a preset initial estimation algorithm according to the touch data of the reference detection point; and respectively calculating the touch data of each detection point in the first vacant area according to a preset compensation algorithm according to the initial estimation data of each detection point in the first vacant area and the touch data of the reference detection point. The preset compensation algorithm is the same as the specific execution process of step S2404 in the above embodiment, and is not described herein again.
That is to say, for any detection point in the first vacancy area, the corresponding touch data is determined according to the touch data of the reference detection points around the detection point and the initial estimation data of the detection points around the detection point in the first vacancy area. The implementation method can rapidly and accurately determine the touch data of each detection point in the first vacant area.
Optionally, as another possible implementation manner, the step of "respectively compensating the touch data of each detection point in the first vacancy area according to the touch data corresponding to the reference detection point" may also be implemented by the following process: acquiring historical touch data of each detection point in a first vacant area corresponding to a previous frame of touch point; and respectively calculating the touch data of each detection point in the first vacant area according to a preset compensation algorithm according to the historical touch data of each detection point in the first vacant area and the touch data of each reference detection point. Optionally, the historical touch data may be touch data of each detection point in the first vacant region in touch data corresponding to a previous frame of touch points of the target frame. The preset compensation algorithm is the same as the specific execution process of step S2404 in the above embodiment, and is not described herein again.
In the implementation mode, calculation is performed based on historical touch data of each detection point in the first vacant area, calculation of initial estimation data of the detection points is not needed, the calculation process is further simplified, and the calculation efficiency of the touch data compensation algorithm is improved.
The above details describe an example of the touch data processing method provided in the embodiment of the present application. It will be appreciated that the keyboard or host device, in order to carry out the above-described functions, contains corresponding hardware and/or software modules for performing the respective functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, with the embodiment described in connection with the particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the keyboard or the host device may be divided into functional modules according to the above method examples, for example, the functional modules may be divided into functional modules corresponding to the functions, such as a detection unit, a processing unit, a display unit, and the like, or two or more functions may be integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
Fig. 25 is a schematic structural diagram of a touch data processing device according to an embodiment of the present disclosure. As shown in fig. 25, the touch data processing apparatus provided in this embodiment may include:
an obtaining module 2501, configured to obtain coordinates of touch points of each frame according to a first preset frequency, where the coordinates of the touch points are used to represent a touched position in a touch area of a keyboard;
the touch interruption preventing module 2502 is configured to, when the touch point is interrupted and the interruption time does not exceed the preset waiting time, determine the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption.
In one embodiment, the coordinates of the touch point before interruption include coordinates of M frames of touch points, the coordinates of the interrupted touch point include coordinates of N frames of touch points, and the coordinates of the touch point after interruption include coordinates of a first frame of touch point after interruption, where M is an integer greater than or equal to 1, N is less than or equal to a preset waiting frame number, and the preset waiting frame number is a frame number corresponding to a preset waiting time;
the anti-trip module 2502 is specifically configured to: and determining the coordinates of the N frames of touch points according to the coordinates of the M frames of touch points and/or the coordinates of the first frame of touch points after interruption.
In one embodiment, if M is greater than 1, the anti-trip module 2502 is specifically configured to: acquiring a preset maximum estimated frame number X, wherein X is an integer greater than 1; if X is larger than or equal to N, estimating the coordinates of N frames of touch points according to the coordinates of M frames of touch points; if X is smaller than N, estimating the coordinates of the front X frame of touch points in the N frame of touch points according to the coordinates of the M frame of touch points, and determining the coordinates of the back N-X frame of touch points in the N frame of touch points according to the coordinates of the M + X frame of touch points and the coordinates of the first frame of touch points after interruption, wherein the M + X frame of touch points is the X frame of touch points in the front X frame of touch points.
In one embodiment, the anti-touch module 2502 is specifically configured to: determining an abscissa estimated increment according to the abscissas of the M frames of touch control points, wherein the abscissa estimated increment is used for representing the increment of the abscissas of the first frame of touch control points in the previous X frames of touch control points relative to the abscissas of the Mth frame of touch control points in the M frames of touch control points; determining a vertical coordinate estimated increment according to the vertical coordinate of the M frames of touch points, wherein the vertical coordinate estimated increment is used for representing the increment of the vertical coordinate of the first frame of touch point relative to the vertical coordinate of the M frame of touch point in the previous X frames of touch points; determining the abscissa of the first frame of touch points in the previous X frames of touch points according to the abscissa and the abscissa pre-estimated increment of the Mth frame of touch points; determining the ordinate of the first frame of touch points in the previous X frames of touch points according to the ordinate and the ordinate pre-estimated increment of the Mth frame of touch points; and taking the last M-1 frame of touch points in the M frames of touch points and the first frame of touch points in the front X frame of touch points as M frames of touch points, taking the first frame of touch points in the front X frame of touch points as M frames of touch points, returning to the execution step, and determining the estimated abscissa increment according to the coordinates of the M frames of touch points until the abscissa and the ordinate of the X frame of touch points in the front X frame of touch points are obtained.
In one embodiment, if M is greater than 2, the anti-touch module 2502 is specifically configured to: determining an abscissa increment variable quantity according to the abscissa of the M frames of touch points, wherein the abscissa increment variable quantity is used for representing the change trend of the abscissa increment of each frame of touch point in the M frames of touch points, and the abscissa increment refers to the increment of the abscissa of a certain frame of touch point relative to the abscissa of the previous frame of touch point; acquiring the abscissa increment of the touch point of the M frame; and determining the estimated abscissa increment according to the abscissa increment and the abscissa increment variation of the M-th frame of touch points.
In one embodiment, the anti-touch module 2502 is specifically configured to: determining the increment of the abscissa of the M-th frame of touch point relative to the abscissa of the M-1-th frame of touch point in the M-th frame of touch point to obtain the abscissa increment of the M-th frame of touch point; determining the increment of the abscissa of the M-1 frame of touch control point relative to the abscissa of the M-2 frame of touch control point in the M frames of touch control points to obtain the abscissa increment of the M-1 frame of touch control point; and determining the difference value obtained by subtracting the abscissa increment of the M-1 frame of touch point from the abscissa increment of the M-frame of touch point as the abscissa increment variation.
In one embodiment, the anti-touch module 2502 is specifically configured to: and determining the sum of the abscissa increment and the abscissa increment variation of the M-th frame of touch points as the abscissa estimated increment.
In one embodiment, if M is equal to 2, the anti-touch down module 2502 is further configured to: and determining the difference value between the abscissa of the M-th frame of touch points and the abscissa of the M-1-th frame of touch points in the M-th frame of touch points as the estimated abscissa increment.
In one embodiment, the anti-touch module 2502 is specifically configured to: calculating a difference value between the abscissa of the first frame of touch points after interruption and the abscissa of the M + X frame of touch points to obtain a first abscissa total difference value; determining the abscissa of the touch points of the last N-X frames according to the first abscissa total difference value, wherein the abscissa of the touch point of the M + X frame, the abscissa of the touch point of the last N-X frame and the abscissa of the touch point of the first frame after interruption are in an arithmetic progression; calculating a difference value between the ordinate of the first frame of touch points and the ordinate of the M + X frame of touch points after interruption to obtain a total difference value of the first ordinate; and determining the vertical coordinate of the last N-X frame of touch points according to the first vertical coordinate total difference, wherein the vertical coordinate of the M + X frame of touch points, the vertical coordinate of the last N-X frame of touch points and the vertical coordinate of the first frame of touch points after interruption are an arithmetic progression.
In one embodiment, the anti-touch module 2502 is specifically configured to:
according to the formula X (Sn) ═ XM+X+(XM+N+1-XM+X) Calculating the abscissa of the N-X frame of touch points after Sn/(N-X +1), wherein Sn represents the serial number of the touch points in the N-X frame of touch points after Sn, Sn is a positive integer less than or equal to N-X, X (Sn) represents the abscissa of the Sn-th frame of touch points in the N-X frame of touch points after Sn, and X (X) represents the abscissa of the Sn-th frame of touch points in the N-X frame of touch points after SnM+XAbscissa, X, representing touch point of M + X frameM+N+1Represents the abscissa, X, of the first frame of touch points after interruptionM+N+1-XM+XRepresenting the first abscissa total difference value.
In one embodiment, if M is 1, the anti-trip module 2502 is further specifically configured to: calculating a difference value between the abscissa of the first frame of touch points after interruption and the abscissa of the Mth frame of touch points in the M frames of touch points to obtain a second abscissa total difference value; determining the abscissa of the N frames of touch points according to the second abscissa total difference value, wherein the abscissa of the M frame of touch points, the abscissa of the N frames of touch points and the abscissa of the first frame of touch points after interruption are an arithmetic progression; calculating a difference value between the ordinate of the first frame of touch points and the ordinate of the Mth frame of touch points after interruption to obtain a second ordinate total difference value; and determining the vertical coordinate of the N frames of touch points according to the second total vertical coordinate difference, wherein the vertical coordinate of the M frame of touch points, the vertical coordinate of the N frames of touch points and the vertical coordinate of the first frame of touch points after interruption are an arithmetic progression.
In one embodiment, the anti-touch module 2502 is further specifically configured to:
according to the formula X (Sn) ═ XM+(XM+N+1-XM) Calculating the abscissa of the N frames of touch points by Sn/(M +1), wherein Sn represents the serial number of the touch points in the N frames of touch points, Sn is a positive integer less than or equal to N, X (Sn) represents the abscissa of the Sn-th frame of touch points in the N frames of touch points, and X (Sn) represents the abscissa of the Sn-th frame of touch points in the N frames of touch pointsMAbscissa, X, representing touch point of Mth frameM+N+1Represents the abscissa, X, of the first frame of touch points after interruptionM+N+1-XMShowing a second abscissaThe total difference.
In an embodiment, the touch area includes at least one vacant area, the vacant area refers to an area where no touch circuit is disposed in the touch area, and the touch data processing apparatus further includes an anti-false-start module 2503, configured to determine that coordinates of a last frame of touch points in the touch points before the interruption are located in any first preset area, where the first preset area is an area in a first preset range around the vacant area.
In an embodiment, the touch area includes a plurality of detection points, and the first obtaining module 2501 is specifically configured to: acquiring touch data of a plurality of detection points in a target frame period to obtain touch data corresponding to a target frame touch point; the target frame period refers to any one of frame periods corresponding to the first preset frequency; determining a detection point corresponding to touch data meeting a preset touch condition in the touch data corresponding to the target frame touch point as an effective detection point; and determining the coordinates of the target frame touch points according to the coordinates of the effective detection points.
In one embodiment, the touch area includes a non-vacant area and at least one vacant area, wherein the non-vacant area is an area in the touch area where the touch circuit is disposed, the vacant area is an area in the touch area where the touch circuit is not disposed, and both the non-vacant area and the vacant area include at least one detection point of the plurality of detection points;
the first obtaining module 2501 is specifically configured to: acquiring touch data of each detection point in the non-vacant area to obtain touch detection data; compensating touch data of each detection point in at least one vacant area according to the touch detection data to obtain touch compensation data; and determining the touch detection data and the touch compensation data as touch data corresponding to the target frame touch point.
In one embodiment, the first obtaining module 2501 is specifically configured to: for a first vacant area, determining detection points located in a second preset range around the first vacant area among detection points in a non-vacant area as reference detection points, wherein the first vacant area is any one vacant area in at least one vacant area; respectively compensating the touch data of each detection point in the first vacancy area according to the touch data of the reference detection point; and determining the touch data of all the detection points in the first vacancy area as touch compensation data.
In one embodiment, the number of the reference detection points is multiple, and the area formed by the multiple reference detection points surrounds the first vacant area.
In one embodiment, the first obtaining module 2501 is specifically configured to: respectively determining initial estimation data of each detection point in the first vacancy area according to the touch data of the reference detection point and a preset initial estimation algorithm; for the first detection point, executing a compensation step; the first detection point is any one of detection points in the first vacancy area;
the compensation step comprises: judging whether uncompensated detection points exist in the first vacant area or not; wherein, the uncompensated detection points are detection points in the first vacancy area except the first detection point; if the uncompensated detection points exist, calculating touch data of the first detection point according to a preset compensation algorithm according to touch data of the reference detection point and initial estimation data of the uncompensated detection points, taking the first detection point and the reference detection point as new reference detection points, taking the second detection point as the first detection point, and repeatedly executing the compensation step until the uncompensated detection points do not exist in the first vacant region; the second detection point is any one of the uncompensated detection points; and if the uncompensated detection points do not exist, calculating the touch data of the first detection point according to the touch data of the reference detection point and a preset compensation algorithm.
In one embodiment, the first obtaining module 2501 is specifically configured to: respectively determining first compensation coefficients corresponding to each reference detection point and each uncompensated detection point; and calculating touch data of the first detection point according to the touch data of each reference detection point, the initial estimation data of each uncompensated detection point and the first compensation coefficient corresponding to each reference detection point and each uncompensated detection point.
In one embodiment, the first obtaining module 2501 is specifically configured to: and determining first compensation coefficients corresponding to the reference detection points and the uncompensated detection points according to the distances between the reference detection points and the uncompensated detection points and the first detection points.
In one embodiment, the first obtaining module 2501 is specifically configured to: respectively calculating touch data of each reference detection point and a product of initial estimation data of each uncompensated detection point and a corresponding first compensation coefficient to obtain a plurality of initial compensation values; and determining touch data of the first detection point according to the sum of the plurality of initial compensation values.
In one embodiment, the first obtaining module 2501 is specifically configured to: and calculating the sum of the plurality of initial compensation values and the sum of the preset correction value to obtain the touch data of the first detection point.
In an embodiment, the first obtaining module 2501 is specifically configured to: selecting reference detection points located in a preset direction of a target detection point and in a third preset range from the reference detection points as initial estimation detection points, wherein the target detection point is any one detection point in a first vacancy area; determining initial estimation coefficients corresponding to the initial estimation detection points; and determining initial estimation data of the target detection points according to the touch data of each initial estimation detection point and the corresponding initial estimation coefficient.
In one embodiment, the touch data processing apparatus further includes a mode control module 2504, configured to determine that a preset touch mode enabling condition is met, and enter a touch mode.
In one embodiment, the preset touch mode enabling conditions are as follows: and detecting that a preset key of the keyboard is pressed for a preset time.
In an embodiment, the mode control module 2504 is further configured to obtain coordinates of each frame of touch points in the touch area according to a second preset frequency, so as to obtain coordinates of a second touch point; wherein the second preset frequency is less than the first preset frequency; and determining a touch track according to the coordinates of the second touch point.
In one embodiment, the preset touch mode enabling condition is that the touch trajectory is a trajectory with a preset shape, and/or the coordinates of the second touch point are located in a second preset area in the touch area.
In one embodiment, mode control module 2504 is further configured to: and if the preset touch mode exit condition is met, exiting the touch mode.
In one embodiment, the preset touch mode exit condition is: any key of the keyboard is detected to be pressed.
The touch data processing apparatus provided in this embodiment is configured to execute a process related to an anti-touch algorithm in the touch data processing method, and the technical principle and the technical effect are similar and will not be described herein again.
Fig. 26 is a schematic structural diagram of another touch data processing device according to an embodiment of the present disclosure. As shown in fig. 26, the touch data processing apparatus provided in this embodiment may include:
a second obtaining module 2601, configured to obtain touch data of each detection point in the non-empty region in a target frame period to obtain touch detection data;
the compensation module 2602 is configured to compensate the touch data of each detection point in the at least one vacant region according to the touch detection data to obtain touch compensation data;
a determining module 2603, configured to determine coordinates of the target frame touch point according to the touch detection data and the touch compensation data.
In one embodiment, the compensation module 2602 is specifically configured to: for a first vacant area, determining detection points located in a second preset range around the first vacant area among detection points in a non-vacant area as reference detection points, wherein the first vacant area is any one vacant area in at least one vacant area; respectively compensating the touch data of each detection point in the first vacancy area according to the touch data of the reference detection point; and determining the touch data of all the detection points in the first vacancy area as touch compensation data.
In one embodiment, the number of the reference detection points is multiple, and the area formed by the multiple reference detection points surrounds the first vacant area.
In one embodiment, the compensation module 2602 is specifically configured to: according to the touch data of the reference detection points, respectively determining initial estimation data of each detection point in the first vacancy area according to a preset initial estimation algorithm; and respectively compensating the touch data of each detection point in the first vacancy area according to a preset compensation algorithm according to the touch data of the reference detection point and the initial estimation data of each detection point in the first vacancy area.
In one embodiment, the compensation module 2602 is specifically configured to: for the first detection point, executing a compensation step; the first detection point is any one of detection points in the first vacancy area; the compensation step comprises: judging whether an uncompensated detection point exists in the first vacant region; wherein, the uncompensated detection points are detection points in the first vacancy area except the first detection point; if the uncompensated detection points exist, calculating touch data of a first detection point according to a preset compensation algorithm according to touch data of a reference detection point and initial estimation data of the uncompensated detection points, taking the first detection point and the reference detection point as new reference detection points, taking a second detection point as the first detection point, and repeatedly executing the compensation step until the uncompensated detection points do not exist in the first vacant region; the second detection point is any one of the uncompensated detection points; and if the uncompensated detection points do not exist, calculating the touch data of the first detection point according to the touch data of the reference detection point and a preset compensation algorithm.
In one embodiment, the compensation module 2602 is specifically configured to: respectively determining first compensation coefficients corresponding to each reference detection point and each uncompensated detection point; and calculating touch data of the first detection point according to the touch data of each reference detection point, the initial estimation data of each uncompensated detection point and the first compensation coefficient corresponding to each reference detection point and each uncompensated detection point.
In one embodiment, the compensation module 2602 is specifically configured to: and determining first compensation coefficients corresponding to the reference detection points and the uncompensated detection points according to the distances between the reference detection points and the uncompensated detection points and the first detection points.
In one embodiment, the compensation module 2602 is specifically configured to: respectively calculating touch data of each reference detection point and a product of initial estimation data of each uncompensated detection point and a corresponding first compensation coefficient to obtain a plurality of initial compensation values; and determining touch data of the first detection point according to the sum of the plurality of initial compensation values.
In one embodiment, the compensation module 2602 is specifically configured to: and calculating the sum of the plurality of initial compensation values and the sum of the preset correction value to obtain the touch data of the first detection point.
In one embodiment, the compensation module 2602 is further specifically configured to: for the first detection points, respectively determining first compensation coefficients corresponding to the reference detection points and the uncompensated detection points; the first detection point is any one of detection points in the first vacancy area; the uncompensated detection points are detection points in the first vacancy area except the first detection point; and calculating touch data of the first detection point according to the touch data of each reference detection point, the initial estimation data of each uncompensated detection point and the first compensation coefficient corresponding to each reference detection point and each uncompensated detection point.
In one embodiment, the compensation module 2602 is specifically configured to: selecting reference detection points located in a preset direction of a target detection point and in a third preset range from the reference detection points as initial estimation detection points, wherein the target detection point is any one detection point in a first vacancy area; determining initial estimation coefficients corresponding to the initial estimation detection points; and determining initial estimation data of the target detection points according to the touch data of each initial estimation detection point and the corresponding initial estimation coefficient.
In one embodiment, the compensation module 2602 is further specifically configured to: acquiring historical touch data of each detection point in the first vacancy area; and respectively compensating the touch data of each detection point in the first vacancy area according to a preset compensation algorithm according to the touch data of the reference detection point and the historical touch data of each detection point in the first vacancy area.
In one embodiment, the determining module 2603 is specifically configured to: determining a detection point corresponding to the touch data meeting the preset touch condition in the touch detection data and the touch compensation data as an effective detection point; and determining the coordinates of the target frame touch points according to the coordinates of the effective detection points.
The touch data processing apparatus provided in this embodiment is configured to execute a process related to a touch data compensation algorithm in the touch data processing method, and the technical principle and the technical effect are similar and will not be described herein again.
The embodiment of the application also provides a keyboard, and the structure of the keyboard can be as shown in the embodiments of fig. 2 to 6. The keyboard includes a processor, a memory, and an interface. The processor, the memory and the interface are mutually matched, so that the keyboard executes the touch data processing method.
Fig. 27 is a schematic structural diagram of an example of a master device according to an embodiment of the present application. As shown in fig. 27, the master device includes: a processor 2701, a receiver 2702, a transmitter 2703, a memory 2704, and a bus 2705. The processor 2701 includes one or more processing cores, and the processor 2701 executes applications of various functions and information processing by running software programs and modules. The receiver 2702 and the transmitter 2703 may be implemented as one communication component, which may be a baseband chip. The memory 2704 is coupled to the processor 2701 by a bus 2705. The memory 2704 may be used to store at least one program instruction, and the processor 2701 is used to execute the at least one program instruction, so as to implement the technical solutions of the above embodiments. The implementation principle and technical effect are similar to those of the embodiments related to the method, and are not described herein again.
When the main device is started, the processor can read the software program in the memory, interpret and execute the instruction of the software program, and process the data of the software program. When data needs to be sent through the antenna, the processor carries out baseband processing on the data to be sent and then outputs baseband signals to a control circuit in the control circuit, and the control circuit carries out radio frequency processing on the baseband signals and then sends the radio frequency signals to the outside through the antenna in an electromagnetic wave mode. When data is sent to the main device, the control circuit receives radio frequency signals through the antenna, converts the radio frequency signals into baseband signals and outputs the baseband signals to the processor, and the processor converts the baseband signals into the data and processes the data.
Those skilled in the art will appreciate that fig. 27 only shows one memory and processor for ease of illustration. In an actual master device, there may be multiple processors and memories. The memory may also be referred to as a storage medium or a storage device, and the like, which is not limited in this application.
As an alternative implementation manner, the processor may include a baseband processor and a central processing unit, the baseband processor is mainly used for processing communication data, and the central processing unit is mainly used for executing a software program and processing data of the software program. Those skilled in the art will appreciate that the baseband processor and the central processing unit may be integrated into a single processor, or may be separate processors, interconnected via bus, etc. Those skilled in the art will appreciate that the host device may include multiple baseband processors to accommodate different network formats, multiple central processors to enhance its processing capabilities, and various components of the host device may be connected by various buses. The baseband processor may also be expressed as a baseband processing circuit or a baseband processing chip. The central processing unit can also be expressed as a central processing circuit or a central processing chip. The function of processing the communication protocol and the communication data may be built in the processor, or may be stored in the memory in the form of a software program, and the processor executes the software program to realize the baseband processing function. The memory may be integrated within the processor or may be separate from the processor. The memory includes a Cache, which may store frequently accessed data/instructions.
In the embodiments of the present application, the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor.
In the embodiment of the present application, the memory may be a nonvolatile memory, such as a Hard Disk Drive (HDD) or a solid-state drive (SS), and may also be a volatile memory (volatile memory), for example, a random-access memory (RAM). The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, not limited thereto.
The memory in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data. Embodiments of the present application provide methods in which the methods may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a computer network, a network appliance, a user device, or other programmable apparatus. Computer instructions may be stored in, or transmitted from, a computer-readable storage medium to another computer-readable storage medium, e.g., from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optics, Digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.), computer-readable storage media may be any available media that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, etc., available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video disks, DWD), or a semiconductor medium (e.g., SSD), etc.
The master device provided by the embodiment is used for executing the touch data processing method, so that the same effect as the effect of the implementation method can be achieved.
The embodiment of the application also provides electronic equipment which comprises the keyboard and/or the main equipment. The keyboard is in communication connection with the host device.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the processor is enabled to execute the touch data processing method according to any of the above embodiments.
The embodiment of the present application further provides a computer program product, which when running on a computer, causes the computer to execute the above related steps, so as to implement the touch data processing method in the above embodiment.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; when the device runs, the processor can execute the computer execution instructions stored in the memory, so that the chip can execute the touch data processing method in the above method embodiments.
The keyboard, the host device, the electronic device, the computer-readable storage medium, the computer program product, or the chip provided in this embodiment are all used for executing the corresponding methods provided above, and therefore, the beneficial effects achieved by the keyboard, the host device, the electronic device, the computer-readable storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding methods provided above, and are not described herein again.
Through the description of the above embodiments, those skilled in the art will understand that, for convenience and simplicity of description, only the division of the above functional modules is used as an example, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (24)

1. A touch data processing method is characterized by comprising the following steps:
acquiring coordinates of touch points of each frame according to a first preset frequency, wherein the coordinates of the touch points are used for representing the touched position in a touch area of the keyboard;
and under the condition that the touch point is interrupted and the interruption time does not exceed the preset waiting time, determining the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption.
2. The method according to claim 1, wherein the coordinates of the touch point before interruption comprise coordinates of M frames of touch points, the coordinates of the touch point after interruption comprise coordinates of N frames of touch points, and the coordinates of the touch point after interruption comprise coordinates of a first frame of touch point after interruption, wherein M is an integer greater than or equal to 1, N is an integer greater than or equal to 1, and N is less than or equal to a preset waiting frame number, which is a frame number corresponding to the preset waiting time;
determining the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption, includes:
and determining the coordinates of the N frames of touch points according to the coordinates of the M frames of touch points and/or the coordinates of the first frame of touch points after interruption.
3. The method according to claim 2, wherein if M is greater than 1, the determining coordinates of the N frames of touch points according to the coordinates of the M frames of touch points and/or the coordinates of the first frame of touch points after the interruption comprises:
acquiring a preset maximum estimated frame number X, wherein X is an integer greater than 1;
if X is larger than or equal to N, estimating the coordinates of the N frames of touch points according to the coordinates of the M frames of touch points;
if X is smaller than N, estimating the coordinates of the front X frame of touch points in the N frames of touch points according to the coordinates of the M frames of touch points, and determining the coordinates of the back N-X frame of touch points in the N frames of touch points according to the coordinates of the M + X frame of touch points and the coordinates of the first frame of touch points after interruption, wherein the M + X frame of touch points are the X frame of touch points in the front X frame of touch points.
4. The method of claim 3, wherein estimating coordinates of a first X frame of touch points of the N frames of touch points according to the coordinates of the M frames of touch points comprises:
determining an abscissa pre-estimation increment according to the abscissas of the M frames of touch points, wherein the abscissa pre-estimation increment is used for representing the increment of the abscissas of the first frame of touch points in the previous X frames of touch points relative to the abscissas of the M frames of touch points in the M frames of touch points;
determining a pre-estimated longitudinal coordinate increment according to the longitudinal coordinate of the M frames of touch points, wherein the pre-estimated longitudinal coordinate increment is used for representing the increment of the longitudinal coordinate of the first frame of touch point in the previous X frames of touch points relative to the longitudinal coordinate of the M frame of touch point;
determining the abscissa of the first frame of touch points in the previous X frame of touch points according to the abscissa of the Mth frame of touch points and the abscissa pre-estimation increment;
determining the ordinate of the first frame of touch point in the previous X frame of touch points according to the ordinate of the Mth frame of touch points and the ordinate pre-estimated increment;
and taking the last M-1 frame of touch points in the M frame of touch points and the first frame of touch points in the front X frame of touch points as the M frame of touch points, taking the first frame of touch points in the front X frame of touch points as the M frame of touch points, returning to the execution step, and determining the estimated increment of the abscissa according to the coordinates of the M frame of touch points until the abscissa and the ordinate of the X frame of touch points in the front X frame of touch points are obtained.
5. The method of claim 4, wherein if M is greater than 2, the determining an estimated abscissa increment according to the abscissas of the M frames of touch points comprises:
determining an abscissa increment variable quantity according to the abscissas of the M frames of touch points, wherein the abscissa increment variable quantity is used for representing the change trend of the abscissa increment of each frame of touch point in the M frames of touch points, and the abscissa increment refers to the increment of the abscissa of a certain frame of touch point relative to the abscissa of the previous frame of touch point;
acquiring the abscissa increment of the touch point of the M frame;
and determining the estimated abscissa increment according to the abscissa increment of the M-th frame of touch points and the abscissa increment variation.
6. The method of claim 5, wherein determining the abscissa delta change according to the abscissas of the M frames of touch points comprises:
determining the increment of the abscissa of the M-th frame of touch point relative to the abscissa of the M-1 th frame of touch point in the M-th frame of touch point to obtain the abscissa increment of the M-th frame of touch point;
determining the increment of the abscissa of the M-1 frame of touch point relative to the abscissa of the M-2 frame of touch point in the M frame of touch point to obtain the abscissa increment of the M-1 frame of touch point;
and determining the difference value obtained by subtracting the abscissa increment of the M-1 frame of touch point from the abscissa increment of the M-frame of touch point as the abscissa increment variation.
7. The method of claim 5 or 6, wherein the determining the estimated abscissa increment according to the abscissa increment and the abscissa increment variation of the M-th frame of touch points comprises:
and determining the sum of the abscissa increment of the M-th frame of touch points and the abscissa increment variation as the abscissa estimated increment.
8. The method of claim 4, wherein if M is equal to 2, the determining the estimated abscissa increment according to the abscissas of the M frames of touch points comprises:
and determining the difference value between the abscissa of the M-th frame of touch points and the abscissa of the M-1-th frame of touch points in the M-th frame of touch points as the estimated abscissa increment.
9. The method according to any one of claims 3 to 8, wherein the determining coordinates of a last N-X frame touch point of the N frame touch points according to the coordinates of the M + X frame touch point and the coordinates of the first frame touch point after the interruption comprises:
calculating the difference value between the abscissa of the touch point of the first frame after interruption and the abscissa of the touch point of the M + X frame to obtain a total difference value of the first abscissa;
determining the abscissa of the touch point of the last N-X frame according to the first abscissa total difference value, wherein the abscissa of the touch point of the M + X frame, the abscissa of the touch point of the last N-X frame and the abscissa of the touch point of the first frame after interruption are arithmetic progression;
calculating a difference value between the ordinate of the first frame of touch points after interruption and the ordinate of the M + X frame of touch points to obtain a first ordinate total difference value;
and determining the vertical coordinate of the last N-X frame of touch points according to the first total vertical coordinate difference, wherein the vertical coordinate of the M + X frame of touch points, the vertical coordinate of the last N-X frame of touch points and the vertical coordinate of the first frame of touch points after interruption are an arithmetic progression.
10. The method of claim 9, wherein determining the abscissa of the post-N-X frame touch point according to the first abscissa total difference value comprises:
according to the formula X (Sn) ═ XM+X+(XM+N+1-XM+X) Calculating the abscissa of the post N-X frame touch point by Sn/(N-X +1), wherein Sn represents the abscissa of the post N-X frame touch pointThe serial number of the touch points, Sn is a positive integer less than or equal to N-X, X (Sn) represents the abscissa of the Sn-th frame touch point in the later N-X frame touch points, and XM+XAn abscissa, X, representing the M + X frame touch pointM+N+1The abscissa, X, of the first frame of touch points after interruptionM+N+1-XM+XRepresenting the first abscissa total difference value.
11. The method according to claim 2, wherein if M is 1, the determining coordinates of the N frames of touch points according to the coordinates of the M frames of touch points and/or the coordinates of the first frame of touch points after the interruption comprises:
calculating a difference value between the abscissa of the first frame of touch control points after the interruption and the abscissa of the Mth frame of touch control points in the M frames of touch control points to obtain a second abscissa total difference value;
determining the abscissa of the N frames of touch points according to the second abscissa total difference value, wherein the abscissa of the M frame of touch points, the abscissa of the N frames of touch points and the abscissa of the first frame of touch points after interruption are an arithmetic progression;
calculating a difference value between the ordinate of the first frame of touch points and the ordinate of the Mth frame of touch points after interruption to obtain a second ordinate total difference value;
and determining the vertical coordinate of the N frames of touch points according to the second total vertical coordinate difference value, wherein the vertical coordinate of the M frame of touch points, the vertical coordinate of the N frames of touch points and the vertical coordinate of the first frame of touch points after interruption are an arithmetic progression.
12. The method of claim 11, wherein the determining the abscissa of the N frames of touch points according to the second abscissa total difference value comprises:
according to the formula X (Sn) ═ XM+(XM+N+1-XM) Calculating the abscissa of the N frames of touch points by Sn/(M +1), wherein Sn represents the serial number of the touch points in the N frames of touch points, Sn is a positive integer less than or equal to N, X (Sn) represents the abscissa of the Sn-th frame of touch points in the N frames of touch points, and X (Sn) represents the abscissa of the Sn-th frame of touch points in the N frames of touch pointsMRepresenting the Mth frame touchAbscissa of point, XM+N+1The abscissa, X, of the first frame of touch points after interruptionM+N+1-XMRepresenting the second abscissa total difference value.
13. The method according to any one of claims 1 to 12, wherein the touch area comprises at least one vacant area, the vacant area refers to an area in the touch area where no touch circuit is disposed, and before determining the coordinates of the interrupted touch point according to the coordinates of the touch point before interruption and/or the coordinates of the touch point after interruption, the method further comprises:
and determining that the coordinates of the last frame of touch points in the touch points before interruption are located in any first preset area, wherein the first preset area is an area in a first preset range around the vacant area.
14. The method according to any one of claims 1 to 13, wherein the touch area includes a plurality of detection points, and the obtaining coordinates of each frame of touch points according to a first preset frequency includes:
acquiring touch data of the plurality of detection points in a target frame period to obtain touch data corresponding to a target frame touch point; the target frame period refers to any one of frame periods corresponding to the first preset frequency;
determining a detection point corresponding to the touch data meeting a preset touch condition in the touch data corresponding to the target frame touch point as an effective detection point;
and determining the coordinates of the target frame touch points according to the coordinates of the effective detection points.
15. The method according to any one of claims 1 to 14, wherein before the obtaining the coordinates of the touch points of each frame according to the first preset frequency, the method further comprises:
and determining that a preset touch mode starting condition is met, and entering a touch mode.
16. The method according to claim 15, wherein the preset touch mode enabling conditions are: and detecting that a preset key of the keyboard is pressed for a preset time.
17. The method of claim 15, wherein the determining that the predetermined touch mode activation condition is satisfied further comprises, before entering the touch mode:
acquiring coordinates of each frame of touch points in the touch area according to a second preset frequency to obtain coordinates of second touch points; wherein the second preset frequency is less than the first preset frequency;
and determining a touch track according to the second touch point coordinates.
18. The method according to claim 17, wherein the preset touch mode enabling conditions are: the touch track is a track with a preset shape, and/or the coordinates of the second touch point are located in a second preset area in the touch area.
19. The method according to any one of claims 15 to 18, further comprising:
and if the preset touch mode exit condition is met, exiting the touch mode.
20. The method of claim 19, wherein the predetermined touch mode exit condition is: detecting that any key of the keyboard is pressed.
21. A keyboard, comprising: a processor, a memory, and an interface;
the processor, memory and interface cooperate to cause the keyboard to perform the method of any of claims 1-20.
22. An electronic device, comprising: a processor communicatively coupled to the keyboard, a memory, and an interface that cooperate to cause the electronic device to perform the method of any of claims 1-20.
23. A chip, comprising: a processor for reading and executing a computer program stored in a memory to perform the method of any one of claims 1 to 20.
24. A computer-readable storage medium, in which a computer program is stored which, when executed by a processor, causes the processor to carry out the method according to any one of claims 1 to 20.
CN202110838379.3A 2021-07-23 2021-07-23 Touch data processing method, keyboard, equipment, chip and readable storage medium Active CN114461091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110838379.3A CN114461091B (en) 2021-07-23 2021-07-23 Touch data processing method, keyboard, equipment, chip and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110838379.3A CN114461091B (en) 2021-07-23 2021-07-23 Touch data processing method, keyboard, equipment, chip and readable storage medium

Publications (2)

Publication Number Publication Date
CN114461091A true CN114461091A (en) 2022-05-10
CN114461091B CN114461091B (en) 2022-12-16

Family

ID=81405434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110838379.3A Active CN114461091B (en) 2021-07-23 2021-07-23 Touch data processing method, keyboard, equipment, chip and readable storage medium

Country Status (1)

Country Link
CN (1) CN114461091B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425300A (en) * 2012-05-14 2013-12-04 北京汇冠新技术股份有限公司 Multipoint touch trajectory tracking method
CN105975119A (en) * 2016-04-21 2016-09-28 北京集创北方科技股份有限公司 Multi-target tracking method, and touch screen control method and system
CN106201309A (en) * 2016-06-29 2016-12-07 维沃移动通信有限公司 A kind of status bar processing method and mobile terminal
CN107608619A (en) * 2017-09-20 2018-01-19 广州视源电子科技股份有限公司 Person's handwriting curve generation method, device, equipment and storage medium for touch screen
CN108089813A (en) * 2018-01-12 2018-05-29 广东欧珀移动通信有限公司 Processing method, device, electronic equipment and the storage medium of touch screen drawing operation
CN108919997A (en) * 2018-06-29 2018-11-30 中国联合网络通信集团有限公司 Improve the method and device of capacitive touch screen identification accuracy
CN109358802A (en) * 2018-10-11 2019-02-19 科大讯飞股份有限公司 A kind of data inputting method, device, equipment and readable storage medium storing program for executing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425300A (en) * 2012-05-14 2013-12-04 北京汇冠新技术股份有限公司 Multipoint touch trajectory tracking method
CN105975119A (en) * 2016-04-21 2016-09-28 北京集创北方科技股份有限公司 Multi-target tracking method, and touch screen control method and system
CN106201309A (en) * 2016-06-29 2016-12-07 维沃移动通信有限公司 A kind of status bar processing method and mobile terminal
CN107608619A (en) * 2017-09-20 2018-01-19 广州视源电子科技股份有限公司 Person's handwriting curve generation method, device, equipment and storage medium for touch screen
CN108089813A (en) * 2018-01-12 2018-05-29 广东欧珀移动通信有限公司 Processing method, device, electronic equipment and the storage medium of touch screen drawing operation
CN108919997A (en) * 2018-06-29 2018-11-30 中国联合网络通信集团有限公司 Improve the method and device of capacitive touch screen identification accuracy
CN109358802A (en) * 2018-10-11 2019-02-19 科大讯飞股份有限公司 A kind of data inputting method, device, equipment and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN114461091B (en) 2022-12-16

Similar Documents

Publication Publication Date Title
US10095365B2 (en) Position detecting method for touchscreen panel, touchscreen panel, and electronic apparatus
US9122947B2 (en) Gesture recognition
US7659887B2 (en) Keyboard with a touchpad layer on keys
JP2010277377A (en) Touch panel system
CN104641324A (en) Gesture-initiated keyboard functions
US9405383B2 (en) Device and method for disambiguating region presses on a capacitive sensing device
EP3550419B1 (en) Mobile terminal device and method for controlling display of mobile terminal device
CN108733302B (en) Gesture triggering method
CN105528130A (en) A control method and device and an electronic apparatus
CN114461090B (en) Touch data processing method, keyboard, equipment, chip and readable storage medium
US9519360B2 (en) Palm rejection visualization for passive stylus
CN114461091B (en) Touch data processing method, keyboard, equipment, chip and readable storage medium
US20120327018A1 (en) Input method and input apparatus using input pad
US9507454B1 (en) Enhanced linearity of gestures on a touch-sensitive surface
US9134843B2 (en) System and method for distinguishing input objects
US9996215B2 (en) Input device, display control method, and integrated circuit device
US9720553B2 (en) Input device including fold over sensor substrate
US20160239139A1 (en) Baseline management with large input object detection
US9652057B2 (en) Top mount clickpad module for bi-level basin
US10466839B2 (en) Dynamic differential algorithm for side touch signals
CN107949825B (en) Location filtering for drop-and-lift events
US20170277265A1 (en) Single axis gesture recognition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant