Touch sampling method and device in charging state, electronic equipment and storage medium

By monitoring charging information on the terminal and dynamically adjusting the filter coefficient, the problem of inaccurate touch sampling in the charging state is solved, and more stable reporting points and reducing picture jitter is achieved.

CN119536535APending Publication Date: 2025-02-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311103745.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Under different operating conditions, inaccurate touch sampling results in point jitter and screen jitter, especially in the charging state of capacitance data differences due to charger noise.

Method used

By acquiring the charging information of the terminal, comparing the current and previous charging information to determine the filter coefficient, and calculating it based on the filter coefficient and coordinate information to realize touch sampling.

Benefits of technology

It effectively avoids point jitter and screen jitter, and improves the accuracy of touch sampling, especially when in a charged state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536535A_ABST
    Figure CN119536535A_ABST
Patent Text Reader

Abstract

The invention discloses a touch sampling method and device in a charging state, electronic equipment and a storage medium, and the method comprises the steps: obtaining the first charging information of a terminal monitored at present, and obtaining the second charging information of the terminal monitored at the adjacent previous time; comparing the first charging information with the second charging information, and determining a current filtering coefficient of the terminal; a scanned first coordinate, a scanned second coordinate and a scanned third coordinate are obtained, the first coordinate is the coordinate of a currently scanned target touch point, the second coordinate is the coordinate of a previous scanned target touch point adjacent to the currently scanned target touch point, and the third coordinate is the coordinate of a previous scanned target touch point adjacent to the previous scanned target touch point; and according to the filter coefficient, the first coordinate, the second coordinate and the third coordinate, calculating to obtain a fourth coordinate representing a current touch sampling result of the terminal, and reporting the first coordinate, the second coordinate, the third coordinate and the fourth coordinate. And the accuracy of touch sampling is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a touch sampling method, device, electronic device and storage medium in a charging state. Background Art

[0002] With the continuous development of technology, devices with touch screens are increasingly appearing in people's lives and work, such as mobile phones and computers. Touch operations are performed on the screen of the device, and the touch screen reports the actual operation, thereby responding to the user's touch operation, improving the convenience of user use. The function of the touch screen is realized based on the principle of capacitive sensing. When the user touches the screen, the touch screen recognizes the coordinates of the object, and then calculates the capacitance difference between the current object touching the touch screen and not touching the touch screen to determine whether to report the point.

[0003] In actual use, the capacitance data of touch screen devices in different states and working conditions will be different. For example, in the charging state, the noise introduced by the charger will cause the capacitance data to be different from the capacitance data in the non-charging state. If the capacitance data in the non-charging state is still used, it will lead to inaccurate touch sampling, jitter in the sliding point reporting, and then jitter in the screen. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a touch sampling method, device, electronic device and storage medium in a charging state, so as to solve the technical problem in the related art that screen jitter is caused by inaccurate touch sampling under different working conditions.

[0005] In a first aspect, an embodiment of the present application provides a touch sampling method in a charging state, comprising:

[0006] Acquire first charging information of a terminal currently monitored, and acquire second charging information of the terminal monitored in an adjacent previous time;

[0007] Comparing the first charging information with the second charging information to determine a current filter coefficient of the terminal;

[0008] Acquire the scanned first coordinate, second coordinate and third coordinate, wherein the first coordinate is the coordinate of the target touch point currently scanned, the second coordinate is the coordinate of the target touch point scanned in a previous scan adjacent to the current scan, and the third coordinate is the coordinate of the target touch point scanned in a previous scan adjacent to the previous scan;

[0009] A fourth coordinate representing a current touch sampling result of the terminal is calculated according to the filter coefficient, the first coordinate, the second coordinate, and the third coordinate, and the first coordinate, the second coordinate, the third coordinate, and the fourth coordinate are reported.

[0010] In a second aspect, an embodiment of the present application provides a touch sampling device in a charging state, comprising:

[0011] A status monitoring module, used to obtain first charging information of a terminal currently monitored, and obtain second charging information of the terminal monitored in the previous adjacent time;

[0012] A comparison and confirmation module, used to compare the first charging information with the second charging information to determine a current filter coefficient of the terminal;

[0013] A coordinate acquisition module, used to acquire a scanned first coordinate, a second coordinate, and a third coordinate, wherein the first coordinate is the coordinate of a target touch point currently scanned, the second coordinate is the coordinate of a target touch point scanned in a previous scan adjacent to the current scan, and the third coordinate is the coordinate of a target touch point scanned in a previous scan adjacent to the previous scan;

