Touch screen data resampling method and device, electronic equipment and storage medium

By performing scene recognition of electronic devices and determining the target resampling time difference, the problem that traditional methods cannot meet the touch response requirements in different scenarios is solved, and a better touch response effect is achieved.

CN119781629AActive Publication Date: 2025-04-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202311296841.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-08
Publication Date
2025-04-08
Estimated Expiration
2043-10-08

AI Technical Summary

Technical Problem

Traditional touch screen data resampling methods cannot meet the differentiated needs of touch response speed and sliding effects in different scenarios, resulting in poor response effects.

Method used

By performing scene recognition of the electronic device, the target resampling time difference is determined, and after each screen refresh event, the sampling time point is determined based on the target resampling time difference and the time point of the screen refresh event, and then the touch screen data is resampled.

Benefits of technology

Resampling is achieved in different scenarios according to different sampling time points, meeting the differentiated needs of touch response speed and sliding effect in different scenarios, and improving the response effect to touch.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781629A_ABST
    Figure CN119781629A_ABST
Patent Text Reader

Abstract

The invention relates to a touch screen resampling method and device, electronic equipment and a storage medium. The method comprises the following steps: performing scene recognition on the electronic equipment to obtain a scene recognition result; determining a corresponding target resampling time difference according to the scene recognition result; the target resampling time difference is a time difference between a sampling time point before a time point of a screen refreshing event and the time point of the screen refreshing event; after a screen refreshing event is monitored each time, determining a sampling time point according to the target resampling time difference and the time point of the screen refreshing event; and resampling target touch screen data reported before the screen refreshing event according to the sampling time point to obtain supplemented touch screen data. By adopting the method, the touch response effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of touch screen technology, and in particular to a touch screen data resampling method, device, electronic device and storage medium. Background Art

[0002] At present, many electronic devices use touch screens. The touch screen reports touch data to the electronic device system at a certain reporting rate. The electronic device system responds to the user's touch operation based on the data reported by the touch screen. In order to supplement the reported touch data and increase the accuracy and smoothness of the touch event, the electronic device system generally resamples and calculates the acquired touch data at a certain period. The resampling algorithm refers to obtaining more or more accurate touch data through a certain calculation method based on the known touch data.

[0003] In the traditional method, the fixed time before the screen refresh time point is generally used as the sampling time point for resampling calculation. However, this resampling method cannot meet the differentiated requirements of touch response speed and sliding effect in different scenarios, resulting in poor touch response effect. Summary of the invention

[0004] The embodiments of the present application provide a touch screen data resampling method, device, electronic device, computer-readable storage medium and computer program product, which can improve the response effect to touch.

[0005] In a first aspect, the present application provides a touch screen data resampling method. The method comprises:

[0006] Performing scene recognition on the electronic device to obtain a scene recognition result;

[0007] Determine a corresponding target resampling time difference according to the scene recognition result; the target resampling time difference is the time difference between a sampling time point before a screen refresh event and a screen refresh event time point;

[0008] After each screen refresh event is monitored, a sampling time point is determined according to the target resampling time difference and the time point of the screen refresh event;

[0009] According to the sampling time point, the target touch screen data reported before the screen refresh event is resampled to obtain supplementary touch screen data.

[0010] In a second aspect, the present application also provides a touch screen data resampling device. The device comprises:

[0011] A scene recognition module is used to perform scene recognition on the electronic device and obtain a scene recognition result;

[0012] A time difference determination module, used to determine a corresponding target resampling time difference according to the scene recognition result; the target resampling time difference is the time difference between a sampling time point before a screen refresh event and a screen refresh event time point;

[0013] A sampling time determination module, used for determining a sampling time point according to the target resampling time difference and the time point of the screen refresh event each time a screen refresh event is monitored;

[0014] The resampling module is used to resample the target touch screen data reported before the screen refresh event according to the sampling time point to obtain supplementary touch screen data.

[0015] In a third aspect, the present application further provides an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0016] Performing scene recognition on the electronic device to obtain a scene recognition result;

[0017] Determine a corresponding target resampling time difference according to the scene recognition result; the target resampling time difference is the time difference between a sampling time point before a screen refresh event and a screen refresh event time point;

[0018] After each screen refresh event is monitored, a sampling time point is determined according to the target resampling time difference and the time point of the screen refresh event;

[0019] According to the sampling time point, the target touch screen data reported before the screen refresh event is resampled to obtain supplementary touch screen data.

[0020] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0021] Performing scene recognition on the electronic device to obtain a scene recognition result;

