Point report rate setting method and device, electronic equipment and computer readable medium
By obtaining and setting the screen refresh rate and point rate of electronic devices to match them, the problems of stuttering and jittering in touch screen sliding operation in the prior art are solved, and a smoother user experience is achieved.
Patent Information
- Application Number
- CN202310664404.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2024-12-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The current touch screen has a fixed or limited point rate, which causes users to feel stuttering and jittering during sliding operation, and cannot meet the smooth changes in image position during continuous screen refresh operation.
By obtaining the screen target refresh rate of the electronic device, setting the target point rate based on the refresh rate, so that the number of touch points collected between any two screen refresh intervals is the same, ensuring that the number of touch points during continuous screen refresh operation is consistent, and avoiding the problem of Stuck and jitter caused by mismatch between the point rate and the screen refresh rate.
The coherence of the touch position changes felt by users during the sliding operation is achieved, and the lag and jitter problems caused by unreasonable settings of the screen refresh rate and point rate are avoided, which improves the smoothness of the sliding operation.
Smart Images

Figure CN119088238A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a method, device, electronic device and computer-readable medium for setting a reporting rate. Background Art
[0002] With the development of electronic technology, the functions of electronic devices are becoming more and more abundant. For example, electronic devices are equipped with touch screens. Users can control electronic devices by executing touch events on the touch screen, including press (down) events, lift (up) events, and slide (move) events, etc. However, the touch screen only has one or a few fixed reporting rates, which makes the current setting of the reporting rate unreasonable. Summary of the invention
[0003] The present application proposes a method, device, electronic device and computer-readable medium for setting a reporting rate.
[0004] In a first aspect, an embodiment of the present application provides a reporting rate setting method, which is applied to an electronic device, the method comprising: obtaining a target refresh rate of the screen of the electronic device; setting a target reporting rate of the electronic device based on the target refresh rate; collecting touch points acting on the screen of the electronic device based on the target reporting rate, so that the number of touch points collected based on the target reporting rate between any two target screen refresh intervals is the same, wherein the electronic device can collect touch points between two consecutive screen refresh operations corresponding to the target screen refresh interval.
[0005] In a second aspect, an embodiment of the present application further provides a reporting rate setting device, which is applied to an electronic device, and the device includes: an acquisition unit, a setting unit, and a collection unit. The acquisition unit is used to acquire the target refresh rate of the screen of the electronic device. The setting unit is used to set the target reporting rate of the electronic device based on the target refresh rate. The collection unit is used to collect touch points acting on the screen of the electronic device based on the target reporting rate, so that the number of touch points collected based on the target reporting rate between any two target screen refresh intervals is the same, wherein the electronic device can collect touch points between two consecutive screen refresh operations corresponding to the target screen refresh interval.
[0006] In a third aspect, an embodiment of the present application also provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the above method.
[0007] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the readable storage medium stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the above method.
[0008] The reporting rate setting method, device, electronic device and computer-readable medium provided in the present application obtain the target refresh rate of the screen of the electronic device; based on the target refresh rate, set the target reporting rate of the electronic device, and collect touch points acting on the screen of the electronic device based on the target reporting rate, so that the number of touch points collected based on the target reporting rate between any two target screen refresh intervals is the same, wherein the electronic device can collect touch points between two consecutive screen refresh operations corresponding to the target screen refresh interval. Therefore, based on the reporting rate adjusted by the screen refresh rate, the number of touch points collected based on the target reporting rate in all screen refresh intervals corresponding to the collected touch points can be made the same, thereby avoiding the lack of consistency in the change of the touch position felt by the user due to the different number of touch points collected between two consecutive screen refresh operations.
[0009] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and partly become apparent from the description, or can be understood by practicing the embodiments of the present application. The purposes and other advantages of the embodiments of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0011] Figure 1 A schematic diagram showing a sliding operation provided in an embodiment of the present application is shown;
[0012] Figure 2 A schematic diagram showing the principle of sliding jamming provided by an embodiment of the present application is shown;
[0013] Figure 3 A method flow chart of a method for setting a reporting rate provided by an embodiment of the present application is shown;
[0014] Figure 4 A schematic diagram showing a long press operation provided in an embodiment of the present application is shown;
[0015] Figure 5A method flow chart of a method for setting a reporting rate provided by another embodiment of the present application is shown;
[0016] Figure 6 A schematic diagram showing the relationship between the screen refresh rate and the reporting rate provided in an embodiment of the present application is shown;
[0017] Figure 7 A schematic diagram showing the relationship between the screen refresh rate and the reporting rate provided by another embodiment of the present application is shown;
[0018] Figure 8 A schematic diagram showing the relationship between the screen refresh rate and the reporting rate provided by another embodiment of the present application is shown;
[0019] Fig. 9 A method flow chart of a method for setting a reporting rate provided by another embodiment of the present application is shown;
[0020] Fig.10 A schematic diagram of a module of a reporting rate setting device provided in an embodiment of the present application is shown;
[0021] Fig.11 A structural block diagram of an electronic device provided in an embodiment of the present application is shown;
[0022] Fig.12 A storage unit for storing or carrying a program code for implementing a method for setting a reporting rate according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0024] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0025] With the development of electronic technology, electronic devices with touch panels (TP) such as mobile phones and tablet computers have become widely popular, and the development of touch technology has undergone great changes. Various touch scenarios such as games and various touch scenarios have made users more and more demanding on touch. Related technologies meet users' usage needs by increasing the reporting speed, but there is a problem of poor reporting stability and jitter in the picture displayed to users on the touch screen.
[0026] The user controls the electronic device by executing touch events on the touch screen, including press (down) events, lift (up) events, and slide (move) events. The reporting rate of the touch screen refers to the number of valid reporting data that the touch screen can provide per unit time, which represents the response speed of the touch screen to touch events. The higher the reporting rate, the faster the response speed (that is, the better the hand tracking).
[0027] The inventor found in the research that the touch screen has only one or a few fixed reporting rates, and this fixed reporting rate usually causes experience problems such as freezes and screen jitters. The reasons for freezes and jitters are usually:
[0028] The operating system of electronic devices uses a synchronization signal (vsync) to control the screen display content. The screen refresh rate is the vsync frequency. When each vsync signal arrives, the display data (that is, the data of an image) is taken from the buffer for display. If the data is not ready in time when vsync arrives, the picture displayed this time will be the same as the picture at the last vsync, which gives the user the feeling of lag. Of course, if the display data does not change for multiple times, the same lag effect will also occur.
[0029] Assume that the user inputs a sliding gesture of uniform sliding on the screen with his finger. When each vsync arrives, the movable object on the interface should move the same distance following the sliding gesture. Once the distance changes differently, the user will perceive jitter and unsmoothness. Similarly, for sliding gestures that are not uniformly slid, if the distance changes too abruptly, the user will also perceive jitter and stuttering. In the embodiments of the present application, in order to facilitate the description of the stuttering and jittering phenomenon caused by unreasonable setting of the reporting rate, the defect is described in the scenario of uniform sliding. However, this application is not limited to the scenario of uniform sliding only.
[0030] Exemplarily, assuming that a user inputs a uniform sliding gesture on the screen of an electronic device, then the sliding distance of the user on the screen per unit time should be fixed. Taking the same direction as an example, during the sliding of the user's hand along this direction, if the user's touch points on the screen are collected at a fixed reporting rate, the distance interval between the positions of two consecutive collected sliding points (i.e., the touch points during the sliding operation, i.e., move) should be the same. For example, the sliding speed of the uniform sliding gesture input by the user is 5M / ms, where M represents the area of a single pixel, i.e., 5M is the area of 5 pixels, so the sliding speed is 5 pixels within 1ms. Assuming that the current reporting rate is 120Hz, i.e., the time interval of the reporting cycle is 8.3ms, then in the aforementioned scenario of uniform sliding along this direction, the distance between two consecutive collected sliding points (i.e., the sliding distance) is approximately equal to 42M. Figure 1 As shown, assuming that a uniform sliding gesture is input along the direction of F1, that is, the drag operation object (i.e., basketball pattern) is sent along F1, wherein g1 is the position of the pressed gesture, i.e., the position of the down event, and g7 is the position of the lifted sliding gesture, i.e., the position of the up event. Between g1 and g7, the sliding points are collected using the first reporting rate, and the sliding points corresponding to the five positions of g2, g3, g4, g5, and g6 can be collected in sequence, that is, five sliding points can be collected, and the five sliding points are g2, g3, g4, g5, and g6 from g1 to g7 in sequence. If the image corresponding to the position of each sliding point collected by the electronic device through the first reporting rate, i.e., the image displayed at each position of the drag operation object reaching g2, g3, g4, g5, and g6, can be seen by the user, then the user can perceive that the operation object is dragged uniformly from g1 to g7. However, if at least one of the images corresponding to each position of the operation objects g2, g3, g4, g5 and g6 is not displayed, the user will perceive a freeze or a shake.
[0031] This kind of freeze or jitter is caused by the mismatch between the reporting rate and the screen refresh rate. It is understandable that when the screen refresh rate of the electronic device arrives, the electronic device will perform a screen refresh operation and display an image on the screen. For example, please refer to Figure 2 , Figure 2 The corresponding scenario is that the user drags the aforementioned operation object and slides it at a constant speed through a constant speed sliding gesture. Figure 25 screen refresh operations are shown, and the screen refresh rate of the electronic device at this time is the first refresh rate, for example, the first refresh rate is 90Hz, and the time interval between two consecutive screen refresh operations is 11.1ms. As described above, each time a screen refresh operation occurs, the electronic device will display an image, and the position of the operation object in the image depends on the position corresponding to the sliding point collected by the electronic device, such as Figure 2 As shown, when screen refresh 2 arrives, the position of the operating object in the displayed image (i.e., the aforementioned sliding object) in the screen is the position corresponding to sliding point 1, i.e., position g2. When screen refresh 3 arrives, the position of the operating object in the image triggered by screen refresh 3 in the screen is the position corresponding to sliding point 2, i.e., position g3. Assuming that the reporting rate of the electronic device at this time is the aforementioned first reporting rate, then the distance between sliding point 2 and sliding point 1 is 42M. Therefore, if the user can perceive the uniform sliding of the operating object in the scenario of a uniform sliding gesture, then when the next screen refresh arrives, i.e., screen refresh 4 arrives, if the distance between the position corresponding to the operating object in the displayed image and position g3 is still 42, the user can feel the uniform movement of the operating object without any lag or jitter. Then, from Figure 2 It can be seen that between screen refresh 3 and screen refresh 4, the electronic device collected two sliding points, namely sliding point 3 and sliding point 4, the position of sliding point 3 on the screen is position g4, and the position of sliding point 4 on the screen is position g5. As mentioned above, when the screen refresh arrives, usually only one picture is displayed, that is, the electronic device will determine a sliding point from sliding point 3 and sliding point 4 to generate a corresponding image, and usually, the electronic device will generate an image based on the last touch point of all touch points collected in the current screen refresh interval and wait for the screen refresh to arrive before displaying, that is, the electronic device will generate an image based on sliding point 4 as the image displayed when screen refresh 4 arrives. Therefore, after screen refresh 4 arrives, the position of the operation object in the image seen by the user on the screen is at the position corresponding to sliding point 4, that is, position g5, and the distance between position g5 and position g3 is 84M, which is obviously greater than the distance between the display positions of the operation objects on the screen between screen refresh 2 and screen refresh 3 (that is, 42M). The user will feel obvious freezes and jitters at this time.
[0032] Therefore, after careful study of the above phenomenon, the inventors concluded that due to the unreasonable settings of the screen refresh rate and the reporting rate, the number of sliding points is different within the continuous screen refresh interval, which cannot satisfy the requirement that the distance between the display positions in the image displayed by the continuous screen refresh operation is smooth. This is not only applicable to uniform sliding, but also to non-uniform sliding, because non-uniform motion will also cause the sliding trajectory to be abrupt, that is, freeze and jitter, due to the different number of sliding points in the continuous screen refresh interval.
[0033] Therefore, in order to overcome the above-mentioned defects, an embodiment of the present application provides a method for setting the reporting rate, which can reasonably set the reporting rate based on the current screen refresh rate, and can alleviate the above-mentioned stuttering or jittering phenomenon.
[0034] See also Figure 3 , Figure 3 A method for setting a reporting rate is shown, which is applied to an electronic device. The method includes: S301 to S303.
[0035] S301: Obtain a target refresh rate of the screen of the electronic device.
[0036] It should be noted that the target refresh rate refers to the refresh rate currently used by the screen of the electronic device, that is, the aforementioned vsync frequency, that is, the number of image frames displayed on the screen of the electronic device per unit time. Taking the Android operating system as an example, it has a control strategy for the screen refresh rate. The code is mainly in the display management module (DisplayManagerService) and the interface drawing module (SurfaceFlinger). The display management module will monitor the changes in the screen refresh rate and the changes in the device display hardware through the two monitoring services mSettingsObserver and mDisplayObserver. The display management module calls the SurfaceControl.setAllowedDisplayConfigs interface to affect the screen refresh rate, and directly calls the SurfaceFlinger service through the JNI interface and libgui. Exemplarily, the service handle of SurfaceFlinger is obtained through getComposerService, and then its interface setAllowedDisplayConfigs is called to update the screen refresh rate.
[0037] When the SurfaceFlinger service is successfully started, the setRefreshRateTo interface will be called to set the screen refresh rate to the highest refresh rate supported by the device. Then if there is a default value in the setting module (setting), it will be changed again through setAllowedDisplayConfigs to change the screen refresh rate to the default value, for example, 60Hz. If you want the screen refresh rate to change adaptively according to the scene, you can set the Schedule, which is the handle of the init() function of SurfaceFlinger. Its function is to manage or set the screen refresh rate. Through this handle, some policies can be set so that the refresh rate of the electronic device's screen is no longer the default value, but can be based on some policy changes. However, changes in the screen refresh rate can be obtained by the aforementioned monitoring service and sent to the kernel layer of the operating system of the electronic device, and then sent by the kernel layer to the driver controller of the reporting rate. The driver controller is used to collect touch points of touch operations on the screen based on a certain reporting rate.
[0038] As an implementation mode, considering that in the embodiment of the present application, the purpose of obtaining the current screen refresh rate (i.e., target refresh rate) of the screen of the electronic device is to make the sliding gesture smoother when the user inputs the sliding gesture on the screen, therefore, when the electronic device is in a scenario where a sliding operation is performed, the operation of obtaining the target refresh rate of the electronic device is performed. The specific method of obtaining the screen refresh rate can refer to the aforementioned description and will not be repeated here. Among them, the scenario where the electronic device is in a sliding operation refers to a sliding operation on the screen. Therefore, when it is detected that a sliding operation is input to the screen, the current screen refresh rate of the screen of the electronic device is read as the target refresh rate.
[0039] Furthermore, the embodiments of the present application are applied to a sliding operation on the screen, especially a dragging operation on an operation object displayed on the screen based on the sliding operation. Therefore, when a sliding operation is detected on the screen and the operation object of the sliding operation is a draggable object, the operation of obtaining the target refresh rate of the electronic device of the present application is performed.
[0040] S302: Setting a target reporting rate of the electronic device based on the target refresh rate.
[0041] S303: Collecting touch points acting on the screen of the electronic device based on the target reporting rate so that the number of touch points collected based on the target reporting rate between any two target screen refresh intervals is the same, wherein the electronic device can collect touch points between two consecutive screen refresh operations corresponding to the target screen refresh interval.
[0042] It should be noted that, when the target reporting rate is less than the target refresh rate, it is possible that the electronic device has not collected touch points in some or a certain screen refresh operation interval. Therefore, during this touch operation, the screen refresh operation interval that does not correspond to a touch point does not belong to the target screen refresh interval, and the screen refresh operation interval that corresponds to a touch point belongs to the target screen refresh interval. Therefore, for those screen refresh operation intervals in which touch points are collected, if the number of touch points is the same, it is also possible to avoid jitter or jamming of the sliding operation due to the inconsistency of the position of the operating object in the displayed image. In addition, although no sliding point is collected in a certain screen refresh operation interval, that is, the position of the operating object in the image to be displayed corresponding to the screen refresh operation interval has not changed, if the content of other image areas in the image to be displayed changes, or even if other content has not changed, the user will not feel obvious jamming.
[0043] Based on the above analysis of the reasons for the stuck and jitter of the screen of the operation object being slid when the user inputs the sliding operation, it can be seen that the essence of the defect is that the reporting rate of the sliding points collected by the electronic device user for the sliding operation and the screen refresh rate of the screen of the electronic device are set unreasonably, so that within the time interval between two consecutive screen refresh operations, the change of the display position of the operation object in the image to be displayed is not smooth enough, and a mutation point is generated. The reason for this phenomenon is that the number of touch points collected based on the target reporting rate between two consecutive screen refresh operations is different. Therefore, in the embodiment of the present application, by reasonably setting the target reporting rate of the electronic device based on the target refresh rate, the electronic device collects the touch points of the screen based on the target reporting rate, and the number of touch points collected based on the target reporting rate between any two consecutive screen refresh operations is the same, so that within the time period of the current continuous touch operation, each time the screen refresh operation arrives, the image determined based on the collected touch points and the change trend of the operation object of the previous frame image are smooth.
[0044] As an implementation method, the target reporting rate and the target refresh rate are in an integer multiple relationship, which will be described in the subsequent embodiments. As another implementation method, the target reporting rate and the target refresh rate may not be in an integer multiple relationship. For details, please refer to Figure 2 , Figure 2 The number of sliding points between screen refresh 3 and screen refresh 4 is 2, while the number of sliding points in the interval of screen refresh operation before that is 1, that is, even if Figure 2The settings of the screen refresh rate and the reporting rate are unreasonable, and there is also a situation where the number of touch points collected based on the target reporting rate between two consecutive screen refresh operations is the same. Therefore, under the condition that the target reporting rate and the target refresh rate are not integer multiples, the difference between the target reporting rate and the target refresh rate can be set to be less than the first specified threshold, that is, the difference between the target reporting rate and the target refresh rate is set to a smaller value, and after a press operation is detected, a screen refresh operation is immediately performed, that is, the time difference between the first screen refresh operation after the press operation and the press operation is shortened, and the time difference is less than the second specified threshold. Through such a setting, the condition that the number of touch points collected based on the target reporting rate is the same between two consecutive screen refresh operations can be met over a long period of time, that is, after the sliding operation starts, the number of touch points collected based on the target reporting rate is the same between two consecutive screen refresh operations over a long period of time, that is, the duration of the screen refresh interval corresponding to the change in the number of touch points is long, and this duration occupies most of the duration of this sliding operation, and even in the case of a short sliding operation, the sliding operation ends before the screen refresh interval corresponding to the change in the number of touch points is reached. In this case, when the target reporting rate and the target refresh rate are not integer multiples, by reasonably setting the first specified threshold and the second specified threshold, it can also be achieved that during this sliding operation, the number of touch points collected based on the target reporting rate is the same between any two consecutive screen refresh operations.
[0045] It should be noted that sliding operations usually consist of three types of gestures, namely, a press (down) event, a lift (up) event, and a slide (move) event. In order to be able to quickly determine and use the reporting rate based on the target refresh rate of the electronic device during the user input of the sliding event, when the press event is detected, the operation of obtaining the target refresh rate of the electronic device and the operation of setting the target reporting rate of the electronic device are executed. If there is no sliding event after the press event, that is, this is only a long press operation or a click operation, then the operation of obtaining the target refresh rate of the electronic device and setting the target reporting rate of the electronic device based on the target refresh rate will not cause excessive resource consumption. Setting the target reporting rate before sliding can be used when the sliding event is subsequently input, and a reasonable reporting rate can be quickly used.
[0046] In addition, in an embodiment of the present application, when a change in the screen refresh rate is detected, the target reporting rate can be updated so that the setting of the reporting rate is always synchronized with the current refresh rate of the screen. That is, when an update of the screen refresh rate of the electronic device is detected, the updated screen refresh rate is used as the new target refresh rate, and the operation of setting the target reporting rate of the electronic device based on the target refresh rate and subsequent operations are returned.
[0047] It should be noted that, in the embodiment of the present application, the touch points acting on the screen of the electronic device collected based on the target reporting rate can be the aforementioned sliding points, or can be pressing points corresponding to long press operations. Among them, the beneficial effects of the target reporting rate on the collection of sliding points provided by the embodiment of the present application can be referred to the aforementioned description, which will not be repeated here. The beneficial effects on pressing points are described as follows. In some scenarios, the collected pressing duration of the user's long press operation on the electronic device can be used to control the target object to change the displayed content. For example, Figure 4 In the scenario shown, by inputting a press gesture in a specified area, the target object (i.e., a virtual car) can be controlled to move. The moving distance of the target object is related to the pressing duration. In the moving animation displayed by the target object, the change between the position of the target object in each image frame can determine whether the target object is smooth in the moving animation. Assuming that the target object moves at a constant speed, during the process of the user inputting a press gesture, the electronic device collects the press points corresponding to the press gesture through the second reporting rate. The time interval between the continuously collected press points is based on the inverse of the second reporting rate. If two consecutive screen refresh intervals correspond to The number of press points is different. For example, the press point of the previous screen refresh interval (named as the first interval) is press point 1, and the press points of the next screen refresh interval (named as the second interval) are press points 2 and 3. Since the time interval between any two adjacent press points among press point 1, press point 2 and press point 3 is fixed, there are two press points in the second interval, and the image corresponding to press point 3 will actually be displayed. Then the image corresponding to press point 2 will not be displayed. Therefore, from the user's point of view, the target object suddenly changes from the position corresponding to press point 1 to the position corresponding to press point 3. Therefore, it can be seen that for the press gesture, the effect of the same number of touch points collected based on the target reporting rate between any two consecutive screen refresh operations provided by the embodiment of the present application can also solve the jitter and freeze problems it faces.
[0048] It is understandable that the embodiments of the present application are not limited to the scenarios of sliding operations. However, in order to facilitate the description of the technical effects of other embodiments, the scenarios of sliding operations are used as examples. Ordinary technicians in this field should understand that the subsequent embodiments are also not limited to the scenarios of sliding operations.
[0049] Therefore, in an embodiment of the present application, a target refresh rate of the electronic device is obtained; based on the target refresh rate, a target reporting rate of the electronic device is set; based on the target reporting rate, touch points acting on the screen of the electronic device are collected, so that the number of touch points collected based on the target reporting rate between any two consecutive screen refresh operations is the same. Therefore, based on the reporting rate adjusted based on the screen refresh rate, the number of touch points collected based on the target reporting rate between two consecutive screen refresh operations can be made the same, avoiding the lack of consistency in the change of the touch position felt by the user due to the different number of touch points collected between two consecutive screen refresh operations.
[0050] See also Figure 5 , Figure 5 A method for setting a reporting rate is shown, which is applied to an electronic device. The method includes: S501 to S503.
[0051] S501: Obtain a target refresh rate of the screen of the electronic device.
[0052] S502: Based on the target refresh rate, setting a target reporting rate of the electronic device, wherein the target refresh rate and the target reporting rate are integer multiples.
[0053] S503: Collecting touch points acting on the screen of the electronic device based on the target reporting rate so that the number of touch points collected based on the target reporting rate between any two target screen refresh intervals is the same, wherein the electronic device can collect touch points between two consecutive screen refresh operations corresponding to the target screen refresh interval.
[0054] In the embodiment of the present application, the target refresh rate is an integer multiple of the target reporting rate, and the application scenario is a sliding operation on the screen, especially a drag operation on the operation object displayed on the screen based on the sliding operation. The target refresh rate is an integer multiple of the target reporting rate, which may mean that the target refresh rate is a positive integer multiple of the target reporting rate, or that the target reporting rate is a positive integer multiple of the target refresh rate. The following describes these two implementations respectively.
[0055] As an implementation method, the target reporting rate is a positive integer multiple of the target refresh rate. The implementation method of setting the target reporting rate of the electronic device based on the target refresh rate is to use the product of the target refresh rate and the first weight as the target reporting rate, wherein the first weight is a positive integer. It should be noted that when the reporting rate increases, the collected sliding points can be smoother. For example, taking uniform sliding as an example, if there are 2 reporting points between the first screen refresh operation and the second screen refresh operation, the coordinates are from 100 to 200, and there are 3 reporting points between the second screen refresh operation and the third screen refresh operation, the coordinates are 200 to 350, so the difference between the two coordinates is 50; if there are 4 reporting points between the first screen refresh operation and the second screen refresh operation, the coordinates are still 100 to 200, and there are 5 reporting points between the second screen refresh operation and the third screen refresh operation, the coordinates are 200 to 325, and the difference between the two coordinates is only 25. However, the increase in the reporting rate will increase the power consumption of the electronic device and the load of the CPU of the electronic device. Generally, when the target reporting rate is a positive integer multiple of the target refresh rate, the target reporting rate is less than or equal to the specified frequency, for example, the specified frequency is 360Hz. Assuming that the target refresh rate of the screen is 60Hz, the value range of the first weight is an integer from 1 to 6.
[0056] Typically, the target reporting rate is 1 or 2 times the target refresh rate. For example, assuming that the first weight is 1, that is, the target reporting rate is 1 times the target refresh rate. Figure 6 As shown, the number of sliding points between each two adjacent screen refresh operations is 1. This is because the target reporting rate is the same as the target refresh rate. On the time axis, the time interval between two adjacent sliding points and the time interval of the screen refresh operation are constant. That is, the time interval between the moment when the sliding point is collected and the moment of the next adjacent screen refresh operation is always constant. Therefore, the number of sliding points between any two adjacent screen refresh operations is always consistent, as shown in Figure 6 As shown, the image to be displayed prepared within the screen refresh interval is the image corresponding to the only sliding point collected within the screen refresh interval, that is, the position of the operation object in the image is the position corresponding to the sliding point collected within the interval. Taking uniform sliding as an example, the position change of the operation object in two consecutively displayed frames is constant. For non-uniform motion, the position change of the operation object in two consecutively displayed frames is also only related to the sliding speed of the sliding gesture. It will not cause jitter due to the different number of touch points in two consecutive screen refresh intervals, and the operation object shows a good display effect of following the sliding gesture.
[0057] As another example, assume that the first weight is 2, that is, the target reporting rate is twice the target refresh rate. Figure 7As shown, between each two adjacent screen refresh operations (i.e., the screen refresh interval), the number of sliding points collected by the electronic device is 2. As mentioned above, when there are multiple sliding points within the screen refresh interval, the image corresponding to the nearest sliding point is usually displayed. That is to say, within the screen refresh interval, the user drags the operation object by inputting a sliding operation, and the electronic device collects two sliding points based on the target reporting rate, which correspond to positions g21 and g22 respectively, and position g22 is farther away from position g1 corresponding to the pressing operation than position g21. At the end of the screen refresh interval, a new screen When the screen refresh operation comes, the image displayed is the image of the operation object at position g22. Similarly, the image to be displayed in the screen refresh interval between screen refresh 2 and screen refresh 3 is the image of the operation object at position g24, and the image to be displayed in the screen refresh interval between screen refresh 3 and screen refresh 4 is the image of the operation object at position g26. Assuming that the current scene is a uniform sliding in the same direction from the position g1 where the operation is pressed, the distance between position g22 and position g24 is the same as the distance between position g24 and position g26, and the movement of the operation object felt by the user is smooth.
[0058] Therefore, when the target reporting rate is a positive integer multiple of the target refresh rate, the target reporting rate can usually be selected to be 1 times or 2 times the target refresh rate, so as to take into account the power consumption and CPU load rate of the electronic device, as well as the timeliness of touch point acquisition and the smoothness of the sliding operation.
[0059] As another implementation, the target refresh rate is a positive integer multiple of the target reporting rate. Then, the implementation method of setting the target reporting rate of the electronic device based on the target refresh rate is to use the product of the target refresh rate and a second weight as the target reporting rate, wherein the second weight is the reciprocal of a positive integer.
[0060] It can be understood that the aforementioned target reporting rate is 1 times the target refresh rate, which also belongs to the implementation scope corresponding to the target refresh rate being a positive integer multiple of the target reporting rate and the target refresh rate, that is, the second weight can also be 1. For example, assuming that the second weight is 2, such as Figure 8 As shown, the interval between screen refresh 1 and screen refresh 2 is named the first interval, the interval between screen refresh 2 and screen refresh 3 is named the second interval, the interval between screen refresh 3 and screen refresh 4 is named the third interval, the interval between screen refresh 4 and screen refresh 5 is named the fourth interval, and the interval between screen refresh 5 and screen refresh 6 is named the fifth interval. Figure 8It can be seen that there is no sliding point in the first interval, the third interval and the fifth interval, that is, the electronic device does not detect the sliding point in the first interval, the third interval and the fifth interval, and the electronic device collects the sliding point in the second interval and the fourth interval, that is, the second interval and the fourth interval belong to the target screen refresh interval, and it can be seen that the number of sliding points collected by the electronic device based on the target reporting rate in the second interval and the fourth interval is the same. That is to say, in the second interval, the position of the operation object in the image is the position g31 corresponding to the sliding point 1, in the third interval, the position of the operation object in the image remains unchanged, and is still the position g31, in the fourth interval, the position of the operation object in the image is the position g32 corresponding to the sliding point 2, in the fifth interval, the position of the operation object in the image remains unchanged, and is still the position g32, in the next interval after the fifth interval, that is, the sixth interval, the position of the operation object in the image is the position g33 corresponding to the sliding point 3, and it can be seen that in the time period from the first interval to the sixth interval, the sliding of the operation object is still smooth, not jittery.
[0061] Therefore, the target refresh rate and the target reporting rate being an integer multiple relationship can mean that the target refresh rate is a positive integer multiple of the target reporting rate, or it can mean that the target reporting rate is a positive integer multiple of the target refresh rate. Usually, considering the smoothness of the sliding operation, the target reporting rate is often set to be a positive integer multiple of the target refresh rate, that is, the target reporting rate is greater than or equal to the target refresh rate. Usually, the target reporting rate is 1 or 2 times the target refresh rate.
[0062] See also Fig. 9 , Fig. 9 A method for setting a reporting rate is shown, which is applied to an electronic device. The method includes: S901 to S904.
[0063] S901: Obtain a target refresh rate of the screen of the electronic device.
[0064] S902: Acquire display content on the screen of the electronic device.
[0065] S903: Setting a target reporting rate of the electronic device based on the display content and the target refresh rate.
[0066] As an implementation mode, after obtaining the display content on the screen of the electronic device, the attribute information corresponding to the display content can be determined, and the target reporting rate of the electronic device can be set based on the attribute information and the target refresh rate. Specifically, the reporting rate selection range of the electronic device can be set by the target refresh rate, and then a reporting rate is determined from a plurality of alternative reporting rates within the reporting rate selection range based on the attribute information as the target reporting rate. Among them, the reporting rate selection range is determined by determining the value range of the reporting rate as the reporting rate selection range based on the strategy of the target reporting rate and the target refresh rate being positive integer multiples and the constraint condition of the target reporting rate, wherein the constraint condition is that the target reporting rate is not greater than the specified frequency (refer to the aforementioned embodiment). For example, the reporting rate selection range is N times the target refresh rate, N is a positive integer from 1 to L, and L is the ratio of 360Hz to the target refresh rate.
[0067] It should be noted that the attribute information corresponding to the displayed content may include at least one of an interface type corresponding to the displayed content, an application type of an application corresponding to the displayed content, and a touch frequency of an application corresponding to the displayed content.
[0068] As an implementation method, the attribute information of the displayed content is the interface type corresponding to the displayed content. Based on the attribute information, a reporting rate is determined from multiple alternative reporting rates within the reporting rate selection range. As an implementation method of the target reporting rate, it is determined whether the interface type is a specified type. If it is a specified type, A reporting rates with the highest frequencies are selected from the multiple alternative reporting rates as the reporting rates to be selected. For example, if A is 2, the reporting rate to be selected is the highest alternative reporting rate or the second highest alternative reporting rate.
[0069] Exemplarily, the interface of the specified type may be a first interface with frequent touch control, for example, for game applications, the first interface refers to a game operation interface, in which the user can control the game object in the game, for example, the game object can be dragged. Therefore, for the game operation interface, which is a frequently touched interface, a higher reporting rate can be used as the target reporting rate, which can not only collect touch points in time, but also make the touch smoother. Exemplarily again, considering that setting the target reporting rate may consume a certain amount of time, in order to enable the electronic device to use the target reporting rate in time when the user operates the specified interface, the target reporting rate can be determined in advance before the electronic device enters the specified interface, so the interface of the specified type may be a second interface, and the second interface may be the upper level interface of the first interface, and the electronic device needs to display the second interface before displaying the first interface. For example, the second interface may be a loading interface of the first interface. As mentioned above, the first interface is a game operation interface, and the second interface is a loading interface of the game operation interface. When the electronic device displays the second interface, it loads the data corresponding to the first interface, and usually in the loading interface, the user will not manipulate the interface. Therefore, when the electronic device displays the second interface, the operation of setting the target reporting rate of the electronic device is executed. Not only will there be no jitter when the user slides the second interface because the reporting rate has not been changed to the target reporting rate when the second interface is displayed, but the target reporting rate can also be obtained in advance before the first interface is displayed. Therefore, when the electronic device displays the first interface, the target reporting rate can be used in time to capture the sliding operation input by the user on the first interface.
[0070] As another implementation method, the attribute information of the displayed content is the application type of the application corresponding to the displayed content, and a reporting rate is determined from multiple alternative reporting rates within the reporting rate selection range based on the attribute information. As an implementation method of the target reporting rate, the application type of the application corresponding to the displayed content is determined, and a pre-set frequency correspondence table is obtained. The frequency correspondence table includes the frequency range corresponding to each type of application, wherein the frequency ranges corresponding to game applications, social applications, and video applications decrease in sequence. Based on the frequency correspondence table, the target type that matches the application type of the application corresponding to the displayed content in the frequency correspondence table is determined, and then the target frequency range corresponding to the target type is determined. The alternative reporting rate in the target frequency range among the multiple alternative reporting rates is used as the reporting rate to be selected, and a reporting rate is selected from the reporting rates to be selected as the target reporting rate. Therefore, different types of reporting frequencies can be selected for different types of applications. A higher reporting rate can be set for game applications, and a lower reporting rate can be set for applications with fewer sliding operations such as video applications.
[0071] As another implementation, the attribute information of the displayed content is the touch frequency of the application corresponding to the displayed content, and a reporting rate is determined from a plurality of alternative reporting rates within the reporting rate selection range based on the attribute information. As an implementation of the target reporting rate, the touch frequency of the application corresponding to the displayed content is determined, and a reporting rate is determined from a plurality of alternative reporting rates based on the touch frequency as the target reporting rate, wherein the target reporting rate is positively correlated with the touch frequency, that is, the higher the touch frequency of the application, the greater the determined target reporting rate, but the determined target reporting rate is taken from the reporting rate selection range. It should be noted that the touch frequency of the application can be determined in advance based on the historical data of the application. For example, the number of times the application is touched within a specified time period can be counted to obtain the total number of touches, and then the touch frequency can be obtained by the ratio of the total number of touches to the length of the specified time period. Therefore, the reporting rate determined by the touch frequency allows a higher reporting rate to be used for applications with a higher touch frequency, which can make the collection of touch points more complete and smooth.
[0072] It should be noted that the target reporting rate can be determined by any combination of the interface type corresponding to the displayed content, the application type of the application corresponding to the displayed content, and the touch frequency of the application corresponding to the displayed content. For example, the corresponding reporting rates can be determined in sequence based on the interface type corresponding to the displayed content, the application type of the application corresponding to the displayed content, and the touch frequency of the application corresponding to the displayed content, and then the intersection of the corresponding reporting rates is calculated to obtain the same reporting rate as the target reporting rate. Alternatively, if there is no intersection, the highest or lowest reporting rate among the corresponding reporting rates is used as the target reporting rate. Alternatively, the corresponding reporting rates are displayed on the screen to obtain the reporting rate selected by the user as the target reporting rate.
[0073] S904: Collecting touch points acting on the screen of the electronic device based on the target reporting rate so that the number of touch points collected based on the target reporting rate between any two target screen refresh intervals is the same, wherein the electronic device can collect touch points between two consecutive screen refresh operations corresponding to the target screen refresh interval.
[0074] Therefore, by jointly determining the target reporting rate through the content displayed on the screen of the electronic device and the current target refresh rate of the screen, the current display content can be taken into account, so that the setting of the reporting rate is more in line with the current application scenario.
[0075] See also Fig.10 , which shows a structural block diagram of a reporting rate setting device 1000 provided in an embodiment of the present application. The device may include: an acquisition unit 1001, a setting unit 1002 and a collection unit 1003.
[0076] The acquisition unit 1001 is used to acquire a target refresh rate of the screen of the electronic device.
[0077] Furthermore, the acquisition unit 1001 is further configured to acquire a target refresh rate of the electronic device when a sliding operation on the screen of the electronic device is detected.
[0078] The setting unit 1002 is used to set a target reporting rate of the electronic device based on the target refresh rate.
[0079] Furthermore, the setting unit 1002 is further configured to use the product of the target refresh rate and a first weight as the target reporting rate, wherein the first weight is a positive integer.
[0080] Furthermore, the setting unit 1002 is further configured to use the product of the target refresh rate and a second weight as the target reporting rate, wherein the second weight is the reciprocal of a positive integer.
[0081] Furthermore, the setting unit 1002 is further configured to obtain display content on the screen of the electronic device; and set a target reporting rate of the electronic device based on the display content and the target refresh rate.
[0082] Furthermore, the setting unit 1002 is also used to determine the application corresponding to the displayed content; determine the touch frequency of the application; and set the target reporting rate of the electronic device based on the touch frequency and the target refresh rate, wherein the target reporting rate is positively correlated with the touch frequency.
[0083] Furthermore, the setting unit 1002 is further configured to obtain an interface type corresponding to the display content; and to set a target reporting rate of the electronic device based on the interface type and the target refresh rate.
[0084] The collection unit 1003 is used to collect touch points acting on the screen of the electronic device based on the target reporting rate, so that the number of touch points collected based on the target reporting rate between any two target screen refresh intervals is the same, wherein the electronic device can collect touch points between two consecutive screen refresh operations corresponding to the target screen refresh interval.
[0085] Furthermore, the reporting rate setting device 1000 also includes an updating unit, which is used to use the updated screen refresh rate as a new target refresh rate when it is detected that the screen refresh rate of the electronic device is updated, and return to execute the operation of setting the target reporting rate of the electronic device based on the target refresh rate and subsequent operations.
[0086] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0087] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0088] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0089] Please refer to Fig.11 , which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be an electronic device capable of running applications, such as a smart phone, a tablet computer, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more programs are configured to execute the method described in the aforementioned method embodiment.
[0090] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0091] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.
[0092] Please refer to Fig.12 , which shows a structural block diagram of a computer-readable medium provided in an embodiment of the present application. The computer-readable medium 1200 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0093] The computer readable medium 1200 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable medium 1200 includes a non-transitory computer-readable storage medium. The computer readable medium 1200 has storage space for program code 1210 that performs any method step of the above method. These program codes can be read from or written to one or more computer program products. The program code 1210 can be compressed, for example, in an appropriate form.
[0094] In summary, the reporting rate setting method, device, electronic device and computer-readable medium provided in the present application obtain the target refresh rate of the screen of the electronic device; based on the target refresh rate, set the target reporting rate of the electronic device, and collect touch points acting on the screen of the electronic device based on the target reporting rate, so that the number of touch points collected based on the target reporting rate between any two target screen refresh intervals is the same, wherein the electronic device can collect touch points between two consecutive screen refresh operations corresponding to the target screen refresh interval. Therefore, based on the reporting rate adjusted after the screen refresh rate, the number of touch points collected based on the target reporting rate in all screen refresh intervals corresponding to the collected touch points can be made the same, thereby avoiding the lack of consistency in the change of the touch position felt by the user due to the different number of touch points collected between two consecutive screen refresh operations.
[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for setting a reporting rate, characterized in that: Applied to electronic equipment, the method comprises: Obtaining a target refresh rate of a screen of the electronic device; Based on the target refresh rate, setting a target reporting rate of the electronic device; Touch points acting on the screen of the electronic device are collected based on the target reporting rate so that the number of touch points collected based on the target reporting rate between any two target screen refresh intervals is the same, wherein the electronic device can collect touch points between two consecutive screen refresh operations corresponding to the target screen refresh interval.
2. The method according to claim 1, characterized in that The target reporting rate of the electronic device is set based on the target refresh rate, including: The product of the target refresh rate and the first weight is used as the target reporting rate, wherein the first weight is a positive integer.
3. The method according to claim 1, characterized in that The target reporting rate of the electronic device is set based on the target refresh rate, including: The product of the target refresh rate and the second weight is used as the target reporting rate, wherein the second weight is the reciprocal of a positive integer.
4. The method according to claim 1, characterized in that: The obtaining of the target refresh rate of the electronic device includes: When a sliding operation acting on the screen of the electronic device is detected, a target refresh rate of the electronic device is obtained.
5. The method according to claim 1, characterized in that After collecting the touch points acting on the screen of the electronic device based on the target reporting rate, the method further includes: When it is detected that the screen refresh rate of the electronic device is updated, the updated screen refresh rate is used as the new target refresh rate, and the operation of setting the target reporting rate of the electronic device based on the target refresh rate and subsequent operations are returned.
6. The method according to any one of claims 1 to 5, characterized in that: The step of setting a target reporting rate of the electronic device based on the target refresh rate includes: Acquiring display content on the screen of the electronic device; A target reporting rate of the electronic device is set based on the display content and the target refresh rate.
7. The method according to claim 6, characterized in that The step of setting a target reporting rate of the electronic device based on the display content and the target refresh rate includes: Determining an application corresponding to the displayed content; determining a touch frequency of the application; Based on the touch frequency and the target refresh rate, a target reporting rate of the electronic device is set, wherein the target reporting rate is positively correlated with the touch frequency.
8. The method according to claim 6, characterized in that The step of setting a target reporting rate of the electronic device based on the display content and the target refresh rate includes: Obtaining the interface type corresponding to the display content; Based on the interface type and the target refresh rate, a target reporting rate of the electronic device is set.
9. A reporting rate setting device, characterized in that: Applied to electronic equipment, the device comprises: An acquisition unit, configured to acquire a target refresh rate of a screen of the electronic device; A setting unit, configured to set a target reporting rate of the electronic device based on the target refresh rate; A collection unit is used to collect touch points acting on the screen of the electronic device based on the target reporting rate, so that the number of touch points collected based on the target reporting rate between any two target screen refresh intervals is the same, wherein the electronic device can collect touch points between two consecutive screen refresh operations corresponding to the target screen refresh interval.
10. An electronic device, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method according to any one of claims 1-8.
11. A computer readable medium, characterized in that The computer-readable medium stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the method according to any one of claims 1 to 21.