[0014] The sampling upload module is used to calculate a fourth coordinate representing the current touch sampling result of the terminal according to the filter coefficient, the first coordinate, the second coordinate and the third coordinate, and report the first coordinate, the second coordinate, the third coordinate and the fourth coordinate.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned touch sampling methods in a charging state when executing the computer program.

[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the above-mentioned touch sampling methods in a charging state are implemented.

[0017] The embodiment of the present application provides a touch sampling method, device, electronic device and storage medium in a charging state. When a terminal in a charging state performs touch sampling, it monitors the charging state of the terminal, obtains the current first charging information of the terminal currently monitored, and obtains the second charging information monitored in the adjacent previous time. When the second charging information has a corresponding filter coefficient, the current filter coefficient of the terminal is determined according to the first charging information and the second charging information, so that the terminal adjusts the filter coefficient in time when the charging state changes, and then obtains the first coordinate currently scanned, the second coordinate scanned in the previous time, and the third coordinate scanned in the previous time, calculates according to the adjusted filter coefficient, obtains the fourth coordinate, and finally uploads all the obtained coordinates to complete the touch sampling. When the mobile terminal is in a charging state, the influence of charging on touch sampling is added to the touch sampling, and the filter coefficient is adjusted in real time according to the charging state to avoid the occurrence of point jitter and screen jitter, thereby improving the accuracy of touch sampling. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a flow chart of a touch sampling method in a charging state provided by an embodiment of the present application;

[0019] Figure 2 is a flowchart of steps for determining filter coefficients provided in an embodiment of the present application;

[0020] Figure 3 is another flowchart of the steps of determining the current filter coefficient provided in an embodiment of the present application;

[0021] Figure 4 is a schematic block diagram of a touch sampling system provided in an embodiment of the present application;

[0022] Figure 5 is a schematic block diagram of a touch sampling method in a charging state provided in an embodiment of the present application;

[0023] Figure 6 It is a structural schematic diagram of a touch sampling device in a charging state provided by an embodiment of the present application;

[0024] Figure 7 is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0025] Figure 8 This is another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0029] In the related art, the function of the touch screen is realized based on the principle of capacitive sensing. When the user touches the screen, the touch screen recognizes the coordinates of the object, and then calculates the capacitance difference between the current object touching the touch screen and not touching the touch screen. By determining whether the capacitance difference is within the preset reporting threshold, the point is reported when it is within the reporting threshold. However, since the capacitance data of the touch screen varies in different states and working conditions, the reporting of points in different states varies.

[0030] For example, in the charging state, due to the noise introduced by the charger interference, the capacitance data at this time is different from the capacitance data in the non-charging state, which in turn affects the accuracy of touch sampling, causing the sliding point reporting to jitter, and then causing the screen to jitter.

[0031] Therefore, there is an urgent need for a method that can avoid the occurrence of report point jitter and cause the screen jitter of the touch screen to improve the accuracy of touch sampling.

[0032] In order to solve the technical problems existing in the related art, the present application embodiment provides a touch sampling method in a charging state, see Figure 1 , Figure 1 1 is a flow chart of a touch sampling method in a charging state provided in an embodiment of the present application. The method includes steps 101 to 104.

[0033] Step 101: Acquire first charging information of a terminal currently monitored, and acquire second charging information of a terminal monitored in an adjacent previous time.

[0034] In one embodiment, when the terminal is in a charging state, the charging state of the terminal may be monitored to obtain first charging information currently monitored, and simultaneously obtain second charging information obtained when monitoring was performed at an immediately previous moment.

[0035] For example, when the terminal is charging, the charging power will change as the charging continues. For example, the charging power is different when fast charging is performed at a low power level and when slow charging is performed at a high power level. Another example is using chargers with different charging powers or using different charging methods. Different chargers and charging methods have different effects on the noise of the touch screen. Therefore, at this time, the filter coefficient during touch sampling is dynamically adjusted according to the actual charging status and charging information to improve the timeliness and accuracy of touch sampling and avoid screen jitter due to report point jitter.

[0036] In actual applications, when the terminal is charging, the charging status of the terminal may be monitored periodically to obtain corresponding charging information when the monitoring is completed. Specifically, a certain time interval may be set as the monitoring time interval.

[0037] Step 102: Compare the first charging information with the second charging information to determine a current filter coefficient of the terminal.