[0022] Determine a corresponding target resampling time difference according to the scene recognition result; the target resampling time difference is the time difference between a sampling time point before a screen refresh event and a screen refresh event time point;

[0023] After each screen refresh event is monitored, a sampling time point is determined according to the target resampling time difference and the time point of the screen refresh event;

[0024] According to the sampling time point, the target touch screen data reported before the screen refresh event is resampled to obtain supplementary touch screen data.

[0025] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0026] Performing scene recognition on the electronic device to obtain a scene recognition result;

[0027] Determine a corresponding target resampling time difference according to the scene recognition result; the target resampling time difference is the time difference between a sampling time point before a screen refresh event and a screen refresh event time point;

[0028] After each screen refresh event is monitored, a sampling time point is determined according to the target resampling time difference and the time point of the screen refresh event;

[0029] According to the sampling time point, the target touch screen data reported before the screen refresh event is resampled to obtain supplementary touch screen data.

[0030] The above-mentioned touch screen data resampling method, device, electronic device, computer-readable storage medium and computer program product perform scene recognition on the electronic device to obtain a scene recognition result, determine the corresponding target resampling time difference according to the scene recognition result, and can flexibly adjust the target resampling time difference according to the scene recognition result. After each screen refresh event is monitored, the sampling time point is determined according to the target resampling time difference and the time point of the screen refresh event. According to the sampling time point, the target touch screen data reported before the screen refresh event is resampled to obtain supplementary touch screen data. Since the target resampling time difference is adjusted according to different scene recognition results, resampling can be performed according to different sampling time points in different scenes, so that different response speeds and sliding effects to touch are achieved in different scenes, which can meet the differentiated requirements for the response speed and sliding effect of touch in different scenes and improve the response effect to touch. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 A diagram showing an application environment of a touch screen data resampling method in an embodiment;

[0033] Figure 2 is a flow chart of a touch screen data resampling method in one embodiment;

[0034] Figure 3 A schematic diagram of determining a sampling time point in one embodiment;

[0035] Figure 4 A schematic diagram of a process of resampling according to an application identification result in one embodiment;

[0036] Figure 5 is a schematic diagram of the setting of coordinate axes in one embodiment;

[0037] Figure 6 is a schematic diagram of acceleration data in a vertical screen state in one embodiment;

[0038] Figure 7 is a schematic diagram of acceleration data in a horizontal screen state in one embodiment;

[0039] Figure 8 It is a schematic diagram of a process of resampling according to the horizontal and vertical screen recognition results in one embodiment;

[0040] Fig. 9 is a structural block diagram of a touch screen data resampling device in one embodiment;

[0041] Fig.10 FIG. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] The touch screen data resampling method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the electronic device 102 includes a touch screen system 1022 and an electronic device system 1024. The touch screen system 1022 and the electronic device system 1024 can communicate with each other. The touch screen system 1022 can trigger an interrupt signal through the INT pin, and the electronic device system 1024 can obtain the touch screen data of the touch screen system 1022 in response to the interrupt signal. The electronic device system 1024 can also set the touch screen system 1022 through the I2C or SPI interface. The touch screen system 1022 can have its own memory and processor. The electronic device system 1024 can perform scene recognition on the electronic device to obtain a scene recognition result, and determine the corresponding target resampling time difference according to the scene recognition result. After each screen refresh event is monitored, the sampling time point is determined according to the target resampling time difference and the time point of the screen refresh event. According to the sampling time point, the target touch screen data reported by the touch screen system 1022 before the screen refresh event is resampled to obtain supplementary touch screen data. The electronic device 102 may be, but is not limited to, various personal computers with touch screens, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc.

[0044] In one embodiment, Figure 2 As shown, a touch screen data resampling method is provided, which is applied to Figure 1 Taking the electronic device system 1024 in FIG. 1 as an example, the method includes the following steps:

[0045] Step 202: Perform scene recognition on the electronic device to obtain a scene recognition result.

[0046] Scene recognition is a process of identifying the operating scene that the electronic device is in. For example, scene recognition can be identifying the application started in the foreground of the electronic device or identifying the horizontal or vertical screen orientation of the electronic device.

[0047] Step 204, determining a corresponding target resampling time difference according to the scene recognition result; the target resampling time difference is the time difference between the sampling time point before the time point of the screen refresh event and the time point of the screen refresh event.