[0038] In one embodiment, after monitoring the current first charging information of the terminal and obtaining the second charging information, the first charging information and the second charging information are compared and analyzed to determine the filter coefficient for touch sampling at the current moment. Specifically, when comparing the first charging information and the second charging information, it is determined whether the charging state of the terminal has changed. If it is determined that a change has occurred, the filter coefficient needs to be adjusted in time, and if no change has occurred, the filter coefficient can be kept unchanged.

[0039] For example, when comparing the first charging information with the second charging information to determine the current filter coefficient of the terminal, reference may be made to Figure 2 , Figure 2 1 is a flow chart of the steps of determining the filter coefficients provided in an embodiment of the present application, wherein the steps include steps 201 to 203.

[0040] Step 201, comparing the first charging information with the second charging information to determine whether the charging state of the terminal has changed;

[0041] Step 202, when it is determined that the charging state of the terminal has changed, query in a preset list according to the first charging information to determine whether there is a matching filter coefficient for the first charging information, wherein the preset list records the corresponding relationship between the charging information and the filter coefficient;

[0042] Step 203: When it is determined that there is a matching filter coefficient, the filter coefficient corresponding to the first charging information is obtained.

[0043] In one embodiment, when comparing the first charging information with the second charging information, it is determined whether the two are the same, and then whether the charging state of the terminal has changed. When it is determined that the charging state has changed, the filter coefficient is determined according to the current charging state of the terminal. Specifically, the first charging information is used to query in a preset list to determine whether there is a filter coefficient that matches the first charging information. When it is determined that there is, the filter coefficient corresponding to the first charging information is directly obtained as the current filter coefficient of the terminal.

[0044] The preset list records the corresponding relationship between the charging information and the filter coefficient. Each set of charging information corresponds to a filter coefficient, and the charging information at least includes the charging power and the charging mode.

[0045] Specifically, when comparing the first charging information and the second charging information, by comparing the charging power and the charging mode at the same time, it is determined that the charging state of the terminal has not changed only when all the information is the same, and as long as there is a difference, it means that the charging state of the terminal has changed.

[0046] Exemplarily, the charging information of the terminal records the charging mode and charging power of the terminal, wherein the charging mode includes wired charging and wireless charging, and the charging power is the actual power during charging. The information recorded in the preset list may be as shown in Table 1 below.

[0047] Table 1

[0048]

[0049] It can be seen from Table 1 that different filter coefficients are set for different charging information. Therefore, when making a comparison, it is determined whether the filter coefficient needs to be adjusted by comparing the charging mode and the charging power.

[0050] When it is determined that the filter coefficient needs to be adjusted, that is, the first charging information and the second charging information are different, the filter coefficient will be queried in the preset list according to the first charging information, and a one-to-one comparison will be performed according to the charging information to find the filter coefficient corresponding to the first charging information.

[0051] Furthermore, when comparing the first charging information with the second charging information to determine whether the charging status has changed, if it is determined that the charging status has not changed, the filter coefficient can be kept unchanged, specifically including: when it is determined that the charging status of the terminal has not changed, the filter coefficient when the terminal is charged based on the second charging information is used as the current filter coefficient of the terminal.

[0052] In actual applications, in order to achieve reasonable adjustment, when it is determined that the charging state of the terminal has not changed, a corresponding judgment can also be made to determine whether to make an adjustment. For example, when it is determined that the charging state has not changed, it is determined whether the filter coefficient corresponding to the second charging information exists in the preset list. If it is determined that it exists, no further judgment is required, and if it is determined that it does not exist, further judgment is performed.

[0053] It should be noted that in actual applications, there will be a certain fluctuation in the charging power in the charging information, and when setting the filter coefficients corresponding to different charging information, they are not listed one by one. There may be a situation where the charging information has no corresponding filter coefficient. Therefore, at this time, when it is determined that the charging modes are the same, the charging powers in the first charging information and the second charging information can be analyzed to determine whether the floating values ​​of the two are less than the set values, and then when it is determined that they are less than the set values, it is determined that the charging state of the terminal has not changed. That is, each filter coefficient can correspond to a charging power range.

[0054] When it is determined that the charging status has changed and there is no filter coefficient corresponding to the second charging information in the preset list, in addition to directly using the filter coefficient when the terminal charges based on the second charging information, appropriate adjustments can also be made by calculating the difference between each charging power in the preset list and the charging power in the first charging information and the second charging information, and selecting the filter coefficient corresponding to a nearby charging power (corresponding to one charging information) as the current filter coefficient.

[0055] Further, when it is determined that the charging state of the terminal has not changed, but the filter coefficient corresponding to the first charging information is not found in the preset list, it is necessary to make an independent selection to determine the current filter coefficient of the terminal, such as, when it is determined that there is no matching filter coefficient, keep the filter coefficient of the terminal in the charging state corresponding to the second charging information unchanged. That is, when there is no filter coefficient corresponding to the first charging information in the preset list, keep the filter coefficient unchanged, that is, determine the current filter coefficient as the filter coefficient corresponding to the terminal when charging based on the second charging information.

[0056] In addition to keeping the filter coefficient unchanged, the filter coefficient can also be selected from the preset list according to the first charging information. For details, please refer to Figure 3 , Figure 3 This is another flowchart diagram of the step of determining the current filter coefficient provided in an embodiment of the present application, wherein the step includes steps 301 to 304.

[0057] Step 301, when it is determined that there is no matching filter coefficient, obtaining a charging mode and a charging power of first charging information;

[0058] Step 302, filtering the preset list according to the charging mode to obtain a first set;

[0059] Step 303, obtaining the charging power corresponding to each filter coefficient in the first set, and performing difference calculation with the charging power of the first charging information to obtain a power difference;

[0060] Step 304: Select a filter coefficient from the first set according to the power difference as the current filter coefficient of the terminal.

[0061] Exemplarily, when it is determined that there is no filter coefficient matching the first charging information, the charging mode and charging power contained in the first charging information are obtained, and the charging mode and charging power are first filtered out in a preset list based on the charging mode to obtain a first set, wherein the charging mode corresponding to the filter coefficient contained in the first set is the same as the charging mode of the first charging information, and then the charging power corresponding to each filter coefficient in the first set is calculated to differ from the charging power of the first charging information to obtain the power difference, and then a filter coefficient is selected in the first set according to the power difference as the current filter coefficient of the terminal.

[0062] In actual processing, the charging modes of the terminal are divided into two modes: wired charging and wireless charging. However, there are many charging powers, which can be exhaustively listed according to actual needs. Therefore, when processing, a screening is performed based on the charging mode, and then a secondary screening and determination is performed using the charging power.

[0063] After completing a screening according to the charging mode, a first set with the same charging mode is obtained, and then the difference in charging power with the first charging information is calculated, and when selecting according to the power difference, the filter coefficient corresponding to the smallest power difference is selected as the current filter coefficient of the terminal. That is, when determining the current filter coefficient according to the power difference, it includes: comparing the power difference with the preset difference threshold, and screening the first set according to the comparison result to obtain the second set, wherein the power difference corresponding to each filter coefficient in the second set is less than the preset difference threshold; and selecting the filter coefficient corresponding to the smallest power difference in the second set as the current filter coefficient of the terminal.

[0064] In addition, when constructing a preset list, a function method can be used to determine the correspondence between different charging powers and filter coefficients in the same charging mode, such as obtaining a function correspondence between different charging powers and filter coefficients in a wired charging mode. When it is determined that the charging state has changed, the current filter coefficient can be determined according to the function correspondence, thereby completing real-time adjustments. Of course, when determining and adjusting the filter coefficient based on this method, a power floating range can also be set. When the difference between the current charging power and the charging power monitored in the previous adjacent time is within the set floating range, the same filter coefficient can be used, that is, the filter coefficient is kept unchanged, that is, the corresponding relationship between the charging power and the filter coefficient at this time is a step-like curve relationship.

[0065] It should be noted that when the terminal is in a non-charging state, a default filter coefficient can be set for it so that the terminal uses the default filter coefficient for touch sampling when it is in a non-charging state. At the same time, when it is detected that the terminal changes from a charging state to a non-charging state, the current filter coefficient of the terminal will be adjusted to the default filter coefficient.

[0066] Step 103, obtain the scanned first coordinate, second coordinate and third coordinate, wherein the first coordinate is the coordinate of the target touch point currently scanned, the second coordinate is the coordinate of the target touch point scanned in the previous scan adjacent to the current scan, and the third coordinate is the coordinate of the target touch point scanned in the previous scan adjacent to the previous scan.

[0067] In one embodiment, when performing touch sampling, it is necessary to determine the current touch point and perform point reporting processing, so it is necessary to accurately determine the coordinates of the current touch point after the adjustment of the filter coefficient is completed. When determining the coordinates of the current touch point, the scanned first coordinate, second coordinate and third coordinate are obtained, wherein the first coordinate is the coordinate of the target touch point currently scanned, the second coordinate is the coordinate of the target touch point scanned in the previous scan adjacent to the current scan, and the third coordinate is the coordinate of the target touch point scanned in the previous scan adjacent to the previous scan, so as to determine the current coordinates according to the acquired coordinate information.