[0048] Among them, the screen refresh event is an event that the electronic device regularly refreshes the screen according to the screen refresh cycle (i.e., Vsync cycle, vertical synchronization cycle). The time point of the screen refresh event is the time point when the electronic device refreshes the screen. The sampling time point is used to determine the method of resampling the touch screen data. The resampling method includes interpolation and extrapolation.

[0049] In some embodiments, corresponding preset resampling time differences may be pre-set for different scenes respectively. The electronic device system may determine the corresponding target preset resampling time difference according to the scene corresponding to the scene recognition result.

[0050] In some embodiments, the electronic device system may identify the target application started in the foreground of the electronic device, obtain an application identification result, and then determine a corresponding target resampling time difference based on the application identification result.

[0051] In some embodiments, corresponding preset resampling time differences may be set in advance for different applications. For example, as shown in the following table, corresponding preset resampling time differences are set for two different applications, "settings" and "games", respectively. The "settings" application uses a first preset resampling time difference of 5ms, and the "games" application uses a second preset resampling time difference of 2ms.

[0052] application Preset resampling time difference time set up The first preset resampling time difference 5ms game The second preset resampling time difference 2ms

[0053] In some embodiments, the application identification result may be an application name or an application identifier of the target application. The electronic device system may determine the corresponding target resampling time difference from the preset resampling time differences pre-set for each application according to the application name or the application identifier of the target application.

[0054] In some other embodiments, at least one preset application set may be preset, and a corresponding preset resampling time difference may be set for each preset application set.

[0055] In some embodiments, when there is only one preset application set, the application identification result may be whether the target application exists in the preset application set. If so, the electronic device system may determine the first preset resampling time difference corresponding to the preset application set as the target resampling time difference; if not, the second preset resampling time difference may be determined as the target resampling time difference.

[0056] In some embodiments, when there are multiple preset application sets, the application identification result may be the target preset application set in which the target application exists, and the electronic device system may determine the preset resampling time difference corresponding to the target preset application set as the target resampling time difference.

[0057] In some embodiments, the electronic device system may identify the horizontal or vertical screen orientation of the electronic device, obtain a horizontal or vertical screen identification result, and determine a corresponding target resampling time difference based on the horizontal or vertical screen identification result.

[0058] Step 206 , after each screen refresh event is monitored, a sampling time point is determined according to the target resampling time difference and the time point of the screen refresh event.

[0059] In some embodiments, after determining the target resampling time difference, the electronic device system may send a time difference adjustment instruction to the resampling service, and the resampling service may switch to the indicated target resampling time difference in response to the time difference adjustment instruction, and execute step 206 and subsequent steps based on the target resampling time difference.

[0060] In some embodiments, the electronic device system may obtain a sampling time point by subtracting the target resampling time difference from the time point of the screen refresh event each time a screen refresh event is monitored.

[0061] For example: Assuming the screen refresh cycle is 60HZ, it means the screen is refreshed 60 times per second, about once every 16ms, then the time points of 16ms, 32ms, 48ms, etc. are screen refresh events. Assuming the target resampling time difference is 5ms, the sampling time point determined by the screen refresh event at the 16ms time point is the time point corresponding to 11ms, the sampling time point determined by the screen refresh event at the 32ms time point is the time point corresponding to 27ms, and the sampling time point determined by the screen refresh event at the 48ms time point is the time point corresponding to 43ms. Figure 3 As shown, when the target resampling time difference is 5ms, the sampling time point (i.e., the time point corresponding to the dotted line) is 5ms before the time point of the screen refresh event; when the target resampling time difference is 2ms, the sampling time point is 2ms before the time point of the screen refresh event.

[0062] Step 208: resample the target touch screen data reported before the screen refresh event according to the sampling time point to obtain supplementary touch screen data.

[0063] In some embodiments, the target touch screen data may be the two touch screen data most recently reported before the screen refresh event.

[0064] In some embodiments, the electronic device system can determine a resampling method according to the order of the sampling time point and the time point of the target touch screen event, and resample the target touch screen data reported before the screen refresh event according to the determined resampling method to obtain supplementary touch screen data. The target touch event is an event corresponding to the most recently reported touch screen data before the screen refresh event.

[0065] In the above touch screen data resampling method, scene recognition is performed on the electronic device to obtain a scene recognition result. According to the scene recognition result, a corresponding target resampling time difference is determined, and the target resampling time difference can be flexibly adjusted according to the scene recognition result. After each screen refresh event is monitored, a sampling time point is determined according to the target resampling time difference and the time point of the screen refresh event. According to the sampling time point, the target touch screen data reported before the screen refresh event is resampled to obtain supplementary touch screen data. Since the target resampling time difference is adjusted according to different scene recognition results, resampling can be performed according to different sampling time points in different scenes, so that different response speeds and sliding effects to touch are achieved in different scenes, which can meet the differentiated requirements for touch response speed and sliding effects in different scenes and improve the response effect to touch.

[0066] In some embodiments, scene recognition is performed on an electronic device to obtain a scene recognition result, including: identifying a target application started in the foreground of the electronic device to obtain an application recognition result; determining a corresponding target resampling time difference based on the scene recognition result, including: determining a corresponding target resampling time difference based on the application recognition result; there is a negative correlation between the response speed required by the target application and the target resampling time difference.

[0067] In some embodiments, the electronic device system may use the default preset resampling time difference as the target resampling time difference when there is no application started in the foreground. When there is a target application started in the foreground, the electronic device system may identify the target application started in the foreground of the electronic device to obtain an application identification result and subsequent steps.

[0068] It can be understood that the response speed required by the target application is negatively correlated with the target resampling time difference, which means that the faster the response speed required by the target application, the smaller the target resampling time difference, and the slower the response speed required by the target application, the larger the target resampling time difference. For example, the "game" application requires a faster response speed, so a smaller target resampling time difference can be set for the "game" application to make the response to touch more timely. The "settings" application does not require a very fast response speed, so a larger target resampling time difference can be set for the "settings" application, so that although the response is not so timely, the uniformity of the coordinate intervals before and after the touch screen data is better, avoiding the problem of sliding jitter.

[0069] The corresponding preset resampling time difference can be set in advance according to the requirements of different applications for response speed.

[0070] In the above embodiment, the target application started in the foreground of the electronic device is identified to obtain an application identification result, and the corresponding target resampling time difference is determined based on the application identification result. The response speed required by the target application is negatively correlated with the target resampling time difference, so that different target resampling time differences can be flexibly adopted for applications with different response speed requirements, thereby improving the response effect to touch.

[0071] In some embodiments, a target application started in the foreground of an electronic device is identified to obtain an application identification result, including: comparing the target application started in the foreground of the electronic device with a preset application in a preset application set to obtain an application identification result; determining a corresponding target resampling time difference based on the application identification result, including: if the application identification result is that the target application exists in the preset application set, then using the first preset resampling time difference as the target resampling time difference, and after the target application exits the foreground, using the second preset resampling time difference as the target resampling time difference.

[0072] In some embodiments, exiting the foreground may be switching to background operation or exiting the application.

[0073] In some embodiments, the electronic device system may compare the target application started in the foreground of the electronic device with the preset applications in the preset application set to obtain an application identification result of whether the target application exists in the preset application set.

[0074] In some embodiments, if the application identification result is that the target application does not exist in the preset application set, the electronic device system may use the second preset resampling time difference as the target resampling time difference. In some embodiments, the second preset resampling time difference may be the same as or different from the default preset resampling time difference. In some embodiments, if the application identification result is that the target application does not exist in the preset application set, the electronic device system may not issue a time difference adjustment instruction to maintain the default preset resampling time difference.

[0075] In some embodiments, the first preset resampling time difference may be smaller than the second preset resampling time difference. For example, the second preset resampling time difference is 5 ms, and the first preset resampling time difference is 2 ms.

[0076] In the above embodiment, the target application started in the foreground of the electronic device is compared with the preset application in the preset application set. If the application identification result is that the target application exists in the preset application set, the first preset resampling time difference is used as the target resampling time difference, and after the target application exits the foreground, the second preset resampling time difference is used as the target resampling time difference. The corresponding first preset resampling time difference can be specially set for the preset application in the preset application set, which improves the response effect and is more convenient to set up.

[0077] like Figure 4 FIG. 1 is a schematic diagram of the overall flow of the method for resampling touch screen data according to the application recognition result in the above embodiment, including the following steps:

[0078] Step 402: storing a mapping table of a preset application set and a first / second preset resampling time difference.

[0079] Step 404: query a preset application set according to the target application started in the foreground.

[0080] Step 406, determine whether the target application started in the foreground is in the preset application set. If yes, execute step 408 and step 410; if no, execute step 412. After executing step 410 or step 412, execute step 414 and subsequent steps.

[0081] Step 408: If it exists in the preset application set, a time difference adjustment instruction is issued to use the first preset resampling time difference as the target resampling time difference.

[0082] Step 410: If the foreground is exited, a time difference adjustment instruction is issued to use the second preset resampling time difference as the target resampling time difference.