[0068] Step 104 , calculating a fourth coordinate representing the current touch sampling result of the terminal according to the filter coefficient, the first coordinate, the second coordinate and the third coordinate, and reporting the first coordinate, the second coordinate, the third coordinate and the fourth coordinate.

[0069] In one embodiment, after obtaining the relevant coordinate information obtained by scanning, the coordinates of the current point to be reported are determined according to the current filter coefficient of the terminal, combined with the first coordinate, the second coordinate and the third coordinate, and then the first coordinate, the second coordinate, the third coordinate and the fourth coordinate are reported. In fact, the first coordinate, the second coordinate and the third coordinate are the coordinates of the reported point.

[0070] Exemplarily, when calculating to obtain the fourth coordinate, a weighted average algorithm may be used for calculation. Specifically, when performing the calculation, the coordinates of the reported point are calculated as follows.

[0071]

[0072]

[0073] Among them, the coordinates (x1, y1) are the real coordinates of the current scan, the coordinates (x2, y2) are the coordinates of the last scan, the coordinates (x3, y3) are the coordinates of the last scan, the coordinates (x0, y0) are the coordinates of the current reporting point, A, B, C are the filter coefficients, and A+B+C=15. Of course, the filter coefficients can be set according to the actual situation.

[0074] When reporting points based on the above method, when A is larger, it means that the current coordinate accounts for a larger proportion, so the reporting response is faster and the jitter is more serious. When A is smaller, it means that the current coordinate accounts for a smaller proportion, so the reporting response is slower, the reporting lag is serious, and the jitter is weaker.

[0075] When adjusting the filter coefficient, it is necessary to ensure that the reporting point response is timely and the reporting point jitter is avoided, so that the touch sampling has better timeliness and accuracy without the reporting point jitter.

[0076] Further, refer to Figure 4 , Figure 4 This is a block diagram of a touch sampling system provided by an embodiment of the present application, wherein the system includes a touch screen system and a terminal system, and the touch screen system includes a memory and a processor, and the terminal system acquires data in the touch screen system through an interrupt signal triggered by an INT pin. The terminal system sets the touch screen system through a 2C SPI interface.

[0077] Based on Figure 4 When the system shown implements touch sampling in the charging state, the touch sampling process can refer to Figure 5 , Figure 5 is a schematic diagram of a block diagram of a touch sampling method in a charging state provided by an embodiment of the present application. Figure 5 In the block diagram shown, the charging information is determined based on the charger and the charging method. Different chargers have different corresponding charging powers. Figure 5 When describing, the difference in chargers indicates the difference in charging power.

[0078] Specifically, a correspondence table of different charging modes and charging powers and the filter coefficients of the touch screen is preset in the terminal system, where the correspondence table can be as shown in Table 1 above, and then the charging status is detected through a monitoring service, such as using an interrupt polling scheme to monitor the charging status. When it is detected that the current charger type is different from the previous one, it is determined whether the currently updated charger has a preset touch screen filter coefficient threshold. If so, the touch screen module is notified to adjust the filter coefficient. If not, no notification is made, that is, no adjustment is made. Then, the touch screen driver of the terminal system sets corresponding instructions to the touch screen system according to the received notification.

[0079] Finally, the touch screen system adjusts the filter coefficient according to the notification sent by the terminal system. For example, when receiving the first threshold command of the terminal system to enlarge, it switches to the first threshold system (corresponding to a filter coefficient), or according to the second or third / fourth threshold command sent by the terminal system, it switches to the second or third / fourth threshold system, where the number of filter coefficients corresponds to the number of threshold systems. After the system switching is completed, the reporting point processing is completed according to the filter coefficient of the switched system, and the charging status of the terminal will still be monitored.