[0083] Step 412: If the application does not exist in the preset application set, no time difference adjustment instruction is issued.

[0084] Step 414, switching to the corresponding target resampling time difference.

[0085] Step 416, acquiring the touch screen data reported by the touch screen, and monitoring the screen refresh event at the same time, and performing resampling after the screen refresh event is triggered to obtain supplementary touch screen data.

[0086] Step 418: respond according to the resampled touch screen data.

[0087] In some embodiments, scene recognition is performed on an electronic device to obtain a scene recognition result, including: identifying the horizontal or vertical screen orientation of the electronic device to obtain a horizontal or vertical screen recognition result; and determining a corresponding target resampling time difference based on the scene recognition result, including: determining a corresponding target resampling time difference based on the horizontal or vertical screen recognition result.

[0088] The horizontal or vertical screen orientation refers to the orientation of the electronic device when it is in use. The horizontal or vertical screen orientation can be horizontal or vertical.

[0089] In some embodiments, corresponding preset resampling time differences may be pre-set for different horizontal and vertical screen orientations. The electronic device system may use the preset resampling time difference corresponding to the horizontal and vertical screen orientation of the electronic device as the target resampling time difference according to the horizontal and vertical screen recognition result.

[0090] In the above embodiment, different target resampling time differences are used for different horizontal and vertical screen orientations, which can meet the differentiated requirements for touch response speed and sliding effect in different horizontal and vertical screen orientations, and improve the touch response effect.

[0091] In some embodiments, the corresponding target resampling time difference is determined according to the horizontal and vertical screen recognition results, including: if the horizontal and vertical screen recognition result is horizontal, the third preset resampling time difference is used as the target resampling time difference; if the horizontal and vertical screen recognition result is vertical, the fourth preset resampling time difference is used as the target resampling time difference; wherein the third preset resampling time difference is less than the fourth preset resampling time difference.

[0092] In some embodiments, the third preset resampling time difference may be the same as or different from the first preset resampling time difference, without limitation.

[0093] In some embodiments, the fourth preset resampling time difference may be the same as or different from the second preset resampling time difference, without limitation.

[0094] In the above embodiment, the target resampling time difference set in the horizontal screen case is smaller than that in the vertical screen case, thereby enabling a faster response speed in the horizontal screen, and having a better effect on some applications such as games used in the horizontal screen.

[0095] In some embodiments, identifying the horizontal or vertical screen orientation of the electronic device to obtain a horizontal or vertical screen identification result includes: acquiring acceleration data of the electronic device; and determining the horizontal or vertical screen identification result of the electronic device based on the acceleration data.

[0096] In some embodiments, the electronic device system may periodically acquire acceleration data from an acceleration sensor of the electronic device.

[0097] In some embodiments, the electronic device system may default the current horizontal or vertical screen orientation to the vertical screen after powering on, and then determine whether the horizontal or vertical screen orientation of the electronic device has switched based on the acceleration data. If so, switch to the orientation opposite to the current horizontal or vertical screen orientation.

[0098] In some embodiments, the electronic device system can determine the target acceleration data of the electronic device in the target detection direction, and determine whether the horizontal or vertical screen orientation of the electronic device is switched according to the target acceleration data. The target detection direction is the direction opposite to the horizontal or vertical screen orientation of the electronic device.

[0099] In the above embodiment, the horizontal or vertical screen recognition result of the electronic device is determined according to the acceleration data, so that the horizontal or vertical screen orientation of the electronic device can be determined efficiently and accurately.

[0100] In some embodiments, the landscape or portrait screen recognition result of the electronic device is determined based on the acceleration data, including: determining the target acceleration data of the electronic device in the target detection direction; the target detection direction is the direction opposite to the landscape or portrait screen direction of the electronic device; if the target acceleration data falls within a preset acceleration range and the duration of falling within the preset acceleration area is greater than or equal to a preset duration threshold, then it is determined that the landscape or portrait screen direction of the electronic device is switched to the target detection direction.

[0101] like Figure 5 As shown, a coordinate system can be established based on the electronic device. For example, the direction parallel to the horizontal side of the electronic device can be set as the x-axis, the direction parallel to the vertical side of the electronic device can be set as the y-axis, and the direction perpendicular to the screen of the electronic device can be set as the z-axis. The electronic device system can determine whether to switch the horizontal or vertical screen direction based on the target acceleration data in the coordinate axis direction corresponding to the target detection direction. For example: when the electronic device is in the vertical screen direction, it can be determined whether to switch to the horizontal screen based on the acceleration data in the x-axis direction; when the electronic device is in the horizontal screen direction, it can be determined whether to switch to the vertical screen based on the acceleration data in the y-axis direction.