[0080] In summary, the present application discloses a touch sampling method in a charging state. When a terminal in a charging state performs touch sampling, the charging state of the terminal is monitored and processed to obtain the current first charging information of the terminal currently monitored, and the second charging information monitored in the adjacent previous time is obtained. When there are corresponding filter coefficients in the second charging information, the current filter coefficient of the terminal is determined according to the first charging information and the second charging information, so that the terminal can adjust the filter coefficient in time when the charging state changes, and then obtain the first coordinate currently scanned, the second coordinate scanned in the previous time, and the third coordinate scanned in the previous time, calculate according to the adjusted filter coefficient, obtain the fourth coordinate, and finally upload all the obtained coordinates to complete the touch sampling. When the mobile terminal is in a charging state, the influence of charging on touch sampling is added to the touch sampling, and the filter coefficient is adjusted in real time according to the charging state to avoid the occurrence of point jitter and screen jitter, thereby improving the accuracy of touch sampling.

[0081] According to the method described in the above embodiment, this embodiment will be further described from the perspective of a touch sampling device in a charging state. The touch sampling device in a charging state can be implemented as an independent entity or integrated in an electronic device, such as a terminal. The terminal may include a mobile phone, a tablet computer, etc.

[0082] See also Figure 6 , Figure 6is a structural diagram of a touch sampling device in a charging state provided in an embodiment of the present application, such as Figure 6 As shown, the touch sampling device 600 in the charging state provided in the embodiment of the present application includes:

[0083] The status monitoring module 601 is used to obtain the first charging information of the terminal currently monitored, and obtain the second charging information of the terminal monitored in the previous adjacent time;

[0084] A comparison and confirmation module 602 is used to compare the first charging information with the second charging information to determine a current filter coefficient of the terminal;

[0085] A coordinate acquisition module 603 is used to acquire the scanned first coordinate, second coordinate and third coordinate, wherein the first coordinate is the coordinate of the target touch point currently scanned, the second coordinate is the coordinate of the target touch point scanned in the previous scan adjacent to the current scan, and the third coordinate is the coordinate of the target touch point scanned in the previous scan adjacent to the previous scan;

[0086] The sampling upload module 604 is used to calculate the fourth coordinate representing the current touch sampling result of the terminal according to the filter coefficient, the first coordinate, the second coordinate and the third coordinate, and report the first coordinate, the second coordinate, the third coordinate and the fourth coordinate.

[0087] In one embodiment, the comparison and confirmation module 602 is further used to:

[0088] Comparing the first charging information with the second charging information to determine whether the charging state of the terminal has changed;

[0089] When it is determined that the charging state of the terminal has changed, querying in a preset list according to the first charging information to determine whether there is a matching filter coefficient for the first charging information, wherein the preset list records the corresponding relationship between the charging information and the filter coefficient;

[0090] When it is determined that there is a matching filter coefficient, the filter coefficient corresponding to the first charging information is obtained.

[0091] In one embodiment, the comparison and confirmation module 602 is further used to:

[0092] When it is determined that the charging state of the terminal has not changed, the filter coefficient when the terminal is charged based on the second charging information is used as the current filter coefficient of the terminal.

[0093] In one embodiment, the comparison and confirmation module 602 is further used to:

[0094] When it is determined that there is no matching filter coefficient, the filter coefficient when the terminal is in the charging state corresponding to the second charging information is kept unchanged.

[0095] In one embodiment, the comparison and confirmation module 602 is further used to:

[0096] When it is determined that there is no matching filter coefficient, obtaining a charging mode and a charging power of the first charging information;

[0097] Filter the preset list according to the charging mode to obtain a first set;

[0098] Obtaining the charging power corresponding to each filter coefficient in the first set, and performing difference calculation with the charging power of the first charging information to obtain a power difference;

[0099] A filter coefficient is selected from the first set according to the power difference as the current filter coefficient of the terminal.

[0100] In one embodiment, the comparison and confirmation module 602 is further used to:

[0101] The power difference value is compared with a preset difference threshold value, and the first set is screened according to the comparison result to obtain a second set, wherein the power difference value corresponding to each filter coefficient in the second set is less than the preset difference threshold value;

[0102] A filter coefficient corresponding to the minimum power difference is selected in the second set as the current filter coefficient of the terminal.

[0103] In one embodiment, the status monitoring module 601 is further used to:

[0104] When it is detected that the terminal changes from a charging state to a non-charging state, a default filter coefficient of the terminal is obtained to perform touch sampling based on the default filter coefficient.

[0105] During specific implementation, the above modules and / or units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules and / or units can refer to the previous method embodiments. The specific beneficial effects that can be achieved can also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.

[0106] Also, see Figure 7 , Figure 7 is a schematic diagram of a structure of an electronic device provided in an embodiment of the present application, and the electronic device may be a mobile terminal such as a smart phone, a tablet computer, or the like. Figure 7 As shown, the electronic device 700 includes a processor 701 and a memory 702. The processor 701 is electrically connected to the memory 702.

[0107] The processor 701 is the control center of the electronic device 700. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device 700 and processes data by running or loading applications stored in the memory 702 and calling data stored in the memory 702, thereby monitoring the electronic device 700 as a whole.

[0108] In this embodiment, the processor 701 in the electronic device 700 will load the instructions corresponding to the processes of one or more applications into the memory 702 according to the following steps, and the processor 701 will run the application stored in the memory 702, thereby implementing any step in the touch sampling method in the charging state provided in the above embodiment.

[0109] The electronic device 700 can implement the steps in any embodiment of the touch sampling method in the charging state provided in the embodiments of the present application. Therefore, it can achieve the beneficial effects that can be achieved by the touch sampling method in any charging state provided in the embodiments of the present application. For details, please refer to the previous embodiments and will not be repeated here.

[0110] See also Figure 8 , Figure 8 is another structural schematic diagram of an electronic device provided in an embodiment of the present application, such as Figure 8 As shown, Figure 8 The electronic device 800 is a block diagram of a specific structure of an electronic device provided in an embodiment of the present application, and the electronic device can be used to implement the touch sampling method in a charging state provided in the above embodiment. The electronic device 800 can be a mobile terminal such as a smart phone or a laptop computer.

[0111] The RF circuit 810 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 810 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 810 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.

[0112] The memory 820 can be used to store software programs and modules, such as the program instructions / modules corresponding to the touch sampling method in the charging state in the above-mentioned embodiment. The processor 880 executes various functional applications and the touch sampling method in the charging state by running the software programs and modules stored in the memory 820.

[0113] The memory 820 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 820 may further include a memory remotely arranged relative to the processor 880, and these remote memories may be connected to the electronic device 800 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0114] The input unit 830 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 830 may include a touch-sensitive surface 831 and other input devices 832. The touch-sensitive surface 831, also known as a touch display screen or touchpad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 831), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 831 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 880, and can receive and execute commands sent by the processor 880. In addition, the touch-sensitive surface 831 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 831, the input unit 830 may further include other input devices 832. Specifically, the other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0115] The display unit 840 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device 800, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 840 may include a display panel 841, and optionally, the display panel 841 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 831 may cover the display panel 841, and when the touch-sensitive surface 831 detects a touch operation on or near it, it is transmitted to the processor 880 to determine the type of the touch event, and then the processor 880 provides corresponding visual output on the display panel 841 according to the type of the touch event. Although in the figure, the touch-sensitive surface 831 and the display panel 841 are implemented as two independent components to implement input and output functions, in some embodiments, the touch-sensitive surface 831 can be integrated with the display panel 841 to implement input and output functions.

[0116] The electronic device 800 may also include at least one sensor 850, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 841 according to the brightness of the ambient light, and the proximity sensor may generate an interrupt when the flip cover is closed or closed. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the electronic device 800, they will not be repeated here.

[0117] The audio circuit 860, the speaker 861, and the microphone 862 can provide an audio interface between the user and the electronic device 800. The audio circuit 860 can transmit the electrical signal converted from the received audio data to the speaker 861, which is converted into a sound signal for output; on the other hand, the microphone 862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 860 and converted into audio data, and then the audio data is output to the processor 880 for processing, and then sent to another terminal through the RF circuit 810, or the audio data is output to the memory 820 for further processing. The audio circuit 860 may also include an earplug jack to provide communication between an external headset and the electronic device 800.

[0118] The electronic device 800 can help the user receive requests, send information, etc. through the transmission module 870 (such as a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 870 is shown in the figure, it is understandable that it is not a necessary component of the electronic device 800 and can be omitted as needed without changing the essence of the invention.

[0119] The processor 880 is the control center of the electronic device 800. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 820, and calling data stored in the memory 820, it executes various functions of the electronic device 800 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 880 may include one or more processing cores; in some embodiments, the processor 880 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 880.

[0120] The electronic device 800 also includes a power supply 890 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 880 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 890 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0121] Although not shown, the electronic device 800 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors to implement any step of the touch sampling method in the charging state provided in the above embodiment.

[0122] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0123] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present application provides a storage medium, which stores multiple instructions, and the instructions can be executed by the processor to implement any step of the touch sampling method in the charging state provided in the above embodiments.