[0102] It can be understood that due to the effect of gravity, the acceleration data of the electronic device in the direction perpendicular to the ground contains the value of the gravitational acceleration g. Therefore, the horizontal or vertical screen orientation of the electronic device can be identified by judging whether the acceleration data of the electronic device in a certain direction falls within a preset acceleration range. Figure 6 As shown, the acceleration data in the y-axis direction is 9.38537, which is close to the gravity acceleration value. Therefore, it can be determined that the direction corresponding to the y-axis is the direction of the electronic device, that is, the electronic device is in the vertical screen direction. Figure 7 As shown, the acceleration data in the x-axis direction is -10.217751, which is close to the gravity acceleration value. Therefore, it can be determined that the direction corresponding to the x-axis is the direction of the electronic device, that is, the electronic device is in the horizontal screen direction.

[0103] In some embodiments, the preset acceleration interval may be within a preset range around the magnitude of gravity acceleration, for example, the preset acceleration interval may be [-9.8, -8] and [8, 9.8].

[0104] In some embodiments, if the duration for which the target acceleration data falls within the preset acceleration interval is less than a preset duration threshold, the screen orientation is not switched between landscape and portrait.

[0105] In some embodiments, the electronic device system may determine the duration that the target acceleration data falls within a preset acceleration interval through a timer.

[0106] In some embodiments, if the target acceleration data does not fall within a preset acceleration range, the screen orientation is not switched.

[0107] In the above embodiment, if the target acceleration data falls within the preset acceleration range and the duration of the data within the preset acceleration area is greater than or equal to the preset duration threshold, the horizontal or vertical screen orientation of the electronic device is determined to be switched to the target detection orientation, thereby accurately determining the horizontal or vertical screen orientation.

[0108] like Figure 8 FIG. 1 is a schematic diagram of the overall process of the method for resampling touch screen data according to the horizontal and vertical screen recognition results in the above embodiment, including the following steps:

[0109] Step 802: periodically obtain acceleration data from the acceleration sensor.

[0110] Step 804: determine the horizontal or vertical screen orientation of the electronic device based on the current acceleration data.

[0111] Step 806: If the screen is in landscape orientation, a time difference adjustment instruction is issued to use the third preset resampling time difference as the target resampling time difference.

[0112] Step 808: If the screen is in portrait orientation, a time difference adjustment instruction is issued to use the fourth preset resampling time difference as the target resampling time difference.

[0113] Step 810, switching to the corresponding target resampling time difference.

[0114] Step 812, acquiring the touch screen data reported by the touch screen, and monitoring the screen refresh event at the same time, and after the screen refresh event is triggered, resampling is performed to obtain supplementary touch screen data.

[0115] Step 814: respond according to the resampled touch screen data.

[0116] In some embodiments, according to the sampling time point, the target touch screen data reported before the screen refresh event is resampled to obtain supplementary touch screen data, including: comparing the sequence between the sampling time point and the time point of the target touch screen event; the target touch event is the event that reports the touch screen data most recently before the screen refresh event; if the sampling time point is before the time point of the target touch screen event, the target touch screen data reported before the screen refresh event is interpolated to obtain supplementary touch screen data; if the sampling time point is after the time point of the target touch screen event, the target touch screen data reported before the screen refresh event is extrapolated to obtain supplementary touch screen data.

[0117] Among them, interpolation is to determine the supplementary touch screen data within the time period between two target touch screen data, and extrapolation is to determine the supplementary touch screen data outside the time period between two target touch screen data.

[0118] In some embodiments, the target touch event is an event of touch screen data that is most recently reported before a screen refresh event.

[0119] In the above embodiment, the sequence between the sampling time point and the time point of the target touch screen event is compared to determine whether to interpolate or extrapolate, and the target touch screen data can be accurately determined to interpolate or extrapolate according to the flexibly determined time point in different scenarios.

[0120] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0121] Based on the same inventive concept, the embodiment of the present application also provides a touch screen data resampling device for implementing the touch screen data resampling method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more touch screen data resampling device embodiments provided below can refer to the limitations of the touch screen data resampling method above, and will not be repeated here.

[0122] In some embodiments, Fig. 9 As shown, a touch screen data resampling device 900 is provided, comprising: a scene recognition module 902, a time difference determination module 904, a sampling time determination module 906 and a resampling module 908, wherein:

[0123] The scene recognition module 902 is used to perform scene recognition on the electronic device to obtain a scene recognition result.

[0124] The time difference determination module 904 is used to determine the corresponding target resampling time difference according to the scene recognition result; the target resampling time difference is the time difference between the sampling time point before the time point of the screen refresh event and the time point of the screen refresh event.

[0125] The sampling time determination module 906 is used to determine the sampling time point according to the target resampling time difference and the time point of the screen refresh event each time a screen refresh event is monitored.

[0126] The resampling module 908 is used to resample the target touch screen data reported before the screen refresh event according to the sampling time point to obtain supplementary touch screen data.

[0127] In some embodiments, the scene recognition module 902 is further used to recognize the target application started in the foreground of the electronic device to obtain an application recognition result. The time difference determination module 904 is further used to determine the corresponding target resampling time difference according to the application recognition result; the response speed required by the target application is negatively correlated with the target resampling time difference.

[0128] In some embodiments, the scene recognition module 902 is further used to compare the target application started in the foreground of the electronic device with the preset application in the preset application set to obtain an application recognition result. The time difference determination module 904 is further used to use the first preset resampling time difference as the target resampling time difference if the application recognition result shows that the target application exists in the preset application set, and use the second preset resampling time difference as the target resampling time difference after the target application exits the foreground.

[0129] In some embodiments, the scene recognition module 902 is further used to recognize the horizontal or vertical screen orientation of the electronic device to obtain a horizontal or vertical screen recognition result. The time difference determination module 904 is further used to determine the corresponding target resampling time difference according to the horizontal or vertical screen recognition result.

[0130] In some embodiments, the time difference determination module 904 is also used to use the third preset resampling time difference as the target resampling time difference if the horizontal or vertical screen recognition result is horizontal; and use the fourth preset resampling time difference as the target resampling time difference if the horizontal or vertical screen recognition result is vertical; wherein the third preset resampling time difference is smaller than the fourth preset resampling time difference.

[0131] In some embodiments, the scene recognition module 902 is further used to obtain acceleration data of the electronic device; and determine the horizontal and vertical screen recognition result of the electronic device according to the acceleration data.

[0132] In some embodiments, the scene recognition module 902 is also used to determine the target acceleration data of the electronic device in the target detection direction; the target detection direction is the direction opposite to the horizontal or vertical screen direction of the electronic device; if the target acceleration data falls within a preset acceleration range and the duration of being within the preset acceleration area is greater than or equal to a preset duration threshold, then it is determined that the horizontal or vertical screen direction of the electronic device is switched to the target detection direction.

[0133] In some embodiments, the resampling module 908 is also used to compare the sequence between the sampling time point and the time point of the target touch screen event; the target touch event is the event that reports the touch screen data most recently before the screen refresh event; if the sampling time point is before the time point of the target touch screen event, the target touch screen data reported before the screen refresh event is interpolated to obtain supplementary touch screen data; if the sampling time point is after the time point of the target touch screen event, the target touch screen data reported before the screen refresh event is extrapolated to obtain supplementary touch screen data.

[0134] The above-mentioned touch screen data resampling device performs scene recognition on the electronic device to obtain a scene recognition result, determines a corresponding target resampling time difference according to the scene recognition result, and can flexibly adjust the target resampling time difference according to the scene recognition result. After each screen refresh event is monitored, the sampling time point is determined according to the target resampling time difference and the time point of the screen refresh event. According to the sampling time point, the target touch screen data reported before the screen refresh event is resampled to obtain supplementary touch screen data. Since the target resampling time difference is adjusted according to different scene recognition results, resampling can be performed according to different sampling time points in different scenes, so that different response speeds and sliding effects to touch are achieved in different scenes, which can meet the differentiated requirements for touch response speed and sliding effects in different scenes and improve the response effect to touch.

[0135] Each module in the above touch screen data resampling device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0136] In one embodiment, an electronic device is provided, whose internal structure diagram can be as follows: Fig.10As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a touch screen data resampling method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen may be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device may be a touch layer or a touch panel covered on the display screen, or may be an external keyboard, touch panel or mouse.

[0137] Those skilled in the art will understand that Fig.10 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0138] The embodiment of the present application further provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, enable the processors to perform the steps of the touch screen data resampling method.

[0139] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute a touch screen data resampling method.