[0124] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0125] Since the instructions stored in the storage medium can execute the steps in any embodiment of the touch sampling method in the charging state provided in the embodiments of the present application, the beneficial effects that can be achieved by the touch sampling method in any charging state provided in the embodiments of the present application can be achieved. For details, please refer to the previous embodiments and will not be repeated here.

[0126] The above is a detailed introduction to a touch sampling method, device, electronic device and storage medium in a charging state provided by an embodiment of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of ​​the present application; at the same time, for technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application. In addition, for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made, and these improvements and modifications are also regarded as the scope of protection of the present application.

Claims

1. A touch sampling method in a charging state, characterized in that: include: Acquire first charging information of a terminal currently monitored, and acquire second charging information of the terminal monitored in an adjacent previous time; Comparing the first charging information with the second charging information to determine a current filter coefficient of the terminal; Acquire the scanned first coordinate, second coordinate and third coordinate, wherein the first coordinate is the coordinate of the target touch point currently scanned, the second coordinate is the coordinate of the target touch point scanned in a previous scan adjacent to the current scan, and the third coordinate is the coordinate of the target touch point scanned in a previous scan adjacent to the previous scan; A fourth coordinate representing a current touch sampling result of the terminal is calculated according to the filter coefficient, the first coordinate, the second coordinate, and the third coordinate, and the first coordinate, the second coordinate, the third coordinate, and the fourth coordinate are reported.

2. The method according to claim 1, characterized in that The comparing the first charging information with the second charging information to determine a current filter coefficient of the terminal includes: Comparing the first charging information with the second charging information to determine whether the charging state of the terminal has changed; When it is determined that the charging state of the terminal has changed, querying in a preset list according to the first charging information to determine whether there is a matching filter coefficient for the first charging information, wherein the preset list records the corresponding relationship between the charging information and the filter coefficient; When it is determined that there is a matching filter coefficient, the filter coefficient corresponding to the first charging information is obtained.

3. The method according to claim 2, characterized in that After comparing the first charging information with the second charging information to determine whether the charging state of the terminal has changed, the method further includes: When it is determined that the charging state of the terminal has not changed, the filter coefficient when the terminal is charged based on the second charging information is used as the current filter coefficient of the terminal.

4. The method according to claim 2, characterized in that After querying according to the first charging information to determine whether the first charging information has a matching filter coefficient, the method further includes: When it is determined that there is no matching filter coefficient, the filter coefficient when the terminal is in the charging state corresponding to the second charging information is kept unchanged.

5. The method according to claim 2, characterized in that After querying according to the first charging information to determine whether the first charging information has a matching filter coefficient, the method further includes: When it is determined that there is no matching filter coefficient, acquiring a charging mode and a charging power of the first charging information; Filter the preset list according to the charging mode to obtain a first set; Obtaining a charging power corresponding to each filter coefficient in the first set, and performing a difference calculation with the charging power of the first charging information to obtain a power difference; A filter coefficient is selected from the first set according to the power difference as a current filter coefficient of the terminal.

6. The method according to claim 5, characterized in that The selecting a filter coefficient from the first set according to the power difference as a current filter coefficient of the terminal includes: Comparing the power difference with a preset difference threshold, and screening the first set according to the comparison result to obtain a second set, wherein the power difference corresponding to each filter coefficient in the second set is less than the preset difference threshold; A filter coefficient corresponding to the minimum power difference value is selected in the second set as the current filter coefficient of the terminal.

7. The method according to claim 1, characterized in that The method further comprises: When it is detected that the terminal changes from a charging state to a non-charging state, a default filter coefficient of the terminal is obtained to perform touch sampling based on the default filter coefficient.

8. A touch sampling device in a charging state, characterized in that: include: A status monitoring module, used to obtain first charging information of a terminal currently monitored, and obtain second charging information of the terminal monitored in the previous adjacent time; A comparison and confirmation module, used to compare the first charging information with the second charging information to determine a current filter coefficient of the terminal; A coordinate acquisition module, used to acquire a scanned first coordinate, a second coordinate, and a third coordinate, wherein the first coordinate is the coordinate of a target touch point currently scanned, the second coordinate is the coordinate of a target touch point scanned in a previous scan adjacent to the current scan, and the third coordinate is the coordinate of a target touch point scanned in a previous scan adjacent to the previous scan; The sampling upload module is used to calculate a fourth coordinate representing the current touch sampling result of the terminal according to the filter coefficient, the first coordinate, the second coordinate and the third coordinate, and report the first coordinate, the second coordinate, the third coordinate and the fourth coordinate.

9. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 7 are implemented.