[0140] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0143] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A touch screen data resampling method, characterized in that: include: Performing scene recognition on the electronic device to obtain a scene recognition result; Determining a corresponding target resampling time difference according to the scene recognition result; The target resampling time difference is the time difference between the sampling time point before the time point of the screen refresh event and the time point of the screen refresh event; After each screen refresh event is monitored, a sampling time point is determined according to the target resampling time difference and the time point of the screen refresh event; According to the sampling time point, the target touch screen data reported before the screen refresh event is resampled to obtain supplementary touch screen data.

2. The method according to claim 1, characterized in that The performing scene recognition on the electronic device to obtain a scene recognition result includes: Identify the target application started in the foreground of the electronic device to obtain an application identification result; The determining, according to the scene recognition result, a corresponding target resampling time difference comprises: According to the application identification result, a corresponding target resampling time difference is determined; the response speed required by the target application is negatively correlated with the target resampling time difference.

3. The method according to claim 2, characterized in that The step of identifying the target application started in the foreground of the electronic device to obtain an application identification result includes: Comparing the target application started in the foreground of the electronic device with the preset applications in the preset application set to obtain an application identification result; The determining, according to the application identification result, a corresponding target resampling time difference comprises: If the application identification result is that the target application exists in the preset application set, the first preset resampling time difference is used as the target resampling time difference, and after the target application exits the foreground, the second preset resampling time difference is used as the target resampling time difference.

4. The method according to claim 1, characterized in that: The performing scene recognition on the electronic device to obtain a scene recognition result includes: Identify the horizontal or vertical screen orientation of the electronic device to obtain a horizontal or vertical screen identification result; The determining, according to the scene recognition result, a corresponding target resampling time difference comprises: According to the horizontal and vertical screen recognition results, a corresponding target resampling time difference is determined.

5. The method according to claim 4, characterized in that The determining, according to the horizontal and vertical screen recognition results, a corresponding target resampling time difference comprises: If the horizontal or vertical screen identification result is a horizontal screen, taking the third preset resampling time difference as the target resampling time difference; If the horizontal or vertical screen recognition result is a vertical screen, taking the fourth preset resampling time difference as the target resampling time difference; Wherein, the third preset resampling time difference is smaller than the fourth preset resampling time difference.

6. The method according to claim 4, characterized in that The identifying the horizontal or vertical screen orientation of the electronic device to obtain a horizontal or vertical screen identification result includes: Acquiring acceleration data of the electronic device; A horizontal or vertical screen recognition result of the electronic device is determined according to the acceleration data.

7. The method according to claim 6, characterized in that The step of determining the horizontal or vertical screen recognition result of the electronic device according to the acceleration data includes: Determining target acceleration data of the electronic device in a target detection direction; the target detection direction is a direction opposite to the horizontal and vertical screen directions of the electronic device; If the target acceleration data falls within a preset acceleration range and the duration of the target acceleration data within the preset acceleration area is greater than or equal to a preset duration threshold, it is determined that the horizontal or vertical screen direction of the electronic device is switched to the target detection direction.

8. The method according to any one of claims 1 to 7, characterized in that The step of resampling the target touch screen data reported before the screen refresh event according to the sampling time point to obtain supplementary touch screen data includes: Comparing the order of the sampling time point and the time point of the target touch screen event; the target touch event is the event that reports the touch screen data most recently before the screen refresh event; If the sampling time point is before the time point of the target touch screen event, interpolating the target touch screen data reported before the screen refresh event to obtain supplementary touch screen data; If the sampling time point is after the time point of the target touch screen event, the target touch screen data reported before the screen refresh event is extrapolated to obtain supplementary touch screen data.

9. A touch screen data resampling device, characterized in that: include: A scene recognition module is used to perform scene recognition on the electronic device and obtain a scene recognition result; A time difference determination module, used to determine a corresponding target resampling time difference according to the scene recognition result; the target resampling time difference is the time difference between a sampling time point before a screen refresh event and a screen refresh event time point; A sampling time determination module, used for determining a sampling time point according to the target resampling time difference and the time point of the screen refresh event each time a screen refresh event is monitored; The resampling module is used to resample the target touch screen data reported before the screen refresh event according to the sampling time point to obtain supplementary touch screen data.

10. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor executes the steps of the touch screen data resampling method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Method for processing data collected by touch screen and terminal equipment

    CN105700668A

  • Method and device for preventing mistaken touch of touch screens and mobile terminal

    CN106708263A

  • Control method based on vertical synchronization signal and electronic device

    CN110609645A

  • Point reporting information processing method and device, terminal and storage medium

    CN114115589A

  • Touch event processing method and device, mobile terminal and storage medium

    CN114341784A